@dropins/storefront-cart 1.5.1-alpha002 → 1.5.1-beta1
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.
package/chunks/persisted-data.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright 2025 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
function s(e){e?sessionStorage.setItem("DROPIN__CART__CART__DATA",JSON.stringify(e)):sessionStorage.removeItem("DROPIN__CART__CART__DATA")}function
|
|
3
|
+
const t="DROPIN__CART__CART__AUTHENTICATED";function s(e){e?sessionStorage.setItem("DROPIN__CART__CART__DATA",JSON.stringify(e)):sessionStorage.removeItem("DROPIN__CART__CART__DATA")}function _(){const e=sessionStorage.getItem("DROPIN__CART__CART__DATA");return e?JSON.parse(e):null}function o(e){e?sessionStorage.setItem("DROPIN__CART__SHIPPING__DATA",JSON.stringify(e)):sessionStorage.removeItem("DROPIN__CART__SHIPPING__DATA")}function r(e){e?localStorage.setItem(t,"true"):localStorage.removeItem(t)}function a(){return localStorage.getItem(t)==="true"}export{a,r as b,s as c,_ as g,o as s};
|
|
4
4
|
//# sourceMappingURL=persisted-data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persisted-data.js","sources":["/@dropins/storefront-cart/src/lib/persisted-data.ts"],"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 { CartModel } from '@/cart/data/models';\n\nexport function setPersistedCartData(data: CartModel | null) {\n if (data) {\n sessionStorage.setItem('DROPIN__CART__CART__DATA', JSON.stringify(data));\n } else {\n sessionStorage.removeItem('DROPIN__CART__CART__DATA');\n }\n}\n\nexport function getPersistedCartData(): CartModel | null {\n const data = sessionStorage.getItem('DROPIN__CART__CART__DATA');\n\n if (data) return JSON.parse(data);\n\n return null;\n}\n\nexport function setEstimatedShippingLocation(\n data: {\n [key: string]: string;\n } | null\n) {\n if (data) {\n sessionStorage.setItem(\n 'DROPIN__CART__SHIPPING__DATA',\n JSON.stringify(data)\n );\n } else {\n sessionStorage.removeItem('DROPIN__CART__SHIPPING__DATA');\n }\n}\n\nexport function getEstimatedShippingLocation(): {\n [key: string]: string;\n} | null {\n const data = sessionStorage.getItem('DROPIN__CART__SHIPPING__DATA');\n\n if (data) return JSON.parse(data);\n\n return null;\n}\n"],"names":["setPersistedCartData","data","getPersistedCartData","setEstimatedShippingLocation"],"mappings":"
|
|
1
|
+
{"version":3,"file":"persisted-data.js","sources":["/@dropins/storefront-cart/src/lib/persisted-data.ts"],"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 { CartModel } from '@/cart/data/models';\n\nconst AUTHENTICATED_CART_KEY = 'DROPIN__CART__CART__AUTHENTICATED';\n\nexport function setPersistedCartData(data: CartModel | null) {\n if (data) {\n sessionStorage.setItem('DROPIN__CART__CART__DATA', JSON.stringify(data));\n } else {\n sessionStorage.removeItem('DROPIN__CART__CART__DATA');\n }\n}\n\nexport function getPersistedCartData(): CartModel | null {\n const data = sessionStorage.getItem('DROPIN__CART__CART__DATA');\n\n if (data) return JSON.parse(data);\n\n return null;\n}\n\nexport function setEstimatedShippingLocation(\n data: {\n [key: string]: string;\n } | null\n) {\n if (data) {\n sessionStorage.setItem(\n 'DROPIN__CART__SHIPPING__DATA',\n JSON.stringify(data)\n );\n } else {\n sessionStorage.removeItem('DROPIN__CART__SHIPPING__DATA');\n }\n}\n\nexport function getEstimatedShippingLocation(): {\n [key: string]: string;\n} | null {\n const data = sessionStorage.getItem('DROPIN__CART__SHIPPING__DATA');\n\n if (data) return JSON.parse(data);\n\n return null;\n}\n\nexport function setAuthenticatedCart(isAuthenticated: boolean) {\n isAuthenticated\n ? localStorage.setItem(AUTHENTICATED_CART_KEY, 'true')\n : localStorage.removeItem(AUTHENTICATED_CART_KEY);\n}\n\nexport function getAuthenticatedCart(): boolean {\n return localStorage.getItem(AUTHENTICATED_CART_KEY) === 'true';\n}\n"],"names":["AUTHENTICATED_CART_KEY","setPersistedCartData","data","getPersistedCartData","setEstimatedShippingLocation","setAuthenticatedCart","isAuthenticated","getAuthenticatedCart"],"mappings":"AAmBA,MAAMA,EAAyB,oCAExB,SAASC,EAAqBC,EAAwB,CACvDA,EACF,eAAe,QAAQ,2BAA4B,KAAK,UAAUA,CAAI,CAAC,EAEvE,eAAe,WAAW,0BAA0B,CAExD,CAEO,SAASC,GAAyC,CACjD,MAAAD,EAAO,eAAe,QAAQ,0BAA0B,EAE9D,OAAIA,EAAa,KAAK,MAAMA,CAAI,EAEzB,IACT,CAEO,SAASE,EACdF,EAGA,CACIA,EACa,eAAA,QACb,+BACA,KAAK,UAAUA,CAAI,CACrB,EAEA,eAAe,WAAW,8BAA8B,CAE5D,CAYO,SAASG,EAAqBC,EAA0B,CAC7DA,EACI,aAAa,QAAQN,EAAwB,MAAM,EACnD,aAAa,WAAWA,CAAsB,CACpD,CAEO,SAASO,GAAgC,CACvC,OAAA,aAAa,QAAQP,CAAsB,IAAM,MAC1D"}
|
package/chunks/refreshCart.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! Copyright 2025 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{s as o,d as q,f as I,h as U}from"./resetCart.js";import{events as f}from"@dropins/tools/event-bus.js";import{Initializer as L,merge as X}from"@dropins/tools/lib.js";import{a as K}from"./persisted-data.js";import{CART_FRAGMENT as A}from"../fragments.js";const z=new L({init:async e=>{const n={disableGuestCart:!1,...e};z.config.setConfig(n),D().catch(console.error)},listeners:()=>[f.on("authenticated",e=>{o.authenticated&&!e?f.emit("cart/reset",void 0):e&&!o.authenticated&&(o.authenticated=e,D().catch(console.error))},{eager:!0}),f.on("locale",async e=>{e!==o.locale&&(o.locale=e,D().catch(console.error))}),f.on("cart/reset",()=>{q().catch(console.error),f.emit("cart/data",null)}),f.on("cart/data",e=>{K(e)}),f.on("checkout/updated",e=>{e&&xe().catch(console.error)})]}),B=z.config;function k(e){var c,r,u,l,i,a,_,g,y,d,m,t,C,h,v,b;if(!e)return null;const n={appliedGiftCards:((c=e==null?void 0:e.applied_gift_cards)==null?void 0:c.map(s=>{var R,w,M;const p={code:s.code??"",appliedBalance:{value:s.applied_balance.value??0,currency:s.applied_balance.currency??"USD"},currentBalance:{value:s.current_balance.value??0,currency:s.current_balance.currency??"USD"},expirationDate:s.expiration_date??""},x=(R=p==null?void 0:p.currentBalance)==null?void 0:R.value,T=(w=p==null?void 0:p.appliedBalance)==null?void 0:w.value,S=(M=p==null?void 0:p.currentBalance)==null?void 0:M.currency,W=x-T>0?x-T:0;return{...p,giftCardBalance:{value:W,currency:S}}}))??[],id:e.id,totalQuantity:le(e),totalUniqueItems:e.itemsV2.items.length,totalGiftOptions:j((r=e==null?void 0:e.prices)==null?void 0:r.gift_options),giftReceiptIncluded:(e==null?void 0:e.gift_receipt_included)??!1,printedCardIncluded:(e==null?void 0:e.printed_card_included)??!1,cartGiftWrapping:((u=e==null?void 0:e.available_gift_wrappings)==null?void 0:u.map(s=>{var p,x,T,S,E;return{design:s.design??"",uid:s.uid,selected:((p=e==null?void 0:e.gift_wrapping)==null?void 0:p.uid)===s.uid,image:{url:((x=s==null?void 0:s.image)==null?void 0:x.url)??"",label:((T=s.image)==null?void 0:T.label)??""},price:{currency:((S=s==null?void 0:s.price)==null?void 0:S.currency)??"USD",value:((E=s==null?void 0:s.price)==null?void 0:E.value)??0}}}))??[],giftMessage:{senderName:((l=e==null?void 0:e.gift_message)==null?void 0:l.from)??"",recipientName:((i=e==null?void 0:e.gift_message)==null?void 0:i.to)??"",message:((a=e==null?void 0:e.gift_message)==null?void 0:a.message)??""},errors:re(e==null?void 0:e.itemsV2),items:N(e==null?void 0:e.itemsV2),miniCartMaxItems:N(e==null?void 0:e.itemsV2).slice(0,((_=o.config)==null?void 0:_.miniCartMaxItemsDisplay)??10),total:{includingTax:{value:e.prices.grand_total.value,currency:e.prices.grand_total.currency},excludingTax:{value:e.prices.grand_total_excluding_tax.value,currency:e.prices.grand_total_excluding_tax.currency}},discount:P(e.prices.discounts,e.prices.grand_total.currency),subtotal:{excludingTax:{value:(g=e.prices.subtotal_excluding_tax)==null?void 0:g.value,currency:(y=e.prices.subtotal_excluding_tax)==null?void 0:y.currency},includingTax:{value:(d=e.prices.subtotal_including_tax)==null?void 0:d.value,currency:(m=e.prices.subtotal_including_tax)==null?void 0:m.currency},includingDiscountOnly:{value:(t=e.prices.subtotal_with_discount_excluding_tax)==null?void 0:t.value,currency:(C=e.prices.subtotal_with_discount_excluding_tax)==null?void 0:C.currency}},appliedTaxes:F(e.prices.applied_taxes),totalTax:P(e.prices.applied_taxes,e.prices.grand_total.currency),appliedDiscounts:F(e.prices.discounts),isVirtual:e.is_virtual,addresses:{shipping:e.shipping_addresses&&se(e)},isGuestCart:!o.authenticated,hasOutOfStockItems:te(e),hasFullyOutOfStockItems:_e(e),appliedCoupons:e.applied_coupons};return X(n,(b=(v=(h=B.getConfig().models)==null?void 0:h.CartModel)==null?void 0:v.transformer)==null?void 0:b.call(v,e))}function j(e){var n,c,r,u,l,i,a,_,g,y,d,m;return{giftWrappingForItems:{value:((n=e==null?void 0:e.gift_wrapping_for_items)==null?void 0:n.value)??0,currency:((c=e==null?void 0:e.gift_wrapping_for_items)==null?void 0:c.currency)??"USD"},giftWrappingForItemsInclTax:{value:((r=e==null?void 0:e.gift_wrapping_for_items_incl_tax)==null?void 0:r.value)??0,currency:((u=e==null?void 0:e.gift_wrapping_for_items_incl_tax)==null?void 0:u.currency)??"USD"},giftWrappingForOrder:{value:((l=e==null?void 0:e.gift_wrapping_for_order)==null?void 0:l.value)??0,currency:((i=e==null?void 0:e.gift_wrapping_for_order)==null?void 0:i.currency)??"USD"},giftWrappingForOrderInclTax:{value:((a=e==null?void 0:e.gift_wrapping_for_order_incl_tax)==null?void 0:a.value)??0,currency:((_=e==null?void 0:e.gift_wrapping_for_order_incl_tax)==null?void 0:_.currency)??"USD"},printedCard:{value:((g=e==null?void 0:e.printed_card)==null?void 0:g.value)??0,currency:((y=e==null?void 0:e.printed_card)==null?void 0:y.currency)??"USD"},printedCardInclTax:{value:((d=e==null?void 0:e.printed_card_incl_tax)==null?void 0:d.value)??0,currency:((m=e==null?void 0:e.printed_card_incl_tax)==null?void 0:m.currency)??"USD"}}}function P(e,n){return e!=null&&e.length?e.reduce((c,r)=>({value:c.value+r.amount.value,currency:r.amount.currency}),{value:0,currency:n}):{value:0,currency:n}}function Y(e,n){var c,r,u,l;return{src:e!=null&&e.useConfigurableParentThumbnail?n.product.thumbnail.url:((r=(c=n.configured_variant)==null?void 0:c.thumbnail)==null?void 0:r.url)||n.product.thumbnail.url,alt:e!=null&&e.useConfigurableParentThumbnail?n.product.thumbnail.label:((l=(u=n.configured_variant)==null?void 0:u.thumbnail)==null?void 0:l.label)||n.product.thumbnail.label}}function O(e){var n,c,r,u;return e.__typename==="ConfigurableCartItem"?{value:(c=(n=e.configured_variant)==null?void 0:n.price_range)==null?void 0:c.maximum_price.regular_price.value,currency:(u=(r=e.configured_variant)==null?void 0:r.price_range)==null?void 0:u.maximum_price.regular_price.currency}:e.__typename==="GiftCardCartItem"?{value:e.prices.price.value,currency:e.prices.price.currency}:{value:e.prices.original_item_price.value,currency:e.prices.original_item_price.currency}}function H(e){var n,c,r;return e.__typename==="ConfigurableCartItem"?((c=(n=e.configured_variant)==null?void 0:n.price_range)==null?void 0:c.maximum_price.discount.amount_off)>0:((r=e.product.price_range)==null?void 0:r.maximum_price.discount.amount_off)>0}function J(e){var n,c,r;return{senderName:((n=e==null?void 0:e.gift_message)==null?void 0:n.from)??"",recipientName:((c=e==null?void 0:e.gift_message)==null?void 0:c.to)??"",message:((r=e==null?void 0:e.gift_message)==null?void 0:r.message)??""}}function Z(e){return{currency:(e==null?void 0:e.currency)??"USD",value:(e==null?void 0:e.value)??0}}function N(e){var c;if(!((c=e==null?void 0:e.items)!=null&&c.length))return[];const n=o.config;return e.items.map(r=>{var u,l,i,a,_,g,y,d,m;return{giftWrappingAvailable:((u=r==null?void 0:r.product)==null?void 0:u.gift_wrapping_available)??!1,giftWrappingPrice:Z((l=r==null?void 0:r.product)==null?void 0:l.gift_wrapping_price),giftMessage:J(r),productGiftWrapping:((i=r==null?void 0:r.available_gift_wrapping)==null?void 0:i.map(t=>{var C,h,v,b,s;return{design:t.design??"",uid:t.uid,selected:((C=r.gift_wrapping)==null?void 0:C.uid)===t.uid,image:{url:((h=t==null?void 0:t.image)==null?void 0:h.url)??"",label:((v=t.image)==null?void 0:v.label)??""},price:{currency:((b=t==null?void 0:t.price)==null?void 0:b.currency)??"USD",value:((s=t==null?void 0:t.price)==null?void 0:s.value)??0}}}))??[],itemType:r.__typename,uid:r.uid,giftMessageAvailable:ee(r.product.gift_message_available),url:{urlKey:r.product.url_key,categories:r.product.categories.map(t=>t.url_key)},canonicalUrl:r.product.canonical_url,categories:r.product.categories.map(t=>t.name),quantity:r.quantity,sku:pe(r),topLevelSku:r.product.sku,name:r.product.name,image:Y(n,r),price:{value:r.prices.price.value,currency:r.prices.price.currency},taxedPrice:{value:r.prices.price_including_tax.value,currency:r.prices.price_including_tax.currency},fixedProductTaxes:r.prices.fixed_product_taxes,rowTotal:{value:r.prices.row_total.value,currency:r.prices.row_total.currency},rowTotalIncludingTax:{value:r.prices.row_total_including_tax.value,currency:r.prices.row_total_including_tax.currency},links:ie(r.links),total:{value:(a=r.prices.original_row_total)==null?void 0:a.value,currency:(_=r.prices.original_row_total)==null?void 0:_.currency},discount:{value:r.prices.total_item_discount.value,currency:r.prices.total_item_discount.currency,label:(g=r.prices.discounts)==null?void 0:g.map(t=>t.label)},regularPrice:O(r),discounted:H(r),bundleOptions:r.__typename==="BundleCartItem"?ne(r.bundle_options):null,bundleOptionsUIDs:r.__typename==="BundleCartItem"?ce(r.bundle_options):null,selectedOptions:(y=$(r.configurable_options))==null?void 0:y.options,selectedOptionsUIDs:(d=$(r.configurable_options))==null?void 0:d.uids,customizableOptions:ue(r.customizable_options),sender:r.__typename==="GiftCardCartItem"?r.sender_name:null,senderEmail:r.__typename==="GiftCardCartItem"?r.sender_email:null,recipient:r.__typename==="GiftCardCartItem"?r.recipient_name:null,recipientEmail:r.__typename==="GiftCardCartItem"?r.recipient_email:null,message:r.__typename==="GiftCardCartItem"?r.message:null,discountedTotal:{value:r.prices.row_total.value,currency:r.prices.row_total.currency},onlyXLeftInStock:r.__typename==="ConfigurableCartItem"?(m=r.configured_variant)==null?void 0:m.only_x_left_in_stock:r.product.only_x_left_in_stock,lowInventory:r.is_available&&r.product.only_x_left_in_stock!==null,insufficientQuantity:(r.__typename==="ConfigurableCartItem"?r.configured_variant:r.product).stock_status==="IN_STOCK"&&!r.is_available,outOfStock:r.product.stock_status==="OUT_OF_STOCK",stockLevel:oe(r),discountPercentage:ae(r),savingsAmount:ge(r),productAttributes:fe(r)}})}function ee(e){switch(+e){case 0:return!1;case 1:return!0;case 2:return null;default:return!1}}function re(e){var c;const n=(c=e==null?void 0:e.items)==null?void 0:c.reduce((r,u)=>{var l;return(l=u.errors)==null||l.forEach(i=>{r.push({uid:u.uid,text:i.message})}),r},[]);return n!=null&&n.length?n:null}function F(e){return e!=null&&e.length?e.map(n=>({amount:{value:n.amount.value,currency:n.amount.currency},label:n.label,coupon:n.coupon})):[]}function ne(e){const n=e==null?void 0:e.map(r=>({uid:r.uid,label:r.label,value:r.values.map(u=>u.label).join(", ")})),c={};return n==null||n.forEach(r=>{c[r.label]=r.value}),Object.keys(c).length>0?c:null}function ce(e){if(!(e!=null&&e.length))return null;const n=[];return e.forEach(c=>{var r;if((r=c.values)!=null&&r.length){const u=c.values.map(l=>l.uid);n.push(...u)}}),n.length>0?n:null}function $(e){const n=e==null?void 0:e.map(u=>({uid:u.configurable_product_option_uid,label:u.option_label,value:u.value_label,valueUid:u.configurable_product_option_value_uid})),c={},r={};return n==null||n.forEach(u=>{c[u.label]=u.value,r[u.label]=u.valueUid}),{options:Object.keys(c).length>0?c:null,uids:Object.keys(r).length>0?r:null}}function ue(e){const n=e==null?void 0:e.map(r=>({uid:r.customizable_option_uid,label:r.label,type:r.type,values:r.values.map(u=>({uid:u.customizable_option_value_uid,label:u.label,value:u.value}))})),c={};return n==null||n.forEach(r=>{var u;switch(r.type){case"field":case"area":case"date_time":c[r.label]=r.values[0].value;break;case"radio":case"drop_down":c[r.label]=r.values[0].label;break;case"multiple":case"checkbox":c[r.label]=r.values.reduce((l,i)=>l?`${l}, ${i.label}`:i.label,"");break;case"file":{const l=new DOMParser,i=r.values[0].value,_=((u=l.parseFromString(i,"text/html").querySelector("a"))==null?void 0:u.textContent)||"";c[r.label]=_;break}}}),c}function le(e){var n,c;return((n=o.config)==null?void 0:n.cartSummaryDisplayTotal)===0?e.itemsV2.items.length:((c=o.config)==null?void 0:c.cartSummaryDisplayTotal)===1?e.total_quantity:e.itemsV2.items.length}function ie(e){return(e==null?void 0:e.length)>0?{count:e.length,result:e.map(n=>n.title).join(", ")}:null}function se(e){var n,c,r,u;return(n=e.shipping_addresses)!=null&&n.length?(c=e.shipping_addresses)==null?void 0:c.map(l=>({countryCode:l.country.code,zipCode:l.postcode,regionCode:l.region.code})):(r=e.addresses)!=null&&r.length?(u=e.addresses)==null?void 0:u.filter(l=>l.default_shipping).map(l=>{var i;return l.default_shipping&&{countryCode:l.country_code,zipCode:l.postcode,regionCode:(i=l.region)==null?void 0:i.region_code}}):null}function te(e){var n,c;return(c=(n=e==null?void 0:e.itemsV2)==null?void 0:n.items)==null?void 0:c.some(r=>{var u;return((u=r==null?void 0:r.product)==null?void 0:u.stock_status)==="OUT_OF_STOCK"||r.product.stock_status==="IN_STOCK"&&!r.is_available})}function oe(e){return e.not_available_message?e.product.quantity!=null?e.product.quantity:"noNumber":null}function _e(e){var n,c;return(c=(n=e==null?void 0:e.itemsV2)==null?void 0:n.items)==null?void 0:c.some(r=>{var u;return((u=r==null?void 0:r.product)==null?void 0:u.stock_status)==="OUT_OF_STOCK"})}function ae(e){var c,r,u,l,i,a,_,g;let n;if(e.__typename==="ConfigurableCartItem")n=(l=(u=(r=(c=e==null?void 0:e.configured_variant)==null?void 0:c.price_range)==null?void 0:r.maximum_price)==null?void 0:u.discount)==null?void 0:l.percent_off;else{if(e.__typename==="BundleCartItem")return;n=(g=(_=(a=(i=e==null?void 0:e.product)==null?void 0:i.price_range)==null?void 0:a.maximum_price)==null?void 0:_.discount)==null?void 0:g.percent_off}if(n!==0)return Math.round(n)}function pe(e){var n;return e.__typename==="ConfigurableCartItem"?e.configured_variant.sku:((n=e.product)==null?void 0:n.variantSku)||e.product.sku}function ge(e){var r,u,l,i,a,_;let n,c;if(n=((u=(r=e==null?void 0:e.prices)==null?void 0:r.original_row_total)==null?void 0:u.value)-((i=(l=e==null?void 0:e.prices)==null?void 0:l.row_total)==null?void 0:i.value),c=(_=(a=e==null?void 0:e.prices)==null?void 0:a.row_total)==null?void 0:_.currency,n!==0)return{value:n,currency:c}}function fe(e){var n,c,r;return(r=(c=(n=e==null?void 0:e.product)==null?void 0:n.custom_attributesV2)==null?void 0:c.items)==null?void 0:r.map(u=>{const l=u.code.split("_").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ");return{...u,code:l}})}function ye(e){var r,u;if(!e)return null;const n=l=>{switch(l){case 1:return"EXCLUDING_TAX";case 2:return"INCLUDING_TAX";case 3:return"INCLUDING_EXCLUDING_TAX";default:return"EXCLUDING_TAX"}},c=l=>{switch(+l){case 0:return!1;case 1:return!0;case 2:return null;default:return!1}};return{displayMiniCart:e.minicart_display,miniCartMaxItemsDisplay:e.minicart_max_items,cartExpiresInDays:e.cart_expires_in_days,cartSummaryDisplayTotal:e.cart_summary_display_quantity,cartSummaryMaxItems:e.max_items_in_order_summary,defaultCountry:e.default_country,categoryFixedProductTaxDisplaySetting:e.category_fixed_product_tax_display_setting,productFixedProductTaxDisplaySetting:e.product_fixed_product_tax_display_setting,salesFixedProductTaxDisplaySetting:e.sales_fixed_product_tax_display_setting,shoppingCartDisplaySetting:{zeroTax:e.shopping_cart_display_zero_tax,subtotal:n(e.shopping_cart_display_subtotal),price:n(e.shopping_cart_display_price),shipping:n(e.shopping_cart_display_shipping),fullSummary:e.shopping_cart_display_full_summary,grandTotal:e.shopping_cart_display_grand_total,taxGiftWrapping:e.shopping_cart_display_tax_gift_wrapping},useConfigurableParentThumbnail:e.configurable_thumbnail_source==="parent",allowGiftWrappingOnOrder:c(e==null?void 0:e.allow_gift_wrapping_on_order),allowGiftWrappingOnOrderItems:c(e==null?void 0:e.allow_gift_wrapping_on_order_items),allowGiftMessageOnOrder:c(e==null?void 0:e.allow_order),allowGiftMessageOnOrderItems:c(e==null?void 0:e.allow_items),allowGiftReceipt:!!+(e==null?void 0:e.allow_gift_receipt),allowPrintedCard:!!+(e==null?void 0:e.allow_printed_card),printedCardPrice:{currency:((r=e==null?void 0:e.printed_card_priceV2)==null?void 0:r.currency)??"",value:((u=e==null?void 0:e.printed_card_priceV2)==null?void 0:u.value)!=null?+e.printed_card_priceV2.value:0},cartGiftWrapping:n(+e.cart_gift_wrapping),cartPrintedCard:n(+e.cart_printed_card)}}const de=`
|
|
3
|
+
import{s as o,d as q,f as I,h as U}from"./resetCart.js";import{events as f}from"@dropins/tools/event-bus.js";import{Initializer as L,merge as X}from"@dropins/tools/lib.js";import{c as K}from"./persisted-data.js";import{CART_FRAGMENT as A}from"../fragments.js";const z=new L({init:async e=>{const n={disableGuestCart:!1,...e};z.config.setConfig(n),D().catch(console.error)},listeners:()=>[f.on("authenticated",e=>{o.authenticated&&!e?f.emit("cart/reset",void 0):e&&!o.authenticated&&(o.authenticated=e,D().catch(console.error))},{eager:!0}),f.on("locale",async e=>{e!==o.locale&&(o.locale=e,D().catch(console.error))}),f.on("cart/reset",()=>{q().catch(console.error),f.emit("cart/data",null)}),f.on("cart/data",e=>{K(e)}),f.on("checkout/updated",e=>{e&&xe().catch(console.error)})]}),B=z.config;function k(e){var c,r,u,l,i,a,_,g,y,d,m,t,C,h,v,b;if(!e)return null;const n={appliedGiftCards:((c=e==null?void 0:e.applied_gift_cards)==null?void 0:c.map(s=>{var R,w,M;const p={code:s.code??"",appliedBalance:{value:s.applied_balance.value??0,currency:s.applied_balance.currency??"USD"},currentBalance:{value:s.current_balance.value??0,currency:s.current_balance.currency??"USD"},expirationDate:s.expiration_date??""},x=(R=p==null?void 0:p.currentBalance)==null?void 0:R.value,T=(w=p==null?void 0:p.appliedBalance)==null?void 0:w.value,S=(M=p==null?void 0:p.currentBalance)==null?void 0:M.currency,W=x-T>0?x-T:0;return{...p,giftCardBalance:{value:W,currency:S}}}))??[],id:e.id,totalQuantity:le(e),totalUniqueItems:e.itemsV2.items.length,totalGiftOptions:j((r=e==null?void 0:e.prices)==null?void 0:r.gift_options),giftReceiptIncluded:(e==null?void 0:e.gift_receipt_included)??!1,printedCardIncluded:(e==null?void 0:e.printed_card_included)??!1,cartGiftWrapping:((u=e==null?void 0:e.available_gift_wrappings)==null?void 0:u.map(s=>{var p,x,T,S,E;return{design:s.design??"",uid:s.uid,selected:((p=e==null?void 0:e.gift_wrapping)==null?void 0:p.uid)===s.uid,image:{url:((x=s==null?void 0:s.image)==null?void 0:x.url)??"",label:((T=s.image)==null?void 0:T.label)??""},price:{currency:((S=s==null?void 0:s.price)==null?void 0:S.currency)??"USD",value:((E=s==null?void 0:s.price)==null?void 0:E.value)??0}}}))??[],giftMessage:{senderName:((l=e==null?void 0:e.gift_message)==null?void 0:l.from)??"",recipientName:((i=e==null?void 0:e.gift_message)==null?void 0:i.to)??"",message:((a=e==null?void 0:e.gift_message)==null?void 0:a.message)??""},errors:re(e==null?void 0:e.itemsV2),items:N(e==null?void 0:e.itemsV2),miniCartMaxItems:N(e==null?void 0:e.itemsV2).slice(0,((_=o.config)==null?void 0:_.miniCartMaxItemsDisplay)??10),total:{includingTax:{value:e.prices.grand_total.value,currency:e.prices.grand_total.currency},excludingTax:{value:e.prices.grand_total_excluding_tax.value,currency:e.prices.grand_total_excluding_tax.currency}},discount:P(e.prices.discounts,e.prices.grand_total.currency),subtotal:{excludingTax:{value:(g=e.prices.subtotal_excluding_tax)==null?void 0:g.value,currency:(y=e.prices.subtotal_excluding_tax)==null?void 0:y.currency},includingTax:{value:(d=e.prices.subtotal_including_tax)==null?void 0:d.value,currency:(m=e.prices.subtotal_including_tax)==null?void 0:m.currency},includingDiscountOnly:{value:(t=e.prices.subtotal_with_discount_excluding_tax)==null?void 0:t.value,currency:(C=e.prices.subtotal_with_discount_excluding_tax)==null?void 0:C.currency}},appliedTaxes:F(e.prices.applied_taxes),totalTax:P(e.prices.applied_taxes,e.prices.grand_total.currency),appliedDiscounts:F(e.prices.discounts),isVirtual:e.is_virtual,addresses:{shipping:e.shipping_addresses&&se(e)},isGuestCart:!o.authenticated,hasOutOfStockItems:te(e),hasFullyOutOfStockItems:_e(e),appliedCoupons:e.applied_coupons};return X(n,(b=(v=(h=B.getConfig().models)==null?void 0:h.CartModel)==null?void 0:v.transformer)==null?void 0:b.call(v,e))}function j(e){var n,c,r,u,l,i,a,_,g,y,d,m;return{giftWrappingForItems:{value:((n=e==null?void 0:e.gift_wrapping_for_items)==null?void 0:n.value)??0,currency:((c=e==null?void 0:e.gift_wrapping_for_items)==null?void 0:c.currency)??"USD"},giftWrappingForItemsInclTax:{value:((r=e==null?void 0:e.gift_wrapping_for_items_incl_tax)==null?void 0:r.value)??0,currency:((u=e==null?void 0:e.gift_wrapping_for_items_incl_tax)==null?void 0:u.currency)??"USD"},giftWrappingForOrder:{value:((l=e==null?void 0:e.gift_wrapping_for_order)==null?void 0:l.value)??0,currency:((i=e==null?void 0:e.gift_wrapping_for_order)==null?void 0:i.currency)??"USD"},giftWrappingForOrderInclTax:{value:((a=e==null?void 0:e.gift_wrapping_for_order_incl_tax)==null?void 0:a.value)??0,currency:((_=e==null?void 0:e.gift_wrapping_for_order_incl_tax)==null?void 0:_.currency)??"USD"},printedCard:{value:((g=e==null?void 0:e.printed_card)==null?void 0:g.value)??0,currency:((y=e==null?void 0:e.printed_card)==null?void 0:y.currency)??"USD"},printedCardInclTax:{value:((d=e==null?void 0:e.printed_card_incl_tax)==null?void 0:d.value)??0,currency:((m=e==null?void 0:e.printed_card_incl_tax)==null?void 0:m.currency)??"USD"}}}function P(e,n){return e!=null&&e.length?e.reduce((c,r)=>({value:c.value+r.amount.value,currency:r.amount.currency}),{value:0,currency:n}):{value:0,currency:n}}function Y(e,n){var c,r,u,l;return{src:e!=null&&e.useConfigurableParentThumbnail?n.product.thumbnail.url:((r=(c=n.configured_variant)==null?void 0:c.thumbnail)==null?void 0:r.url)||n.product.thumbnail.url,alt:e!=null&&e.useConfigurableParentThumbnail?n.product.thumbnail.label:((l=(u=n.configured_variant)==null?void 0:u.thumbnail)==null?void 0:l.label)||n.product.thumbnail.label}}function O(e){var n,c,r,u;return e.__typename==="ConfigurableCartItem"?{value:(c=(n=e.configured_variant)==null?void 0:n.price_range)==null?void 0:c.maximum_price.regular_price.value,currency:(u=(r=e.configured_variant)==null?void 0:r.price_range)==null?void 0:u.maximum_price.regular_price.currency}:e.__typename==="GiftCardCartItem"?{value:e.prices.price.value,currency:e.prices.price.currency}:{value:e.prices.original_item_price.value,currency:e.prices.original_item_price.currency}}function H(e){var n,c,r;return e.__typename==="ConfigurableCartItem"?((c=(n=e.configured_variant)==null?void 0:n.price_range)==null?void 0:c.maximum_price.discount.amount_off)>0:((r=e.product.price_range)==null?void 0:r.maximum_price.discount.amount_off)>0}function J(e){var n,c,r;return{senderName:((n=e==null?void 0:e.gift_message)==null?void 0:n.from)??"",recipientName:((c=e==null?void 0:e.gift_message)==null?void 0:c.to)??"",message:((r=e==null?void 0:e.gift_message)==null?void 0:r.message)??""}}function Z(e){return{currency:(e==null?void 0:e.currency)??"USD",value:(e==null?void 0:e.value)??0}}function N(e){var c;if(!((c=e==null?void 0:e.items)!=null&&c.length))return[];const n=o.config;return e.items.map(r=>{var u,l,i,a,_,g,y,d,m;return{giftWrappingAvailable:((u=r==null?void 0:r.product)==null?void 0:u.gift_wrapping_available)??!1,giftWrappingPrice:Z((l=r==null?void 0:r.product)==null?void 0:l.gift_wrapping_price),giftMessage:J(r),productGiftWrapping:((i=r==null?void 0:r.available_gift_wrapping)==null?void 0:i.map(t=>{var C,h,v,b,s;return{design:t.design??"",uid:t.uid,selected:((C=r.gift_wrapping)==null?void 0:C.uid)===t.uid,image:{url:((h=t==null?void 0:t.image)==null?void 0:h.url)??"",label:((v=t.image)==null?void 0:v.label)??""},price:{currency:((b=t==null?void 0:t.price)==null?void 0:b.currency)??"USD",value:((s=t==null?void 0:t.price)==null?void 0:s.value)??0}}}))??[],itemType:r.__typename,uid:r.uid,giftMessageAvailable:ee(r.product.gift_message_available),url:{urlKey:r.product.url_key,categories:r.product.categories.map(t=>t.url_key)},canonicalUrl:r.product.canonical_url,categories:r.product.categories.map(t=>t.name),quantity:r.quantity,sku:pe(r),topLevelSku:r.product.sku,name:r.product.name,image:Y(n,r),price:{value:r.prices.price.value,currency:r.prices.price.currency},taxedPrice:{value:r.prices.price_including_tax.value,currency:r.prices.price_including_tax.currency},fixedProductTaxes:r.prices.fixed_product_taxes,rowTotal:{value:r.prices.row_total.value,currency:r.prices.row_total.currency},rowTotalIncludingTax:{value:r.prices.row_total_including_tax.value,currency:r.prices.row_total_including_tax.currency},links:ie(r.links),total:{value:(a=r.prices.original_row_total)==null?void 0:a.value,currency:(_=r.prices.original_row_total)==null?void 0:_.currency},discount:{value:r.prices.total_item_discount.value,currency:r.prices.total_item_discount.currency,label:(g=r.prices.discounts)==null?void 0:g.map(t=>t.label)},regularPrice:O(r),discounted:H(r),bundleOptions:r.__typename==="BundleCartItem"?ne(r.bundle_options):null,bundleOptionsUIDs:r.__typename==="BundleCartItem"?ce(r.bundle_options):null,selectedOptions:(y=$(r.configurable_options))==null?void 0:y.options,selectedOptionsUIDs:(d=$(r.configurable_options))==null?void 0:d.uids,customizableOptions:ue(r.customizable_options),sender:r.__typename==="GiftCardCartItem"?r.sender_name:null,senderEmail:r.__typename==="GiftCardCartItem"?r.sender_email:null,recipient:r.__typename==="GiftCardCartItem"?r.recipient_name:null,recipientEmail:r.__typename==="GiftCardCartItem"?r.recipient_email:null,message:r.__typename==="GiftCardCartItem"?r.message:null,discountedTotal:{value:r.prices.row_total.value,currency:r.prices.row_total.currency},onlyXLeftInStock:r.__typename==="ConfigurableCartItem"?(m=r.configured_variant)==null?void 0:m.only_x_left_in_stock:r.product.only_x_left_in_stock,lowInventory:r.is_available&&r.product.only_x_left_in_stock!==null,insufficientQuantity:(r.__typename==="ConfigurableCartItem"?r.configured_variant:r.product).stock_status==="IN_STOCK"&&!r.is_available,outOfStock:r.product.stock_status==="OUT_OF_STOCK",stockLevel:oe(r),discountPercentage:ae(r),savingsAmount:ge(r),productAttributes:fe(r)}})}function ee(e){switch(+e){case 0:return!1;case 1:return!0;case 2:return null;default:return!1}}function re(e){var c;const n=(c=e==null?void 0:e.items)==null?void 0:c.reduce((r,u)=>{var l;return(l=u.errors)==null||l.forEach(i=>{r.push({uid:u.uid,text:i.message})}),r},[]);return n!=null&&n.length?n:null}function F(e){return e!=null&&e.length?e.map(n=>({amount:{value:n.amount.value,currency:n.amount.currency},label:n.label,coupon:n.coupon})):[]}function ne(e){const n=e==null?void 0:e.map(r=>({uid:r.uid,label:r.label,value:r.values.map(u=>u.label).join(", ")})),c={};return n==null||n.forEach(r=>{c[r.label]=r.value}),Object.keys(c).length>0?c:null}function ce(e){if(!(e!=null&&e.length))return null;const n=[];return e.forEach(c=>{var r;if((r=c.values)!=null&&r.length){const u=c.values.map(l=>l.uid);n.push(...u)}}),n.length>0?n:null}function $(e){const n=e==null?void 0:e.map(u=>({uid:u.configurable_product_option_uid,label:u.option_label,value:u.value_label,valueUid:u.configurable_product_option_value_uid})),c={},r={};return n==null||n.forEach(u=>{c[u.label]=u.value,r[u.label]=u.valueUid}),{options:Object.keys(c).length>0?c:null,uids:Object.keys(r).length>0?r:null}}function ue(e){const n=e==null?void 0:e.map(r=>({uid:r.customizable_option_uid,label:r.label,type:r.type,values:r.values.map(u=>({uid:u.customizable_option_value_uid,label:u.label,value:u.value}))})),c={};return n==null||n.forEach(r=>{var u;switch(r.type){case"field":case"area":case"date_time":c[r.label]=r.values[0].value;break;case"radio":case"drop_down":c[r.label]=r.values[0].label;break;case"multiple":case"checkbox":c[r.label]=r.values.reduce((l,i)=>l?`${l}, ${i.label}`:i.label,"");break;case"file":{const l=new DOMParser,i=r.values[0].value,_=((u=l.parseFromString(i,"text/html").querySelector("a"))==null?void 0:u.textContent)||"";c[r.label]=_;break}}}),c}function le(e){var n,c;return((n=o.config)==null?void 0:n.cartSummaryDisplayTotal)===0?e.itemsV2.items.length:((c=o.config)==null?void 0:c.cartSummaryDisplayTotal)===1?e.total_quantity:e.itemsV2.items.length}function ie(e){return(e==null?void 0:e.length)>0?{count:e.length,result:e.map(n=>n.title).join(", ")}:null}function se(e){var n,c,r,u;return(n=e.shipping_addresses)!=null&&n.length?(c=e.shipping_addresses)==null?void 0:c.map(l=>({countryCode:l.country.code,zipCode:l.postcode,regionCode:l.region.code})):(r=e.addresses)!=null&&r.length?(u=e.addresses)==null?void 0:u.filter(l=>l.default_shipping).map(l=>{var i;return l.default_shipping&&{countryCode:l.country_code,zipCode:l.postcode,regionCode:(i=l.region)==null?void 0:i.region_code}}):null}function te(e){var n,c;return(c=(n=e==null?void 0:e.itemsV2)==null?void 0:n.items)==null?void 0:c.some(r=>{var u;return((u=r==null?void 0:r.product)==null?void 0:u.stock_status)==="OUT_OF_STOCK"||r.product.stock_status==="IN_STOCK"&&!r.is_available})}function oe(e){return e.not_available_message?e.product.quantity!=null?e.product.quantity:"noNumber":null}function _e(e){var n,c;return(c=(n=e==null?void 0:e.itemsV2)==null?void 0:n.items)==null?void 0:c.some(r=>{var u;return((u=r==null?void 0:r.product)==null?void 0:u.stock_status)==="OUT_OF_STOCK"})}function ae(e){var c,r,u,l,i,a,_,g;let n;if(e.__typename==="ConfigurableCartItem")n=(l=(u=(r=(c=e==null?void 0:e.configured_variant)==null?void 0:c.price_range)==null?void 0:r.maximum_price)==null?void 0:u.discount)==null?void 0:l.percent_off;else{if(e.__typename==="BundleCartItem")return;n=(g=(_=(a=(i=e==null?void 0:e.product)==null?void 0:i.price_range)==null?void 0:a.maximum_price)==null?void 0:_.discount)==null?void 0:g.percent_off}if(n!==0)return Math.round(n)}function pe(e){var n;return e.__typename==="ConfigurableCartItem"?e.configured_variant.sku:((n=e.product)==null?void 0:n.variantSku)||e.product.sku}function ge(e){var r,u,l,i,a,_;let n,c;if(n=((u=(r=e==null?void 0:e.prices)==null?void 0:r.original_row_total)==null?void 0:u.value)-((i=(l=e==null?void 0:e.prices)==null?void 0:l.row_total)==null?void 0:i.value),c=(_=(a=e==null?void 0:e.prices)==null?void 0:a.row_total)==null?void 0:_.currency,n!==0)return{value:n,currency:c}}function fe(e){var n,c,r;return(r=(c=(n=e==null?void 0:e.product)==null?void 0:n.custom_attributesV2)==null?void 0:c.items)==null?void 0:r.map(u=>{const l=u.code.split("_").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ");return{...u,code:l}})}function ye(e){var r,u;if(!e)return null;const n=l=>{switch(l){case 1:return"EXCLUDING_TAX";case 2:return"INCLUDING_TAX";case 3:return"INCLUDING_EXCLUDING_TAX";default:return"EXCLUDING_TAX"}},c=l=>{switch(+l){case 0:return!1;case 1:return!0;case 2:return null;default:return!1}};return{displayMiniCart:e.minicart_display,miniCartMaxItemsDisplay:e.minicart_max_items,cartExpiresInDays:e.cart_expires_in_days,cartSummaryDisplayTotal:e.cart_summary_display_quantity,cartSummaryMaxItems:e.max_items_in_order_summary,defaultCountry:e.default_country,categoryFixedProductTaxDisplaySetting:e.category_fixed_product_tax_display_setting,productFixedProductTaxDisplaySetting:e.product_fixed_product_tax_display_setting,salesFixedProductTaxDisplaySetting:e.sales_fixed_product_tax_display_setting,shoppingCartDisplaySetting:{zeroTax:e.shopping_cart_display_zero_tax,subtotal:n(e.shopping_cart_display_subtotal),price:n(e.shopping_cart_display_price),shipping:n(e.shopping_cart_display_shipping),fullSummary:e.shopping_cart_display_full_summary,grandTotal:e.shopping_cart_display_grand_total,taxGiftWrapping:e.shopping_cart_display_tax_gift_wrapping},useConfigurableParentThumbnail:e.configurable_thumbnail_source==="parent",allowGiftWrappingOnOrder:c(e==null?void 0:e.allow_gift_wrapping_on_order),allowGiftWrappingOnOrderItems:c(e==null?void 0:e.allow_gift_wrapping_on_order_items),allowGiftMessageOnOrder:c(e==null?void 0:e.allow_order),allowGiftMessageOnOrderItems:c(e==null?void 0:e.allow_items),allowGiftReceipt:!!+(e==null?void 0:e.allow_gift_receipt),allowPrintedCard:!!+(e==null?void 0:e.allow_printed_card),printedCardPrice:{currency:((r=e==null?void 0:e.printed_card_priceV2)==null?void 0:r.currency)??"",value:((u=e==null?void 0:e.printed_card_priceV2)==null?void 0:u.value)!=null?+e.printed_card_priceV2.value:0},cartGiftWrapping:n(+e.cart_gift_wrapping),cartPrintedCard:n(+e.cart_printed_card)}}const de=`
|
|
4
4
|
fragment CUSTOMER_FRAGMENT on Customer {
|
|
5
5
|
addresses {
|
|
6
6
|
default_shipping
|
package/chunks/resetCart.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Copyright 2025 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{FetchGraphQL as s}from"@dropins/tools/fetch-graphql.js";import"@dropins/tools/event-bus.js";import{
|
|
3
|
+
import{FetchGraphQL as s}from"@dropins/tools/fetch-graphql.js";import"@dropins/tools/event-bus.js";import{a as u,b as d}from"./persisted-data.js";function l(r){const e=document.cookie.split(";");for(let a=0;a<e.length;a++){const n=e[a].trim();if(n.indexOf(`${r}=`)===0)return n.substring(r.length+1)}return null}const h={cartId:null,authenticated:u()},i=new Proxy(h,{set(r,e,a){var n;if(r[e]=a,e==="cartId"){if(a===i.cartId)return!0;if(a===null)return document.cookie="DROPIN__CART__CART-ID=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/",!0;const c=(n=i.config)==null?void 0:n.cartExpiresInDays;c||console.warn('Missing "expiresInDays" config. Cookie expiration will default to 30 days.');const t=new Date;t.setDate(t.getDate()+(c??30)),document.cookie=`DROPIN__CART__CART-ID=${a}; expires=${t.toUTCString()}; path=/`}return e==="authenticated"&&d(a),!0},get(r,e){return e==="cartId"?l("DROPIN__CART__CART-ID"):r[e]}}),{setEndpoint:I,setFetchGraphQlHeader:m,removeFetchGraphQlHeader:_,setFetchGraphQlHeaders:D,fetchGraphQl:A,getConfig:T}=new s().getMethods(),R=r=>{const e=r.findIndex(({extensions:t})=>(t==null?void 0:t.category)==="graphql-authorization")>-1,a=r.findIndex(({path:t,extensions:o})=>(o==null?void 0:o.category)==="graphql-no-such-entity"&&!(t!=null&&t.includes("applyCouponsToCart")))>-1,n=r.map(t=>t.message).join(" "),c=r.findIndex(({path:t,extensions:o})=>(o==null?void 0:o.category)==="graphql-input"&&(t==null?void 0:t.includes("cart")))>-1;if(e||a||c)return g(),console.error(n),null;throw Error(n)},g=()=>(i.cartId=null,i.authenticated=!1,Promise.resolve(null));export{I as a,m as b,D as c,g as d,A as f,T as g,R as h,_ as r,i as s};
|
|
4
4
|
//# sourceMappingURL=resetCart.js.map
|
package/chunks/resetCart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resetCart.js","sources":["/@dropins/storefront-cart/src/lib/cookies.ts","/@dropins/storefront-cart/src/lib/state.ts","/@dropins/storefront-cart/src/api/fetch-graphql/fetch-graphql.ts","/@dropins/storefront-cart/src/lib/fetch-error.ts","/@dropins/storefront-cart/src/api/resetCart/resetCart.ts"],"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\nexport function getCookie(cookieName: string) {\n // Split the cookie string into an array of individual cookies\n const cookies = document.cookie.split(';');\n\n // Loop through the cookies to find the one with the specified name\n for (let i = 0; i < cookies.length; i++) {\n const cookie = cookies[i].trim(); // Remove leading and trailing spaces\n\n // Check if this cookie starts with the name you're looking for\n if (cookie.indexOf(`${cookieName}=`) === 0) {\n // Extract and return the cookie's value\n return cookie.substring(cookieName.length + 1);\n }\n }\n\n // If the cookie is not found, return null\n return null;\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 { getCookie } from '@/cart/lib/cookies';\nimport { StoreConfigModel } from '@/cart/data/models/store-models';\nimport { getPersistedCartData } from './persisted-data';\n\ntype State = {\n state: {\n displayMiniCart: boolean;\n miniCartMaxItemsDisplay: number;\n cartExpiresInDays: number;\n cartSummaryDisplayTotal: number;\n defaultCountry: string;\n categoryFixedProductTaxDisplaySetting: string;\n productFixedProductTaxDisplaySetting: string;\n salesFixedProductTaxDisplaySetting: string;\n useConfigurableParentThumbnail: boolean;\n shoppingCartDisplaySetting: {\n zeroTax: boolean;\n subtotal: string;\n price: string;\n shipping: string;\n fullSummary: boolean;\n grandTotal: boolean;\n taxGiftWrapping: string;\n };\n };\n cartId: string | null;\n authenticated: boolean;\n initializing?: boolean;\n locale?: string;\n config?: StoreConfigModel | null;\n};\n\nconst _state: State = (() => {\n const persistedCartData = getPersistedCartData();\n const isAuthenticated = persistedCartData\n ? !persistedCartData.isGuestCart\n : false;\n return {\n cartId: null,\n authenticated: isAuthenticated,\n };\n})();\n\n// Proxy state to allow reactivity\nexport const state = new Proxy(_state, {\n set(target, key, value) {\n // @ts-ignore\n target[key] = value;\n\n if (key === 'cartId') {\n // only update cookie if value has changed\n if (value === state.cartId) return true;\n\n if (value === null) {\n // remove cookie\n document.cookie = `DROPIN__CART__CART-ID=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`;\n return true;\n }\n\n // get expiration days from config\n const expiresInDays = state.config?.cartExpiresInDays;\n\n if (!expiresInDays) {\n console.warn(\n 'Missing \"expiresInDays\" config. Cookie expiration will default to 30 days.'\n );\n }\n\n // set expiration date\n const expires = new Date();\n expires.setDate(expires.getDate() + (expiresInDays ?? 30));\n\n // set cookie\n document.cookie = `DROPIN__CART__CART-ID=${value}; expires=${expires.toUTCString()}; path=/`;\n }\n\n return true;\n },\n get(target, key) {\n if (key === 'cartId') {\n // get value from cookie\n return getCookie('DROPIN__CART__CART-ID');\n }\n\n return target[key as keyof State];\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 { FetchGraphQL } from '@adobe-commerce/fetch-graphql';\n\nexport const {\n setEndpoint,\n setFetchGraphQlHeader,\n removeFetchGraphQlHeader,\n setFetchGraphQlHeaders,\n fetchGraphQl,\n getConfig,\n} = new FetchGraphQL().getMethods();\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 { resetCart } from '../api';\n\n/** Actions */\nexport const handleFetchError = (\n errors: Array<{\n message: string;\n path: Array<string>;\n extensions: { category: string };\n }>\n) => {\n const unauthorized =\n errors.findIndex(\n ({ extensions }) => extensions?.category === 'graphql-authorization'\n ) > -1;\n\n // Exclude invalid Coupon error\n const missingCart =\n errors.findIndex(\n ({ path, extensions }) =>\n extensions?.category === 'graphql-no-such-entity' &&\n !path?.includes('applyCouponsToCart')\n ) > -1;\n\n const errorMessage = errors.map((e: any) => e.message).join(' ');\n\n // Invalid cart\n const invalidCart =\n errors.findIndex(\n ({ path, extensions }) =>\n extensions?.category === 'graphql-input' &&\n path?.includes('cart')\n ) > -1;\n\n // Reset cart data if unauthorized or missing cart or invalid cart\n if (unauthorized || missingCart || invalidCart) {\n resetCart();\n console.error(errorMessage);\n return null;\n }\n\n throw Error(errorMessage);\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 { state } from '@/cart/lib/state';\nimport { CartModel } from '@/cart/data/models';\n\nexport const resetCart = (): Promise<CartModel | null> => {\n state.cartId = null;\n state.authenticated = false;\n\n return Promise.resolve(null);\n};\n"],"names":["getCookie","cookieName","cookies","i","cookie","_state","persistedCartData","getPersistedCartData","state","target","key","value","expiresInDays","_a","expires","setEndpoint","setFetchGraphQlHeader","removeFetchGraphQlHeader","setFetchGraphQlHeaders","fetchGraphQl","getConfig","FetchGraphQL","handleFetchError","errors","unauthorized","extensions","missingCart","path","errorMessage","e","invalidCart","resetCart"],"mappings":"2IAiBO,SAASA,EAAUC,EAAoB,CAE5C,MAAMC,EAAU,SAAS,OAAO,MAAM,GAAG,EAGzC,QAASC,EAAI,EAAGA,EAAID,EAAQ,OAAQC,IAAK,CACvC,MAAMC,EAASF,EAAQC,CAAC,EAAE,KAAK,EAG/B,GAAIC,EAAO,QAAQ,GAAGH,CAAU,GAAG,IAAM,EAEvC,OAAOG,EAAO,UAAUH,EAAW,OAAS,CAAC,CAC/C,CAIK,OAAA,IACT,CCeA,MAAMI,GAAiB,IAAM,CAC3B,MAAMC,EAAoBC,EAAqB,EAIxC,MAAA,CACL,OAAQ,KACR,cALsBD,EACpB,CAACA,EAAkB,YACnB,EAIJ,CACF,GAAG,EAGUE,EAAQ,IAAI,MAAMH,EAAQ,CACrC,IAAII,EAAQC,EAAKC,EAAO,OAItB,GAFAF,EAAOC,CAAG,EAAIC,EAEVD,IAAQ,SAAU,CAEhB,GAAAC,IAAUH,EAAM,OAAe,MAAA,GAEnC,GAAIG,IAAU,KAEZ,gBAAS,OAAS,wEACX,GAIH,MAAAC,GAAgBC,EAAAL,EAAM,SAAN,YAAAK,EAAc,kBAE/BD,GACK,QAAA,KACN,4EACF,EAII,MAAAE,MAAc,KACpBA,EAAQ,QAAQA,EAAQ,QAAQ,GAAKF,GAAiB,GAAG,EAGzD,SAAS,OAAS,yBAAyBD,CAAK,aAAaG,EAAQ,YAAa,CAAA,UAAA,CAG7E,MAAA,EACT,EACA,IAAIL,EAAQC,EAAK,CACf,OAAIA,IAAQ,SAEHV,EAAU,uBAAuB,EAGnCS,EAAOC,CAAkB,CAAA,CAEpC,CAAC,ECpFY,CACX,YAAAK,EACA,sBAAAC,EACA,yBAAAC,EACA,uBAAAC,EACA,aAAAC,EACA,UAAAC,CACF,EAAI,IAAIC,EAAa,EAAE,WAAW,ECNrBC,EACXC,GAKG,CACH,MAAMC,EACJD,EAAO,UACL,CAAC,CAAE,WAAAE,CAAW,KAAMA,GAAA,YAAAA,EAAY,YAAa,uBAAA,EAC3C,GAGAC,EACJH,EAAO,UACL,CAAC,CAAE,KAAAI,EAAM,WAAAF,CAAW,KAClBA,GAAA,YAAAA,EAAY,YAAa,0BACzB,EAACE,GAAA,MAAAA,EAAM,SAAS,sBAAoB,EACpC,GAEAC,EAAeL,EAAO,IAAKM,GAAWA,EAAE,OAAO,EAAE,KAAK,GAAG,EAGzDC,EACJP,EAAO,UACL,CAAC,CAAE,KAAAI,EAAM,WAAAF,MACPA,GAAA,YAAAA,EAAY,YAAa,kBACzBE,GAAA,YAAAA,EAAM,SAAS,QAAM,EACrB,GAGF,GAAAH,GAAgBE,GAAeI,EACvB,OAAAC,EAAA,EACV,QAAQ,MAAMH,CAAY,EACnB,KAGT,MAAM,MAAMA,CAAY,CAC1B,ECtCaG,EAAY,KACvBvB,EAAM,OAAS,KACfA,EAAM,cAAgB,GAEf,QAAQ,QAAQ,IAAI"}
|
|
1
|
+
{"version":3,"file":"resetCart.js","sources":["/@dropins/storefront-cart/src/lib/cookies.ts","/@dropins/storefront-cart/src/lib/state.ts","/@dropins/storefront-cart/src/api/fetch-graphql/fetch-graphql.ts","/@dropins/storefront-cart/src/lib/fetch-error.ts","/@dropins/storefront-cart/src/api/resetCart/resetCart.ts"],"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\nexport function getCookie(cookieName: string) {\n // Split the cookie string into an array of individual cookies\n const cookies = document.cookie.split(';');\n\n // Loop through the cookies to find the one with the specified name\n for (let i = 0; i < cookies.length; i++) {\n const cookie = cookies[i].trim(); // Remove leading and trailing spaces\n\n // Check if this cookie starts with the name you're looking for\n if (cookie.indexOf(`${cookieName}=`) === 0) {\n // Extract and return the cookie's value\n return cookie.substring(cookieName.length + 1);\n }\n }\n\n // If the cookie is not found, return null\n return null;\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 { getCookie } from '@/cart/lib/cookies';\nimport { StoreConfigModel } from '@/cart/data/models/store-models';\nimport { getAuthenticatedCart, setAuthenticatedCart } from './persisted-data';\n\ntype State = {\n state: {\n displayMiniCart: boolean;\n miniCartMaxItemsDisplay: number;\n cartExpiresInDays: number;\n cartSummaryDisplayTotal: number;\n defaultCountry: string;\n categoryFixedProductTaxDisplaySetting: string;\n productFixedProductTaxDisplaySetting: string;\n salesFixedProductTaxDisplaySetting: string;\n useConfigurableParentThumbnail: boolean;\n shoppingCartDisplaySetting: {\n zeroTax: boolean;\n subtotal: string;\n price: string;\n shipping: string;\n fullSummary: boolean;\n grandTotal: boolean;\n taxGiftWrapping: string;\n };\n };\n cartId: string | null;\n authenticated: boolean;\n initializing?: boolean;\n locale?: string;\n config?: StoreConfigModel | null;\n};\n\nconst _state: State = (() => {\n const isAuthenticated = getAuthenticatedCart();\n return {\n cartId: null,\n authenticated: isAuthenticated,\n };\n})();\n\n// Proxy state to allow reactivity\nexport const state = new Proxy(_state, {\n set(target, key, value) {\n // @ts-ignore\n target[key] = value;\n\n if (key === 'cartId') {\n // only update cookie if value has changed\n if (value === state.cartId) return true;\n\n if (value === null) {\n // remove cookie\n document.cookie = `DROPIN__CART__CART-ID=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`;\n return true;\n }\n\n // get expiration days from config\n const expiresInDays = state.config?.cartExpiresInDays;\n\n if (!expiresInDays) {\n console.warn(\n 'Missing \"expiresInDays\" config. Cookie expiration will default to 30 days.'\n );\n }\n\n // set expiration date\n const expires = new Date();\n expires.setDate(expires.getDate() + (expiresInDays ?? 30));\n\n // set cookie\n document.cookie = `DROPIN__CART__CART-ID=${value}; expires=${expires.toUTCString()}; path=/`;\n }\n\n if (key === 'authenticated') {\n setAuthenticatedCart(value);\n }\n\n return true;\n },\n get(target, key) {\n if (key === 'cartId') {\n // get value from cookie\n return getCookie('DROPIN__CART__CART-ID');\n }\n\n return target[key as keyof State];\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 { FetchGraphQL } from '@adobe-commerce/fetch-graphql';\n\nexport const {\n setEndpoint,\n setFetchGraphQlHeader,\n removeFetchGraphQlHeader,\n setFetchGraphQlHeaders,\n fetchGraphQl,\n getConfig,\n} = new FetchGraphQL().getMethods();\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 { resetCart } from '../api';\n\n/** Actions */\nexport const handleFetchError = (\n errors: Array<{\n message: string;\n path: Array<string>;\n extensions: { category: string };\n }>\n) => {\n const unauthorized =\n errors.findIndex(\n ({ extensions }) => extensions?.category === 'graphql-authorization'\n ) > -1;\n\n // Exclude invalid Coupon error\n const missingCart =\n errors.findIndex(\n ({ path, extensions }) =>\n extensions?.category === 'graphql-no-such-entity' &&\n !path?.includes('applyCouponsToCart')\n ) > -1;\n\n const errorMessage = errors.map((e: any) => e.message).join(' ');\n\n // Invalid cart\n const invalidCart =\n errors.findIndex(\n ({ path, extensions }) =>\n extensions?.category === 'graphql-input' &&\n path?.includes('cart')\n ) > -1;\n\n // Reset cart data if unauthorized or missing cart or invalid cart\n if (unauthorized || missingCart || invalidCart) {\n resetCart();\n console.error(errorMessage);\n return null;\n }\n\n throw Error(errorMessage);\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 { state } from '@/cart/lib/state';\nimport { CartModel } from '@/cart/data/models';\n\nexport const resetCart = (): Promise<CartModel | null> => {\n state.cartId = null;\n state.authenticated = false;\n\n return Promise.resolve(null);\n};\n"],"names":["getCookie","cookieName","cookies","i","cookie","_state","getAuthenticatedCart","state","target","key","value","expiresInDays","_a","expires","setAuthenticatedCart","setEndpoint","setFetchGraphQlHeader","removeFetchGraphQlHeader","setFetchGraphQlHeaders","fetchGraphQl","getConfig","FetchGraphQL","handleFetchError","errors","unauthorized","extensions","missingCart","path","errorMessage","e","invalidCart","resetCart"],"mappings":"kJAiBO,SAASA,EAAUC,EAAoB,CAE5C,MAAMC,EAAU,SAAS,OAAO,MAAM,GAAG,EAGzC,QAASC,EAAI,EAAGA,EAAID,EAAQ,OAAQC,IAAK,CACvC,MAAMC,EAASF,EAAQC,CAAC,EAAE,KAAK,EAG/B,GAAIC,EAAO,QAAQ,GAAGH,CAAU,GAAG,IAAM,EAEvC,OAAOG,EAAO,UAAUH,EAAW,OAAS,CAAC,CAC/C,CAIK,OAAA,IACT,CCeA,MAAMI,EAEG,CACL,OAAQ,KACR,cAHsBC,EAAqB,CAI7C,EAIWC,EAAQ,IAAI,MAAMF,EAAQ,CACrC,IAAIG,EAAQC,EAAKC,EAAO,OAItB,GAFAF,EAAOC,CAAG,EAAIC,EAEVD,IAAQ,SAAU,CAEhB,GAAAC,IAAUH,EAAM,OAAe,MAAA,GAEnC,GAAIG,IAAU,KAEZ,gBAAS,OAAS,wEACX,GAIH,MAAAC,GAAgBC,EAAAL,EAAM,SAAN,YAAAK,EAAc,kBAE/BD,GACK,QAAA,KACN,4EACF,EAII,MAAAE,MAAc,KACpBA,EAAQ,QAAQA,EAAQ,QAAQ,GAAKF,GAAiB,GAAG,EAGzD,SAAS,OAAS,yBAAyBD,CAAK,aAAaG,EAAQ,YAAa,CAAA,UAAA,CAGpF,OAAIJ,IAAQ,iBACVK,EAAqBJ,CAAK,EAGrB,EACT,EACA,IAAIF,EAAQC,EAAK,CACf,OAAIA,IAAQ,SAEHT,EAAU,uBAAuB,EAGnCQ,EAAOC,CAAkB,CAAA,CAEpC,CAAC,ECrFY,CACX,YAAAM,EACA,sBAAAC,EACA,yBAAAC,EACA,uBAAAC,EACA,aAAAC,EACA,UAAAC,CACF,EAAI,IAAIC,EAAa,EAAE,WAAW,ECNrBC,EACXC,GAKG,CACH,MAAMC,EACJD,EAAO,UACL,CAAC,CAAE,WAAAE,CAAW,KAAMA,GAAA,YAAAA,EAAY,YAAa,uBAAA,EAC3C,GAGAC,EACJH,EAAO,UACL,CAAC,CAAE,KAAAI,EAAM,WAAAF,CAAW,KAClBA,GAAA,YAAAA,EAAY,YAAa,0BACzB,EAACE,GAAA,MAAAA,EAAM,SAAS,sBAAoB,EACpC,GAEAC,EAAeL,EAAO,IAAKM,GAAWA,EAAE,OAAO,EAAE,KAAK,GAAG,EAGzDC,EACJP,EAAO,UACL,CAAC,CAAE,KAAAI,EAAM,WAAAF,MACPA,GAAA,YAAAA,EAAY,YAAa,kBACzBE,GAAA,YAAAA,EAAM,SAAS,QAAM,EACrB,GAGF,GAAAH,GAAgBE,GAAeI,EACvB,OAAAC,EAAA,EACV,QAAQ,MAAMH,CAAY,EACnB,KAGT,MAAM,MAAMA,CAAY,CAC1B,ECtCaG,EAAY,KACvBxB,EAAM,OAAS,KACfA,EAAM,cAAgB,GAEf,QAAQ,QAAQ,IAAI"}
|
package/lib/persisted-data.d.ts
CHANGED
|
@@ -8,4 +8,6 @@ export declare function setEstimatedShippingLocation(data: {
|
|
|
8
8
|
export declare function getEstimatedShippingLocation(): {
|
|
9
9
|
[key: string]: string;
|
|
10
10
|
} | null;
|
|
11
|
+
export declare function setAuthenticatedCart(isAuthenticated: boolean): void;
|
|
12
|
+
export declare function getAuthenticatedCart(): boolean;
|
|
11
13
|
//# sourceMappingURL=persisted-data.d.ts.map
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@dropins/storefront-cart", "version": "1.5.1-
|
|
1
|
+
{"name": "@dropins/storefront-cart", "version": "1.5.1-beta1", "@dropins/tools": "~1.4.0", "license": "SEE LICENSE IN LICENSE.md"}
|