@shopify/hydrogen-react 2022.7.0 → 2022.10.0
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/README.md +7 -5
- package/dist/dev/CartProvider.cjs +485 -0
- package/dist/dev/CartProvider.cjs.map +1 -0
- package/dist/dev/CartProvider.js +485 -0
- package/dist/dev/CartProvider.js.map +1 -0
- package/dist/dev/MediaFile.cjs.map +1 -1
- package/dist/dev/MediaFile.js.map +1 -1
- package/dist/dev/Metafield.cjs +2 -2
- package/dist/dev/Metafield.cjs.map +1 -1
- package/dist/dev/Metafield.js.map +1 -1
- package/dist/dev/ModelViewer.cjs +4 -4
- package/dist/dev/ModelViewer.cjs.map +1 -1
- package/dist/dev/Money.cjs.map +1 -1
- package/dist/dev/Money.js.map +1 -1
- package/dist/dev/ProductPrice.cjs.map +1 -1
- package/dist/dev/ProductPrice.js.map +1 -1
- package/dist/dev/ProductProvider.cjs +14 -14
- package/dist/dev/ProductProvider.cjs.map +1 -1
- package/dist/dev/ShopPayButton.cjs.map +1 -1
- package/dist/dev/ShopPayButton.js.map +1 -1
- package/dist/dev/ShopifyProvider.cjs +4 -4
- package/dist/dev/ShopifyProvider.cjs.map +1 -1
- package/dist/dev/Video.cjs +2 -2
- package/dist/dev/_virtual/index.cjs +5 -0
- package/dist/dev/_virtual/index.cjs.map +1 -0
- package/dist/dev/_virtual/index.js +5 -0
- package/dist/dev/_virtual/index.js.map +1 -0
- package/dist/dev/_virtual/use-sync-external-store-shim.development.cjs +5 -0
- package/dist/dev/_virtual/use-sync-external-store-shim.development.cjs.map +1 -0
- package/dist/dev/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/dev/_virtual/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/dev/_virtual/use-sync-external-store-shim.production.min.cjs +5 -0
- package/dist/dev/_virtual/use-sync-external-store-shim.production.min.cjs.map +1 -0
- package/dist/dev/_virtual/use-sync-external-store-shim.production.min.js +5 -0
- package/dist/dev/_virtual/use-sync-external-store-shim.production.min.js.map +1 -0
- package/dist/dev/_virtual/with-selector.cjs +5 -0
- package/dist/dev/_virtual/with-selector.cjs.map +1 -0
- package/dist/dev/_virtual/with-selector.development.cjs +5 -0
- package/dist/dev/_virtual/with-selector.development.cjs.map +1 -0
- package/dist/dev/_virtual/with-selector.development.js +5 -0
- package/dist/dev/_virtual/with-selector.development.js.map +1 -0
- package/dist/dev/_virtual/with-selector.js +5 -0
- package/dist/dev/_virtual/with-selector.js.map +1 -0
- package/dist/dev/_virtual/with-selector.production.min.cjs +5 -0
- package/dist/dev/_virtual/with-selector.production.min.cjs.map +1 -0
- package/dist/dev/_virtual/with-selector.production.min.js +5 -0
- package/dist/dev/_virtual/with-selector.production.min.js.map +1 -0
- package/dist/dev/cart-constants.cjs +17 -0
- package/dist/dev/cart-constants.cjs.map +1 -0
- package/dist/dev/cart-constants.js +17 -0
- package/dist/dev/cart-constants.js.map +1 -0
- package/dist/dev/cart-hooks.cjs +48 -0
- package/dist/dev/cart-hooks.cjs.map +1 -0
- package/dist/dev/cart-hooks.js +48 -0
- package/dist/dev/cart-hooks.js.map +1 -0
- package/dist/dev/cart-queries.cjs +114 -0
- package/dist/dev/cart-queries.cjs.map +1 -0
- package/dist/dev/cart-queries.js +114 -0
- package/dist/dev/cart-queries.js.map +1 -0
- package/dist/dev/flatten-connection.cjs +6 -0
- package/dist/dev/flatten-connection.cjs.map +1 -1
- package/dist/dev/flatten-connection.js +6 -0
- package/dist/dev/flatten-connection.js.map +1 -1
- package/dist/dev/index.cjs +3 -0
- package/dist/dev/index.cjs.map +1 -1
- package/dist/dev/index.js +3 -0
- package/dist/dev/index.js.map +1 -1
- package/dist/dev/load-script.cjs +3 -3
- package/dist/dev/load-script.cjs.map +1 -1
- package/dist/dev/node_modules/@xstate/fsm/es/index.cjs +158 -0
- package/dist/dev/node_modules/@xstate/fsm/es/index.cjs.map +1 -0
- package/dist/dev/node_modules/@xstate/fsm/es/index.js +159 -0
- package/dist/dev/node_modules/@xstate/fsm/es/index.js.map +1 -0
- package/dist/dev/node_modules/@xstate/react/es/fsm.cjs +94 -0
- package/dist/dev/node_modules/@xstate/react/es/fsm.cjs.map +1 -0
- package/dist/dev/node_modules/@xstate/react/es/fsm.js +94 -0
- package/dist/dev/node_modules/@xstate/react/es/fsm.js.map +1 -0
- package/dist/dev/node_modules/@xstate/react/es/useConstant.cjs +30 -0
- package/dist/dev/node_modules/@xstate/react/es/useConstant.cjs.map +1 -0
- package/dist/dev/node_modules/@xstate/react/es/useConstant.js +12 -0
- package/dist/dev/node_modules/@xstate/react/es/useConstant.js.map +1 -0
- package/dist/dev/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.cjs +5 -0
- package/dist/dev/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.cjs.map +1 -0
- package/dist/dev/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +6 -0
- package/dist/dev/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js.map +1 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.cjs +107 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.cjs.map +1 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +105 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.cjs +74 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.cjs.map +1 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +72 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js.map +1 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +138 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs.map +1 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +136 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.cjs +60 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.cjs.map +1 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +58 -0
- package/dist/dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js.map +1 -0
- package/dist/dev/node_modules/use-sync-external-store/shim/index.cjs +21 -0
- package/dist/dev/node_modules/use-sync-external-store/shim/index.cjs.map +1 -0
- package/dist/dev/node_modules/use-sync-external-store/shim/index.js +21 -0
- package/dist/dev/node_modules/use-sync-external-store/shim/index.js.map +1 -0
- package/dist/dev/node_modules/use-sync-external-store/shim/with-selector.cjs +12 -0
- package/dist/dev/node_modules/use-sync-external-store/shim/with-selector.cjs.map +1 -0
- package/dist/dev/node_modules/use-sync-external-store/shim/with-selector.js +11 -0
- package/dist/dev/node_modules/use-sync-external-store/shim/with-selector.js.map +1 -0
- package/dist/dev/node_modules/worktop/cookie/index.cjs +27 -0
- package/dist/dev/node_modules/worktop/cookie/index.cjs.map +1 -0
- package/dist/dev/node_modules/worktop/cookie/index.js +27 -0
- package/dist/dev/node_modules/worktop/cookie/index.js.map +1 -0
- package/dist/dev/storefront-api-constants.cjs +1 -1
- package/dist/dev/storefront-api-constants.cjs.map +1 -1
- package/dist/dev/storefront-api-constants.js +1 -1
- package/dist/dev/storefront-api-constants.js.map +1 -1
- package/dist/dev/useCartAPIStateMachine.cjs +326 -0
- package/dist/dev/useCartAPIStateMachine.cjs.map +1 -0
- package/dist/dev/useCartAPIStateMachine.js +326 -0
- package/dist/dev/useCartAPIStateMachine.js.map +1 -0
- package/dist/dev/useCartActions.cjs +123 -0
- package/dist/dev/useCartActions.cjs.map +1 -0
- package/dist/dev/useCartActions.js +123 -0
- package/dist/dev/useCartActions.js.map +1 -0
- package/dist/dev/useMoney.cjs +5 -5
- package/dist/dev/useMoney.cjs.map +1 -1
- package/dist/prod/CartProvider.cjs +485 -0
- package/dist/prod/CartProvider.cjs.map +1 -0
- package/dist/prod/CartProvider.js +485 -0
- package/dist/prod/CartProvider.js.map +1 -0
- package/dist/prod/MediaFile.cjs.map +1 -1
- package/dist/prod/MediaFile.js.map +1 -1
- package/dist/prod/Metafield.cjs +2 -2
- package/dist/prod/Metafield.cjs.map +1 -1
- package/dist/prod/Metafield.js.map +1 -1
- package/dist/prod/ModelViewer.cjs +4 -4
- package/dist/prod/ModelViewer.cjs.map +1 -1
- package/dist/prod/Money.cjs.map +1 -1
- package/dist/prod/Money.js.map +1 -1
- package/dist/prod/ProductPrice.cjs.map +1 -1
- package/dist/prod/ProductPrice.js.map +1 -1
- package/dist/prod/ProductProvider.cjs +14 -14
- package/dist/prod/ProductProvider.cjs.map +1 -1
- package/dist/prod/ShopPayButton.cjs.map +1 -1
- package/dist/prod/ShopPayButton.js.map +1 -1
- package/dist/prod/ShopifyProvider.cjs +4 -4
- package/dist/prod/ShopifyProvider.cjs.map +1 -1
- package/dist/prod/Video.cjs +2 -2
- package/dist/prod/_virtual/index.cjs +5 -0
- package/dist/prod/_virtual/index.cjs.map +1 -0
- package/dist/prod/_virtual/index.js +5 -0
- package/dist/prod/_virtual/index.js.map +1 -0
- package/dist/prod/_virtual/use-sync-external-store-shim.development.cjs +5 -0
- package/dist/prod/_virtual/use-sync-external-store-shim.development.cjs.map +1 -0
- package/dist/prod/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/prod/_virtual/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/prod/_virtual/use-sync-external-store-shim.production.min.cjs +5 -0
- package/dist/prod/_virtual/use-sync-external-store-shim.production.min.cjs.map +1 -0
- package/dist/prod/_virtual/use-sync-external-store-shim.production.min.js +5 -0
- package/dist/prod/_virtual/use-sync-external-store-shim.production.min.js.map +1 -0
- package/dist/prod/_virtual/with-selector.cjs +5 -0
- package/dist/prod/_virtual/with-selector.cjs.map +1 -0
- package/dist/prod/_virtual/with-selector.development.cjs +5 -0
- package/dist/prod/_virtual/with-selector.development.cjs.map +1 -0
- package/dist/prod/_virtual/with-selector.development.js +5 -0
- package/dist/prod/_virtual/with-selector.development.js.map +1 -0
- package/dist/prod/_virtual/with-selector.js +5 -0
- package/dist/prod/_virtual/with-selector.js.map +1 -0
- package/dist/prod/_virtual/with-selector.production.min.cjs +5 -0
- package/dist/prod/_virtual/with-selector.production.min.cjs.map +1 -0
- package/dist/prod/_virtual/with-selector.production.min.js +5 -0
- package/dist/prod/_virtual/with-selector.production.min.js.map +1 -0
- package/dist/prod/cart-constants.cjs +17 -0
- package/dist/prod/cart-constants.cjs.map +1 -0
- package/dist/prod/cart-constants.js +17 -0
- package/dist/prod/cart-constants.js.map +1 -0
- package/dist/prod/cart-hooks.cjs +48 -0
- package/dist/prod/cart-hooks.cjs.map +1 -0
- package/dist/prod/cart-hooks.js +48 -0
- package/dist/prod/cart-hooks.js.map +1 -0
- package/dist/prod/cart-queries.cjs +114 -0
- package/dist/prod/cart-queries.cjs.map +1 -0
- package/dist/prod/cart-queries.js +114 -0
- package/dist/prod/cart-queries.js.map +1 -0
- package/dist/prod/flatten-connection.cjs +7 -0
- package/dist/prod/flatten-connection.cjs.map +1 -1
- package/dist/prod/flatten-connection.js +7 -0
- package/dist/prod/flatten-connection.js.map +1 -1
- package/dist/prod/index.cjs +3 -0
- package/dist/prod/index.cjs.map +1 -1
- package/dist/prod/index.js +3 -0
- package/dist/prod/index.js.map +1 -1
- package/dist/prod/load-script.cjs +3 -3
- package/dist/prod/load-script.cjs.map +1 -1
- package/dist/prod/node_modules/@xstate/fsm/es/index.cjs +158 -0
- package/dist/prod/node_modules/@xstate/fsm/es/index.cjs.map +1 -0
- package/dist/prod/node_modules/@xstate/fsm/es/index.js +159 -0
- package/dist/prod/node_modules/@xstate/fsm/es/index.js.map +1 -0
- package/dist/prod/node_modules/@xstate/react/es/fsm.cjs +94 -0
- package/dist/prod/node_modules/@xstate/react/es/fsm.cjs.map +1 -0
- package/dist/prod/node_modules/@xstate/react/es/fsm.js +94 -0
- package/dist/prod/node_modules/@xstate/react/es/fsm.js.map +1 -0
- package/dist/prod/node_modules/@xstate/react/es/useConstant.cjs +30 -0
- package/dist/prod/node_modules/@xstate/react/es/useConstant.cjs.map +1 -0
- package/dist/prod/node_modules/@xstate/react/es/useConstant.js +12 -0
- package/dist/prod/node_modules/@xstate/react/es/useConstant.js.map +1 -0
- package/dist/prod/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.cjs +5 -0
- package/dist/prod/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.cjs.map +1 -0
- package/dist/prod/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +6 -0
- package/dist/prod/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js.map +1 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.cjs +107 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.cjs.map +1 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +105 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.cjs +74 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.cjs.map +1 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +72 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js.map +1 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +138 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs.map +1 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +136 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.cjs +60 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.cjs.map +1 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +58 -0
- package/dist/prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js.map +1 -0
- package/dist/prod/node_modules/use-sync-external-store/shim/index.cjs +21 -0
- package/dist/prod/node_modules/use-sync-external-store/shim/index.cjs.map +1 -0
- package/dist/prod/node_modules/use-sync-external-store/shim/index.js +21 -0
- package/dist/prod/node_modules/use-sync-external-store/shim/index.js.map +1 -0
- package/dist/prod/node_modules/use-sync-external-store/shim/with-selector.cjs +12 -0
- package/dist/prod/node_modules/use-sync-external-store/shim/with-selector.cjs.map +1 -0
- package/dist/prod/node_modules/use-sync-external-store/shim/with-selector.js +11 -0
- package/dist/prod/node_modules/use-sync-external-store/shim/with-selector.js.map +1 -0
- package/dist/prod/node_modules/worktop/cookie/index.cjs +27 -0
- package/dist/prod/node_modules/worktop/cookie/index.cjs.map +1 -0
- package/dist/prod/node_modules/worktop/cookie/index.js +27 -0
- package/dist/prod/node_modules/worktop/cookie/index.js.map +1 -0
- package/dist/prod/storefront-api-constants.cjs +1 -1
- package/dist/prod/storefront-api-constants.cjs.map +1 -1
- package/dist/prod/storefront-api-constants.js +1 -1
- package/dist/prod/storefront-api-constants.js.map +1 -1
- package/dist/prod/useCartAPIStateMachine.cjs +326 -0
- package/dist/prod/useCartAPIStateMachine.cjs.map +1 -0
- package/dist/prod/useCartAPIStateMachine.js +326 -0
- package/dist/prod/useCartAPIStateMachine.js.map +1 -0
- package/dist/prod/useCartActions.cjs +123 -0
- package/dist/prod/useCartActions.cjs.map +1 -0
- package/dist/prod/useCartActions.js +123 -0
- package/dist/prod/useCartActions.js.map +1 -0
- package/dist/prod/useMoney.cjs +5 -5
- package/dist/prod/useMoney.cjs.map +1 -1
- package/dist/types/CartProvider.d.ts +61 -0
- package/dist/types/MediaFile.d.ts +0 -1
- package/dist/types/Money.d.ts +1 -1
- package/dist/types/ProductPrice.d.ts +0 -1
- package/dist/types/cart-constants.d.ts +8 -0
- package/dist/types/cart-hooks.d.ts +24 -0
- package/dist/types/cart-queries.d.ts +10 -0
- package/dist/types/cart-types.d.ts +289 -0
- package/dist/types/flatten-connection.d.ts +3 -1
- package/dist/types/index.d.cts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/storefront-api-constants.d.ts +1 -1
- package/dist/types/storefront-api-types.d.ts +278 -73
- package/dist/types/useCartAPIStateMachine.d.ts +25 -0
- package/dist/types/useCartActions.d.ts +64 -0
- package/dist/umd/hydrogen-react.dev.js +1815 -109
- package/dist/umd/hydrogen-react.dev.js.map +1 -1
- package/dist/umd/hydrogen-react.prod.js +239 -2
- package/dist/umd/hydrogen-react.prod.js.map +1 -1
- package/package.json +24 -12
- package/storefront.schema.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const useSyncExternalStoreShim_production_min = require("../../../_virtual/use-sync-external-store-shim.production.min.cjs");
|
|
4
|
+
const require$$0 = require("react");
|
|
5
|
+
const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
6
|
+
const require$$0__default = /* @__PURE__ */ _interopDefaultLegacy(require$$0);
|
|
7
|
+
/**
|
|
8
|
+
* @license React
|
|
9
|
+
* use-sync-external-store-shim.production.min.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
var hasRequiredUseSyncExternalStoreShim_production_min;
|
|
17
|
+
function requireUseSyncExternalStoreShim_production_min() {
|
|
18
|
+
if (hasRequiredUseSyncExternalStoreShim_production_min)
|
|
19
|
+
return useSyncExternalStoreShim_production_min.__exports;
|
|
20
|
+
hasRequiredUseSyncExternalStoreShim_production_min = 1;
|
|
21
|
+
var e = require$$0__default.default;
|
|
22
|
+
function h(a, b) {
|
|
23
|
+
return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
|
|
24
|
+
}
|
|
25
|
+
var k = "function" === typeof Object.is ? Object.is : h, l = e.useState, m = e.useEffect, n = e.useLayoutEffect, p = e.useDebugValue;
|
|
26
|
+
function q(a, b) {
|
|
27
|
+
var d = b(), f = l({ inst: { value: d, getSnapshot: b } }), c = f[0].inst, g = f[1];
|
|
28
|
+
n(function() {
|
|
29
|
+
c.value = d;
|
|
30
|
+
c.getSnapshot = b;
|
|
31
|
+
r(c) && g({ inst: c });
|
|
32
|
+
}, [a, d, b]);
|
|
33
|
+
m(function() {
|
|
34
|
+
r(c) && g({ inst: c });
|
|
35
|
+
return a(function() {
|
|
36
|
+
r(c) && g({ inst: c });
|
|
37
|
+
});
|
|
38
|
+
}, [a]);
|
|
39
|
+
p(d);
|
|
40
|
+
return d;
|
|
41
|
+
}
|
|
42
|
+
function r(a) {
|
|
43
|
+
var b = a.getSnapshot;
|
|
44
|
+
a = a.value;
|
|
45
|
+
try {
|
|
46
|
+
var d = b();
|
|
47
|
+
return !k(a, d);
|
|
48
|
+
} catch (f) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function t(a, b) {
|
|
53
|
+
return b();
|
|
54
|
+
}
|
|
55
|
+
var u = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? t : q;
|
|
56
|
+
useSyncExternalStoreShim_production_min.__exports.useSyncExternalStore = void 0 !== e.useSyncExternalStore ? e.useSyncExternalStore : u;
|
|
57
|
+
return useSyncExternalStoreShim_production_min.__exports;
|
|
58
|
+
}
|
|
59
|
+
exports.__require = requireUseSyncExternalStoreShim_production_min;
|
|
60
|
+
//# sourceMappingURL=use-sync-external-store-shim.production.min.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sync-external-store-shim.production.min.cjs","sources":["../../../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n"],"names":["require$$0","useSyncExternalStoreShim_production_min"],"mappings":";;;;;;;;;;;;;;;;;;;;AASa,MAAI,IAAEA,oBAAgB;AAAC,WAAS,EAAE,GAAE,GAAE;AAAC,WAAO,MAAI,MAAI,MAAI,KAAG,IAAE,MAAI,IAAE,MAAI,MAAI,KAAG,MAAI;AAAA,EAAC;AAAC,MAAI,IAAE,eAAa,OAAO,OAAO,KAAG,OAAO,KAAG,GAAE,IAAE,EAAE,UAAS,IAAE,EAAE,WAAU,IAAE,EAAE,iBAAgB,IAAE,EAAE;AAAc,WAAS,EAAE,GAAE,GAAE;AAAC,QAAI,IAAE,EAAC,GAAG,IAAE,EAAE,EAAC,MAAK,EAAC,OAAM,GAAE,aAAY,EAAC,EAAC,CAAC,GAAE,IAAE,EAAE,GAAG,MAAK,IAAE,EAAE;AAAG,MAAE,WAAU;AAAC,QAAE,QAAM;AAAE,QAAE,cAAY;AAAE,QAAE,CAAC,KAAG,EAAE,EAAC,MAAK,EAAC,CAAC;AAAA,IAAC,GAAE,CAAC,GAAE,GAAE,CAAC,CAAC;AAAE,MAAE,WAAU;AAAC,QAAE,CAAC,KAAG,EAAE,EAAC,MAAK,EAAC,CAAC;AAAE,aAAO,EAAE,WAAU;AAAC,UAAE,CAAC,KAAG,EAAE,EAAC,MAAK,EAAC,CAAC;AAAA,MAAC,CAAC;AAAA,IAAC,GAAE,CAAC,CAAC,CAAC;AAAE,MAAE,CAAC;AAAE,WAAO;AAAA,EAAC;AAClc,WAAS,EAAE,GAAE;AAAC,QAAI,IAAE,EAAE;AAAY,QAAE,EAAE;AAAM,QAAG;AAAC,UAAI,IAAE,EAAG;AAAC,aAAM,CAAC,EAAE,GAAE,CAAC;AAAA,IAAC,SAAO,GAAN;AAAS,aAAM;AAAA,IAAE;AAAA,EAAC;AAAC,WAAS,EAAE,GAAE,GAAE;AAAC,WAAO,EAAC;AAAA,EAAE;AAAC,MAAI,IAAE,gBAAc,OAAO,UAAQ,gBAAc,OAAO,OAAO,YAAU,gBAAc,OAAO,OAAO,SAAS,gBAAc,IAAE;AAAEC,0CAA4B,UAAA,uBAAC,WAAS,EAAE,uBAAqB,EAAE,uBAAqB;;;;"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { __exports as useSyncExternalStoreShim_production_min } from "../../../_virtual/use-sync-external-store-shim.production.min.js";
|
|
2
|
+
import require$$0__default from "react";
|
|
3
|
+
/**
|
|
4
|
+
* @license React
|
|
5
|
+
* use-sync-external-store-shim.production.min.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
var hasRequiredUseSyncExternalStoreShim_production_min;
|
|
13
|
+
function requireUseSyncExternalStoreShim_production_min() {
|
|
14
|
+
if (hasRequiredUseSyncExternalStoreShim_production_min)
|
|
15
|
+
return useSyncExternalStoreShim_production_min;
|
|
16
|
+
hasRequiredUseSyncExternalStoreShim_production_min = 1;
|
|
17
|
+
var e = require$$0__default;
|
|
18
|
+
function h(a, b) {
|
|
19
|
+
return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
|
|
20
|
+
}
|
|
21
|
+
var k = "function" === typeof Object.is ? Object.is : h, l = e.useState, m = e.useEffect, n = e.useLayoutEffect, p = e.useDebugValue;
|
|
22
|
+
function q(a, b) {
|
|
23
|
+
var d = b(), f = l({ inst: { value: d, getSnapshot: b } }), c = f[0].inst, g = f[1];
|
|
24
|
+
n(function() {
|
|
25
|
+
c.value = d;
|
|
26
|
+
c.getSnapshot = b;
|
|
27
|
+
r(c) && g({ inst: c });
|
|
28
|
+
}, [a, d, b]);
|
|
29
|
+
m(function() {
|
|
30
|
+
r(c) && g({ inst: c });
|
|
31
|
+
return a(function() {
|
|
32
|
+
r(c) && g({ inst: c });
|
|
33
|
+
});
|
|
34
|
+
}, [a]);
|
|
35
|
+
p(d);
|
|
36
|
+
return d;
|
|
37
|
+
}
|
|
38
|
+
function r(a) {
|
|
39
|
+
var b = a.getSnapshot;
|
|
40
|
+
a = a.value;
|
|
41
|
+
try {
|
|
42
|
+
var d = b();
|
|
43
|
+
return !k(a, d);
|
|
44
|
+
} catch (f) {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function t(a, b) {
|
|
49
|
+
return b();
|
|
50
|
+
}
|
|
51
|
+
var u = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? t : q;
|
|
52
|
+
useSyncExternalStoreShim_production_min.useSyncExternalStore = void 0 !== e.useSyncExternalStore ? e.useSyncExternalStore : u;
|
|
53
|
+
return useSyncExternalStoreShim_production_min;
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
requireUseSyncExternalStoreShim_production_min as __require
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=use-sync-external-store-shim.production.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-sync-external-store-shim.production.min.js","sources":["../../../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n"],"names":["require$$0"],"mappings":";;;;;;;;;;;;;;;;AASa,MAAI,IAAEA;AAAiB,WAAS,EAAE,GAAE,GAAE;AAAC,WAAO,MAAI,MAAI,MAAI,KAAG,IAAE,MAAI,IAAE,MAAI,MAAI,KAAG,MAAI;AAAA,EAAC;AAAC,MAAI,IAAE,eAAa,OAAO,OAAO,KAAG,OAAO,KAAG,GAAE,IAAE,EAAE,UAAS,IAAE,EAAE,WAAU,IAAE,EAAE,iBAAgB,IAAE,EAAE;AAAc,WAAS,EAAE,GAAE,GAAE;AAAC,QAAI,IAAE,EAAC,GAAG,IAAE,EAAE,EAAC,MAAK,EAAC,OAAM,GAAE,aAAY,EAAC,EAAC,CAAC,GAAE,IAAE,EAAE,GAAG,MAAK,IAAE,EAAE;AAAG,MAAE,WAAU;AAAC,QAAE,QAAM;AAAE,QAAE,cAAY;AAAE,QAAE,CAAC,KAAG,EAAE,EAAC,MAAK,EAAC,CAAC;AAAA,IAAC,GAAE,CAAC,GAAE,GAAE,CAAC,CAAC;AAAE,MAAE,WAAU;AAAC,QAAE,CAAC,KAAG,EAAE,EAAC,MAAK,EAAC,CAAC;AAAE,aAAO,EAAE,WAAU;AAAC,UAAE,CAAC,KAAG,EAAE,EAAC,MAAK,EAAC,CAAC;AAAA,MAAC,CAAC;AAAA,IAAC,GAAE,CAAC,CAAC,CAAC;AAAE,MAAE,CAAC;AAAE,WAAO;AAAA,EAAC;AAClc,WAAS,EAAE,GAAE;AAAC,QAAI,IAAE,EAAE;AAAY,QAAE,EAAE;AAAM,QAAG;AAAC,UAAI,IAAE,EAAG;AAAC,aAAM,CAAC,EAAE,GAAE,CAAC;AAAA,IAAC,SAAO,GAAN;AAAS,aAAM;AAAA,IAAE;AAAA,EAAC;AAAC,WAAS,EAAE,GAAE,GAAE;AAAC,WAAO,EAAC;AAAA,EAAE;AAAC,MAAI,IAAE,gBAAc,OAAO,UAAQ,gBAAc,OAAO,OAAO,YAAU,gBAAc,OAAO,OAAO,SAAS,gBAAc,IAAE;AAAE,0CAA4B,uBAAC,WAAS,EAAE,uBAAqB,EAAE,uBAAqB;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const index = require("../../../_virtual/index.cjs");
|
|
4
|
+
const useSyncExternalStoreShim_production_min = require("../cjs/use-sync-external-store-shim.production.min.cjs");
|
|
5
|
+
const useSyncExternalStoreShim_development = require("../cjs/use-sync-external-store-shim.development.cjs");
|
|
6
|
+
var hasRequiredShim;
|
|
7
|
+
function requireShim() {
|
|
8
|
+
if (hasRequiredShim)
|
|
9
|
+
return index.shim.exports;
|
|
10
|
+
hasRequiredShim = 1;
|
|
11
|
+
(function(module2) {
|
|
12
|
+
if (process.env.NODE_ENV === "production") {
|
|
13
|
+
module2.exports = useSyncExternalStoreShim_production_min.__require();
|
|
14
|
+
} else {
|
|
15
|
+
module2.exports = useSyncExternalStoreShim_development.__require();
|
|
16
|
+
}
|
|
17
|
+
})(index.shim);
|
|
18
|
+
return index.shim.exports;
|
|
19
|
+
}
|
|
20
|
+
exports.__require = requireShim;
|
|
21
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/use-sync-external-store/shim/index.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n"],"names":["module","require$$0","require$$1"],"mappings":";;;;;;;;;;;AAEA,QAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,MAAAA,QAAA,UAAiBC,wCAAAA;IACnB,OAAO;AACL,MAAAD,QAAA,UAAiBE,qCAAAA;IACnB;AAAA;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { s as shim } from "../../../_virtual/index.js";
|
|
2
|
+
import { __require as requireUseSyncExternalStoreShim_production_min } from "../cjs/use-sync-external-store-shim.production.min.js";
|
|
3
|
+
import { __require as requireUseSyncExternalStoreShim_development } from "../cjs/use-sync-external-store-shim.development.js";
|
|
4
|
+
var hasRequiredShim;
|
|
5
|
+
function requireShim() {
|
|
6
|
+
if (hasRequiredShim)
|
|
7
|
+
return shim.exports;
|
|
8
|
+
hasRequiredShim = 1;
|
|
9
|
+
(function(module) {
|
|
10
|
+
if (process.env.NODE_ENV === "production") {
|
|
11
|
+
module.exports = requireUseSyncExternalStoreShim_production_min();
|
|
12
|
+
} else {
|
|
13
|
+
module.exports = requireUseSyncExternalStoreShim_development();
|
|
14
|
+
}
|
|
15
|
+
})(shim);
|
|
16
|
+
return shim.exports;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
requireShim as __require
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/use-sync-external-store/shim/index.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n"],"names":["require$$0","require$$1"],"mappings":";;;;;;;;;AAEA,QAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,aAAA,UAAiBA;IACnB,OAAO;AACL,aAAA,UAAiBC;IACnB;AAAA;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const withSelector = require("../../../_virtual/with-selector.cjs");
|
|
3
|
+
const withSelector_production_min = require("../cjs/use-sync-external-store-shim/with-selector.production.min.cjs");
|
|
4
|
+
const withSelector_development = require("../cjs/use-sync-external-store-shim/with-selector.development.cjs");
|
|
5
|
+
(function(module2) {
|
|
6
|
+
if (process.env.NODE_ENV === "production") {
|
|
7
|
+
module2.exports = withSelector_production_min.__require();
|
|
8
|
+
} else {
|
|
9
|
+
module2.exports = withSelector_development.__require();
|
|
10
|
+
}
|
|
11
|
+
})(withSelector.withSelector);
|
|
12
|
+
//# sourceMappingURL=with-selector.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with-selector.cjs","sources":["../../../../../../../node_modules/use-sync-external-store/shim/with-selector.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n"],"names":["module","require$$0","require$$1"],"mappings":";;;;;AAEA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,IAAAA,QAAA,UAAiBC,4BAAAA;EACnB,OAAO;AACL,IAAAD,QAAA,UAAiBE,yBAAAA;EACnB;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { w as withSelector } from "../../../_virtual/with-selector.js";
|
|
2
|
+
import { __require as requireWithSelector_production_min } from "../cjs/use-sync-external-store-shim/with-selector.production.min.js";
|
|
3
|
+
import { __require as requireWithSelector_development } from "../cjs/use-sync-external-store-shim/with-selector.development.js";
|
|
4
|
+
(function(module) {
|
|
5
|
+
if (process.env.NODE_ENV === "production") {
|
|
6
|
+
module.exports = requireWithSelector_production_min();
|
|
7
|
+
} else {
|
|
8
|
+
module.exports = requireWithSelector_development();
|
|
9
|
+
}
|
|
10
|
+
})(withSelector);
|
|
11
|
+
//# sourceMappingURL=with-selector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with-selector.js","sources":["../../../../../../../node_modules/use-sync-external-store/shim/with-selector.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n"],"names":["require$$0","require$$1"],"mappings":";;;;AAEA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,WAAA,UAAiBA;EACnB,OAAO;AACL,WAAA,UAAiBC;EACnB;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
var g = /* @__PURE__ */ new Set([
|
|
4
|
+
"domain",
|
|
5
|
+
"path",
|
|
6
|
+
"max-age",
|
|
7
|
+
"expires",
|
|
8
|
+
"samesite",
|
|
9
|
+
"secure",
|
|
10
|
+
"httponly"
|
|
11
|
+
]);
|
|
12
|
+
function u(a) {
|
|
13
|
+
let r = {}, e, t, n = 0, m = a.split(/;\s*/g), s, i;
|
|
14
|
+
for (; n < m.length; n++)
|
|
15
|
+
if (t = m[n], e = t.indexOf("="), ~e) {
|
|
16
|
+
if (s = t.substring(0, e++).trim(), i = t.substring(e).trim(), i[0] === '"' && (i = i.substring(1, i.length - 1)), ~i.indexOf("%"))
|
|
17
|
+
try {
|
|
18
|
+
i = decodeURIComponent(i);
|
|
19
|
+
} catch (f) {
|
|
20
|
+
}
|
|
21
|
+
g.has(t = s.toLowerCase()) ? t === "expires" ? r.expires = new Date(i) : t === "max-age" ? r.maxage = +i : r[t] = i : r[s] = i;
|
|
22
|
+
} else
|
|
23
|
+
(s = t.trim().toLowerCase()) && (s === "httponly" || s === "secure") && (r[s] = true);
|
|
24
|
+
return r;
|
|
25
|
+
}
|
|
26
|
+
exports.parse = u;
|
|
27
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/worktop/cookie/index.mjs"],"sourcesContent":["// src/cookie.ts\nvar g = new Set([\n \"domain\",\n \"path\",\n \"max-age\",\n \"expires\",\n \"samesite\",\n \"secure\",\n \"httponly\"\n]);\nfunction u(a) {\n let r = {}, e, t, n = 0, m = a.split(/;\\s*/g), s, i;\n for (; n < m.length; n++)\n if (t = m[n], e = t.indexOf(\"=\"), ~e) {\n if (s = t.substring(0, e++).trim(), i = t.substring(e).trim(), i[0] === '\"' && (i = i.substring(1, i.length - 1)), ~i.indexOf(\"%\"))\n try {\n i = decodeURIComponent(i);\n } catch (f) {\n }\n g.has(t = s.toLowerCase()) ? t === \"expires\" ? r.expires = new Date(i) : t === \"max-age\" ? r.maxage = +i : r[t] = i : r[s] = i;\n } else\n (s = t.trim().toLowerCase()) && (s === \"httponly\" || s === \"secure\") && (r[s] = !0);\n return r;\n}\nfunction l(a, r, e = {}) {\n let t = a + \"=\" + encodeURIComponent(r);\n return e.expires && (t += \"; Expires=\" + new Date(e.expires).toUTCString()), e.maxage != null && e.maxage >= 0 && (t += \"; Max-Age=\" + (e.maxage | 0)), e.domain && (t += \"; Domain=\" + e.domain), e.path && (t += \"; Path=\" + e.path), e.samesite && (t += \"; SameSite=\" + e.samesite), (e.secure || e.samesite === \"None\") && (t += \"; Secure\"), e.httponly && (t += \"; HttpOnly\"), t;\n}\nexport {\n u as parse,\n l as stringify\n};\n"],"names":[],"mappings":";;AACA,IAAI,IAAI,oBAAI,IAAI;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AACD,SAAS,EAAE,GAAG;AACZ,MAAI,IAAI,CAAE,GAAE,GAAG,GAAG,IAAI,GAAG,IAAI,EAAE,MAAM,OAAO,GAAG,GAAG;AAClD,SAAO,IAAI,EAAE,QAAQ;AACnB,QAAI,IAAI,EAAE,IAAI,IAAI,EAAE,QAAQ,GAAG,GAAG,CAAC,GAAG;AACpC,UAAI,IAAI,EAAE,UAAU,GAAG,GAAG,EAAE,KAAM,GAAE,IAAI,EAAE,UAAU,CAAC,EAAE,KAAM,GAAE,EAAE,OAAO,QAAQ,IAAI,EAAE,UAAU,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG;AAC/H,YAAI;AACF,cAAI,mBAAmB,CAAC;AAAA,QACzB,SAAQ,GAAP;AAAA,QACD;AACH,QAAE,IAAI,IAAI,EAAE,YAAa,CAAA,IAAI,MAAM,YAAY,EAAE,UAAU,IAAI,KAAK,CAAC,IAAI,MAAM,YAAY,EAAE,SAAS,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,KAAK;AAAA,IAC9H;AACC,OAAC,IAAI,EAAE,KAAM,EAAC,YAAW,OAAQ,MAAM,cAAc,MAAM,cAAc,EAAE,KAAK;AACpF,SAAO;AACT;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var g = /* @__PURE__ */ new Set([
|
|
2
|
+
"domain",
|
|
3
|
+
"path",
|
|
4
|
+
"max-age",
|
|
5
|
+
"expires",
|
|
6
|
+
"samesite",
|
|
7
|
+
"secure",
|
|
8
|
+
"httponly"
|
|
9
|
+
]);
|
|
10
|
+
function u(a) {
|
|
11
|
+
let r = {}, e, t, n = 0, m = a.split(/;\s*/g), s, i;
|
|
12
|
+
for (; n < m.length; n++)
|
|
13
|
+
if (t = m[n], e = t.indexOf("="), ~e) {
|
|
14
|
+
if (s = t.substring(0, e++).trim(), i = t.substring(e).trim(), i[0] === '"' && (i = i.substring(1, i.length - 1)), ~i.indexOf("%"))
|
|
15
|
+
try {
|
|
16
|
+
i = decodeURIComponent(i);
|
|
17
|
+
} catch (f) {
|
|
18
|
+
}
|
|
19
|
+
g.has(t = s.toLowerCase()) ? t === "expires" ? r.expires = new Date(i) : t === "max-age" ? r.maxage = +i : r[t] = i : r[s] = i;
|
|
20
|
+
} else
|
|
21
|
+
(s = t.trim().toLowerCase()) && (s === "httponly" || s === "secure") && (r[s] = true);
|
|
22
|
+
return r;
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
u as parse
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/worktop/cookie/index.mjs"],"sourcesContent":["// src/cookie.ts\nvar g = new Set([\n \"domain\",\n \"path\",\n \"max-age\",\n \"expires\",\n \"samesite\",\n \"secure\",\n \"httponly\"\n]);\nfunction u(a) {\n let r = {}, e, t, n = 0, m = a.split(/;\\s*/g), s, i;\n for (; n < m.length; n++)\n if (t = m[n], e = t.indexOf(\"=\"), ~e) {\n if (s = t.substring(0, e++).trim(), i = t.substring(e).trim(), i[0] === '\"' && (i = i.substring(1, i.length - 1)), ~i.indexOf(\"%\"))\n try {\n i = decodeURIComponent(i);\n } catch (f) {\n }\n g.has(t = s.toLowerCase()) ? t === \"expires\" ? r.expires = new Date(i) : t === \"max-age\" ? r.maxage = +i : r[t] = i : r[s] = i;\n } else\n (s = t.trim().toLowerCase()) && (s === \"httponly\" || s === \"secure\") && (r[s] = !0);\n return r;\n}\nfunction l(a, r, e = {}) {\n let t = a + \"=\" + encodeURIComponent(r);\n return e.expires && (t += \"; Expires=\" + new Date(e.expires).toUTCString()), e.maxage != null && e.maxage >= 0 && (t += \"; Max-Age=\" + (e.maxage | 0)), e.domain && (t += \"; Domain=\" + e.domain), e.path && (t += \"; Path=\" + e.path), e.samesite && (t += \"; SameSite=\" + e.samesite), (e.secure || e.samesite === \"None\") && (t += \"; Secure\"), e.httponly && (t += \"; HttpOnly\"), t;\n}\nexport {\n u as parse,\n l as stringify\n};\n"],"names":[],"mappings":"AACA,IAAI,IAAI,oBAAI,IAAI;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AACD,SAAS,EAAE,GAAG;AACZ,MAAI,IAAI,CAAE,GAAE,GAAG,GAAG,IAAI,GAAG,IAAI,EAAE,MAAM,OAAO,GAAG,GAAG;AAClD,SAAO,IAAI,EAAE,QAAQ;AACnB,QAAI,IAAI,EAAE,IAAI,IAAI,EAAE,QAAQ,GAAG,GAAG,CAAC,GAAG;AACpC,UAAI,IAAI,EAAE,UAAU,GAAG,GAAG,EAAE,KAAM,GAAE,IAAI,EAAE,UAAU,CAAC,EAAE,KAAM,GAAE,EAAE,OAAO,QAAQ,IAAI,EAAE,UAAU,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG;AAC/H,YAAI;AACF,cAAI,mBAAmB,CAAC;AAAA,QACzB,SAAQ,GAAP;AAAA,QACD;AACH,QAAE,IAAI,IAAI,EAAE,YAAa,CAAA,IAAI,MAAM,YAAY,EAAE,UAAU,IAAI,KAAK,CAAC,IAAI,MAAM,YAAY,EAAE,SAAS,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,KAAK;AAAA,IAC9H;AACC,OAAC,IAAI,EAAE,KAAM,EAAC,YAAW,OAAQ,MAAM,cAAc,MAAM,cAAc,EAAE,KAAK;AACpF,SAAO;AACT;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const SFAPI_VERSION = "2022-
|
|
3
|
+
const SFAPI_VERSION = "2022-10";
|
|
4
4
|
exports.SFAPI_VERSION = SFAPI_VERSION;
|
|
5
5
|
//# sourceMappingURL=storefront-api-constants.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storefront-api-constants.cjs","sources":["../../src/storefront-api-constants.ts"],"sourcesContent":["export const SFAPI_VERSION = '2022-
|
|
1
|
+
{"version":3,"file":"storefront-api-constants.cjs","sources":["../../src/storefront-api-constants.ts"],"sourcesContent":["export const SFAPI_VERSION = '2022-10';\n"],"names":[],"mappings":";;AAAO,MAAM,gBAAgB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storefront-api-constants.js","sources":["../../src/storefront-api-constants.ts"],"sourcesContent":["export const SFAPI_VERSION = '2022-
|
|
1
|
+
{"version":3,"file":"storefront-api-constants.js","sources":["../../src/storefront-api-constants.ts"],"sourcesContent":["export const SFAPI_VERSION = '2022-10';\n"],"names":[],"mappings":"AAAO,MAAM,gBAAgB;"}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const fsm = require("./node_modules/@xstate/react/es/fsm.cjs");
|
|
4
|
+
const index = require("./node_modules/@xstate/fsm/es/index.cjs");
|
|
5
|
+
const flattenConnection = require("./flatten-connection.cjs");
|
|
6
|
+
const useCartActions = require("./useCartActions.cjs");
|
|
7
|
+
const require$$0 = require("react");
|
|
8
|
+
function invokeCart(action, options) {
|
|
9
|
+
return {
|
|
10
|
+
entry: [...(options == null ? void 0 : options.entryActions) || [], "onCartActionEntry", "onCartActionOptimisticUI", action],
|
|
11
|
+
on: {
|
|
12
|
+
RESOLVE: {
|
|
13
|
+
target: (options == null ? void 0 : options.resolveTarget) || "idle",
|
|
14
|
+
actions: [index.assign({
|
|
15
|
+
prevCart: (context) => context == null ? void 0 : context.cart,
|
|
16
|
+
cart: (_, event) => {
|
|
17
|
+
var _a;
|
|
18
|
+
return (_a = event == null ? void 0 : event.payload) == null ? void 0 : _a.cart;
|
|
19
|
+
},
|
|
20
|
+
rawCartResult: (_, event) => {
|
|
21
|
+
var _a;
|
|
22
|
+
return (_a = event == null ? void 0 : event.payload) == null ? void 0 : _a.rawCartResult;
|
|
23
|
+
},
|
|
24
|
+
errors: (_) => void 0
|
|
25
|
+
})]
|
|
26
|
+
},
|
|
27
|
+
ERROR: {
|
|
28
|
+
target: (options == null ? void 0 : options.errorTarget) || "error",
|
|
29
|
+
actions: [index.assign({
|
|
30
|
+
prevCart: (context) => context == null ? void 0 : context.cart,
|
|
31
|
+
cart: (context) => context == null ? void 0 : context.lastValidCart,
|
|
32
|
+
errors: (_, event) => {
|
|
33
|
+
var _a;
|
|
34
|
+
return (_a = event == null ? void 0 : event.payload) == null ? void 0 : _a.errors;
|
|
35
|
+
}
|
|
36
|
+
})]
|
|
37
|
+
},
|
|
38
|
+
CART_COMPLETED: {
|
|
39
|
+
target: "cartCompleted",
|
|
40
|
+
actions: index.assign({
|
|
41
|
+
prevCart: (_) => void 0,
|
|
42
|
+
cart: (_) => void 0,
|
|
43
|
+
lastValidCart: (_) => void 0,
|
|
44
|
+
errors: (_) => void 0
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
exit: ["onCartActionComplete", ...(options == null ? void 0 : options.exitActions) || []]
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const INITIALIZING_CART_EVENTS = {
|
|
52
|
+
CART_FETCH: {
|
|
53
|
+
target: "cartFetching"
|
|
54
|
+
},
|
|
55
|
+
CART_CREATE: {
|
|
56
|
+
target: "cartCreating"
|
|
57
|
+
},
|
|
58
|
+
CART_SET: {
|
|
59
|
+
target: "idle",
|
|
60
|
+
actions: [index.assign({
|
|
61
|
+
rawCartResult: (_, event) => event.payload.cart,
|
|
62
|
+
cart: (_, event) => cartFromGraphQL(event.payload.cart)
|
|
63
|
+
})]
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const UPDATING_CART_EVENTS = {
|
|
67
|
+
CARTLINE_ADD: {
|
|
68
|
+
target: "cartLineAdding"
|
|
69
|
+
},
|
|
70
|
+
CARTLINE_UPDATE: {
|
|
71
|
+
target: "cartLineUpdating"
|
|
72
|
+
},
|
|
73
|
+
CARTLINE_REMOVE: {
|
|
74
|
+
target: "cartLineRemoving"
|
|
75
|
+
},
|
|
76
|
+
NOTE_UPDATE: {
|
|
77
|
+
target: "noteUpdating"
|
|
78
|
+
},
|
|
79
|
+
BUYER_IDENTITY_UPDATE: {
|
|
80
|
+
target: "buyerIdentityUpdating"
|
|
81
|
+
},
|
|
82
|
+
CART_ATTRIBUTES_UPDATE: {
|
|
83
|
+
target: "cartAttributesUpdating"
|
|
84
|
+
},
|
|
85
|
+
DISCOUNT_CODES_UPDATE: {
|
|
86
|
+
target: "discountCodesUpdating"
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
function createCartMachine(initialCart) {
|
|
90
|
+
return index.createMachine({
|
|
91
|
+
id: "Cart",
|
|
92
|
+
initial: initialCart ? "idle" : "uninitialized",
|
|
93
|
+
context: {
|
|
94
|
+
cart: initialCart && cartFromGraphQL(initialCart)
|
|
95
|
+
},
|
|
96
|
+
states: {
|
|
97
|
+
uninitialized: {
|
|
98
|
+
on: INITIALIZING_CART_EVENTS
|
|
99
|
+
},
|
|
100
|
+
cartCompleted: {
|
|
101
|
+
on: INITIALIZING_CART_EVENTS
|
|
102
|
+
},
|
|
103
|
+
initializationError: {
|
|
104
|
+
on: INITIALIZING_CART_EVENTS
|
|
105
|
+
},
|
|
106
|
+
idle: {
|
|
107
|
+
on: {
|
|
108
|
+
...INITIALIZING_CART_EVENTS,
|
|
109
|
+
...UPDATING_CART_EVENTS
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
error: {
|
|
113
|
+
on: {
|
|
114
|
+
...INITIALIZING_CART_EVENTS,
|
|
115
|
+
...UPDATING_CART_EVENTS
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
cartFetching: invokeCart("cartFetchAction", {
|
|
119
|
+
errorTarget: "initializationError"
|
|
120
|
+
}),
|
|
121
|
+
cartCreating: invokeCart("cartCreateAction", {
|
|
122
|
+
errorTarget: "initializationError"
|
|
123
|
+
}),
|
|
124
|
+
cartLineRemoving: invokeCart("cartLineRemoveAction"),
|
|
125
|
+
cartLineUpdating: invokeCart("cartLineUpdateAction"),
|
|
126
|
+
cartLineAdding: invokeCart("cartLineAddAction"),
|
|
127
|
+
noteUpdating: invokeCart("noteUpdateAction"),
|
|
128
|
+
buyerIdentityUpdating: invokeCart("buyerIdentityUpdateAction"),
|
|
129
|
+
cartAttributesUpdating: invokeCart("cartAttributesUpdateAction"),
|
|
130
|
+
discountCodesUpdating: invokeCart("discountCodesUpdateAction")
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function useCartAPIStateMachine({
|
|
135
|
+
numCartLines,
|
|
136
|
+
onCartActionEntry,
|
|
137
|
+
onCartActionOptimisticUI,
|
|
138
|
+
onCartActionComplete,
|
|
139
|
+
data: cart,
|
|
140
|
+
cartFragment,
|
|
141
|
+
countryCode
|
|
142
|
+
}) {
|
|
143
|
+
const {
|
|
144
|
+
cartFetch,
|
|
145
|
+
cartCreate,
|
|
146
|
+
cartLineAdd,
|
|
147
|
+
cartLineUpdate,
|
|
148
|
+
cartLineRemove,
|
|
149
|
+
noteUpdate,
|
|
150
|
+
buyerIdentityUpdate,
|
|
151
|
+
cartAttributesUpdate,
|
|
152
|
+
discountCodesUpdate
|
|
153
|
+
} = useCartActions.useCartActions({
|
|
154
|
+
numCartLines,
|
|
155
|
+
cartFragment,
|
|
156
|
+
countryCode
|
|
157
|
+
});
|
|
158
|
+
const cartMachine = require$$0.useMemo(() => createCartMachine(cart), [cart]);
|
|
159
|
+
const [state, send, service] = fsm.useMachine(cartMachine, {
|
|
160
|
+
actions: {
|
|
161
|
+
cartFetchAction: async (_, event) => {
|
|
162
|
+
var _a;
|
|
163
|
+
if (event.type !== "CART_FETCH")
|
|
164
|
+
return;
|
|
165
|
+
const {
|
|
166
|
+
data,
|
|
167
|
+
errors
|
|
168
|
+
} = await cartFetch((_a = event == null ? void 0 : event.payload) == null ? void 0 : _a.cartId);
|
|
169
|
+
const resultEvent = eventFromFetchResult(event, data == null ? void 0 : data.cart, errors);
|
|
170
|
+
send(resultEvent);
|
|
171
|
+
},
|
|
172
|
+
cartCreateAction: async (_, event) => {
|
|
173
|
+
var _a;
|
|
174
|
+
if (event.type !== "CART_CREATE")
|
|
175
|
+
return;
|
|
176
|
+
const {
|
|
177
|
+
data,
|
|
178
|
+
errors
|
|
179
|
+
} = await cartCreate(event == null ? void 0 : event.payload);
|
|
180
|
+
const resultEvent = eventFromFetchResult(event, (_a = data == null ? void 0 : data.cartCreate) == null ? void 0 : _a.cart, errors);
|
|
181
|
+
send(resultEvent);
|
|
182
|
+
},
|
|
183
|
+
cartLineAddAction: async (context, event) => {
|
|
184
|
+
var _a, _b;
|
|
185
|
+
if (event.type !== "CARTLINE_ADD" || !((_a = context == null ? void 0 : context.cart) == null ? void 0 : _a.id))
|
|
186
|
+
return;
|
|
187
|
+
const {
|
|
188
|
+
data,
|
|
189
|
+
errors
|
|
190
|
+
} = await cartLineAdd(context.cart.id, event.payload.lines);
|
|
191
|
+
const resultEvent = eventFromFetchResult(event, (_b = data == null ? void 0 : data.cartLinesAdd) == null ? void 0 : _b.cart, errors);
|
|
192
|
+
send(resultEvent);
|
|
193
|
+
},
|
|
194
|
+
cartLineUpdateAction: async (context, event) => {
|
|
195
|
+
var _a, _b;
|
|
196
|
+
if (event.type !== "CARTLINE_UPDATE" || !((_a = context == null ? void 0 : context.cart) == null ? void 0 : _a.id))
|
|
197
|
+
return;
|
|
198
|
+
const {
|
|
199
|
+
data,
|
|
200
|
+
errors
|
|
201
|
+
} = await cartLineUpdate(context.cart.id, event.payload.lines);
|
|
202
|
+
const resultEvent = eventFromFetchResult(event, (_b = data == null ? void 0 : data.cartLinesUpdate) == null ? void 0 : _b.cart, errors);
|
|
203
|
+
send(resultEvent);
|
|
204
|
+
},
|
|
205
|
+
cartLineRemoveAction: async (context, event) => {
|
|
206
|
+
var _a, _b;
|
|
207
|
+
if (event.type !== "CARTLINE_REMOVE" || !((_a = context == null ? void 0 : context.cart) == null ? void 0 : _a.id))
|
|
208
|
+
return;
|
|
209
|
+
const {
|
|
210
|
+
data,
|
|
211
|
+
errors
|
|
212
|
+
} = await cartLineRemove(context.cart.id, event.payload.lines);
|
|
213
|
+
const resultEvent = eventFromFetchResult(event, (_b = data == null ? void 0 : data.cartLinesRemove) == null ? void 0 : _b.cart, errors);
|
|
214
|
+
send(resultEvent);
|
|
215
|
+
},
|
|
216
|
+
noteUpdateAction: async (context, event) => {
|
|
217
|
+
var _a, _b;
|
|
218
|
+
if (event.type !== "NOTE_UPDATE" || !((_a = context == null ? void 0 : context.cart) == null ? void 0 : _a.id))
|
|
219
|
+
return;
|
|
220
|
+
const {
|
|
221
|
+
data,
|
|
222
|
+
errors
|
|
223
|
+
} = await noteUpdate(context.cart.id, event.payload.note);
|
|
224
|
+
const resultEvent = eventFromFetchResult(event, (_b = data == null ? void 0 : data.cartNoteUpdate) == null ? void 0 : _b.cart, errors);
|
|
225
|
+
send(resultEvent);
|
|
226
|
+
},
|
|
227
|
+
buyerIdentityUpdateAction: async (context, event) => {
|
|
228
|
+
var _a, _b;
|
|
229
|
+
if (event.type !== "BUYER_IDENTITY_UPDATE" || !((_a = context == null ? void 0 : context.cart) == null ? void 0 : _a.id))
|
|
230
|
+
return;
|
|
231
|
+
const {
|
|
232
|
+
data,
|
|
233
|
+
errors
|
|
234
|
+
} = await buyerIdentityUpdate(context.cart.id, event.payload.buyerIdentity);
|
|
235
|
+
const resultEvent = eventFromFetchResult(event, (_b = data == null ? void 0 : data.cartBuyerIdentityUpdate) == null ? void 0 : _b.cart, errors);
|
|
236
|
+
send(resultEvent);
|
|
237
|
+
},
|
|
238
|
+
cartAttributesUpdateAction: async (context, event) => {
|
|
239
|
+
var _a, _b;
|
|
240
|
+
if (event.type !== "CART_ATTRIBUTES_UPDATE" || !((_a = context == null ? void 0 : context.cart) == null ? void 0 : _a.id))
|
|
241
|
+
return;
|
|
242
|
+
const {
|
|
243
|
+
data,
|
|
244
|
+
errors
|
|
245
|
+
} = await cartAttributesUpdate(context.cart.id, event.payload.attributes);
|
|
246
|
+
const resultEvent = eventFromFetchResult(event, (_b = data == null ? void 0 : data.cartAttributesUpdate) == null ? void 0 : _b.cart, errors);
|
|
247
|
+
send(resultEvent);
|
|
248
|
+
},
|
|
249
|
+
discountCodesUpdateAction: async (context, event) => {
|
|
250
|
+
var _a, _b;
|
|
251
|
+
if (event.type !== "DISCOUNT_CODES_UPDATE" || !((_a = context == null ? void 0 : context.cart) == null ? void 0 : _a.id))
|
|
252
|
+
return;
|
|
253
|
+
const {
|
|
254
|
+
data,
|
|
255
|
+
errors
|
|
256
|
+
} = await discountCodesUpdate(context.cart.id, event.payload.discountCodes);
|
|
257
|
+
const resultEvent = eventFromFetchResult(event, (_b = data == null ? void 0 : data.cartDiscountCodesUpdate) == null ? void 0 : _b.cart, errors);
|
|
258
|
+
send(resultEvent);
|
|
259
|
+
},
|
|
260
|
+
...onCartActionEntry && {
|
|
261
|
+
onCartActionEntry: (context, event) => {
|
|
262
|
+
if (isCartActionEvent(event)) {
|
|
263
|
+
onCartActionEntry(context, event);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
...onCartActionOptimisticUI && {
|
|
268
|
+
onCartActionOptimisticUI: index.assign((context, event) => {
|
|
269
|
+
return onCartActionOptimisticUI(context, event);
|
|
270
|
+
})
|
|
271
|
+
},
|
|
272
|
+
...onCartActionComplete && {
|
|
273
|
+
onCartActionComplete: (context, event) => {
|
|
274
|
+
if (isCartFetchResultEvent(event)) {
|
|
275
|
+
onCartActionComplete(context, event);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
return require$$0.useMemo(() => [state, send, service], [state, send, service]);
|
|
282
|
+
}
|
|
283
|
+
function cartFromGraphQL(cart) {
|
|
284
|
+
var _a;
|
|
285
|
+
return {
|
|
286
|
+
...cart,
|
|
287
|
+
lines: flattenConnection.flattenConnection(cart == null ? void 0 : cart.lines),
|
|
288
|
+
note: (_a = cart.note) != null ? _a : void 0
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
function eventFromFetchResult(cartActionEvent, cart, errors) {
|
|
292
|
+
if (errors) {
|
|
293
|
+
return {
|
|
294
|
+
type: "ERROR",
|
|
295
|
+
payload: {
|
|
296
|
+
errors,
|
|
297
|
+
cartActionEvent
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
if (!cart) {
|
|
302
|
+
return {
|
|
303
|
+
type: "CART_COMPLETED",
|
|
304
|
+
payload: {
|
|
305
|
+
cartActionEvent
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
return {
|
|
310
|
+
type: "RESOLVE",
|
|
311
|
+
payload: {
|
|
312
|
+
cart: cartFromGraphQL(cart),
|
|
313
|
+
rawCartResult: cart,
|
|
314
|
+
cartActionEvent
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
function isCartActionEvent(event) {
|
|
319
|
+
return event.type === "CART_CREATE" || event.type === "CARTLINE_ADD" || event.type === "CARTLINE_UPDATE" || event.type === "CARTLINE_REMOVE" || event.type === "NOTE_UPDATE" || event.type === "BUYER_IDENTITY_UPDATE" || event.type === "CART_ATTRIBUTES_UPDATE" || event.type === "DISCOUNT_CODES_UPDATE";
|
|
320
|
+
}
|
|
321
|
+
function isCartFetchResultEvent(event) {
|
|
322
|
+
return event.type === "RESOLVE" || event.type === "ERROR" || event.type === "CART_COMPLETED";
|
|
323
|
+
}
|
|
324
|
+
exports.cartFromGraphQL = cartFromGraphQL;
|
|
325
|
+
exports.useCartAPIStateMachine = useCartAPIStateMachine;
|
|
326
|
+
//# sourceMappingURL=useCartAPIStateMachine.cjs.map
|