@dropins/storefront-cart 1.5.0-beta2 → 1.5.0-beta3

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.
@@ -1,4 +1,4 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{jsx as i,jsxs as m,Fragment as j}from"@dropins/tools/preact-jsx-runtime.js";import{useState as w,useEffect as O,useCallback as B}from"@dropins/tools/preact-compat.js";import{classes as h,VComponent as u,Slot as y}from"@dropins/tools/lib.js";import{g as V}from"../chunks/persisted-data.js";import{events as $}from"@dropins/tools/event-bus.js";import{Button as L,Price as N}from"@dropins/tools/components.js";/* empty css */import{useText as D}from"@dropins/tools/i18n.js";import"@dropins/tools/preact-hooks.js";import{s as b}from"../chunks/resetCart.js";import{a as q}from"../chunks/acdl.js";import{u as z}from"../chunks/updateProductsFromCart.js";import"../chunks/CartSummaryGrid.js";import{C as J}from"../chunks/CartSummaryList.js";import"../chunks/OrderSummary.js";import"../chunks/CartSummaryTable2.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/refreshCart.js";import"../fragments.js";import"../chunks/EmptyCart2.js";import"../chunks/createGuestCart.js";import"../chunks/WarningWithCircle.js";import"../chunks/ChevronDown.js";import"../chunks/getEstimatedTotals.js";import"../chunks/OrderSummaryLine.js";import"../chunks/ChevronUp.js";import"../chunks/Coupon.js";import"../chunks/GiftCard.js";import"../chunks/EmptyCart.js";import"../chunks/Close.js";const K=({className:_,products:s,productListFooter:l,subtotal:e,subtotalExcludingTaxes:d,preCheckoutSection:o,ctas:n,...f})=>{const p=D({subtotal:"Cart.MiniCart.subtotal",subtotalExcludingTaxes:"Cart.MiniCart.subtotalExcludingTaxes"});return i("div",{...f,className:h(["cart-mini-cart",_]),children:s&&m(j,{children:[i("div",{className:"cart-mini-cart__products","data-testid":"mini-cart-products-wrapper",children:s}),l&&i("div",{className:h(["cart-mini-cart__productListFooter"]),"data-testid":"mini-cart-product-list-footer",children:i(u,{node:l})}),m("div",{className:"cart-mini-cart__footer","data-testid":"mini-cart-subtotals",children:[e&&m("div",{className:"cart-mini-cart__footer__estimated-total","data-testid":"mini-cart-subtotal",children:[p.subtotal,i(u,{node:e})]}),d&&m("div",{className:"cart-mini-cart__footer__estimated-total-excluding-taxes","data-testid":"mini-cart-subtotal-excluding-taxes",children:[p.subtotalExcludingTaxes,i(u,{node:d,className:h(["dropin-price-summary__price","dropin-price-summary__price--muted"])})]}),o&&i("div",{className:h(["cart-mini-cart__preCheckoutSection"]),"data-testid":"mini-cart-pre-checkout-section",children:i(u,{node:o})}),n&&i(u,{node:n,className:"cart-mini-cart__footer__ctas"})]})]})})},W=({children:_,initialData:s=null,hideFooter:l=!0,slots:e,routeProduct:d,routeCart:o,routeCheckout:n,routeEmptyCartCTA:f,showDiscount:p,showSavings:P,enableItemRemoval:S=!0,enableQuantityUpdate:T=!1,hideHeading:M=!1,undo:Q=!1,...U})=>{var v,k,I;const[t,E]=w(s),a=(v=b.config)==null?void 0:v.shoppingCartDisplaySetting;O(()=>{const r=$.on("cart/data",x=>{E(x)},{eager:!0});return()=>{r==null||r.off()}},[]);const g=D({cartLink:"Cart.MiniCart.cartLink",checkoutLink:"Cart.MiniCart.checkoutLink"}),C=(r,x)=>z([{uid:r,quantity:x}]),F=r=>C(r,0),c=t==null?void 0:t.hasOutOfStockItems,G=B(()=>{t&&!c&&q(t,b.locale)},[t,c]),X=i(y,{name:"ProductList",slot:e==null?void 0:e.ProductList,context:{itemQuantityUpdateHandler:C,itemRemoveHandler:F,totalQuantity:t==null?void 0:t.totalQuantity},children:i(J,{"data-testid":"default-cart-summary-list",routeProduct:d,routeEmptyCartCTA:f,initialData:t,maxItems:(k=b.config)==null?void 0:k.miniCartMaxItemsDisplay,showMaxItems:!!((I=b.config)!=null&&I.miniCartMaxItemsDisplay),hideHeading:M||!(t!=null&&t.totalQuantity),hideFooter:l,enableRemoveItem:S,enableUpdateItemQuantity:T,showDiscount:p,showSavings:P,undo:Q,slots:{Thumbnail:e==null?void 0:e.Thumbnail}})}),A=r=>i(y,{name:"ProductListFooter",slot:e==null?void 0:e.ProductListFooter,context:{data:r}}),H=r=>i(y,{name:"PreCheckoutSection",slot:e==null?void 0:e.PreCheckoutSection,context:{data:r}}),R=()=>(a==null?void 0:a.subtotal)==="INCLUDING_TAX"||(a==null?void 0:a.subtotal)==="INCLUDING_EXCLUDING_TAX"?{amount:t==null?void 0:t.subtotal.includingTax.value,currency:t==null?void 0:t.subtotal.includingTax.currency,"data-testid":"subtotal-including-tax",style:{font:"inherit"}}:{amount:t==null?void 0:t.subtotal.excludingTax.value,currency:t==null?void 0:t.subtotal.excludingTax.currency,"data-testid":"subtotal-excluding-tax",style:{font:"inherit"}};return i(K,{...U,productListFooter:A(t),subtotal:t!=null&&t.totalQuantity?(t==null?void 0:t.subtotal)&&i(N,{...R()}):void 0,subtotalExcludingTaxes:t!=null&&t.totalQuantity?(t==null?void 0:t.subtotal)&&((a==null?void 0:a.subtotal)==="INCLUDING_EXCLUDING_TAX"?i(N,{amount:t==null?void 0:t.subtotal.excludingTax.value,currency:t==null?void 0:t.subtotal.excludingTax.currency,"data-testid":"subtotal-including-excluding-tax",style:{font:"inherit"}}):void 0):void 0,preCheckoutSection:H(t),ctas:t!=null&&t.totalQuantity?m("div",{children:[n&&i(L,{"data-testid":"route-checkout-button",variant:"primary",href:c?void 0:n(),disabled:c,"aria-disabled":c,onClick:G,children:g.checkoutLink}),o&&i(L,{"data-testid":"route-cart-button",variant:"tertiary",href:o(),children:g.cartLink})]}):void 0,products:X})};W.getInitialData=async function(){return V()};export{W as MiniCart,W as default};
3
+ import{jsx as e,jsxs as o,Fragment as j}from"@dropins/tools/preact-jsx-runtime.js";import{useState as w,useEffect as O,useCallback as V}from"@dropins/tools/preact-compat.js";import{classes as y,VComponent as u,Slot as x}from"@dropins/tools/lib.js";import{g as $}from"../chunks/persisted-data.js";import{events as q}from"@dropins/tools/event-bus.js";import{Button as N,Price as P}from"@dropins/tools/components.js";/* empty css */import{useText as S}from"@dropins/tools/i18n.js";import"@dropins/tools/preact-hooks.js";import{s as I}from"../chunks/resetCart.js";import{a as z}from"../chunks/acdl.js";import{u as J}from"../chunks/updateProductsFromCart.js";import"../chunks/CartSummaryGrid.js";import{C as K}from"../chunks/CartSummaryList.js";import"../chunks/OrderSummary.js";import"../chunks/CartSummaryTable2.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/refreshCart.js";import"../fragments.js";import"../chunks/EmptyCart2.js";import"../chunks/createGuestCart.js";import"../chunks/Trash.js";import"../chunks/ChevronDown.js";import"../chunks/getEstimatedTotals.js";import"../chunks/OrderSummaryLine.js";import"../chunks/ChevronUp.js";import"../chunks/Coupon.js";import"../chunks/GiftCard.js";import"../chunks/EmptyCart.js";import"../chunks/Close.js";const W=({className:C,products:d,productListFooter:p,subtotal:t,subtotalExcludingTaxes:h,preCheckoutSection:n,ctas:c,...l})=>{const b=S({subtotal:"Cart.MiniCart.subtotal",subtotalExcludingTaxes:"Cart.MiniCart.subtotalExcludingTaxes"});return e("div",{...l,className:y(["cart-mini-cart",C]),children:d&&o(j,{children:[e("div",{className:"cart-mini-cart__products","data-testid":"mini-cart-products-wrapper",children:d}),p&&e("div",{className:y(["cart-mini-cart__productListFooter"]),"data-testid":"mini-cart-product-list-footer",children:e(u,{node:p})}),o("div",{className:"cart-mini-cart__footer","data-testid":"mini-cart-subtotals",children:[t&&o("div",{className:"cart-mini-cart__footer__estimated-total","data-testid":"mini-cart-subtotal",children:[b.subtotal,e(u,{node:t})]}),h&&o("div",{className:"cart-mini-cart__footer__estimated-total-excluding-taxes","data-testid":"mini-cart-subtotal-excluding-taxes",children:[b.subtotalExcludingTaxes,e(u,{node:h,className:y(["dropin-price-summary__price","dropin-price-summary__price--muted"])})]}),n&&e("div",{className:y(["cart-mini-cart__preCheckoutSection"]),"data-testid":"mini-cart-pre-checkout-section",children:e(u,{node:n})}),c&&e(u,{node:c,className:"cart-mini-cart__footer__ctas"})]})]})})},Y=({children:C,initialData:d=null,hideFooter:p=!0,slots:t,routeProduct:h,routeCart:n,routeCheckout:c,routeEmptyCartCTA:l,showDiscount:b,showSavings:T,enableItemRemoval:D=!0,enableQuantityUpdate:Q=!1,hideHeading:F=!1,undo:U=!1,...E})=>{var v,k,L;const[i,M]=w(d),a=(v=I.config)==null?void 0:v.shoppingCartDisplaySetting;O(()=>{const r=q.on("cart/data",f=>{M(f)},{eager:!0});return()=>{r==null||r.off()}},[]);const _=S({cartLink:"Cart.MiniCart.cartLink",checkoutLink:"Cart.MiniCart.checkoutLink"}),g=(r,f)=>J([{uid:r,quantity:f}]),A=r=>g(r,0),m=i==null?void 0:i.hasOutOfStockItems,G=V(()=>{i&&!m&&z(i,I.locale)},[i,m]),H=e(x,{name:"ProductList",slot:t==null?void 0:t.ProductList,context:{itemQuantityUpdateHandler:g,itemRemoveHandler:A,totalQuantity:i==null?void 0:i.totalQuantity},children:e(K,{"data-testid":"default-cart-summary-list",routeProduct:h,routeEmptyCartCTA:l,initialData:i,maxItems:(k=I.config)==null?void 0:k.miniCartMaxItemsDisplay,showMaxItems:!!((L=I.config)!=null&&L.miniCartMaxItemsDisplay),hideHeading:F||!(i!=null&&i.totalQuantity),hideFooter:p,enableRemoveItem:D,enableUpdateItemQuantity:Q,showDiscount:b,showSavings:T,undo:U,slots:{Thumbnail:t==null?void 0:t.Thumbnail,Heading:t==null?void 0:t.Heading,EmptyCart:t==null?void 0:t.EmptyCart,Footer:t==null?void 0:t.Footer,ProductAttributes:t==null?void 0:t.ProductAttributes,CartSummaryFooter:t==null?void 0:t.CartSummaryFooter,CartItem:t==null?void 0:t.CartItem,UndoBanner:t==null?void 0:t.UndoBanner,ItemTitle:t==null?void 0:t.ItemTitle,ItemPrice:t==null?void 0:t.ItemPrice,ItemQuantity:t==null?void 0:t.ItemQuantity,ItemTotal:t==null?void 0:t.ItemTotal,ItemSku:t==null?void 0:t.ItemSku,ItemRemoveAction:t==null?void 0:t.ItemRemoveAction}})}),R=r=>e(x,{name:"ProductListFooter",slot:t==null?void 0:t.ProductListFooter,context:{data:r}}),X=r=>e(x,{name:"PreCheckoutSection",slot:t==null?void 0:t.PreCheckoutSection,context:{data:r}}),B=()=>(a==null?void 0:a.subtotal)==="INCLUDING_TAX"||(a==null?void 0:a.subtotal)==="INCLUDING_EXCLUDING_TAX"?{amount:i==null?void 0:i.subtotal.includingTax.value,currency:i==null?void 0:i.subtotal.includingTax.currency,"data-testid":"subtotal-including-tax",style:{font:"inherit"}}:{amount:i==null?void 0:i.subtotal.excludingTax.value,currency:i==null?void 0:i.subtotal.excludingTax.currency,"data-testid":"subtotal-excluding-tax",style:{font:"inherit"}};return e(W,{...E,productListFooter:R(i),subtotal:i!=null&&i.totalQuantity?(i==null?void 0:i.subtotal)&&e(P,{...B()}):void 0,subtotalExcludingTaxes:i!=null&&i.totalQuantity?(i==null?void 0:i.subtotal)&&((a==null?void 0:a.subtotal)==="INCLUDING_EXCLUDING_TAX"?e(P,{amount:i==null?void 0:i.subtotal.excludingTax.value,currency:i==null?void 0:i.subtotal.excludingTax.currency,"data-testid":"subtotal-including-excluding-tax",style:{font:"inherit"}}):void 0):void 0,preCheckoutSection:X(i),ctas:i!=null&&i.totalQuantity?o("div",{children:[c&&e(N,{"data-testid":"route-checkout-button",variant:"primary",href:m?void 0:c(),disabled:m,"aria-disabled":m,onClick:G,children:_.checkoutLink}),n&&e(N,{"data-testid":"route-cart-button",variant:"tertiary",href:n(),children:_.cartLink})]}):void 0,products:H})};Y.getInitialData=async function(){return $()};export{Y as MiniCart,Y as default};
4
4
  //# sourceMappingURL=MiniCart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MiniCart.js","sources":["/@dropins/storefront-cart/src/components/MiniCart/MiniCart.tsx","/@dropins/storefront-cart/src/containers/MiniCart/MiniCart.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@/cart/components/MiniCart/MiniCart.css';\n\nexport interface MiniCartProps extends HTMLAttributes<HTMLDivElement> {\n products?: VNode;\n productListFooter?: VNode;\n subtotal?: VNode;\n subtotalExcludingTaxes?: VNode;\n preCheckoutSection?: VNode;\n ctas?: VNode;\n}\n\nexport const MiniCart: FunctionComponent<MiniCartProps> = ({\n className,\n products,\n productListFooter,\n subtotal,\n subtotalExcludingTaxes,\n preCheckoutSection,\n ctas,\n ...props\n}) => {\n const dictionary = useText({\n subtotal: 'Cart.MiniCart.subtotal',\n subtotalExcludingTaxes: 'Cart.MiniCart.subtotalExcludingTaxes',\n });\n\n return (\n <div {...props} className={classes(['cart-mini-cart', className])}>\n {/* Content */}\n {products && (\n <>\n <div\n className=\"cart-mini-cart__products\"\n data-testid=\"mini-cart-products-wrapper\"\n >\n {products}\n </div>\n\n {/* Product List Footer */}\n {productListFooter && (\n <div\n className={classes(['cart-mini-cart__productListFooter'])}\n data-testid=\"mini-cart-product-list-footer\"\n >\n <VComponent node={productListFooter} />\n </div>\n )}\n\n <div\n className=\"cart-mini-cart__footer\"\n data-testid=\"mini-cart-subtotals\"\n >\n {/* Subtotal */}\n {subtotal && (\n <div\n className=\"cart-mini-cart__footer__estimated-total\"\n data-testid=\"mini-cart-subtotal\"\n >\n {dictionary.subtotal}\n <VComponent node={subtotal} />\n </div>\n )}\n {/* Subtotal Excluding Taxes */}\n {subtotalExcludingTaxes && (\n <div\n className=\"cart-mini-cart__footer__estimated-total-excluding-taxes\"\n data-testid=\"mini-cart-subtotal-excluding-taxes\"\n >\n {dictionary.subtotalExcludingTaxes}\n <VComponent\n node={subtotalExcludingTaxes}\n className={classes([\n 'dropin-price-summary__price',\n 'dropin-price-summary__price--muted',\n ])}\n />\n </div>\n )}\n\n {/* Pre-checkout section */}\n {preCheckoutSection && (\n <div\n className={classes(['cart-mini-cart__preCheckoutSection'])}\n data-testid=\"mini-cart-pre-checkout-section\"\n >\n <VComponent node={preCheckoutSection} />\n </div>\n )}\n\n {ctas && (\n <VComponent\n node={ctas}\n className=\"cart-mini-cart__footer__ctas\"\n />\n )}\n </div>\n </>\n )}\n </div>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n HTMLAttributes,\n useCallback,\n useEffect,\n useState,\n} from 'preact/compat';\nimport { Container, Slot, SlotProps } from '@adobe-commerce/elsie/lib';\nimport { CartModel } from '@/cart/data/models';\nimport { getPersistedCartData } from '@/cart/lib/persisted-data';\nimport { events } from '@adobe-commerce/event-bus';\nimport { MiniCart as MiniCartComponent } from '@/cart/components';\nimport { CartSummaryList } from '@/cart/containers';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Button, ImageProps, Price } from '@adobe-commerce/elsie/components';\nimport { updateProductsFromCart } from '@/cart/api';\nimport { publishInitiateCheckoutEvent } from '@/cart/lib/acdl';\nimport { state } from '@/cart/lib/state';\n\nexport interface MiniCartProps extends HTMLAttributes<HTMLDivElement> {\n routeProduct?: (item: CartModel['items'][0]) => string;\n routeCart?: () => string;\n routeCheckout?: () => string;\n routeEmptyCartCTA?: () => string;\n slots?: {\n ProductList?: SlotProps;\n ProductListFooter?: SlotProps;\n PreCheckoutSection?: SlotProps;\n Thumbnail?: SlotProps<{ \n item: CartModel['items'][number], \n defaultImageProps: ImageProps \n }>;\n };\n hideFooter?: boolean;\n displayAllItems?: boolean;\n showDiscount?: boolean;\n showSavings?: boolean;\n enableItemRemoval?: boolean;\n enableQuantityUpdate?: boolean;\n hideHeading?: boolean;\n undo?: boolean;\n}\n\nexport const MiniCart: Container<MiniCartProps, CartModel | null> = ({\n children,\n initialData = null,\n hideFooter = true, // Default to true for MiniCart\n slots,\n routeProduct,\n routeCart,\n routeCheckout,\n routeEmptyCartCTA,\n showDiscount,\n showSavings,\n enableItemRemoval = true, // Default to true for MiniCart\n enableQuantityUpdate = false, // Default to false for MiniCart\n hideHeading = false, // Default to false for MiniCart\n undo = false,\n ...props\n}) => {\n const [data, setData] = useState<CartModel | null>(initialData);\n const cartTaxesConfig = state.config?.shoppingCartDisplaySetting;\n\n useEffect(() => {\n const event = events.on(\n 'cart/data',\n (payload) => {\n setData(payload as CartModel);\n },\n { eager: true }\n );\n\n return () => {\n event?.off();\n };\n }, []);\n\n const dictionary = useText({\n cartLink: 'Cart.MiniCart.cartLink',\n checkoutLink: 'Cart.MiniCart.checkoutLink',\n });\n\n const handleItemQuantityUpdate = (uid: string, quantity: number) => {\n return updateProductsFromCart([{ uid, quantity }]);\n };\n\n const handleItemRemove = (uid: string) => handleItemQuantityUpdate(uid, 0);\n\n const checkoutLinkDisabled = data?.hasOutOfStockItems;\n\n const handleInitiateCheckout = useCallback(() => {\n if (data && !checkoutLinkDisabled) {\n publishInitiateCheckoutEvent(data, state.locale);\n }\n }, [data, checkoutLinkDisabled]);\n\n const productList = (\n <Slot\n name=\"ProductList\"\n slot={slots?.ProductList}\n context={{\n itemQuantityUpdateHandler: handleItemQuantityUpdate,\n itemRemoveHandler: handleItemRemove,\n totalQuantity: data?.totalQuantity,\n }}\n >\n <CartSummaryList\n data-testid=\"default-cart-summary-list\"\n routeProduct={routeProduct}\n routeEmptyCartCTA={routeEmptyCartCTA}\n initialData={data}\n maxItems={state.config?.miniCartMaxItemsDisplay}\n showMaxItems={!!state.config?.miniCartMaxItemsDisplay}\n hideHeading={hideHeading || !data?.totalQuantity}\n hideFooter={hideFooter}\n enableRemoveItem={enableItemRemoval}\n enableUpdateItemQuantity={enableQuantityUpdate}\n showDiscount={showDiscount}\n showSavings={showSavings}\n undo={undo}\n slots={{\n Thumbnail: slots?.Thumbnail,\n }}\n />\n </Slot>\n );\n\n const getProductListFooter = (data: CartModel | null) => {\n return (\n <Slot\n name=\"ProductListFooter\"\n slot={slots?.ProductListFooter}\n context={{\n data,\n }}\n />\n );\n };\n\n const getPreCheckoutSection = (data: CartModel | null) => {\n return (\n <Slot\n name=\"PreCheckoutSection\"\n slot={slots?.PreCheckoutSection}\n context={{\n data,\n }}\n />\n );\n };\n\n const getSubtotalPriceProps = () =>\n cartTaxesConfig?.subtotal === 'INCLUDING_TAX' ||\n cartTaxesConfig?.subtotal === 'INCLUDING_EXCLUDING_TAX'\n ? {\n amount: data?.subtotal.includingTax.value,\n currency: data?.subtotal.includingTax.currency,\n 'data-testid': 'subtotal-including-tax',\n style: { font: 'inherit' },\n }\n : {\n amount: data?.subtotal.excludingTax.value,\n currency: data?.subtotal.excludingTax.currency,\n 'data-testid': 'subtotal-excluding-tax',\n style: { font: 'inherit' },\n };\n\n return (\n <MiniCartComponent\n {...props}\n productListFooter={getProductListFooter(data)}\n subtotal={\n !data?.totalQuantity\n ? undefined\n : data?.subtotal && <Price {...getSubtotalPriceProps()} />\n }\n subtotalExcludingTaxes={\n !data?.totalQuantity\n ? undefined\n : data?.subtotal &&\n (cartTaxesConfig?.subtotal === 'INCLUDING_EXCLUDING_TAX' ? (\n <Price\n amount={data?.subtotal.excludingTax.value}\n currency={data?.subtotal.excludingTax.currency}\n data-testid=\"subtotal-including-excluding-tax\"\n style={{ font: 'inherit' }}\n />\n ) : undefined)\n }\n preCheckoutSection={getPreCheckoutSection(data)}\n ctas={\n !data?.totalQuantity ? undefined : (\n <div>\n {routeCheckout && (\n <Button\n data-testid=\"route-checkout-button\"\n variant=\"primary\"\n href={checkoutLinkDisabled ? undefined : routeCheckout()}\n disabled={checkoutLinkDisabled}\n aria-disabled={checkoutLinkDisabled}\n onClick={handleInitiateCheckout}\n >\n {dictionary.checkoutLink}\n </Button>\n )}\n {routeCart && (\n <Button\n data-testid=\"route-cart-button\"\n variant=\"tertiary\"\n href={routeCart()}\n >\n {dictionary.cartLink}\n </Button>\n )}\n </div>\n )\n }\n products={productList}\n />\n );\n};\n\nMiniCart.getInitialData = async function () {\n return getPersistedCartData();\n};\n"],"names":["MiniCart","className","products","productListFooter","subtotal","subtotalExcludingTaxes","preCheckoutSection","ctas","props","dictionary","useText","jsx","classes","jsxs","Fragment","VComponent","children","initialData","hideFooter","slots","routeProduct","routeCart","routeCheckout","routeEmptyCartCTA","showDiscount","showSavings","enableItemRemoval","enableQuantityUpdate","hideHeading","undo","data","setData","useState","cartTaxesConfig","_a","state","useEffect","event","events","payload","handleItemQuantityUpdate","uid","quantity","updateProductsFromCart","handleItemRemove","checkoutLinkDisabled","handleInitiateCheckout","useCallback","publishInitiateCheckoutEvent","productList","Slot","CartSummaryList","_b","_c","getProductListFooter","getPreCheckoutSection","getSubtotalPriceProps","MiniCartComponent","Price","Button","getPersistedCartData"],"mappings":"mxCAiCO,MAAMA,EAA6C,CAAC,CACzD,UAAAC,EACA,SAAAC,EACA,kBAAAC,EACA,SAAAC,EACA,uBAAAC,EACA,mBAAAC,EACA,KAAAC,EACA,GAAGC,CACL,IAAM,CACJ,MAAMC,EAAaC,EAAQ,CACzB,SAAU,yBACV,uBAAwB,sCAAA,CACzB,EAED,OACGC,EAAA,MAAA,CAAK,GAAGH,EAAO,UAAWI,EAAQ,CAAC,iBAAkBX,CAAS,CAAC,EAE7D,SAAAC,GAEGW,EAAAC,EAAA,CAAA,SAAA,CAAAH,EAAC,MAAA,CACC,UAAU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SAAWZ,EAAA,QAAA,CAAA,CACd,EAEJ,EAvBqB,OA0BzB,SAAUwC,CAAA,CACZ,CAEJ,EAEAjD,EAAS,eAAiB,gBAAkB,CAC1C,OAAO4D,EAAqB,CAC9B"}
1
+ {"version":3,"file":"MiniCart.js","sources":["/@dropins/storefront-cart/src/components/MiniCart/MiniCart.tsx","/@dropins/storefront-cart/src/containers/MiniCart/MiniCart.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@/cart/components/MiniCart/MiniCart.css';\n\nexport interface MiniCartProps extends HTMLAttributes<HTMLDivElement> {\n products?: VNode;\n productListFooter?: VNode;\n subtotal?: VNode;\n subtotalExcludingTaxes?: VNode;\n preCheckoutSection?: VNode;\n ctas?: VNode;\n}\n\nexport const MiniCart: FunctionComponent<MiniCartProps> = ({\n className,\n products,\n productListFooter,\n subtotal,\n subtotalExcludingTaxes,\n preCheckoutSection,\n ctas,\n ...props\n}) => {\n const dictionary = useText({\n subtotal: 'Cart.MiniCart.subtotal',\n subtotalExcludingTaxes: 'Cart.MiniCart.subtotalExcludingTaxes',\n });\n\n return (\n <div {...props} className={classes(['cart-mini-cart', className])}>\n {/* Content */}\n {products && (\n <>\n <div\n className=\"cart-mini-cart__products\"\n data-testid=\"mini-cart-products-wrapper\"\n >\n {products}\n </div>\n\n {/* Product List Footer */}\n {productListFooter && (\n <div\n className={classes(['cart-mini-cart__productListFooter'])}\n data-testid=\"mini-cart-product-list-footer\"\n >\n <VComponent node={productListFooter} />\n </div>\n )}\n\n <div\n className=\"cart-mini-cart__footer\"\n data-testid=\"mini-cart-subtotals\"\n >\n {/* Subtotal */}\n {subtotal && (\n <div\n className=\"cart-mini-cart__footer__estimated-total\"\n data-testid=\"mini-cart-subtotal\"\n >\n {dictionary.subtotal}\n <VComponent node={subtotal} />\n </div>\n )}\n {/* Subtotal Excluding Taxes */}\n {subtotalExcludingTaxes && (\n <div\n className=\"cart-mini-cart__footer__estimated-total-excluding-taxes\"\n data-testid=\"mini-cart-subtotal-excluding-taxes\"\n >\n {dictionary.subtotalExcludingTaxes}\n <VComponent\n node={subtotalExcludingTaxes}\n className={classes([\n 'dropin-price-summary__price',\n 'dropin-price-summary__price--muted',\n ])}\n />\n </div>\n )}\n\n {/* Pre-checkout section */}\n {preCheckoutSection && (\n <div\n className={classes(['cart-mini-cart__preCheckoutSection'])}\n data-testid=\"mini-cart-pre-checkout-section\"\n >\n <VComponent node={preCheckoutSection} />\n </div>\n )}\n\n {ctas && (\n <VComponent\n node={ctas}\n className=\"cart-mini-cart__footer__ctas\"\n />\n )}\n </div>\n </>\n )}\n </div>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n HTMLAttributes,\n useCallback,\n useEffect,\n useState,\n} from 'preact/compat';\nimport { Container, Slot, SlotProps } from '@adobe-commerce/elsie/lib';\nimport { CartModel } from '@/cart/data/models';\nimport { getPersistedCartData } from '@/cart/lib/persisted-data';\nimport { events } from '@adobe-commerce/event-bus';\nimport { MiniCart as MiniCartComponent } from '@/cart/components';\nimport { CartSummaryList } from '@/cart/containers';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Button, ImageProps, Price } from '@adobe-commerce/elsie/components';\nimport { updateProductsFromCart } from '@/cart/api';\nimport { publishInitiateCheckoutEvent } from '@/cart/lib/acdl';\nimport { state } from '@/cart/lib/state';\n\nexport interface MiniCartProps extends HTMLAttributes<HTMLDivElement> {\n routeProduct?: (item: CartModel['items'][0]) => string;\n routeCart?: () => string;\n routeCheckout?: () => string;\n routeEmptyCartCTA?: () => string;\n slots?: {\n ProductList?: SlotProps;\n ProductListFooter?: SlotProps;\n PreCheckoutSection?: SlotProps;\n Thumbnail?: SlotProps<{\n item: CartModel['items'][number];\n defaultImageProps: ImageProps;\n }>;\n Heading?: SlotProps;\n EmptyCart?: SlotProps;\n Footer?: SlotProps;\n ProductAttributes?: SlotProps;\n CartSummaryFooter?: SlotProps;\n CartItem?: SlotProps; // For backward compatibility\n UndoBanner?: SlotProps<{\n item: CartModel['items'][0];\n loading: boolean;\n error?: string;\n onUndo: () => void;\n onDismiss: () => void;\n }>;\n ItemTitle?: SlotProps<{ item: CartModel['items'][number] }>;\n ItemPrice?: SlotProps<{ item: CartModel['items'][number] }>;\n ItemQuantity?: SlotProps<{\n item: CartModel['items'][number];\n enableUpdateItemQuantity: boolean;\n handleItemQuantityUpdate: (\n item: CartModel['items'][number],\n quantity: number\n ) => void;\n itemsLoading: Set<string>;\n handleItemsError: (uid: string, message?: string) => void;\n handleItemsLoading: (uid: string, state: boolean) => void;\n onItemUpdate?: ({ item }: { item: CartModel['items'][number] }) => void;\n }>;\n ItemTotal?: SlotProps<{ item: CartModel['items'][number] }>;\n ItemSku?: SlotProps<{ item: CartModel['items'][number] }>;\n ItemRemoveAction?: SlotProps<{\n item: CartModel['items'][number];\n enableRemoveItem: boolean;\n handleItemQuantityUpdate: (\n item: CartModel['items'][number],\n quantity: number\n ) => void;\n handleItemsError: (uid: string, message?: string) => void;\n handleItemsLoading: (uid: string, state: boolean) => void;\n onItemUpdate?: ({ item }: { item: CartModel['items'][number] }) => void;\n itemsLoading: Set<string>;\n }>;\n };\n hideFooter?: boolean;\n displayAllItems?: boolean;\n showDiscount?: boolean;\n showSavings?: boolean;\n enableItemRemoval?: boolean;\n enableQuantityUpdate?: boolean;\n hideHeading?: boolean;\n undo?: boolean;\n}\n\nexport const MiniCart: Container<MiniCartProps, CartModel | null> = ({\n children,\n initialData = null,\n hideFooter = true, // Default to true for MiniCart\n slots,\n routeProduct,\n routeCart,\n routeCheckout,\n routeEmptyCartCTA,\n showDiscount,\n showSavings,\n enableItemRemoval = true, // Default to true for MiniCart\n enableQuantityUpdate = false, // Default to false for MiniCart\n hideHeading = false, // Default to false for MiniCart\n undo = false,\n ...props\n}) => {\n const [data, setData] = useState<CartModel | null>(initialData);\n const cartTaxesConfig = state.config?.shoppingCartDisplaySetting;\n\n useEffect(() => {\n const event = events.on(\n 'cart/data',\n (payload) => {\n setData(payload as CartModel);\n },\n { eager: true }\n );\n\n return () => {\n event?.off();\n };\n }, []);\n\n const dictionary = useText({\n cartLink: 'Cart.MiniCart.cartLink',\n checkoutLink: 'Cart.MiniCart.checkoutLink',\n });\n\n const handleItemQuantityUpdate = (uid: string, quantity: number) => {\n return updateProductsFromCart([{ uid, quantity }]);\n };\n\n const handleItemRemove = (uid: string) => handleItemQuantityUpdate(uid, 0);\n\n const checkoutLinkDisabled = data?.hasOutOfStockItems;\n\n const handleInitiateCheckout = useCallback(() => {\n if (data && !checkoutLinkDisabled) {\n publishInitiateCheckoutEvent(data, state.locale);\n }\n }, [data, checkoutLinkDisabled]);\n\n const productList = (\n <Slot\n name=\"ProductList\"\n slot={slots?.ProductList}\n context={{\n itemQuantityUpdateHandler: handleItemQuantityUpdate,\n itemRemoveHandler: handleItemRemove,\n totalQuantity: data?.totalQuantity,\n }}\n >\n <CartSummaryList\n data-testid=\"default-cart-summary-list\"\n routeProduct={routeProduct}\n routeEmptyCartCTA={routeEmptyCartCTA}\n initialData={data}\n maxItems={state.config?.miniCartMaxItemsDisplay}\n showMaxItems={!!state.config?.miniCartMaxItemsDisplay}\n hideHeading={hideHeading || !data?.totalQuantity}\n hideFooter={hideFooter}\n enableRemoveItem={enableItemRemoval}\n enableUpdateItemQuantity={enableQuantityUpdate}\n showDiscount={showDiscount}\n showSavings={showSavings}\n undo={undo}\n slots={{\n Thumbnail: slots?.Thumbnail,\n Heading: slots?.Heading,\n EmptyCart: slots?.EmptyCart,\n Footer: slots?.Footer,\n ProductAttributes: slots?.ProductAttributes,\n CartSummaryFooter: slots?.CartSummaryFooter,\n CartItem: slots?.CartItem, // Keep for backward compatibility\n UndoBanner: slots?.UndoBanner,\n ItemTitle: slots?.ItemTitle,\n ItemPrice: slots?.ItemPrice,\n ItemQuantity: slots?.ItemQuantity,\n ItemTotal: slots?.ItemTotal,\n ItemSku: slots?.ItemSku,\n ItemRemoveAction: slots?.ItemRemoveAction,\n }}\n />\n </Slot>\n );\n\n const getProductListFooter = (data: CartModel | null) => {\n return (\n <Slot\n name=\"ProductListFooter\"\n slot={slots?.ProductListFooter}\n context={{\n data,\n }}\n />\n );\n };\n\n const getPreCheckoutSection = (data: CartModel | null) => {\n return (\n <Slot\n name=\"PreCheckoutSection\"\n slot={slots?.PreCheckoutSection}\n context={{\n data,\n }}\n />\n );\n };\n\n const getSubtotalPriceProps = () =>\n cartTaxesConfig?.subtotal === 'INCLUDING_TAX' ||\n cartTaxesConfig?.subtotal === 'INCLUDING_EXCLUDING_TAX'\n ? {\n amount: data?.subtotal.includingTax.value,\n currency: data?.subtotal.includingTax.currency,\n 'data-testid': 'subtotal-including-tax',\n style: { font: 'inherit' },\n }\n : {\n amount: data?.subtotal.excludingTax.value,\n currency: data?.subtotal.excludingTax.currency,\n 'data-testid': 'subtotal-excluding-tax',\n style: { font: 'inherit' },\n };\n\n return (\n <MiniCartComponent\n {...props}\n productListFooter={getProductListFooter(data)}\n subtotal={\n !data?.totalQuantity\n ? undefined\n : data?.subtotal && <Price {...getSubtotalPriceProps()} />\n }\n subtotalExcludingTaxes={\n !data?.totalQuantity\n ? undefined\n : data?.subtotal &&\n (cartTaxesConfig?.subtotal === 'INCLUDING_EXCLUDING_TAX' ? (\n <Price\n amount={data?.subtotal.excludingTax.value}\n currency={data?.subtotal.excludingTax.currency}\n data-testid=\"subtotal-including-excluding-tax\"\n style={{ font: 'inherit' }}\n />\n ) : undefined)\n }\n preCheckoutSection={getPreCheckoutSection(data)}\n ctas={\n !data?.totalQuantity ? undefined : (\n <div>\n {routeCheckout && (\n <Button\n data-testid=\"route-checkout-button\"\n variant=\"primary\"\n href={checkoutLinkDisabled ? undefined : routeCheckout()}\n disabled={checkoutLinkDisabled}\n aria-disabled={checkoutLinkDisabled}\n onClick={handleInitiateCheckout}\n >\n {dictionary.checkoutLink}\n </Button>\n )}\n {routeCart && (\n <Button\n data-testid=\"route-cart-button\"\n variant=\"tertiary\"\n href={routeCart()}\n >\n {dictionary.cartLink}\n </Button>\n )}\n </div>\n )\n }\n products={productList}\n />\n );\n};\n\nMiniCart.getInitialData = async function () {\n return getPersistedCartData();\n};\n"],"names":["MiniCart","className","products","productListFooter","subtotal","subtotalExcludingTaxes","preCheckoutSection","ctas","props","dictionary","useText","jsx","classes","jsxs","Fragment","VComponent","children","initialData","hideFooter","slots","routeProduct","routeCart","routeCheckout","routeEmptyCartCTA","showDiscount","showSavings","enableItemRemoval","enableQuantityUpdate","hideHeading","undo","data","setData","useState","cartTaxesConfig","_a","state","useEffect","event","events","payload","handleItemQuantityUpdate","uid","quantity","updateProductsFromCart","handleItemRemove","checkoutLinkDisabled","handleInitiateCheckout","useCallback","publishInitiateCheckoutEvent","productList","Slot","CartSummaryList","_b","_c","getProductListFooter","getPreCheckoutSection","getSubtotalPriceProps","MiniCartComponent","Price","Button","getPersistedCartData"],"mappings":"uwCAiCO,MAAMA,EAA6C,CAAC,CACzD,UAAAC,EACA,SAAAC,EACA,kBAAAC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B8C,EAAqBxB,CAAI,EAC5C,SACGA,GAAA,MAAAA,EAAM,eAEHA,GAAA,YAAAA,EAAM,WAAanB,EAAA+C,EAAA,CAAO,GAAGF,EAAyB,CAAA,CAAA,EADtD,OAGN,uBACG1B,GAAA,MAAAA,EAAM,eAEHA,GAAA,YAAAA,EAAM,aACLG,GAAA,YAAAA,EAAiB,YAAa,0BAC7BtB,EAAC+C,EAAA,CACC,OAAQ5B,GAAA,YAAAA,EAAM,SAAS,aAAa,MACpC,SAAUA,GAAA,YAAAA,EAAM,SAAS,aAAa,SACtC,cAAY,mCACZ,MAAO,CAAE,KAAM,SAAU,CAAA,CAEzB,EAAA,QATJ,OAWN,mBAAoByB,EAAsBzB,CAAI,EAC9C,KACGA,GAAA,MAAAA,EAAM,gBACJ,MACE,CAAA,SAAA,CACCR,GAAAX,EAACgD,EAAA,CACC,cAAY,wBACZ,QAAQ,UACR,KAAMd,EAAuB,OAAYvB,EAAc,EACvD,SAAUuB,EACV,gBAAeA,EACf,QAASC,EAER,SAAWrC,EAAA,YAAA,CACd,EAEDY,GACCV,EAACgD,EAAA,CACC,cAAY,oBACZ,QAAQ,WACR,KAAMtC,EAAU,EAEf,SAAWZ,EAAA,QAAA,CAAA,CACd,EAEJ,EAvBqB,OA0BzB,SAAUwC,CAAA,CACZ,CAEJ,EAEAjD,EAAS,eAAiB,gBAAkB,CAC1C,OAAO4D,EAAqB,CAC9B"}
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name": "@dropins/storefront-cart", "version": "1.5.0-beta2", "@dropins/tools": "^1.4.0-beta3", "license": "SEE LICENSE IN LICENSE.md"}
1
+ {"name": "@dropins/storefront-cart", "version": "1.5.0-beta3", "@dropins/tools": "1.4.0-beta6", "license": "SEE LICENSE IN LICENSE.md"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"WarningWithCircle.js","sources":["../../node_modules/@adobe-commerce/elsie/src/icons/OrderError.svg","../../node_modules/@adobe-commerce/elsie/src/icons/WarningWithCircle.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgOrderError = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { clipPath: \"url(#clip0_4797_15331)\" }, /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", d: \"M10.25 20.91L1.5 17.55V6.51996L10.25 9.92996V20.91Z\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", d: \"M6.24023 4.64001L14.9902 8.06001V11.42\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"path\", { className: \"error-icon\", vectorEffect: \"non-scaling-stroke\", d: \"M19 13.31L15.5 19.37H22.5L19 13.31Z\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"path\", { className: \"error-icon\", vectorEffect: \"non-scaling-stroke\", d: \"M19.0202 17.11H18.9802L18.9502 15.56H19.0502L19.0202 17.11ZM18.9602 18.29V18.06H19.0502V18.29H18.9602Z\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", d: \"M19 12.16V6.51996L10.25 9.92996V20.91L14.27 19.37L14.4 19.32\", stroke: \"currentColor\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"path\", { vectorEffect: \"non-scaling-stroke\", d: \"M1.5 6.51999L10.25 3.04999L19 6.51999L10.25 9.92999L1.5 6.51999Z\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"clipPath\", { id: \"clip0_4797_15331\" }, /* @__PURE__ */ React.createElement(\"rect\", { width: 22, height: 18.86, fill: \"white\", transform: \"translate(1 2.54999)\" }))));\nexport default SvgOrderError;\n","import * as React from \"react\";\nconst SvgWarningWithCircle = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: 24, height: 24, viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.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\" }), /* @__PURE__ */ React.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\" }));\nexport default SvgWarningWithCircle;\n"],"names":["SvgOrderError","props","React","SvgWarningWithCircle"],"mappings":"kDACK,MAACA,EAAiBC,GAA0BC,EAAM,cAAc,MAAO,CAAE,MAAO,GAAI,OAAQ,GAAI,QAAS,YAAa,KAAM,OAAQ,MAAO,6BAA8B,GAAGD,CAAO,EAAkBC,EAAM,cAAc,IAAK,CAAE,SAAU,0BAA4CA,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,EAAG,sDAAuD,OAAQ,eAAgB,cAAe,QAAS,eAAgB,OAAO,CAAE,EAAmBA,EAAM,cAAc,OAAQ,CAAE,aAAc,qBAAsB,EAAG,yCAA0C,OAAQ,eAAgB,cAAe,QAAS,eAAgB,OAAS,CAAA,EAAmBA,EAAM,cAAc,OAAQ,CAAE,UAAW,aAAc,aAAc,qBAAsB,EAAG,sCAAuC,OAAQ,eAAgB,cAAe,QAAS,eAAgB,OAAS,CAAA,EAAmBA,EAAM,cAAc,OAAQ,CAAE,UAAW,aAAc,aAAc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