@shopify/hydrogen-react 2022.10.8 → 2023.1.4
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 +41 -47
- package/dist/browser-dev/AddToCartButton.mjs +43 -40
- package/dist/browser-dev/AddToCartButton.mjs.map +1 -1
- package/dist/browser-dev/BaseButton.mjs +13 -15
- package/dist/browser-dev/BaseButton.mjs.map +1 -1
- package/dist/browser-dev/BuyNowButton.mjs +19 -17
- package/dist/browser-dev/BuyNowButton.mjs.map +1 -1
- package/dist/browser-dev/CartCheckoutButton.mjs +12 -15
- package/dist/browser-dev/CartCheckoutButton.mjs.map +1 -1
- package/dist/browser-dev/CartCost.mjs +25 -0
- package/dist/browser-dev/CartCost.mjs.map +1 -0
- package/dist/browser-dev/CartLinePrice.mjs +18 -0
- package/dist/browser-dev/CartLinePrice.mjs.map +1 -0
- package/dist/browser-dev/CartLineProvider.mjs +19 -0
- package/dist/browser-dev/CartLineProvider.mjs.map +1 -0
- package/dist/browser-dev/CartProvider.mjs +73 -67
- package/dist/browser-dev/CartProvider.mjs.map +1 -1
- package/dist/browser-dev/ExternalVideo.mjs +13 -11
- package/dist/browser-dev/ExternalVideo.mjs.map +1 -1
- package/dist/browser-dev/Image.mjs +41 -30
- package/dist/browser-dev/Image.mjs.map +1 -1
- package/dist/browser-dev/MediaFile.mjs +29 -21
- package/dist/browser-dev/MediaFile.mjs.map +1 -1
- package/dist/browser-dev/ModelViewer.mjs +138 -76
- package/dist/browser-dev/ModelViewer.mjs.map +1 -1
- package/dist/browser-dev/Money.mjs +12 -9
- package/dist/browser-dev/Money.mjs.map +1 -1
- package/dist/browser-dev/ProductPrice.mjs +12 -17
- package/dist/browser-dev/ProductPrice.mjs.map +1 -1
- package/dist/browser-dev/ProductProvider.mjs +102 -73
- package/dist/browser-dev/ProductProvider.mjs.map +1 -1
- package/dist/browser-dev/ShopPayButton.mjs +14 -24
- package/dist/browser-dev/ShopPayButton.mjs.map +1 -1
- package/dist/browser-dev/ShopifyProvider.mjs +22 -38
- package/dist/browser-dev/ShopifyProvider.mjs.map +1 -1
- package/dist/browser-dev/Video.mjs +30 -21
- package/dist/browser-dev/Video.mjs.map +1 -1
- package/dist/browser-dev/_virtual/index.mjs +11 -2
- package/dist/browser-dev/_virtual/index.mjs.map +1 -1
- package/dist/browser-dev/_virtual/with-selector.mjs +11 -2
- package/dist/browser-dev/_virtual/with-selector.mjs.map +1 -1
- package/dist/browser-dev/analytics-constants.mjs +43 -0
- package/dist/browser-dev/analytics-constants.mjs.map +1 -0
- package/dist/browser-dev/analytics-schema-custom-storefront-customer-tracking.mjs +145 -0
- package/dist/browser-dev/analytics-schema-custom-storefront-customer-tracking.mjs.map +1 -0
- package/dist/browser-dev/analytics-schema-trekkie-storefront-page-view.mjs +58 -0
- package/dist/browser-dev/analytics-schema-trekkie-storefront-page-view.mjs.map +1 -0
- package/dist/browser-dev/analytics-utils.mjs +49 -0
- package/dist/browser-dev/analytics-utils.mjs.map +1 -0
- package/dist/browser-dev/analytics.mjs +159 -0
- package/dist/browser-dev/analytics.mjs.map +1 -0
- package/dist/browser-dev/cart-hooks.mjs +29 -34
- package/dist/browser-dev/cart-hooks.mjs.map +1 -1
- package/dist/browser-dev/cart-queries.mjs +50 -28
- package/dist/browser-dev/cart-queries.mjs.map +1 -1
- package/dist/browser-dev/codegen.helpers.mjs +1 -0
- package/dist/browser-dev/codegen.helpers.mjs.map +1 -1
- package/dist/browser-dev/cookies-utils.mjs +50 -0
- package/dist/browser-dev/cookies-utils.mjs.map +1 -0
- package/dist/browser-dev/flatten-connection.mjs +7 -5
- package/dist/browser-dev/flatten-connection.mjs.map +1 -1
- package/dist/browser-dev/image-size.mjs +8 -8
- package/dist/browser-dev/image-size.mjs.map +1 -1
- package/dist/browser-dev/index.mjs +20 -6
- package/dist/browser-dev/index.mjs.map +1 -1
- package/dist/browser-dev/load-script.mjs.map +1 -1
- package/dist/browser-dev/node_modules/@xstate/fsm/es/index.mjs.map +1 -1
- package/dist/browser-dev/node_modules/@xstate/react/es/fsm.mjs +2 -2
- package/dist/browser-dev/node_modules/@xstate/react/es/fsm.mjs.map +1 -1
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +1 -1
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs.map +1 -1
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +1 -1
- package/dist/browser-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs.map +1 -1
- package/dist/browser-dev/node_modules/use-sync-external-store/shim/index.mjs +3 -3
- package/dist/browser-dev/node_modules/use-sync-external-store/shim/with-selector.mjs +1 -1
- package/dist/browser-dev/{metafield-parser.mjs → parse-metafield.mjs} +20 -12
- package/dist/browser-dev/parse-metafield.mjs.map +1 -0
- package/dist/browser-dev/storefront-api-constants.mjs +1 -1
- package/dist/browser-dev/storefront-api-constants.mjs.map +1 -1
- package/dist/browser-dev/storefront-client.mjs +19 -20
- package/dist/browser-dev/storefront-client.mjs.map +1 -1
- package/dist/browser-dev/useCartAPIStateMachine.mjs +111 -80
- package/dist/browser-dev/useCartAPIStateMachine.mjs.map +1 -1
- package/dist/browser-dev/useCartActions.mjs +150 -109
- package/dist/browser-dev/useCartActions.mjs.map +1 -1
- package/dist/browser-dev/useMoney.mjs +62 -36
- package/dist/browser-dev/useMoney.mjs.map +1 -1
- package/dist/browser-dev/useShopifyCookies.mjs +41 -0
- package/dist/browser-dev/useShopifyCookies.mjs.map +1 -0
- package/dist/browser-prod/AddToCartButton.mjs +43 -40
- package/dist/browser-prod/AddToCartButton.mjs.map +1 -1
- package/dist/browser-prod/BaseButton.mjs +13 -15
- package/dist/browser-prod/BaseButton.mjs.map +1 -1
- package/dist/browser-prod/BuyNowButton.mjs +19 -17
- package/dist/browser-prod/BuyNowButton.mjs.map +1 -1
- package/dist/browser-prod/CartCheckoutButton.mjs +12 -15
- package/dist/browser-prod/CartCheckoutButton.mjs.map +1 -1
- package/dist/browser-prod/CartCost.mjs +25 -0
- package/dist/browser-prod/CartCost.mjs.map +1 -0
- package/dist/browser-prod/CartLinePrice.mjs +18 -0
- package/dist/browser-prod/CartLinePrice.mjs.map +1 -0
- package/dist/browser-prod/CartLineProvider.mjs +19 -0
- package/dist/browser-prod/CartLineProvider.mjs.map +1 -0
- package/dist/browser-prod/CartProvider.mjs +73 -67
- package/dist/browser-prod/CartProvider.mjs.map +1 -1
- package/dist/browser-prod/ExternalVideo.mjs +13 -11
- package/dist/browser-prod/ExternalVideo.mjs.map +1 -1
- package/dist/browser-prod/Image.mjs +35 -28
- package/dist/browser-prod/Image.mjs.map +1 -1
- package/dist/browser-prod/MediaFile.mjs +29 -21
- package/dist/browser-prod/MediaFile.mjs.map +1 -1
- package/dist/browser-prod/ModelViewer.mjs +135 -75
- package/dist/browser-prod/ModelViewer.mjs.map +1 -1
- package/dist/browser-prod/Money.mjs +12 -9
- package/dist/browser-prod/Money.mjs.map +1 -1
- package/dist/browser-prod/ProductPrice.mjs +12 -17
- package/dist/browser-prod/ProductPrice.mjs.map +1 -1
- package/dist/browser-prod/ProductProvider.mjs +102 -73
- package/dist/browser-prod/ProductProvider.mjs.map +1 -1
- package/dist/browser-prod/ShopPayButton.mjs +14 -24
- package/dist/browser-prod/ShopPayButton.mjs.map +1 -1
- package/dist/browser-prod/ShopifyProvider.mjs +22 -32
- package/dist/browser-prod/ShopifyProvider.mjs.map +1 -1
- package/dist/browser-prod/Video.mjs +30 -21
- package/dist/browser-prod/Video.mjs.map +1 -1
- package/dist/browser-prod/_virtual/index.mjs +11 -2
- package/dist/browser-prod/_virtual/index.mjs.map +1 -1
- package/dist/browser-prod/_virtual/with-selector.mjs +11 -2
- package/dist/browser-prod/_virtual/with-selector.mjs.map +1 -1
- package/dist/browser-prod/analytics-constants.mjs +43 -0
- package/dist/browser-prod/analytics-constants.mjs.map +1 -0
- package/dist/browser-prod/analytics-schema-custom-storefront-customer-tracking.mjs +145 -0
- package/dist/browser-prod/analytics-schema-custom-storefront-customer-tracking.mjs.map +1 -0
- package/dist/browser-prod/analytics-schema-trekkie-storefront-page-view.mjs +58 -0
- package/dist/browser-prod/analytics-schema-trekkie-storefront-page-view.mjs.map +1 -0
- package/dist/browser-prod/analytics-utils.mjs +49 -0
- package/dist/browser-prod/analytics-utils.mjs.map +1 -0
- package/dist/browser-prod/analytics.mjs +158 -0
- package/dist/browser-prod/analytics.mjs.map +1 -0
- package/dist/browser-prod/cart-hooks.mjs +29 -34
- package/dist/browser-prod/cart-hooks.mjs.map +1 -1
- package/dist/browser-prod/cart-queries.mjs +50 -28
- package/dist/browser-prod/cart-queries.mjs.map +1 -1
- package/dist/browser-prod/codegen.helpers.mjs +1 -0
- package/dist/browser-prod/codegen.helpers.mjs.map +1 -1
- package/dist/browser-prod/cookies-utils.mjs +50 -0
- package/dist/browser-prod/cookies-utils.mjs.map +1 -0
- package/dist/browser-prod/flatten-connection.mjs +7 -5
- package/dist/browser-prod/flatten-connection.mjs.map +1 -1
- package/dist/browser-prod/image-size.mjs +8 -8
- package/dist/browser-prod/image-size.mjs.map +1 -1
- package/dist/browser-prod/index.mjs +20 -6
- package/dist/browser-prod/index.mjs.map +1 -1
- package/dist/browser-prod/load-script.mjs.map +1 -1
- package/dist/browser-prod/node_modules/@xstate/fsm/es/index.mjs.map +1 -1
- package/dist/browser-prod/node_modules/@xstate/react/es/fsm.mjs +2 -2
- package/dist/browser-prod/node_modules/@xstate/react/es/fsm.mjs.map +1 -1
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +1 -1
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs.map +1 -1
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +1 -1
- package/dist/browser-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs.map +1 -1
- package/dist/browser-prod/node_modules/use-sync-external-store/shim/index.mjs +3 -3
- package/dist/browser-prod/node_modules/use-sync-external-store/shim/with-selector.mjs +1 -1
- package/dist/browser-prod/{metafield-parser.mjs → parse-metafield.mjs} +20 -12
- package/dist/browser-prod/parse-metafield.mjs.map +1 -0
- package/dist/browser-prod/storefront-api-constants.mjs +1 -1
- package/dist/browser-prod/storefront-api-constants.mjs.map +1 -1
- package/dist/browser-prod/storefront-client.mjs +19 -20
- package/dist/browser-prod/storefront-client.mjs.map +1 -1
- package/dist/browser-prod/useCartAPIStateMachine.mjs +111 -80
- package/dist/browser-prod/useCartAPIStateMachine.mjs.map +1 -1
- package/dist/browser-prod/useCartActions.mjs +150 -109
- package/dist/browser-prod/useCartActions.mjs.map +1 -1
- package/dist/browser-prod/useMoney.mjs +62 -36
- package/dist/browser-prod/useMoney.mjs.map +1 -1
- package/dist/browser-prod/useShopifyCookies.mjs +41 -0
- package/dist/browser-prod/useShopifyCookies.mjs.map +1 -0
- package/dist/node-dev/AddToCartButton.js +44 -41
- package/dist/node-dev/AddToCartButton.js.map +1 -1
- package/dist/node-dev/AddToCartButton.mjs +43 -40
- package/dist/node-dev/AddToCartButton.mjs.map +1 -1
- package/dist/node-dev/BaseButton.js +14 -16
- package/dist/node-dev/BaseButton.js.map +1 -1
- package/dist/node-dev/BaseButton.mjs +13 -15
- package/dist/node-dev/BaseButton.mjs.map +1 -1
- package/dist/node-dev/BuyNowButton.js +20 -18
- package/dist/node-dev/BuyNowButton.js.map +1 -1
- package/dist/node-dev/BuyNowButton.mjs +19 -17
- package/dist/node-dev/BuyNowButton.mjs.map +1 -1
- package/dist/node-dev/CartCheckoutButton.js +13 -16
- package/dist/node-dev/CartCheckoutButton.js.map +1 -1
- package/dist/node-dev/CartCheckoutButton.mjs +12 -15
- package/dist/node-dev/CartCheckoutButton.mjs.map +1 -1
- package/dist/node-dev/CartCost.js +25 -0
- package/dist/node-dev/CartCost.js.map +1 -0
- package/dist/node-dev/CartCost.mjs +25 -0
- package/dist/node-dev/CartCost.mjs.map +1 -0
- package/dist/node-dev/CartLinePrice.js +18 -0
- package/dist/node-dev/CartLinePrice.js.map +1 -0
- package/dist/node-dev/CartLinePrice.mjs +18 -0
- package/dist/node-dev/CartLinePrice.mjs.map +1 -0
- package/dist/node-dev/CartLineProvider.js +19 -0
- package/dist/node-dev/CartLineProvider.js.map +1 -0
- package/dist/node-dev/CartLineProvider.mjs +19 -0
- package/dist/node-dev/CartLineProvider.mjs.map +1 -0
- package/dist/node-dev/CartProvider.js +74 -68
- package/dist/node-dev/CartProvider.js.map +1 -1
- package/dist/node-dev/CartProvider.mjs +73 -67
- package/dist/node-dev/CartProvider.mjs.map +1 -1
- package/dist/node-dev/ExternalVideo.js +14 -12
- package/dist/node-dev/ExternalVideo.js.map +1 -1
- package/dist/node-dev/ExternalVideo.mjs +13 -11
- package/dist/node-dev/ExternalVideo.mjs.map +1 -1
- package/dist/node-dev/Image.js +42 -31
- package/dist/node-dev/Image.js.map +1 -1
- package/dist/node-dev/Image.mjs +41 -30
- package/dist/node-dev/Image.mjs.map +1 -1
- package/dist/node-dev/MediaFile.js +30 -22
- package/dist/node-dev/MediaFile.js.map +1 -1
- package/dist/node-dev/MediaFile.mjs +29 -21
- package/dist/node-dev/MediaFile.mjs.map +1 -1
- package/dist/node-dev/ModelViewer.js +139 -77
- package/dist/node-dev/ModelViewer.js.map +1 -1
- package/dist/node-dev/ModelViewer.mjs +138 -76
- package/dist/node-dev/ModelViewer.mjs.map +1 -1
- package/dist/node-dev/Money.js +13 -10
- package/dist/node-dev/Money.js.map +1 -1
- package/dist/node-dev/Money.mjs +12 -9
- package/dist/node-dev/Money.mjs.map +1 -1
- package/dist/node-dev/ProductPrice.js +13 -18
- package/dist/node-dev/ProductPrice.js.map +1 -1
- package/dist/node-dev/ProductPrice.mjs +12 -17
- package/dist/node-dev/ProductPrice.mjs.map +1 -1
- package/dist/node-dev/ProductProvider.js +103 -74
- package/dist/node-dev/ProductProvider.js.map +1 -1
- package/dist/node-dev/ProductProvider.mjs +102 -73
- package/dist/node-dev/ProductProvider.mjs.map +1 -1
- package/dist/node-dev/ShopPayButton.js +14 -24
- package/dist/node-dev/ShopPayButton.js.map +1 -1
- package/dist/node-dev/ShopPayButton.mjs +14 -24
- package/dist/node-dev/ShopPayButton.mjs.map +1 -1
- package/dist/node-dev/ShopifyProvider.js +23 -39
- package/dist/node-dev/ShopifyProvider.js.map +1 -1
- package/dist/node-dev/ShopifyProvider.mjs +22 -38
- package/dist/node-dev/ShopifyProvider.mjs.map +1 -1
- package/dist/node-dev/Video.js +31 -22
- package/dist/node-dev/Video.js.map +1 -1
- package/dist/node-dev/Video.mjs +30 -21
- package/dist/node-dev/Video.mjs.map +1 -1
- package/dist/node-dev/_virtual/index.js +11 -3
- package/dist/node-dev/_virtual/index.js.map +1 -1
- package/dist/node-dev/_virtual/index.mjs +11 -2
- package/dist/node-dev/_virtual/index.mjs.map +1 -1
- package/dist/node-dev/_virtual/use-sync-external-store-shim.development.js +1 -1
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.min.js +1 -1
- package/dist/node-dev/_virtual/with-selector.development.js +1 -1
- package/dist/node-dev/_virtual/with-selector.js +11 -3
- package/dist/node-dev/_virtual/with-selector.js.map +1 -1
- package/dist/node-dev/_virtual/with-selector.mjs +11 -2
- package/dist/node-dev/_virtual/with-selector.mjs.map +1 -1
- package/dist/node-dev/_virtual/with-selector.production.min.js +1 -1
- package/dist/node-dev/analytics-constants.js +43 -0
- package/dist/node-dev/analytics-constants.js.map +1 -0
- package/dist/node-dev/analytics-constants.mjs +43 -0
- package/dist/node-dev/analytics-constants.mjs.map +1 -0
- package/dist/node-dev/analytics-schema-custom-storefront-customer-tracking.js +145 -0
- package/dist/node-dev/analytics-schema-custom-storefront-customer-tracking.js.map +1 -0
- package/dist/node-dev/analytics-schema-custom-storefront-customer-tracking.mjs +145 -0
- package/dist/node-dev/analytics-schema-custom-storefront-customer-tracking.mjs.map +1 -0
- package/dist/node-dev/analytics-schema-trekkie-storefront-page-view.js +58 -0
- package/dist/node-dev/analytics-schema-trekkie-storefront-page-view.js.map +1 -0
- package/dist/node-dev/analytics-schema-trekkie-storefront-page-view.mjs +58 -0
- package/dist/node-dev/analytics-schema-trekkie-storefront-page-view.mjs.map +1 -0
- package/dist/node-dev/analytics-utils.js +49 -0
- package/dist/node-dev/analytics-utils.js.map +1 -0
- package/dist/node-dev/analytics-utils.mjs +49 -0
- package/dist/node-dev/analytics-utils.mjs.map +1 -0
- package/dist/node-dev/analytics.js +159 -0
- package/dist/node-dev/analytics.js.map +1 -0
- package/dist/node-dev/analytics.mjs +159 -0
- package/dist/node-dev/analytics.mjs.map +1 -0
- package/dist/node-dev/cart-constants.js +1 -1
- package/dist/node-dev/cart-hooks.js +29 -34
- package/dist/node-dev/cart-hooks.js.map +1 -1
- package/dist/node-dev/cart-hooks.mjs +29 -34
- package/dist/node-dev/cart-hooks.mjs.map +1 -1
- package/dist/node-dev/cart-queries.js +51 -29
- package/dist/node-dev/cart-queries.js.map +1 -1
- package/dist/node-dev/cart-queries.mjs +50 -28
- package/dist/node-dev/cart-queries.mjs.map +1 -1
- package/dist/node-dev/codegen.helpers.js +2 -1
- package/dist/node-dev/codegen.helpers.js.map +1 -1
- package/dist/node-dev/codegen.helpers.mjs +1 -0
- package/dist/node-dev/codegen.helpers.mjs.map +1 -1
- package/dist/node-dev/cookies-utils.js +50 -0
- package/dist/node-dev/cookies-utils.js.map +1 -0
- package/dist/node-dev/cookies-utils.mjs +50 -0
- package/dist/node-dev/cookies-utils.mjs.map +1 -0
- package/dist/node-dev/flatten-connection.js +8 -6
- package/dist/node-dev/flatten-connection.js.map +1 -1
- package/dist/node-dev/flatten-connection.mjs +7 -5
- package/dist/node-dev/flatten-connection.mjs.map +1 -1
- package/dist/node-dev/image-size.js +9 -9
- package/dist/node-dev/image-size.js.map +1 -1
- package/dist/node-dev/image-size.mjs +8 -8
- package/dist/node-dev/image-size.mjs.map +1 -1
- package/dist/node-dev/index.js +21 -7
- package/dist/node-dev/index.js.map +1 -1
- package/dist/node-dev/index.mjs +20 -6
- package/dist/node-dev/index.mjs.map +1 -1
- package/dist/node-dev/load-script.js +1 -1
- package/dist/node-dev/load-script.js.map +1 -1
- package/dist/node-dev/load-script.mjs.map +1 -1
- package/dist/node-dev/node_modules/@xstate/fsm/es/index.js +1 -1
- package/dist/node-dev/node_modules/@xstate/fsm/es/index.js.map +1 -1
- package/dist/node-dev/node_modules/@xstate/fsm/es/index.mjs.map +1 -1
- package/dist/node-dev/node_modules/@xstate/react/es/fsm.js +2 -2
- package/dist/node-dev/node_modules/@xstate/react/es/fsm.js.map +1 -1
- package/dist/node-dev/node_modules/@xstate/react/es/fsm.mjs +2 -2
- package/dist/node-dev/node_modules/@xstate/react/es/fsm.mjs.map +1 -1
- package/dist/node-dev/node_modules/@xstate/react/es/useConstant.js +2 -4
- package/dist/node-dev/node_modules/@xstate/react/es/useConstant.js.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +2 -4
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +2 -4
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +2 -4
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +2 -4
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs.map +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/shim/index.js +4 -4
- package/dist/node-dev/node_modules/use-sync-external-store/shim/index.mjs +3 -3
- package/dist/node-dev/node_modules/use-sync-external-store/shim/with-selector.js +1 -1
- package/dist/node-dev/node_modules/use-sync-external-store/shim/with-selector.mjs +1 -1
- package/dist/node-dev/{metafield-parser.js → parse-metafield.js} +21 -13
- package/dist/node-dev/parse-metafield.js.map +1 -0
- package/dist/node-dev/{metafield-parser.mjs → parse-metafield.mjs} +20 -12
- package/dist/node-dev/parse-metafield.mjs.map +1 -0
- package/dist/node-dev/storefront-api-constants.js +2 -2
- package/dist/node-dev/storefront-api-constants.js.map +1 -1
- package/dist/node-dev/storefront-api-constants.mjs +1 -1
- package/dist/node-dev/storefront-api-constants.mjs.map +1 -1
- package/dist/node-dev/storefront-client.js +20 -21
- package/dist/node-dev/storefront-client.js.map +1 -1
- package/dist/node-dev/storefront-client.mjs +19 -20
- package/dist/node-dev/storefront-client.mjs.map +1 -1
- package/dist/node-dev/useCartAPIStateMachine.js +112 -81
- package/dist/node-dev/useCartAPIStateMachine.js.map +1 -1
- package/dist/node-dev/useCartAPIStateMachine.mjs +111 -80
- package/dist/node-dev/useCartAPIStateMachine.mjs.map +1 -1
- package/dist/node-dev/useCartActions.js +151 -110
- package/dist/node-dev/useCartActions.js.map +1 -1
- package/dist/node-dev/useCartActions.mjs +150 -109
- package/dist/node-dev/useCartActions.mjs.map +1 -1
- package/dist/node-dev/useMoney.js +63 -37
- package/dist/node-dev/useMoney.js.map +1 -1
- package/dist/node-dev/useMoney.mjs +62 -36
- package/dist/node-dev/useMoney.mjs.map +1 -1
- package/dist/node-dev/useShopifyCookies.js +41 -0
- package/dist/node-dev/useShopifyCookies.js.map +1 -0
- package/dist/node-dev/useShopifyCookies.mjs +41 -0
- package/dist/node-dev/useShopifyCookies.mjs.map +1 -0
- package/dist/node-prod/AddToCartButton.js +44 -41
- package/dist/node-prod/AddToCartButton.js.map +1 -1
- package/dist/node-prod/AddToCartButton.mjs +43 -40
- package/dist/node-prod/AddToCartButton.mjs.map +1 -1
- package/dist/node-prod/BaseButton.js +14 -16
- package/dist/node-prod/BaseButton.js.map +1 -1
- package/dist/node-prod/BaseButton.mjs +13 -15
- package/dist/node-prod/BaseButton.mjs.map +1 -1
- package/dist/node-prod/BuyNowButton.js +20 -18
- package/dist/node-prod/BuyNowButton.js.map +1 -1
- package/dist/node-prod/BuyNowButton.mjs +19 -17
- package/dist/node-prod/BuyNowButton.mjs.map +1 -1
- package/dist/node-prod/CartCheckoutButton.js +13 -16
- package/dist/node-prod/CartCheckoutButton.js.map +1 -1
- package/dist/node-prod/CartCheckoutButton.mjs +12 -15
- package/dist/node-prod/CartCheckoutButton.mjs.map +1 -1
- package/dist/node-prod/CartCost.js +25 -0
- package/dist/node-prod/CartCost.js.map +1 -0
- package/dist/node-prod/CartCost.mjs +25 -0
- package/dist/node-prod/CartCost.mjs.map +1 -0
- package/dist/node-prod/CartLinePrice.js +18 -0
- package/dist/node-prod/CartLinePrice.js.map +1 -0
- package/dist/node-prod/CartLinePrice.mjs +18 -0
- package/dist/node-prod/CartLinePrice.mjs.map +1 -0
- package/dist/node-prod/CartLineProvider.js +19 -0
- package/dist/node-prod/CartLineProvider.js.map +1 -0
- package/dist/node-prod/CartLineProvider.mjs +19 -0
- package/dist/node-prod/CartLineProvider.mjs.map +1 -0
- package/dist/node-prod/CartProvider.js +74 -68
- package/dist/node-prod/CartProvider.js.map +1 -1
- package/dist/node-prod/CartProvider.mjs +73 -67
- package/dist/node-prod/CartProvider.mjs.map +1 -1
- package/dist/node-prod/ExternalVideo.js +14 -12
- package/dist/node-prod/ExternalVideo.js.map +1 -1
- package/dist/node-prod/ExternalVideo.mjs +13 -11
- package/dist/node-prod/ExternalVideo.mjs.map +1 -1
- package/dist/node-prod/Image.js +36 -29
- package/dist/node-prod/Image.js.map +1 -1
- package/dist/node-prod/Image.mjs +35 -28
- package/dist/node-prod/Image.mjs.map +1 -1
- package/dist/node-prod/MediaFile.js +30 -22
- package/dist/node-prod/MediaFile.js.map +1 -1
- package/dist/node-prod/MediaFile.mjs +29 -21
- package/dist/node-prod/MediaFile.mjs.map +1 -1
- package/dist/node-prod/ModelViewer.js +136 -76
- package/dist/node-prod/ModelViewer.js.map +1 -1
- package/dist/node-prod/ModelViewer.mjs +135 -75
- package/dist/node-prod/ModelViewer.mjs.map +1 -1
- package/dist/node-prod/Money.js +13 -10
- package/dist/node-prod/Money.js.map +1 -1
- package/dist/node-prod/Money.mjs +12 -9
- package/dist/node-prod/Money.mjs.map +1 -1
- package/dist/node-prod/ProductPrice.js +13 -18
- package/dist/node-prod/ProductPrice.js.map +1 -1
- package/dist/node-prod/ProductPrice.mjs +12 -17
- package/dist/node-prod/ProductPrice.mjs.map +1 -1
- package/dist/node-prod/ProductProvider.js +103 -74
- package/dist/node-prod/ProductProvider.js.map +1 -1
- package/dist/node-prod/ProductProvider.mjs +102 -73
- package/dist/node-prod/ProductProvider.mjs.map +1 -1
- package/dist/node-prod/ShopPayButton.js +14 -24
- package/dist/node-prod/ShopPayButton.js.map +1 -1
- package/dist/node-prod/ShopPayButton.mjs +14 -24
- package/dist/node-prod/ShopPayButton.mjs.map +1 -1
- package/dist/node-prod/ShopifyProvider.js +23 -33
- package/dist/node-prod/ShopifyProvider.js.map +1 -1
- package/dist/node-prod/ShopifyProvider.mjs +22 -32
- package/dist/node-prod/ShopifyProvider.mjs.map +1 -1
- package/dist/node-prod/Video.js +31 -22
- package/dist/node-prod/Video.js.map +1 -1
- package/dist/node-prod/Video.mjs +30 -21
- package/dist/node-prod/Video.mjs.map +1 -1
- package/dist/node-prod/_virtual/index.js +11 -3
- package/dist/node-prod/_virtual/index.js.map +1 -1
- package/dist/node-prod/_virtual/index.mjs +11 -2
- package/dist/node-prod/_virtual/index.mjs.map +1 -1
- package/dist/node-prod/_virtual/use-sync-external-store-shim.development.js +1 -1
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.min.js +1 -1
- package/dist/node-prod/_virtual/with-selector.development.js +1 -1
- package/dist/node-prod/_virtual/with-selector.js +11 -3
- package/dist/node-prod/_virtual/with-selector.js.map +1 -1
- package/dist/node-prod/_virtual/with-selector.mjs +11 -2
- package/dist/node-prod/_virtual/with-selector.mjs.map +1 -1
- package/dist/node-prod/_virtual/with-selector.production.min.js +1 -1
- package/dist/node-prod/analytics-constants.js +43 -0
- package/dist/node-prod/analytics-constants.js.map +1 -0
- package/dist/node-prod/analytics-constants.mjs +43 -0
- package/dist/node-prod/analytics-constants.mjs.map +1 -0
- package/dist/node-prod/analytics-schema-custom-storefront-customer-tracking.js +145 -0
- package/dist/node-prod/analytics-schema-custom-storefront-customer-tracking.js.map +1 -0
- package/dist/node-prod/analytics-schema-custom-storefront-customer-tracking.mjs +145 -0
- package/dist/node-prod/analytics-schema-custom-storefront-customer-tracking.mjs.map +1 -0
- package/dist/node-prod/analytics-schema-trekkie-storefront-page-view.js +58 -0
- package/dist/node-prod/analytics-schema-trekkie-storefront-page-view.js.map +1 -0
- package/dist/node-prod/analytics-schema-trekkie-storefront-page-view.mjs +58 -0
- package/dist/node-prod/analytics-schema-trekkie-storefront-page-view.mjs.map +1 -0
- package/dist/node-prod/analytics-utils.js +49 -0
- package/dist/node-prod/analytics-utils.js.map +1 -0
- package/dist/node-prod/analytics-utils.mjs +49 -0
- package/dist/node-prod/analytics-utils.mjs.map +1 -0
- package/dist/node-prod/analytics.js +158 -0
- package/dist/node-prod/analytics.js.map +1 -0
- package/dist/node-prod/analytics.mjs +158 -0
- package/dist/node-prod/analytics.mjs.map +1 -0
- package/dist/node-prod/cart-constants.js +1 -1
- package/dist/node-prod/cart-hooks.js +29 -34
- package/dist/node-prod/cart-hooks.js.map +1 -1
- package/dist/node-prod/cart-hooks.mjs +29 -34
- package/dist/node-prod/cart-hooks.mjs.map +1 -1
- package/dist/node-prod/cart-queries.js +51 -29
- package/dist/node-prod/cart-queries.js.map +1 -1
- package/dist/node-prod/cart-queries.mjs +50 -28
- package/dist/node-prod/cart-queries.mjs.map +1 -1
- package/dist/node-prod/codegen.helpers.js +2 -1
- package/dist/node-prod/codegen.helpers.js.map +1 -1
- package/dist/node-prod/codegen.helpers.mjs +1 -0
- package/dist/node-prod/codegen.helpers.mjs.map +1 -1
- package/dist/node-prod/cookies-utils.js +50 -0
- package/dist/node-prod/cookies-utils.js.map +1 -0
- package/dist/node-prod/cookies-utils.mjs +50 -0
- package/dist/node-prod/cookies-utils.mjs.map +1 -0
- package/dist/node-prod/flatten-connection.js +8 -6
- package/dist/node-prod/flatten-connection.js.map +1 -1
- package/dist/node-prod/flatten-connection.mjs +7 -5
- package/dist/node-prod/flatten-connection.mjs.map +1 -1
- package/dist/node-prod/image-size.js +9 -9
- package/dist/node-prod/image-size.js.map +1 -1
- package/dist/node-prod/image-size.mjs +8 -8
- package/dist/node-prod/image-size.mjs.map +1 -1
- package/dist/node-prod/index.js +21 -7
- package/dist/node-prod/index.js.map +1 -1
- package/dist/node-prod/index.mjs +20 -6
- package/dist/node-prod/index.mjs.map +1 -1
- package/dist/node-prod/load-script.js +1 -1
- package/dist/node-prod/load-script.js.map +1 -1
- package/dist/node-prod/load-script.mjs.map +1 -1
- package/dist/node-prod/node_modules/@xstate/fsm/es/index.js +1 -1
- package/dist/node-prod/node_modules/@xstate/fsm/es/index.js.map +1 -1
- package/dist/node-prod/node_modules/@xstate/fsm/es/index.mjs.map +1 -1
- package/dist/node-prod/node_modules/@xstate/react/es/fsm.js +2 -2
- package/dist/node-prod/node_modules/@xstate/react/es/fsm.js.map +1 -1
- package/dist/node-prod/node_modules/@xstate/react/es/fsm.mjs +2 -2
- package/dist/node-prod/node_modules/@xstate/react/es/fsm.mjs.map +1 -1
- package/dist/node-prod/node_modules/@xstate/react/es/useConstant.js +2 -4
- package/dist/node-prod/node_modules/@xstate/react/es/useConstant.js.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +2 -4
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +2 -4
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.mjs.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +2 -4
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +2 -4
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.mjs.map +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/shim/index.js +4 -4
- package/dist/node-prod/node_modules/use-sync-external-store/shim/index.mjs +3 -3
- package/dist/node-prod/node_modules/use-sync-external-store/shim/with-selector.js +1 -1
- package/dist/node-prod/node_modules/use-sync-external-store/shim/with-selector.mjs +1 -1
- package/dist/node-prod/{metafield-parser.js → parse-metafield.js} +21 -13
- package/dist/node-prod/parse-metafield.js.map +1 -0
- package/dist/node-prod/{metafield-parser.mjs → parse-metafield.mjs} +20 -12
- package/dist/node-prod/parse-metafield.mjs.map +1 -0
- package/dist/node-prod/storefront-api-constants.js +2 -2
- package/dist/node-prod/storefront-api-constants.js.map +1 -1
- package/dist/node-prod/storefront-api-constants.mjs +1 -1
- package/dist/node-prod/storefront-api-constants.mjs.map +1 -1
- package/dist/node-prod/storefront-client.js +20 -21
- package/dist/node-prod/storefront-client.js.map +1 -1
- package/dist/node-prod/storefront-client.mjs +19 -20
- package/dist/node-prod/storefront-client.mjs.map +1 -1
- package/dist/node-prod/useCartAPIStateMachine.js +112 -81
- package/dist/node-prod/useCartAPIStateMachine.js.map +1 -1
- package/dist/node-prod/useCartAPIStateMachine.mjs +111 -80
- package/dist/node-prod/useCartAPIStateMachine.mjs.map +1 -1
- package/dist/node-prod/useCartActions.js +151 -110
- package/dist/node-prod/useCartActions.js.map +1 -1
- package/dist/node-prod/useCartActions.mjs +150 -109
- package/dist/node-prod/useCartActions.mjs.map +1 -1
- package/dist/node-prod/useMoney.js +63 -37
- package/dist/node-prod/useMoney.js.map +1 -1
- package/dist/node-prod/useMoney.mjs +62 -36
- package/dist/node-prod/useMoney.mjs.map +1 -1
- package/dist/node-prod/useShopifyCookies.js +41 -0
- package/dist/node-prod/useShopifyCookies.js.map +1 -0
- package/dist/node-prod/useShopifyCookies.mjs +41 -0
- package/dist/node-prod/useShopifyCookies.mjs.map +1 -0
- package/dist/types/AddToCartButton.d.ts +3 -2
- package/dist/types/BuyNowButton.d.ts +7 -3
- package/dist/types/CartCheckoutButton.d.ts +6 -5
- package/dist/types/CartCost.d.ts +7 -5
- package/dist/types/CartLinePrice.d.ts +4 -4
- package/dist/types/CartLineProvider.d.ts +8 -6
- package/dist/types/CartProvider.d.ts +12 -2
- package/dist/types/ExternalVideo.d.ts +1 -2
- package/dist/types/Image.d.ts +5 -3
- package/dist/types/MediaFile.d.ts +12 -11
- package/dist/types/ModelViewer.d.ts +2 -2
- package/dist/types/ProductPrice.d.ts +1 -1
- package/dist/types/ProductProvider.d.ts +1 -1
- package/dist/types/ShopPayButton.d.ts +10 -10
- package/dist/types/ShopifyProvider.d.ts +36 -40
- package/dist/types/analytics-constants.d.ts +48 -0
- package/dist/types/analytics-schema-custom-storefront-customer-tracking.d.ts +3 -0
- package/dist/types/analytics-schema-trekkie-storefront-page-view.d.ts +2 -0
- package/dist/types/analytics-types.d.ts +108 -0
- package/dist/types/analytics-utils.d.ts +36 -0
- package/dist/types/analytics.d.ts +9 -0
- package/dist/types/cart-queries.d.ts +1 -1
- package/dist/types/cookies-utils.d.ts +4 -0
- package/dist/types/flatten-connection.d.ts +29 -9
- package/dist/types/index.d.cts +11 -4
- package/dist/types/index.d.ts +11 -4
- package/dist/types/{metafield-parser.d.ts → parse-metafield.d.ts} +11 -9
- package/dist/types/storefront-api-constants.d.ts +1 -1
- package/dist/types/storefront-api-types.d.ts +121 -2
- package/dist/types/storefront-client.d.ts +14 -14
- package/dist/types/useCartActions.d.ts +1 -1
- package/dist/types/useShopifyCookies.d.ts +14 -0
- package/dist/umd/hydrogen-react.dev.js +1634 -1371
- package/dist/umd/hydrogen-react.dev.js.map +1 -1
- package/dist/umd/hydrogen-react.prod.js +18 -25
- package/dist/umd/hydrogen-react.prod.js.map +1 -1
- package/package.json +24 -19
- package/storefront.schema.json +1 -1
- package/dist/browser-dev/Metafield.mjs +0 -301
- package/dist/browser-dev/Metafield.mjs.map +0 -1
- package/dist/browser-dev/metafield-parser.mjs.map +0 -1
- package/dist/browser-prod/Metafield.mjs +0 -288
- package/dist/browser-prod/Metafield.mjs.map +0 -1
- package/dist/browser-prod/metafield-parser.mjs.map +0 -1
- package/dist/node-dev/Metafield.js +0 -301
- package/dist/node-dev/Metafield.js.map +0 -1
- package/dist/node-dev/Metafield.mjs +0 -301
- package/dist/node-dev/Metafield.mjs.map +0 -1
- package/dist/node-dev/metafield-parser.js.map +0 -1
- package/dist/node-dev/metafield-parser.mjs.map +0 -1
- package/dist/node-prod/Metafield.js +0 -288
- package/dist/node-prod/Metafield.js.map +0 -1
- package/dist/node-prod/Metafield.mjs +0 -288
- package/dist/node-prod/Metafield.mjs.map +0 -1
- package/dist/node-prod/metafield-parser.js.map +0 -1
- package/dist/node-prod/metafield-parser.mjs.map +0 -1
- package/dist/types/Metafield.d.ts +0 -61
package/dist/node-dev/index.js
CHANGED
|
@@ -1,41 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const AddToCartButton = require("./AddToCartButton.js");
|
|
4
|
+
const analytics = require("./analytics.js");
|
|
5
|
+
const analyticsConstants = require("./analytics-constants.js");
|
|
4
6
|
const BuyNowButton = require("./BuyNowButton.js");
|
|
5
7
|
const CartCheckoutButton = require("./CartCheckoutButton.js");
|
|
8
|
+
const CartCost = require("./CartCost.js");
|
|
9
|
+
const CartLinePrice = require("./CartLinePrice.js");
|
|
10
|
+
const CartLineProvider = require("./CartLineProvider.js");
|
|
6
11
|
const CartProvider = require("./CartProvider.js");
|
|
7
12
|
const codegen_helpers = require("./codegen.helpers.js");
|
|
13
|
+
const cookiesUtils = require("./cookies-utils.js");
|
|
8
14
|
const ExternalVideo = require("./ExternalVideo.js");
|
|
9
15
|
const flattenConnection = require("./flatten-connection.js");
|
|
10
16
|
const Image = require("./Image.js");
|
|
11
17
|
const MediaFile = require("./MediaFile.js");
|
|
12
|
-
const metafieldParser = require("./metafield-parser.js");
|
|
13
|
-
const Metafield = require("./Metafield.js");
|
|
14
18
|
const ModelViewer = require("./ModelViewer.js");
|
|
15
19
|
const Money = require("./Money.js");
|
|
20
|
+
const parseMetafield = require("./parse-metafield.js");
|
|
16
21
|
const ProductPrice = require("./ProductPrice.js");
|
|
17
22
|
const ProductProvider = require("./ProductProvider.js");
|
|
18
23
|
const ShopifyProvider = require("./ShopifyProvider.js");
|
|
19
24
|
const ShopPayButton = require("./ShopPayButton.js");
|
|
20
25
|
const storefrontClient = require("./storefront-client.js");
|
|
21
26
|
const useMoney = require("./useMoney.js");
|
|
27
|
+
const useShopifyCookies = require("./useShopifyCookies.js");
|
|
22
28
|
const Video = require("./Video.js");
|
|
23
29
|
exports.AddToCartButton = AddToCartButton.AddToCartButton;
|
|
30
|
+
exports.getClientBrowserParameters = analytics.getClientBrowserParameters;
|
|
31
|
+
exports.sendShopifyAnalytics = analytics.sendShopifyAnalytics;
|
|
32
|
+
exports.AnalyticsEventName = analyticsConstants.AnalyticsEventName;
|
|
33
|
+
exports.AnalyticsPageType = analyticsConstants.AnalyticsPageType;
|
|
34
|
+
exports.ShopifySalesChannel = analyticsConstants.ShopifySalesChannel;
|
|
24
35
|
exports.BuyNowButton = BuyNowButton.BuyNowButton;
|
|
25
36
|
exports.CartCheckoutButton = CartCheckoutButton.CartCheckoutButton;
|
|
37
|
+
exports.CartCost = CartCost.CartCost;
|
|
38
|
+
exports.CartLinePrice = CartLinePrice.CartLinePrice;
|
|
39
|
+
exports.CartLineProvider = CartLineProvider.CartLineProvider;
|
|
40
|
+
exports.useCartLine = CartLineProvider.useCartLine;
|
|
26
41
|
exports.CartProvider = CartProvider.CartProvider;
|
|
27
42
|
exports.useCart = CartProvider.useCart;
|
|
28
43
|
exports.storefrontApiCustomScalars = codegen_helpers.storefrontApiCustomScalars;
|
|
44
|
+
exports.getShopifyCookies = cookiesUtils.getShopifyCookies;
|
|
29
45
|
exports.ExternalVideo = ExternalVideo.ExternalVideo;
|
|
30
46
|
exports.flattenConnection = flattenConnection.flattenConnection;
|
|
31
47
|
exports.Image = Image.Image;
|
|
32
48
|
exports.MediaFile = MediaFile.MediaFile;
|
|
33
|
-
exports.metafieldParser = metafieldParser.metafieldParser;
|
|
34
|
-
exports.Metafield = Metafield.Metafield;
|
|
35
|
-
exports.parseMetafield = Metafield.parseMetafield;
|
|
36
|
-
exports.parseMetafieldValue = Metafield.parseMetafieldValue;
|
|
37
49
|
exports.ModelViewer = ModelViewer.ModelViewer;
|
|
38
50
|
exports.Money = Money.Money;
|
|
51
|
+
exports.parseMetafield = parseMetafield.parseMetafield;
|
|
39
52
|
exports.ProductPrice = ProductPrice.ProductPrice;
|
|
40
53
|
exports.ProductProvider = ProductProvider.ProductProvider;
|
|
41
54
|
exports.useProduct = ProductProvider.useProduct;
|
|
@@ -44,5 +57,6 @@ exports.useShop = ShopifyProvider.useShop;
|
|
|
44
57
|
exports.ShopPayButton = ShopPayButton.ShopPayButton;
|
|
45
58
|
exports.createStorefrontClient = storefrontClient.createStorefrontClient;
|
|
46
59
|
exports.useMoney = useMoney.useMoney;
|
|
60
|
+
exports.useShopifyCookies = useShopifyCookies.useShopifyCookies;
|
|
47
61
|
exports.Video = Video.Video;
|
|
48
62
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/node-dev/index.mjs
CHANGED
|
@@ -1,48 +1,62 @@
|
|
|
1
1
|
import { AddToCartButton } from "./AddToCartButton.mjs";
|
|
2
|
+
import { getClientBrowserParameters, sendShopifyAnalytics } from "./analytics.mjs";
|
|
3
|
+
import { AnalyticsEventName, AnalyticsPageType, ShopifySalesChannel } from "./analytics-constants.mjs";
|
|
2
4
|
import { BuyNowButton } from "./BuyNowButton.mjs";
|
|
3
5
|
import { CartCheckoutButton } from "./CartCheckoutButton.mjs";
|
|
6
|
+
import { CartCost } from "./CartCost.mjs";
|
|
7
|
+
import { CartLinePrice } from "./CartLinePrice.mjs";
|
|
8
|
+
import { CartLineProvider, useCartLine } from "./CartLineProvider.mjs";
|
|
4
9
|
import { CartProvider, useCart } from "./CartProvider.mjs";
|
|
5
10
|
import { storefrontApiCustomScalars } from "./codegen.helpers.mjs";
|
|
11
|
+
import { getShopifyCookies } from "./cookies-utils.mjs";
|
|
6
12
|
import { ExternalVideo } from "./ExternalVideo.mjs";
|
|
7
13
|
import { flattenConnection } from "./flatten-connection.mjs";
|
|
8
14
|
import { Image } from "./Image.mjs";
|
|
9
15
|
import { MediaFile } from "./MediaFile.mjs";
|
|
10
|
-
import { metafieldParser } from "./metafield-parser.mjs";
|
|
11
|
-
import { Metafield, parseMetafield, parseMetafieldValue } from "./Metafield.mjs";
|
|
12
16
|
import { ModelViewer } from "./ModelViewer.mjs";
|
|
13
17
|
import { Money } from "./Money.mjs";
|
|
18
|
+
import { parseMetafield } from "./parse-metafield.mjs";
|
|
14
19
|
import { ProductPrice } from "./ProductPrice.mjs";
|
|
15
20
|
import { ProductProvider, useProduct } from "./ProductProvider.mjs";
|
|
16
21
|
import { ShopifyProvider, useShop } from "./ShopifyProvider.mjs";
|
|
17
22
|
import { ShopPayButton } from "./ShopPayButton.mjs";
|
|
18
23
|
import { createStorefrontClient } from "./storefront-client.mjs";
|
|
19
24
|
import { useMoney } from "./useMoney.mjs";
|
|
25
|
+
import { useShopifyCookies } from "./useShopifyCookies.mjs";
|
|
20
26
|
import { Video } from "./Video.mjs";
|
|
21
27
|
export {
|
|
22
28
|
AddToCartButton,
|
|
29
|
+
AnalyticsEventName,
|
|
30
|
+
AnalyticsPageType,
|
|
23
31
|
BuyNowButton,
|
|
24
32
|
CartCheckoutButton,
|
|
33
|
+
CartCost,
|
|
34
|
+
CartLinePrice,
|
|
35
|
+
CartLineProvider,
|
|
25
36
|
CartProvider,
|
|
26
37
|
ExternalVideo,
|
|
27
38
|
Image,
|
|
28
39
|
MediaFile,
|
|
29
|
-
Metafield,
|
|
30
40
|
ModelViewer,
|
|
31
41
|
Money,
|
|
32
42
|
ProductPrice,
|
|
33
43
|
ProductProvider,
|
|
34
44
|
ShopPayButton,
|
|
35
45
|
ShopifyProvider,
|
|
46
|
+
ShopifySalesChannel,
|
|
36
47
|
Video,
|
|
37
48
|
createStorefrontClient,
|
|
38
49
|
flattenConnection,
|
|
39
|
-
|
|
50
|
+
getClientBrowserParameters,
|
|
51
|
+
getShopifyCookies,
|
|
40
52
|
parseMetafield,
|
|
41
|
-
|
|
53
|
+
sendShopifyAnalytics,
|
|
42
54
|
storefrontApiCustomScalars,
|
|
43
55
|
useCart,
|
|
56
|
+
useCartLine,
|
|
44
57
|
useMoney,
|
|
45
58
|
useProduct,
|
|
46
|
-
useShop
|
|
59
|
+
useShop,
|
|
60
|
+
useShopifyCookies
|
|
47
61
|
};
|
|
48
62
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require$$0 = require("react");
|
|
4
4
|
const SCRIPTS_LOADED = {};
|
|
5
5
|
function loadScript(src, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-script.js","sources":["../../src/load-script.tsx"],"sourcesContent":["import {useState, useEffect} from 'react';\n\nconst SCRIPTS_LOADED: Record<string, Promise<boolean>> = {};\n\nexport function loadScript(\n src: string,\n options?: {module?: boolean; in?: 'head' | 'body'}\n): Promise<boolean> {\n const isScriptLoaded: Promise<boolean> = SCRIPTS_LOADED[src];\n\n if (isScriptLoaded) {\n return isScriptLoaded;\n }\n\n const promise = new Promise<boolean>((resolve, reject) => {\n const script = document.createElement('script');\n if (options?.module) {\n script.type = 'module';\n } else {\n script.type = 'text/javascript';\n }\n script.src = src;\n script.onload = () => {\n resolve(true);\n };\n script.onerror = () => {\n reject(false);\n };\n if (options?.in === 'head') {\n document.head.appendChild(script);\n } else {\n document.body.appendChild(script);\n }\n });\n\n SCRIPTS_LOADED[src] = promise;\n\n return promise;\n}\n\ntype LoadScriptParams = Parameters<typeof loadScript>;\n\n/**\n * The `useLoadScript` hook loads an external script tag in the browser. It allows React components to lazy-load large third-party dependencies.\n */\nexport function useLoadScript(\n url: LoadScriptParams[0],\n options?: LoadScriptParams[1]\n): ScriptState {\n const [status, setStatus] = useState<ScriptState>('loading');\n const stringifiedOptions = JSON.stringify(options);\n\n useEffect(() => {\n async function loadScriptWrapper() {\n try {\n setStatus('loading');\n await loadScript(url, options);\n setStatus('done');\n } catch (error) {\n setStatus('error');\n }\n }\n\n loadScriptWrapper();\n }, [url, stringifiedOptions, options]);\n\n return status;\n}\n\ntype ScriptState = 'loading' | 'done' | 'error';\n"],"names":["
|
|
1
|
+
{"version":3,"file":"load-script.js","sources":["../../src/load-script.tsx"],"sourcesContent":["import {useState, useEffect} from 'react';\n\nconst SCRIPTS_LOADED: Record<string, Promise<boolean>> = {};\n\nexport function loadScript(\n src: string,\n options?: {module?: boolean; in?: 'head' | 'body'}\n): Promise<boolean> {\n const isScriptLoaded: Promise<boolean> = SCRIPTS_LOADED[src];\n\n if (isScriptLoaded) {\n return isScriptLoaded;\n }\n\n const promise = new Promise<boolean>((resolve, reject) => {\n const script = document.createElement('script');\n if (options?.module) {\n script.type = 'module';\n } else {\n script.type = 'text/javascript';\n }\n script.src = src;\n script.onload = () => {\n resolve(true);\n };\n script.onerror = () => {\n reject(false);\n };\n if (options?.in === 'head') {\n document.head.appendChild(script);\n } else {\n document.body.appendChild(script);\n }\n });\n\n SCRIPTS_LOADED[src] = promise;\n\n return promise;\n}\n\ntype LoadScriptParams = Parameters<typeof loadScript>;\n\n/**\n * The `useLoadScript` hook loads an external script tag in the browser. It allows React components to lazy-load large third-party dependencies.\n */\nexport function useLoadScript(\n url: LoadScriptParams[0],\n options?: LoadScriptParams[1]\n): ScriptState {\n const [status, setStatus] = useState<ScriptState>('loading');\n const stringifiedOptions = JSON.stringify(options);\n\n useEffect(() => {\n async function loadScriptWrapper() {\n try {\n setStatus('loading');\n await loadScript(url, options);\n setStatus('done');\n } catch (error) {\n setStatus('error');\n }\n }\n\n loadScriptWrapper();\n }, [url, stringifiedOptions, options]);\n\n return status;\n}\n\ntype ScriptState = 'loading' | 'done' | 'error';\n"],"names":["useState","useEffect"],"mappings":";;;AAEA,MAAM,iBAAmD,CAAA;AAEzC,SAAA,WACd,KACA,SACkB;AACZ,QAAA,iBAAmC,eAAe,GAAG;AAE3D,MAAI,gBAAgB;AACX,WAAA;AAAA,EACT;AAEA,QAAM,UAAU,IAAI,QAAiB,CAAC,SAAS,WAAW;AAClD,UAAA,SAAS,SAAS,cAAc,QAAQ;AAC9C,QAAI,mCAAS,QAAQ;AACnB,aAAO,OAAO;AAAA,IAAA,OACT;AACL,aAAO,OAAO;AAAA,IAChB;AACA,WAAO,MAAM;AACb,WAAO,SAAS,MAAM;AACpB,cAAQ,IAAI;AAAA,IAAA;AAEd,WAAO,UAAU,MAAM;AACrB,aAAO,KAAK;AAAA,IAAA;AAEV,SAAA,mCAAS,QAAO,QAAQ;AACjB,eAAA,KAAK,YAAY,MAAM;AAAA,IAAA,OAC3B;AACI,eAAA,KAAK,YAAY,MAAM;AAAA,IAClC;AAAA,EAAA,CACD;AAED,iBAAe,GAAG,IAAI;AAEf,SAAA;AACT;AAOgB,SAAA,cACd,KACA,SACa;AACb,QAAM,CAAC,QAAQ,SAAS,IAAIA,oBAAsB,SAAS;AACrD,QAAA,qBAAqB,KAAK,UAAU,OAAO;AAEjDC,aAAAA,UAAU,MAAM;AACd,mBAAe,oBAAoB;AAC7B,UAAA;AACF,kBAAU,SAAS;AACb,cAAA,WAAW,KAAK,OAAO;AAC7B,kBAAU,MAAM;AAAA,eACT;AACP,kBAAU,OAAO;AAAA,MACnB;AAAA,IACF;AAEkB;EACjB,GAAA,CAAC,KAAK,oBAAoB,OAAO,CAAC;AAE9B,SAAA;AACT;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-script.mjs","sources":["../../src/load-script.tsx"],"sourcesContent":["import {useState, useEffect} from 'react';\n\nconst SCRIPTS_LOADED: Record<string, Promise<boolean>> = {};\n\nexport function loadScript(\n src: string,\n options?: {module?: boolean; in?: 'head' | 'body'}\n): Promise<boolean> {\n const isScriptLoaded: Promise<boolean> = SCRIPTS_LOADED[src];\n\n if (isScriptLoaded) {\n return isScriptLoaded;\n }\n\n const promise = new Promise<boolean>((resolve, reject) => {\n const script = document.createElement('script');\n if (options?.module) {\n script.type = 'module';\n } else {\n script.type = 'text/javascript';\n }\n script.src = src;\n script.onload = () => {\n resolve(true);\n };\n script.onerror = () => {\n reject(false);\n };\n if (options?.in === 'head') {\n document.head.appendChild(script);\n } else {\n document.body.appendChild(script);\n }\n });\n\n SCRIPTS_LOADED[src] = promise;\n\n return promise;\n}\n\ntype LoadScriptParams = Parameters<typeof loadScript>;\n\n/**\n * The `useLoadScript` hook loads an external script tag in the browser. It allows React components to lazy-load large third-party dependencies.\n */\nexport function useLoadScript(\n url: LoadScriptParams[0],\n options?: LoadScriptParams[1]\n): ScriptState {\n const [status, setStatus] = useState<ScriptState>('loading');\n const stringifiedOptions = JSON.stringify(options);\n\n useEffect(() => {\n async function loadScriptWrapper() {\n try {\n setStatus('loading');\n await loadScript(url, options);\n setStatus('done');\n } catch (error) {\n setStatus('error');\n }\n }\n\n loadScriptWrapper();\n }, [url, stringifiedOptions, options]);\n\n return status;\n}\n\ntype ScriptState = 'loading' | 'done' | 'error';\n"],"names":[
|
|
1
|
+
{"version":3,"file":"load-script.mjs","sources":["../../src/load-script.tsx"],"sourcesContent":["import {useState, useEffect} from 'react';\n\nconst SCRIPTS_LOADED: Record<string, Promise<boolean>> = {};\n\nexport function loadScript(\n src: string,\n options?: {module?: boolean; in?: 'head' | 'body'}\n): Promise<boolean> {\n const isScriptLoaded: Promise<boolean> = SCRIPTS_LOADED[src];\n\n if (isScriptLoaded) {\n return isScriptLoaded;\n }\n\n const promise = new Promise<boolean>((resolve, reject) => {\n const script = document.createElement('script');\n if (options?.module) {\n script.type = 'module';\n } else {\n script.type = 'text/javascript';\n }\n script.src = src;\n script.onload = () => {\n resolve(true);\n };\n script.onerror = () => {\n reject(false);\n };\n if (options?.in === 'head') {\n document.head.appendChild(script);\n } else {\n document.body.appendChild(script);\n }\n });\n\n SCRIPTS_LOADED[src] = promise;\n\n return promise;\n}\n\ntype LoadScriptParams = Parameters<typeof loadScript>;\n\n/**\n * The `useLoadScript` hook loads an external script tag in the browser. It allows React components to lazy-load large third-party dependencies.\n */\nexport function useLoadScript(\n url: LoadScriptParams[0],\n options?: LoadScriptParams[1]\n): ScriptState {\n const [status, setStatus] = useState<ScriptState>('loading');\n const stringifiedOptions = JSON.stringify(options);\n\n useEffect(() => {\n async function loadScriptWrapper() {\n try {\n setStatus('loading');\n await loadScript(url, options);\n setStatus('done');\n } catch (error) {\n setStatus('error');\n }\n }\n\n loadScriptWrapper();\n }, [url, stringifiedOptions, options]);\n\n return status;\n}\n\ntype ScriptState = 'loading' | 'done' | 'error';\n"],"names":[],"mappings":";AAEA,MAAM,iBAAmD,CAAA;AAEzC,SAAA,WACd,KACA,SACkB;AACZ,QAAA,iBAAmC,eAAe,GAAG;AAE3D,MAAI,gBAAgB;AACX,WAAA;AAAA,EACT;AAEA,QAAM,UAAU,IAAI,QAAiB,CAAC,SAAS,WAAW;AAClD,UAAA,SAAS,SAAS,cAAc,QAAQ;AAC9C,QAAI,mCAAS,QAAQ;AACnB,aAAO,OAAO;AAAA,IAAA,OACT;AACL,aAAO,OAAO;AAAA,IAChB;AACA,WAAO,MAAM;AACb,WAAO,SAAS,MAAM;AACpB,cAAQ,IAAI;AAAA,IAAA;AAEd,WAAO,UAAU,MAAM;AACrB,aAAO,KAAK;AAAA,IAAA;AAEV,SAAA,mCAAS,QAAO,QAAQ;AACjB,eAAA,KAAK,YAAY,MAAM;AAAA,IAAA,OAC3B;AACI,eAAA,KAAK,YAAY,MAAM;AAAA,IAClC;AAAA,EAAA,CACD;AAED,iBAAe,GAAG,IAAI;AAEf,SAAA;AACT;AAOgB,SAAA,cACd,KACA,SACa;AACb,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAsB,SAAS;AACrD,QAAA,qBAAqB,KAAK,UAAU,OAAO;AAEjD,YAAU,MAAM;AACd,mBAAe,oBAAoB;AAC7B,UAAA;AACF,kBAAU,SAAS;AACb,cAAA,WAAW,KAAK,OAAO;AAC7B,kBAAU,MAAM;AAAA,eACT;AACP,kBAAU,OAAO;AAAA,MACnB;AAAA,IACF;AAEkB;EACjB,GAAA,CAAC,KAAK,oBAAoB,OAAO,CAAC;AAE9B,SAAA;AACT;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
/*! *****************************************************************************
|
|
4
4
|
Copyright (c) Microsoft Corporation.
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@xstate/fsm/es/index.js"],"sourcesContent":["/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nfunction t(t,n){var e=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return a}var n;!function(t){t[t.NotStarted=0]=\"NotStarted\",t[t.Running=1]=\"Running\",t[t.Stopped=2]=\"Stopped\"}(n||(n={}));var e={type:\"xstate.init\"};function r(t){return void 0===t?[]:[].concat(t)}function i(t){return{type:\"xstate.assign\",assignment:t}}function o(t,n){return\"string\"==typeof(t=\"string\"==typeof t&&n&&n[t]?n[t]:t)?{type:t}:\"function\"==typeof t?{type:t.name,exec:t}:t}function a(t){return function(n){return t===n}}function u(t){return\"string\"==typeof t?{type:t}:t}function c(t,n){return{value:t,context:n,actions:[],changed:!1,matches:a(t)}}function f(t,n,e){var r=n,i=!1;return[t.filter((function(t){if(\"xstate.assign\"===t.type){i=!0;var n=Object.assign({},r);return\"function\"==typeof t.assignment?n=t.assignment(r,e):Object.keys(t.assignment).forEach((function(i){n[i]=\"function\"==typeof t.assignment[i]?t.assignment[i](r,e):t.assignment[i]})),r=n,!1}return!0})),r,i]}function s(n,i){void 0===i&&(i={});var s=t(f(r(n.states[n.initial].entry).map((function(t){return o(t,i.actions)})),n.context,e),2),l=s[0],v=s[1],y={config:n,_options:i,initialState:{value:n.initial,actions:l,context:v,matches:a(n.initial)},transition:function(e,i){var s,l,v=\"string\"==typeof e?{value:e,context:n.context}:e,p=v.value,g=v.context,d=u(i),x=n.states[p];if(x.on){var m=r(x.on[d.type]);try{for(var h=function(t){var n=\"function\"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")}(m),b=h.next();!b.done;b=h.next()){var S=b.value;if(void 0===S)return c(p,g);var w=\"string\"==typeof S?{target:S}:S,j=w.target,E=w.actions,R=void 0===E?[]:E,N=w.cond,O=void 0===N?function(){return!0}:N,_=void 0===j,k=null!=j?j:p,T=n.states[k];if(O(g,d)){var q=t(f((_?r(R):[].concat(x.exit,R,T.entry).filter((function(t){return t}))).map((function(t){return o(t,y._options.actions)})),g,d),3),z=q[0],A=q[1],B=q[2],C=null!=j?j:p;return{value:C,context:A,actions:z,changed:j!==p||z.length>0||B,matches:a(C)}}}}catch(t){s={error:t}}finally{try{b&&!b.done&&(l=h.return)&&l.call(h)}finally{if(s)throw s.error}}}return c(p,g)}};return y}var l=function(t,n){return t.actions.forEach((function(e){var r=e.exec;return r&&r(t.context,n)}))};function v(t){var r=t.initialState,i=n.NotStarted,o=new Set,c={_machine:t,send:function(e){i===n.Running&&(r=t.transition(r,e),l(r,u(e)),o.forEach((function(t){return t(r)})))},subscribe:function(t){return o.add(t),t(r),{unsubscribe:function(){return o.delete(t)}}},start:function(o){if(o){var u=\"object\"==typeof o?o:{context:t.config.context,value:o};r={value:u.value,actions:[],context:u.context,matches:a(u.value)}}else r=t.initialState;return i=n.Running,l(r,e),c},stop:function(){return i=n.Stopped,o.clear(),c},get state(){return r},get status(){return i}};return c}export{n as InterpreterStatus,i as assign,s as createMachine,v as interpret};\n"],"names":["t","e","r","i","o","a","n","s","l","v","c","u"],"mappings":";;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,SAAS,EAAEA,IAAE,GAAE;AAAC,MAAIC,KAAE,cAAY,OAAO,UAAQD,GAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@xstate/fsm/es/index.js"],"sourcesContent":["/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nfunction t(t,n){var e=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return a}var n;!function(t){t[t.NotStarted=0]=\"NotStarted\",t[t.Running=1]=\"Running\",t[t.Stopped=2]=\"Stopped\"}(n||(n={}));var e={type:\"xstate.init\"};function r(t){return void 0===t?[]:[].concat(t)}function i(t){return{type:\"xstate.assign\",assignment:t}}function o(t,n){return\"string\"==typeof(t=\"string\"==typeof t&&n&&n[t]?n[t]:t)?{type:t}:\"function\"==typeof t?{type:t.name,exec:t}:t}function a(t){return function(n){return t===n}}function u(t){return\"string\"==typeof t?{type:t}:t}function c(t,n){return{value:t,context:n,actions:[],changed:!1,matches:a(t)}}function f(t,n,e){var r=n,i=!1;return[t.filter((function(t){if(\"xstate.assign\"===t.type){i=!0;var n=Object.assign({},r);return\"function\"==typeof t.assignment?n=t.assignment(r,e):Object.keys(t.assignment).forEach((function(i){n[i]=\"function\"==typeof t.assignment[i]?t.assignment[i](r,e):t.assignment[i]})),r=n,!1}return!0})),r,i]}function s(n,i){void 0===i&&(i={});var s=t(f(r(n.states[n.initial].entry).map((function(t){return o(t,i.actions)})),n.context,e),2),l=s[0],v=s[1],y={config:n,_options:i,initialState:{value:n.initial,actions:l,context:v,matches:a(n.initial)},transition:function(e,i){var s,l,v=\"string\"==typeof e?{value:e,context:n.context}:e,p=v.value,g=v.context,d=u(i),x=n.states[p];if(x.on){var m=r(x.on[d.type]);try{for(var h=function(t){var n=\"function\"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")}(m),b=h.next();!b.done;b=h.next()){var S=b.value;if(void 0===S)return c(p,g);var w=\"string\"==typeof S?{target:S}:S,j=w.target,E=w.actions,R=void 0===E?[]:E,N=w.cond,O=void 0===N?function(){return!0}:N,_=void 0===j,k=null!=j?j:p,T=n.states[k];if(O(g,d)){var q=t(f((_?r(R):[].concat(x.exit,R,T.entry).filter((function(t){return t}))).map((function(t){return o(t,y._options.actions)})),g,d),3),z=q[0],A=q[1],B=q[2],C=null!=j?j:p;return{value:C,context:A,actions:z,changed:j!==p||z.length>0||B,matches:a(C)}}}}catch(t){s={error:t}}finally{try{b&&!b.done&&(l=h.return)&&l.call(h)}finally{if(s)throw s.error}}}return c(p,g)}};return y}var l=function(t,n){return t.actions.forEach((function(e){var r=e.exec;return r&&r(t.context,n)}))};function v(t){var r=t.initialState,i=n.NotStarted,o=new Set,c={_machine:t,send:function(e){i===n.Running&&(r=t.transition(r,e),l(r,u(e)),o.forEach((function(t){return t(r)})))},subscribe:function(t){return o.add(t),t(r),{unsubscribe:function(){return o.delete(t)}}},start:function(o){if(o){var u=\"object\"==typeof o?o:{context:t.config.context,value:o};r={value:u.value,actions:[],context:u.context,matches:a(u.value)}}else r=t.initialState;return i=n.Running,l(r,e),c},stop:function(){return i=n.Stopped,o.clear(),c},get state(){return r},get status(){return i}};return c}export{n as InterpreterStatus,i as assign,s as createMachine,v as interpret};\n"],"names":["t","e","r","i","o","a","n","s","l","v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AAE,cAAaG,KAAEG,0BAAE,YAAWF,KAAE,oBAAI,OAAIM,KAAE,EAAC,UAASV,IAAE,MAAK,SAASC,IAAE;AAAC,IAAAE,OAAIG,QAAAA,kBAAE,YAAUJ,KAAEF,GAAE,WAAWE,IAAED,EAAC,GAAE,EAAEC,IAAE,EAAED,EAAC,CAAC,GAAEG,GAAE,QAAS,SAASJ,IAAE;AAAC,aAAOA,GAAEE,EAAC;AAAA,IAAC,CAAC;AAAA,EAAG,GAAE,WAAU,SAASF,IAAE;AAAC,WAAOI,GAAE,IAAIJ,EAAC,GAAEA,GAAEE,EAAC,GAAE,EAAC,aAAY,WAAU;AAAC,aAAOE,GAAE,OAAOJ,EAAC;AAAA,IAAC,EAAC;AAAA,EAAC,GAAE,OAAM,SAASI,IAAE;AAAC,QAAGA,IAAE;AAAC,UAAIO,KAAE,YAAU,OAAOP,KAAEA,KAAE,EAAC,SAAQJ,GAAE,OAAO,SAAQ,OAAMI,GAAC;AAAE,MAAAF,KAAE,EAAC,OAAMS,GAAE,OAAM,SAAQ,CAAE,GAAC,SAAQA,GAAE,SAAQ,SAAQ,EAAEA,GAAE,KAAK,EAAC;AAAA,IAAC;AAAM,MAAAT,KAAEF,GAAE;AAAa,WAAOG,KAAEG,QAAC,kBAAC,SAAQ,EAAEJ,IAAE,CAAC,GAAEQ;AAAA,EAAC,GAAE,MAAK,WAAU;AAAC,WAAOP,KAAEG,0BAAE,SAAQF,GAAE,MAAO,GAACM;AAAA,EAAC,GAAE,IAAI,QAAO;AAAC,WAAOR;AAAA,EAAC,GAAE,IAAI,SAAQ;AAAC,WAAOC;AAAA,EAAC,EAAC;AAAE,SAAOO;AAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../../node_modules/@xstate/fsm/es/index.js"],"sourcesContent":["/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nfunction t(t,n){var e=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return a}var n;!function(t){t[t.NotStarted=0]=\"NotStarted\",t[t.Running=1]=\"Running\",t[t.Stopped=2]=\"Stopped\"}(n||(n={}));var e={type:\"xstate.init\"};function r(t){return void 0===t?[]:[].concat(t)}function i(t){return{type:\"xstate.assign\",assignment:t}}function o(t,n){return\"string\"==typeof(t=\"string\"==typeof t&&n&&n[t]?n[t]:t)?{type:t}:\"function\"==typeof t?{type:t.name,exec:t}:t}function a(t){return function(n){return t===n}}function u(t){return\"string\"==typeof t?{type:t}:t}function c(t,n){return{value:t,context:n,actions:[],changed:!1,matches:a(t)}}function f(t,n,e){var r=n,i=!1;return[t.filter((function(t){if(\"xstate.assign\"===t.type){i=!0;var n=Object.assign({},r);return\"function\"==typeof t.assignment?n=t.assignment(r,e):Object.keys(t.assignment).forEach((function(i){n[i]=\"function\"==typeof t.assignment[i]?t.assignment[i](r,e):t.assignment[i]})),r=n,!1}return!0})),r,i]}function s(n,i){void 0===i&&(i={});var s=t(f(r(n.states[n.initial].entry).map((function(t){return o(t,i.actions)})),n.context,e),2),l=s[0],v=s[1],y={config:n,_options:i,initialState:{value:n.initial,actions:l,context:v,matches:a(n.initial)},transition:function(e,i){var s,l,v=\"string\"==typeof e?{value:e,context:n.context}:e,p=v.value,g=v.context,d=u(i),x=n.states[p];if(x.on){var m=r(x.on[d.type]);try{for(var h=function(t){var n=\"function\"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")}(m),b=h.next();!b.done;b=h.next()){var S=b.value;if(void 0===S)return c(p,g);var w=\"string\"==typeof S?{target:S}:S,j=w.target,E=w.actions,R=void 0===E?[]:E,N=w.cond,O=void 0===N?function(){return!0}:N,_=void 0===j,k=null!=j?j:p,T=n.states[k];if(O(g,d)){var q=t(f((_?r(R):[].concat(x.exit,R,T.entry).filter((function(t){return t}))).map((function(t){return o(t,y._options.actions)})),g,d),3),z=q[0],A=q[1],B=q[2],C=null!=j?j:p;return{value:C,context:A,actions:z,changed:j!==p||z.length>0||B,matches:a(C)}}}}catch(t){s={error:t}}finally{try{b&&!b.done&&(l=h.return)&&l.call(h)}finally{if(s)throw s.error}}}return c(p,g)}};return y}var l=function(t,n){return t.actions.forEach((function(e){var r=e.exec;return r&&r(t.context,n)}))};function v(t){var r=t.initialState,i=n.NotStarted,o=new Set,c={_machine:t,send:function(e){i===n.Running&&(r=t.transition(r,e),l(r,u(e)),o.forEach((function(t){return t(r)})))},subscribe:function(t){return o.add(t),t(r),{unsubscribe:function(){return o.delete(t)}}},start:function(o){if(o){var u=\"object\"==typeof o?o:{context:t.config.context,value:o};r={value:u.value,actions:[],context:u.context,matches:a(u.value)}}else r=t.initialState;return i=n.Running,l(r,e),c},stop:function(){return i=n.Stopped,o.clear(),c},get state(){return r},get status(){return i}};return c}export{n as InterpreterStatus,i as assign,s as createMachine,v as interpret};\n"],"names":["t","n","e","r","i","o","a","s","l","v","c","u"],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,SAAS,EAAEA,IAAEC,IAAE;AAAC,MAAIC,KAAE,cAAY,OAAO,UAAQF,GAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../../node_modules/@xstate/fsm/es/index.js"],"sourcesContent":["/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nfunction t(t,n){var e=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return a}var n;!function(t){t[t.NotStarted=0]=\"NotStarted\",t[t.Running=1]=\"Running\",t[t.Stopped=2]=\"Stopped\"}(n||(n={}));var e={type:\"xstate.init\"};function r(t){return void 0===t?[]:[].concat(t)}function i(t){return{type:\"xstate.assign\",assignment:t}}function o(t,n){return\"string\"==typeof(t=\"string\"==typeof t&&n&&n[t]?n[t]:t)?{type:t}:\"function\"==typeof t?{type:t.name,exec:t}:t}function a(t){return function(n){return t===n}}function u(t){return\"string\"==typeof t?{type:t}:t}function c(t,n){return{value:t,context:n,actions:[],changed:!1,matches:a(t)}}function f(t,n,e){var r=n,i=!1;return[t.filter((function(t){if(\"xstate.assign\"===t.type){i=!0;var n=Object.assign({},r);return\"function\"==typeof t.assignment?n=t.assignment(r,e):Object.keys(t.assignment).forEach((function(i){n[i]=\"function\"==typeof t.assignment[i]?t.assignment[i](r,e):t.assignment[i]})),r=n,!1}return!0})),r,i]}function s(n,i){void 0===i&&(i={});var s=t(f(r(n.states[n.initial].entry).map((function(t){return o(t,i.actions)})),n.context,e),2),l=s[0],v=s[1],y={config:n,_options:i,initialState:{value:n.initial,actions:l,context:v,matches:a(n.initial)},transition:function(e,i){var s,l,v=\"string\"==typeof e?{value:e,context:n.context}:e,p=v.value,g=v.context,d=u(i),x=n.states[p];if(x.on){var m=r(x.on[d.type]);try{for(var h=function(t){var n=\"function\"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")}(m),b=h.next();!b.done;b=h.next()){var S=b.value;if(void 0===S)return c(p,g);var w=\"string\"==typeof S?{target:S}:S,j=w.target,E=w.actions,R=void 0===E?[]:E,N=w.cond,O=void 0===N?function(){return!0}:N,_=void 0===j,k=null!=j?j:p,T=n.states[k];if(O(g,d)){var q=t(f((_?r(R):[].concat(x.exit,R,T.entry).filter((function(t){return t}))).map((function(t){return o(t,y._options.actions)})),g,d),3),z=q[0],A=q[1],B=q[2],C=null!=j?j:p;return{value:C,context:A,actions:z,changed:j!==p||z.length>0||B,matches:a(C)}}}}catch(t){s={error:t}}finally{try{b&&!b.done&&(l=h.return)&&l.call(h)}finally{if(s)throw s.error}}}return c(p,g)}};return y}var l=function(t,n){return t.actions.forEach((function(e){var r=e.exec;return r&&r(t.context,n)}))};function v(t){var r=t.initialState,i=n.NotStarted,o=new Set,c={_machine:t,send:function(e){i===n.Running&&(r=t.transition(r,e),l(r,u(e)),o.forEach((function(t){return t(r)})))},subscribe:function(t){return o.add(t),t(r),{unsubscribe:function(){return o.delete(t)}}},start:function(o){if(o){var u=\"object\"==typeof o?o:{context:t.config.context,value:o};r={value:u.value,actions:[],context:u.context,matches:a(u.value)}}else r=t.initialState;return i=n.Running,l(r,e),c},stop:function(){return i=n.Stopped,o.clear(),c},get state(){return r},get status(){return i}};return c}export{n as InterpreterStatus,i as assign,s as createMachine,v as interpret};\n"],"names":["t","n","e","r","i","o","a","s","l","v","c","u"],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,SAAS,EAAEA,IAAEC,IAAE;AAAC,MAAIC,KAAE,cAAY,OAAO,UAAQF,GAAE,OAAO,QAAQ;AAAE,MAAG,CAACE;AAAE,WAAOF;AAAE,MAAIG,IAAEC,IAAEC,KAAEH,GAAE,KAAKF,EAAC,GAAEM,KAAE,CAAE;AAAC,MAAG;AAAC,YAAM,WAASL,MAAGA,OAAK,MAAI,EAAEE,KAAEE,GAAE,KAAI,GAAI;AAAM,MAAAC,GAAE,KAAKH,GAAE,KAAK;AAAA,EAAC,SAAOH,IAAN;AAAS,IAAAI,KAAE,EAAC,OAAMJ,GAAC;AAAA,EAAC,UAAC;AAAQ,QAAG;AAAC,MAAAG,MAAG,CAACA,GAAE,SAAOD,KAAEG,GAAE,WAASH,GAAE,KAAKG,EAAC;AAAA,IAAC,UAAC;AAAQ,UAAGD;AAAE,cAAMA,GAAE;AAAA,IAAK;AAAA,EAAC;AAAC,SAAOE;AAAC;AAAI,IAAC;AAAE,CAAC,SAASN,IAAE;AAAC,EAAAA,GAAEA,GAAE,aAAW,CAAC,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WAAOI,KAAE,EAAE,SAAQ,EAAED,IAAE,CAAC,GAAEO;AAAA,EAAC,GAAE,MAAK,WAAU;AAAC,WAAON,KAAE,EAAE,SAAQC,GAAE,MAAO,GAACK;AAAA,EAAC,GAAE,IAAI,QAAO;AAAC,WAAOP;AAAA,EAAC,GAAE,IAAI,SAAQ;AAAC,WAAOC;AAAA,EAAC,EAAC;AAAE,SAAOM;AAAC;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const index = require("../../fsm/es/index.js");
|
|
4
4
|
const require$$0 = require("react");
|
|
5
5
|
const useIsomorphicLayoutEffect_esm = require("../../../use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js");
|
|
@@ -86,7 +86,7 @@ function useService(service) {
|
|
|
86
86
|
var unsubscribe = service.subscribe(handleStoreChange).unsubscribe;
|
|
87
87
|
return unsubscribe;
|
|
88
88
|
}, [service]);
|
|
89
|
-
var storeSnapshot = withSelector.
|
|
89
|
+
var storeSnapshot = withSelector.exports.useSyncExternalStoreWithSelector(subscribe, getSnapshot, getSnapshot, identity, isEqual);
|
|
90
90
|
return [storeSnapshot, service.send, service];
|
|
91
91
|
}
|
|
92
92
|
exports.useMachine = useMachine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fsm.js","sources":["../../../../../../../../node_modules/@xstate/react/es/fsm.js"],"sourcesContent":["var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { createMachine, interpret, InterpreterStatus } from '@xstate/fsm';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport useIsomorphicLayoutEffect from 'use-isomorphic-layout-effect';\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';\nimport useConstant from './useConstant';\nfunction identity(a) {\n return a;\n}\nvar getServiceState = function (service) {\n var currentValue;\n service\n .subscribe(function (state) {\n currentValue = state;\n })\n .unsubscribe();\n return currentValue;\n};\nexport function useMachine(stateMachine, options) {\n var persistedStateRef = useRef();\n if (process.env.NODE_ENV !== 'production') {\n var _a = __read(useState(stateMachine), 1), initialMachine = _a[0];\n if (stateMachine !== initialMachine) {\n console.warn('Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\\n' +\n 'Please make sure that you pass the same Machine as argument each time.');\n }\n }\n var _b = __read(useConstant(function () {\n var queue = [];\n var service = interpret(createMachine(stateMachine.config, options ? options : stateMachine._options));\n var send = service.send;\n service.send = function (event) {\n if (service.status === InterpreterStatus.NotStarted) {\n queue.push(event);\n return;\n }\n send(event);\n persistedStateRef.current = service.state;\n };\n return [service, queue];\n }), 2), service = _b[0], queue = _b[1];\n useIsomorphicLayoutEffect(function () {\n if (options) {\n service._machine._options = options;\n }\n });\n var useServiceResult = useService(service);\n useEffect(function () {\n service.start(persistedStateRef.current);\n queue.forEach(service.send);\n persistedStateRef.current = service.state;\n return function () {\n service.stop();\n };\n }, []);\n return useServiceResult;\n}\nvar isEqual = function (_prevState, nextState) { return nextState.changed === false; };\nexport function useService(service) {\n var getSnapshot = useCallback(function () { return getServiceState(service); }, [service]);\n var subscribe = useCallback(function (handleStoreChange) {\n var unsubscribe = service.subscribe(handleStoreChange).unsubscribe;\n return unsubscribe;\n }, [service]);\n var storeSnapshot = useSyncExternalStoreWithSelector(subscribe, getSnapshot, getSnapshot, identity, isEqual);\n return [storeSnapshot, service.send, service];\n}\n"],"names":["this","useRef","useState","queue","service","interpret","createMachine","InterpreterStatus","useIsomorphicLayoutEffect","useEffect","useCallback","useSyncExternalStoreWithSelector"],"mappings":";;;;;;;;AAAA,IAAI,SAAUA,cAAQA,WAAK,UAAW,SAAU,GAAG,GAAG;AAClD,MAAI,IAAI,OAAO,WAAW,cAAc,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"fsm.js","sources":["../../../../../../../../node_modules/@xstate/react/es/fsm.js"],"sourcesContent":["var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { createMachine, interpret, InterpreterStatus } from '@xstate/fsm';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport useIsomorphicLayoutEffect from 'use-isomorphic-layout-effect';\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';\nimport useConstant from './useConstant';\nfunction identity(a) {\n return a;\n}\nvar getServiceState = function (service) {\n var currentValue;\n service\n .subscribe(function (state) {\n currentValue = state;\n })\n .unsubscribe();\n return currentValue;\n};\nexport function useMachine(stateMachine, options) {\n var persistedStateRef = useRef();\n if (process.env.NODE_ENV !== 'production') {\n var _a = __read(useState(stateMachine), 1), initialMachine = _a[0];\n if (stateMachine !== initialMachine) {\n console.warn('Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\\n' +\n 'Please make sure that you pass the same Machine as argument each time.');\n }\n }\n var _b = __read(useConstant(function () {\n var queue = [];\n var service = interpret(createMachine(stateMachine.config, options ? options : stateMachine._options));\n var send = service.send;\n service.send = function (event) {\n if (service.status === InterpreterStatus.NotStarted) {\n queue.push(event);\n return;\n }\n send(event);\n persistedStateRef.current = service.state;\n };\n return [service, queue];\n }), 2), service = _b[0], queue = _b[1];\n useIsomorphicLayoutEffect(function () {\n if (options) {\n service._machine._options = options;\n }\n });\n var useServiceResult = useService(service);\n useEffect(function () {\n service.start(persistedStateRef.current);\n queue.forEach(service.send);\n persistedStateRef.current = service.state;\n return function () {\n service.stop();\n };\n }, []);\n return useServiceResult;\n}\nvar isEqual = function (_prevState, nextState) { return nextState.changed === false; };\nexport function useService(service) {\n var getSnapshot = useCallback(function () { return getServiceState(service); }, [service]);\n var subscribe = useCallback(function (handleStoreChange) {\n var unsubscribe = service.subscribe(handleStoreChange).unsubscribe;\n return unsubscribe;\n }, [service]);\n var storeSnapshot = useSyncExternalStoreWithSelector(subscribe, getSnapshot, getSnapshot, identity, isEqual);\n return [storeSnapshot, service.send, service];\n}\n"],"names":["this","useRef","useState","queue","service","interpret","createMachine","InterpreterStatus","useIsomorphicLayoutEffect","useEffect","useCallback","useSyncExternalStoreWithSelector"],"mappings":";;;;;;;;AAAA,IAAI,SAAUA,cAAQA,WAAK,UAAW,SAAU,GAAG,GAAG;AAClD,MAAI,IAAI,OAAO,WAAW,cAAc,EAAE,OAAO,QAAQ;AACzD,MAAI,CAAC;AAAG,WAAO;AACf,MAAI,IAAI,EAAE,KAAK,CAAC,GAAG,GAAG,KAAK,CAAE,GAAE;AAC/B,MAAI;AACA,YAAQ,MAAM,UAAU,MAAM,MAAM,EAAE,IAAI,EAAE,KAAM,GAAE;AAAM,SAAG,KAAK,EAAE,KAAK;AAAA,EAC5E,SACM,OAAP;AAAgB,QAAI,EAAE,MAAc;AAAA,EAAG,UAC/B;AACJ,QAAI;AACA,UAAI,KAAK,CAAC,EAAE,SAAS,IAAI,EAAE,QAAQ;AAAI,UAAE,KAAK,CAAC;AAAA,IAClD,UACO;AAAE,UAAI;AAAG,cAAM,EAAE;AAAA,IAAQ;AAAA,EACpC;AACD,SAAO;AACX;AAMA,SAAS,SAAS,GAAG;AACjB,SAAO;AACX;AACA,IAAI,kBAAkB,SAAU,SAAS;AACrC,MAAI;AACJ,UACK,UAAU,SAAU,OAAO;AAC5B,mBAAe;AAAA,EACvB,CAAK,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,gBAAgB,OAAO;AAAA,EAAI,GAAE,CAAC,OAAO,CAAC;AACzF,MAAI,YAAYA,uBAAY,SAAU,mBAAmB;AACrD,QAAI,cAAc,QAAQ,UAAU,iBAAiB,EAAE;AACvD,WAAO;AAAA,EACf,GAAO,CAAC,OAAO,CAAC;AACZ,MAAI,gBAAgBC,aAAAA,QAAAA,iCAAiC,WAAW,aAAa,aAAa,UAAU,OAAO;AAC3G,SAAO,CAAC,eAAe,QAAQ,MAAM,OAAO;AAChD;;;"}
|
|
@@ -3,7 +3,7 @@ import { useRef, useState, useEffect, useCallback } from "react";
|
|
|
3
3
|
import index from "../../../use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.mjs";
|
|
4
4
|
import "../../../use-sync-external-store/shim/with-selector.mjs";
|
|
5
5
|
import useConstant from "./useConstant.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { exports as withSelectorExports } from "../../../../_virtual/with-selector.mjs";
|
|
7
7
|
var __read = globalThis && globalThis.__read || function(o, n2) {
|
|
8
8
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
9
9
|
if (!m)
|
|
@@ -84,7 +84,7 @@ function useService(service) {
|
|
|
84
84
|
var unsubscribe = service.subscribe(handleStoreChange).unsubscribe;
|
|
85
85
|
return unsubscribe;
|
|
86
86
|
}, [service]);
|
|
87
|
-
var storeSnapshot =
|
|
87
|
+
var storeSnapshot = withSelectorExports.useSyncExternalStoreWithSelector(subscribe, getSnapshot, getSnapshot, identity, isEqual);
|
|
88
88
|
return [storeSnapshot, service.send, service];
|
|
89
89
|
}
|
|
90
90
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fsm.mjs","sources":["../../../../../../../../node_modules/@xstate/react/es/fsm.js"],"sourcesContent":["var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { createMachine, interpret, InterpreterStatus } from '@xstate/fsm';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport useIsomorphicLayoutEffect from 'use-isomorphic-layout-effect';\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';\nimport useConstant from './useConstant';\nfunction identity(a) {\n return a;\n}\nvar getServiceState = function (service) {\n var currentValue;\n service\n .subscribe(function (state) {\n currentValue = state;\n })\n .unsubscribe();\n return currentValue;\n};\nexport function useMachine(stateMachine, options) {\n var persistedStateRef = useRef();\n if (process.env.NODE_ENV !== 'production') {\n var _a = __read(useState(stateMachine), 1), initialMachine = _a[0];\n if (stateMachine !== initialMachine) {\n console.warn('Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\\n' +\n 'Please make sure that you pass the same Machine as argument each time.');\n }\n }\n var _b = __read(useConstant(function () {\n var queue = [];\n var service = interpret(createMachine(stateMachine.config, options ? options : stateMachine._options));\n var send = service.send;\n service.send = function (event) {\n if (service.status === InterpreterStatus.NotStarted) {\n queue.push(event);\n return;\n }\n send(event);\n persistedStateRef.current = service.state;\n };\n return [service, queue];\n }), 2), service = _b[0], queue = _b[1];\n useIsomorphicLayoutEffect(function () {\n if (options) {\n service._machine._options = options;\n }\n });\n var useServiceResult = useService(service);\n useEffect(function () {\n service.start(persistedStateRef.current);\n queue.forEach(service.send);\n persistedStateRef.current = service.state;\n return function () {\n service.stop();\n };\n }, []);\n return useServiceResult;\n}\nvar isEqual = function (_prevState, nextState) { return nextState.changed === false; };\nexport function useService(service) {\n var getSnapshot = useCallback(function () { return getServiceState(service); }, [service]);\n var subscribe = useCallback(function (handleStoreChange) {\n var unsubscribe = service.subscribe(handleStoreChange).unsubscribe;\n return unsubscribe;\n }, [service]);\n var storeSnapshot = useSyncExternalStoreWithSelector(subscribe, getSnapshot, getSnapshot, identity, isEqual);\n return [storeSnapshot, service.send, service];\n}\n"],"names":["this","n","queue","service","interpret","createMachine","InterpreterStatus","useIsomorphicLayoutEffect","useSyncExternalStoreWithSelector"],"mappings":";;;;;;AAAA,IAAI,SAAUA,cAAQA,WAAK,UAAW,SAAU,GAAGC,IAAG;AAClD,MAAI,IAAI,OAAO,WAAW,cAAc,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"fsm.mjs","sources":["../../../../../../../../node_modules/@xstate/react/es/fsm.js"],"sourcesContent":["var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { createMachine, interpret, InterpreterStatus } from '@xstate/fsm';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport useIsomorphicLayoutEffect from 'use-isomorphic-layout-effect';\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';\nimport useConstant from './useConstant';\nfunction identity(a) {\n return a;\n}\nvar getServiceState = function (service) {\n var currentValue;\n service\n .subscribe(function (state) {\n currentValue = state;\n })\n .unsubscribe();\n return currentValue;\n};\nexport function useMachine(stateMachine, options) {\n var persistedStateRef = useRef();\n if (process.env.NODE_ENV !== 'production') {\n var _a = __read(useState(stateMachine), 1), initialMachine = _a[0];\n if (stateMachine !== initialMachine) {\n console.warn('Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\\n' +\n 'Please make sure that you pass the same Machine as argument each time.');\n }\n }\n var _b = __read(useConstant(function () {\n var queue = [];\n var service = interpret(createMachine(stateMachine.config, options ? options : stateMachine._options));\n var send = service.send;\n service.send = function (event) {\n if (service.status === InterpreterStatus.NotStarted) {\n queue.push(event);\n return;\n }\n send(event);\n persistedStateRef.current = service.state;\n };\n return [service, queue];\n }), 2), service = _b[0], queue = _b[1];\n useIsomorphicLayoutEffect(function () {\n if (options) {\n service._machine._options = options;\n }\n });\n var useServiceResult = useService(service);\n useEffect(function () {\n service.start(persistedStateRef.current);\n queue.forEach(service.send);\n persistedStateRef.current = service.state;\n return function () {\n service.stop();\n };\n }, []);\n return useServiceResult;\n}\nvar isEqual = function (_prevState, nextState) { return nextState.changed === false; };\nexport function useService(service) {\n var getSnapshot = useCallback(function () { return getServiceState(service); }, [service]);\n var subscribe = useCallback(function (handleStoreChange) {\n var unsubscribe = service.subscribe(handleStoreChange).unsubscribe;\n return unsubscribe;\n }, [service]);\n var storeSnapshot = useSyncExternalStoreWithSelector(subscribe, getSnapshot, getSnapshot, identity, isEqual);\n return [storeSnapshot, service.send, service];\n}\n"],"names":["this","n","queue","service","interpret","createMachine","InterpreterStatus","useIsomorphicLayoutEffect","useSyncExternalStoreWithSelector"],"mappings":";;;;;;AAAA,IAAI,SAAUA,cAAQA,WAAK,UAAW,SAAU,GAAGC,IAAG;AAClD,MAAI,IAAI,OAAO,WAAW,cAAc,EAAE,OAAO,QAAQ;AACzD,MAAI,CAAC;AAAG,WAAO;AACf,MAAI,IAAI,EAAE,KAAK,CAAC,GAAG,GAAG,KAAK,CAAE,GAAE;AAC/B,MAAI;AACA,YAAQA,OAAM,UAAUA,OAAM,MAAM,EAAE,IAAI,EAAE,KAAM,GAAE;AAAM,SAAG,KAAK,EAAE,KAAK;AAAA,EAC5E,SACM,OAAP;AAAgB,QAAI,EAAE,MAAc;AAAA,EAAG,UAC/B;AACJ,QAAI;AACA,UAAI,KAAK,CAAC,EAAE,SAAS,IAAI,EAAE,QAAQ;AAAI,UAAE,KAAK,CAAC;AAAA,IAClD,UACO;AAAE,UAAI;AAAG,cAAM,EAAE;AAAA,IAAQ;AAAA,EACpC;AACD,SAAO;AACX;AAMA,SAAS,SAAS,GAAG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,YAAY;;AACvE,SAAS,WAAW,SAAS;AAChC,MAAI,cAAc,YAAY,WAAY;AAAE,WAAO,gBAAgB,OAAO;AAAA,EAAI,GAAE,CAAC,OAAO,CAAC;AACzF,MAAI,YAAY,YAAY,SAAU,mBAAmB;AACrD,QAAI,cAAc,QAAQ,UAAU,iBAAiB,EAAE;AACvD,WAAO;AAAA,EACf,GAAO,CAAC,OAAO,CAAC;AACZ,MAAI,gBAAgBC,oBAAAA,iCAAiC,WAAW,aAAa,aAAa,UAAU,OAAO;AAC3G,SAAO,CAAC,eAAe,QAAQ,MAAM,OAAO;AAChD;"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require$$0 = require("react");
|
|
3
|
-
function
|
|
4
|
-
if (e && e.__esModule)
|
|
5
|
-
return e;
|
|
3
|
+
function _interopNamespaceDefault(e) {
|
|
6
4
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
7
5
|
if (e) {
|
|
8
6
|
for (const k in e) {
|
|
@@ -18,7 +16,7 @@ function _interopNamespace(e) {
|
|
|
18
16
|
n.default = e;
|
|
19
17
|
return Object.freeze(n);
|
|
20
18
|
}
|
|
21
|
-
const require$$0__namespace = /* @__PURE__ */
|
|
19
|
+
const require$$0__namespace = /* @__PURE__ */ _interopNamespaceDefault(require$$0);
|
|
22
20
|
function useConstant(fn) {
|
|
23
21
|
var ref = require$$0__namespace.useRef();
|
|
24
22
|
if (!ref.current) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConstant.js","sources":["../../../../../../../../node_modules/@xstate/react/es/useConstant.js"],"sourcesContent":["import * as React from 'react';\nexport default function useConstant(fn) {\n var ref = React.useRef();\n if (!ref.current) {\n ref.current = { v: fn() };\n }\n return ref.current.v;\n}\n"],"names":["React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useConstant.js","sources":["../../../../../../../../node_modules/@xstate/react/es/useConstant.js"],"sourcesContent":["import * as React from 'react';\nexport default function useConstant(fn) {\n var ref = React.useRef();\n if (!ref.current) {\n ref.current = { v: fn() };\n }\n return ref.current.v;\n}\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;AACe,SAAS,YAAY,IAAI;AACpC,MAAI,MAAMA,sBAAM;AAChB,MAAI,CAAC,IAAI,SAAS;AACd,QAAI,UAAU,EAAE,GAAG,GAAI,EAAA;AAAA,EAC1B;AACD,SAAO,IAAI,QAAQ;AACvB;;"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const withSelector_development = require("../../../../_virtual/with-selector.development.js");
|
|
4
4
|
const require$$0 = require("react");
|
|
5
5
|
const index = require("../../shim/index.js");
|
|
6
|
-
const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
7
|
-
const require$$0__default = /* @__PURE__ */ _interopDefaultLegacy(require$$0);
|
|
8
6
|
/**
|
|
9
7
|
* @license React
|
|
10
8
|
* use-sync-external-store-shim/with-selector.development.js
|
|
@@ -24,7 +22,7 @@ function requireWithSelector_development() {
|
|
|
24
22
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
25
23
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
26
24
|
}
|
|
27
|
-
var React = require$$
|
|
25
|
+
var React = require$$0;
|
|
28
26
|
var shim = index.__require();
|
|
29
27
|
function is(x, y) {
|
|
30
28
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-selector.development.js","sources":["../../../../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.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\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\nvar shim = require('use-sync-external-store/shim');\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar useSyncExternalStore = shim.useSyncExternalStore;\n\n// for CommonJS interop.\n\nvar useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.\n\nfunction useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {\n // Use this to track the rendered snapshot.\n var instRef = useRef(null);\n var inst;\n\n if (instRef.current === null) {\n inst = {\n hasValue: false,\n value: null\n };\n instRef.current = inst;\n } else {\n inst = instRef.current;\n }\n\n var _useMemo = useMemo(function () {\n // Track the memoized state using closure variables that are local to this\n // memoized instance of a getSnapshot function. Intentionally not using a\n // useRef hook, because that state would be shared across all concurrent\n // copies of the hook/component.\n var hasMemo = false;\n var memoizedSnapshot;\n var memoizedSelection;\n\n var memoizedSelector = function (nextSnapshot) {\n if (!hasMemo) {\n // The first time the hook is called, there is no memoized result.\n hasMemo = true;\n memoizedSnapshot = nextSnapshot;\n\n var _nextSelection = selector(nextSnapshot);\n\n if (isEqual !== undefined) {\n // Even if the selector has changed, the currently rendered selection\n // may be equal to the new selection. We should attempt to reuse the\n // current value if possible, to preserve downstream memoizations.\n if (inst.hasValue) {\n var currentSelection = inst.value;\n\n if (isEqual(currentSelection, _nextSelection)) {\n memoizedSelection = currentSelection;\n return currentSelection;\n }\n }\n }\n\n memoizedSelection = _nextSelection;\n return _nextSelection;\n } // We may be able to reuse the previous invocation's result.\n\n\n // We may be able to reuse the previous invocation's result.\n var prevSnapshot = memoizedSnapshot;\n var prevSelection = memoizedSelection;\n\n if (objectIs(prevSnapshot, nextSnapshot)) {\n // The snapshot is the same as last time. Reuse the previous selection.\n return prevSelection;\n } // The snapshot has changed, so we need to compute a new selection.\n\n\n // The snapshot has changed, so we need to compute a new selection.\n var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n\n // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {\n return prevSelection;\n }\n\n memoizedSnapshot = nextSnapshot;\n memoizedSelection = nextSelection;\n return nextSelection;\n }; // Assigning this to a constant so that Flow knows it can't change.\n\n\n // Assigning this to a constant so that Flow knows it can't change.\n var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;\n\n var getSnapshotWithSelector = function () {\n return memoizedSelector(getSnapshot());\n };\n\n var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n };\n return [getSnapshotWithSelector, getServerSnapshotWithSelector];\n }, [getSnapshot, getServerSnapshot, selector, isEqual]),\n getSelection = _useMemo[0],\n getServerSelection = _useMemo[1];\n\n var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);\n useEffect(function () {\n inst.hasValue = true;\n inst.value = value;\n }, [value]);\n useDebugValue(value);\n return value;\n}\n\nexports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n"],"names":["require$$
|
|
1
|
+
{"version":3,"file":"with-selector.development.js","sources":["../../../../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.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\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\nvar shim = require('use-sync-external-store/shim');\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar useSyncExternalStore = shim.useSyncExternalStore;\n\n// for CommonJS interop.\n\nvar useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.\n\nfunction useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {\n // Use this to track the rendered snapshot.\n var instRef = useRef(null);\n var inst;\n\n if (instRef.current === null) {\n inst = {\n hasValue: false,\n value: null\n };\n instRef.current = inst;\n } else {\n inst = instRef.current;\n }\n\n var _useMemo = useMemo(function () {\n // Track the memoized state using closure variables that are local to this\n // memoized instance of a getSnapshot function. Intentionally not using a\n // useRef hook, because that state would be shared across all concurrent\n // copies of the hook/component.\n var hasMemo = false;\n var memoizedSnapshot;\n var memoizedSelection;\n\n var memoizedSelector = function (nextSnapshot) {\n if (!hasMemo) {\n // The first time the hook is called, there is no memoized result.\n hasMemo = true;\n memoizedSnapshot = nextSnapshot;\n\n var _nextSelection = selector(nextSnapshot);\n\n if (isEqual !== undefined) {\n // Even if the selector has changed, the currently rendered selection\n // may be equal to the new selection. We should attempt to reuse the\n // current value if possible, to preserve downstream memoizations.\n if (inst.hasValue) {\n var currentSelection = inst.value;\n\n if (isEqual(currentSelection, _nextSelection)) {\n memoizedSelection = currentSelection;\n return currentSelection;\n }\n }\n }\n\n memoizedSelection = _nextSelection;\n return _nextSelection;\n } // We may be able to reuse the previous invocation's result.\n\n\n // We may be able to reuse the previous invocation's result.\n var prevSnapshot = memoizedSnapshot;\n var prevSelection = memoizedSelection;\n\n if (objectIs(prevSnapshot, nextSnapshot)) {\n // The snapshot is the same as last time. Reuse the previous selection.\n return prevSelection;\n } // The snapshot has changed, so we need to compute a new selection.\n\n\n // The snapshot has changed, so we need to compute a new selection.\n var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n\n // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {\n return prevSelection;\n }\n\n memoizedSnapshot = nextSnapshot;\n memoizedSelection = nextSelection;\n return nextSelection;\n }; // Assigning this to a constant so that Flow knows it can't change.\n\n\n // Assigning this to a constant so that Flow knows it can't change.\n var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;\n\n var getSnapshotWithSelector = function () {\n return memoizedSelector(getSnapshot());\n };\n\n var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n };\n return [getSnapshotWithSelector, getServerSnapshotWithSelector];\n }, [getSnapshot, getServerSnapshot, selector, isEqual]),\n getSelection = _useMemo[0],\n getServerSelection = _useMemo[1];\n\n var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);\n useEffect(function () {\n inst.hasValue = true;\n inst.value = value;\n }, [value]);\n useDebugValue(value);\n return value;\n}\n\nexports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n"],"names":["require$$1","withSelector_development"],"mappings":";;;;;;;;;;;;;;;;;;;AAYA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,KAAC,WAAW;AAKd,UACE,OAAO,mCAAmC,eAC1C,OAAO,+BAA+B,gCACpC,YACF;AACA,uCAA+B,4BAA4B,IAAI,MAAK,CAAE;AAAA,MACvE;AACS,UAAI,QAAQ;AACtB,UAAI,OAAOA,MAAAA;AAMX,eAAS,GAAG,GAAG,GAAG;AAChB,eAAO,MAAM,MAAM,MAAM,KAAK,IAAI,MAAM,IAAI,MAAM,MAAM,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AC3C;AAEI,cAAI,gCAAgC,2BAA2B,OAAO,SAAY,WAAY;AAC5F,mBAAO,iBAAiB,uBAAsB,CAAE;AAAA,UACtD;AACI,iBAAO,CAAC,yBAAyB,6BAA6B;AAAA,QAC/D,GAAE,CAAC,aAAa,mBAAmB,UAAU,OAAO,CAAC,GAClD,eAAe,SAAS,CAAC,GACzB,qBAAqB,SAAS,CAAC;AAEnC,YAAI,QAAQ,qBAAqB,WAAW,cAAc,kBAAkB;AAC5E,kBAAU,WAAY;AACpB,eAAK,WAAW;AAChB,eAAK,QAAQ;AAAA,QACjB,GAAK,CAAC,KAAK,CAAC;AACV,sBAAc,KAAK;AACnB,eAAO;AAAA,MACR;AAEuCC,+BAAA,UAAA,mCAAG;AAE3C,UACE,OAAO,mCAAmC,eAC1C,OAAO,+BAA+B,+BACpC,YACF;AACA,uCAA+B,2BAA2B,IAAI,MAAK,CAAE;AAAA,MACtE;AAAA,IAED;EACA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-selector.development.mjs","sources":["../../../../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.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\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\nvar shim = require('use-sync-external-store/shim');\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar useSyncExternalStore = shim.useSyncExternalStore;\n\n// for CommonJS interop.\n\nvar useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.\n\nfunction useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {\n // Use this to track the rendered snapshot.\n var instRef = useRef(null);\n var inst;\n\n if (instRef.current === null) {\n inst = {\n hasValue: false,\n value: null\n };\n instRef.current = inst;\n } else {\n inst = instRef.current;\n }\n\n var _useMemo = useMemo(function () {\n // Track the memoized state using closure variables that are local to this\n // memoized instance of a getSnapshot function. Intentionally not using a\n // useRef hook, because that state would be shared across all concurrent\n // copies of the hook/component.\n var hasMemo = false;\n var memoizedSnapshot;\n var memoizedSelection;\n\n var memoizedSelector = function (nextSnapshot) {\n if (!hasMemo) {\n // The first time the hook is called, there is no memoized result.\n hasMemo = true;\n memoizedSnapshot = nextSnapshot;\n\n var _nextSelection = selector(nextSnapshot);\n\n if (isEqual !== undefined) {\n // Even if the selector has changed, the currently rendered selection\n // may be equal to the new selection. We should attempt to reuse the\n // current value if possible, to preserve downstream memoizations.\n if (inst.hasValue) {\n var currentSelection = inst.value;\n\n if (isEqual(currentSelection, _nextSelection)) {\n memoizedSelection = currentSelection;\n return currentSelection;\n }\n }\n }\n\n memoizedSelection = _nextSelection;\n return _nextSelection;\n } // We may be able to reuse the previous invocation's result.\n\n\n // We may be able to reuse the previous invocation's result.\n var prevSnapshot = memoizedSnapshot;\n var prevSelection = memoizedSelection;\n\n if (objectIs(prevSnapshot, nextSnapshot)) {\n // The snapshot is the same as last time. Reuse the previous selection.\n return prevSelection;\n } // The snapshot has changed, so we need to compute a new selection.\n\n\n // The snapshot has changed, so we need to compute a new selection.\n var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n\n // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {\n return prevSelection;\n }\n\n memoizedSnapshot = nextSnapshot;\n memoizedSelection = nextSelection;\n return nextSelection;\n }; // Assigning this to a constant so that Flow knows it can't change.\n\n\n // Assigning this to a constant so that Flow knows it can't change.\n var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;\n\n var getSnapshotWithSelector = function () {\n return memoizedSelector(getSnapshot());\n };\n\n var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n };\n return [getSnapshotWithSelector, getServerSnapshotWithSelector];\n }, [getSnapshot, getServerSnapshot, selector, isEqual]),\n getSelection = _useMemo[0],\n getServerSelection = _useMemo[1];\n\n var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);\n useEffect(function () {\n inst.hasValue = true;\n inst.value = value;\n }, [value]);\n useDebugValue(value);\n return value;\n}\n\nexports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n"],"names":["require$$0","require$$1"],"mappings":";;;;;;;;;;;;;;;;;AAYA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,KAAC,WAAW;AAKd,UACE,OAAO,mC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AI,YAAY,UAAa,QAAQ,eAAe,aAAa,GAAG;AAClE,qBAAO;AAAA,YACR;AAED,+BAAmB;AACnB,gCAAoB;AACpB,mBAAO;AAAA,UACb;AAII,cAAI,yBAAyB,sBAAsB,SAAY,OAAO;AAEtE,cAAI,0BAA0B,WAAY;AACxC,mBAAO,iBAAiB,YAAW,CAAE;AAAA,UAC3C;AAEI,cAAI,gCAAgC,2BAA2B,OAAO,SAAY,WAAY;AAC5F,mBAAO,iBAAiB,uBAAsB,CAAE;AAAA,UACtD;AACI,iBAAO,CAAC,yBAAyB,6BAA6B;AAAA,QAC/D,GAAE,CAAC,aAAa,mBAAmB,UAAU,OAAO,CAAC,GAClD,eAAe,SAAS,
|
|
1
|
+
{"version":3,"file":"with-selector.development.mjs","sources":["../../../../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.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\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\nvar shim = require('use-sync-external-store/shim');\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar useSyncExternalStore = shim.useSyncExternalStore;\n\n// for CommonJS interop.\n\nvar useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.\n\nfunction useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {\n // Use this to track the rendered snapshot.\n var instRef = useRef(null);\n var inst;\n\n if (instRef.current === null) {\n inst = {\n hasValue: false,\n value: null\n };\n instRef.current = inst;\n } else {\n inst = instRef.current;\n }\n\n var _useMemo = useMemo(function () {\n // Track the memoized state using closure variables that are local to this\n // memoized instance of a getSnapshot function. Intentionally not using a\n // useRef hook, because that state would be shared across all concurrent\n // copies of the hook/component.\n var hasMemo = false;\n var memoizedSnapshot;\n var memoizedSelection;\n\n var memoizedSelector = function (nextSnapshot) {\n if (!hasMemo) {\n // The first time the hook is called, there is no memoized result.\n hasMemo = true;\n memoizedSnapshot = nextSnapshot;\n\n var _nextSelection = selector(nextSnapshot);\n\n if (isEqual !== undefined) {\n // Even if the selector has changed, the currently rendered selection\n // may be equal to the new selection. We should attempt to reuse the\n // current value if possible, to preserve downstream memoizations.\n if (inst.hasValue) {\n var currentSelection = inst.value;\n\n if (isEqual(currentSelection, _nextSelection)) {\n memoizedSelection = currentSelection;\n return currentSelection;\n }\n }\n }\n\n memoizedSelection = _nextSelection;\n return _nextSelection;\n } // We may be able to reuse the previous invocation's result.\n\n\n // We may be able to reuse the previous invocation's result.\n var prevSnapshot = memoizedSnapshot;\n var prevSelection = memoizedSelection;\n\n if (objectIs(prevSnapshot, nextSnapshot)) {\n // The snapshot is the same as last time. Reuse the previous selection.\n return prevSelection;\n } // The snapshot has changed, so we need to compute a new selection.\n\n\n // The snapshot has changed, so we need to compute a new selection.\n var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n\n // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {\n return prevSelection;\n }\n\n memoizedSnapshot = nextSnapshot;\n memoizedSelection = nextSelection;\n return nextSelection;\n }; // Assigning this to a constant so that Flow knows it can't change.\n\n\n // Assigning this to a constant so that Flow knows it can't change.\n var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;\n\n var getSnapshotWithSelector = function () {\n return memoizedSelector(getSnapshot());\n };\n\n var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n };\n return [getSnapshotWithSelector, getServerSnapshotWithSelector];\n }, [getSnapshot, getServerSnapshot, selector, isEqual]),\n getSelection = _useMemo[0],\n getServerSelection = _useMemo[1];\n\n var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);\n useEffect(function () {\n inst.hasValue = true;\n inst.value = value;\n }, [value]);\n useDebugValue(value);\n return value;\n}\n\nexports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n"],"names":["require$$0","require$$1"],"mappings":";;;;;;;;;;;;;;;;;AAYA,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,KAAC,WAAW;AAKd,UACE,OAAO,mCAAmC,eAC1C,OAAO,+BAA+B,gCACpC,YACF;AACA,uCAA+B,4BAA4B,IAAI,MAAK,CAAE;AAAA,MACvE;AACS,UAAI,QAAQA;AACtB,UAAI,OAAOC;AAMX,eAAS,GAAG,GAAG,GAAG;AAChB,eAAO,MAAM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B,WAAY;AACxC,mBAAO,iBAAiB,YAAW,CAAE;AAAA,UAC3C;AAEI,cAAI,gCAAgC,2BAA2B,OAAO,SAAY,WAAY;AAC5F,mBAAO,iBAAiB,uBAAsB,CAAE;AAAA,UACtD;AACI,iBAAO,CAAC,yBAAyB,6BAA6B;AAAA,QAC/D,GAAE,CAAC,aAAa,mBAAmB,UAAU,OAAO,CAAC,GAClD,eAAe,SAAS,CAAC,GACzB,qBAAqB,SAAS,CAAC;AAEnC,YAAI,QAAQ,qBAAqB,WAAW,cAAc,kBAAkB;AAC5E,kBAAU,WAAY;AACpB,eAAK,WAAW;AAChB,eAAK,QAAQ;AAAA,QACjB,GAAK,CAAC,KAAK,CAAC;AACV,sBAAc,KAAK;AACnB,eAAO;AAAA,MACR;AAEuC,+BAAA,mCAAG;AAE3C,UACE,OAAO,mCAAmC,eAC1C,OAAO,+BAA+B,+BACpC,YACF;AACA,uCAA+B,2BAA2B,IAAI,MAAK,CAAE;AAAA,MACtE;AAAA,IAED;EACA;;;"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const withSelector_production_min = require("../../../../_virtual/with-selector.production.min.js");
|
|
4
4
|
const require$$0 = require("react");
|
|
5
5
|
const index = require("../../shim/index.js");
|
|
6
|
-
const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
7
|
-
const require$$0__default = /* @__PURE__ */ _interopDefaultLegacy(require$$0);
|
|
8
6
|
/**
|
|
9
7
|
* @license React
|
|
10
8
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
@@ -19,7 +17,7 @@ function requireWithSelector_production_min() {
|
|
|
19
17
|
if (hasRequiredWithSelector_production_min)
|
|
20
18
|
return withSelector_production_min.__exports;
|
|
21
19
|
hasRequiredWithSelector_production_min = 1;
|
|
22
|
-
var h = require$$
|
|
20
|
+
var h = require$$0, n = index.__require();
|
|
23
21
|
function p(a, b) {
|
|
24
22
|
return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
|
|
25
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-selector.production.min.js","sources":["../../../../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim/with-selector.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 h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n"],"names":["require$$
|
|
1
|
+
{"version":3,"file":"with-selector.production.min.js","sources":["../../../../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim/with-selector.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 h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n"],"names":["require$$1","withSelector_production_min","a","c","d","b","e"],"mappings":";;;;;;;;;;;;;;;;;;;AASa,MAAI,IAAE,YAAiB,IAAEA,gBAAuC;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,sBAAqB,IAAE,EAAE,QAAO,IAAE,EAAE,WAAU,IAAE,EAAE,SAAQ,IAAE,EAAE;AAC/PC,8BAAA,UAAA,mCAAyC,SAAS,GAAE,GAAE,GAAE,GAAE,GAAE;AAAC,QAAI,IAAE,EAAE,IAAI;AAAE,QAAG,SAAO,EAAE,SAAQ;AAAC,UAAI,IAAE,EAAC,UAAS,OAAG,OAAM,KAAI;AAAE,QAAE,UAAQ;AAAA,IAAC;AAAM,UAAE,EAAE;AAAQ,QAAE,EAAE,WAAU;AAAC,eAASC,GAAEA,IAAE;AAAC,YAAG,CAACC,IAAE;AAAC,UAAAA,KAAE;AAAG,UAAAC,KAAEF;AAAE,UAAAA,KAAE,EAAEA,EAAC;AAAE,cAAG,WAAS,KAAG,EAAE,UAAS;AAAC,gBAAIG,KAAE,EAAE;AAAM,gBAAG,EAAEA,IAAEH,EAAC;AAAE,qBAAO,IAAEG;AAAA,UAAC;AAAC,iBAAO,IAAEH;AAAA,QAAC;AAAC,QAAAG,KAAE;AAAE,YAAG,EAAED,IAAEF,EAAC;AAAE,iBAAOG;AAAE,YAAIC,KAAE,EAAEJ,EAAC;AAAE,YAAG,WAAS,KAAG,EAAEG,IAAEC,EAAC;AAAE,iBAAOD;AAAE,QAAAD,KAAEF;AAAE,eAAO,IAAEI;AAAA,MAAC;AAAC,UAAIH,KAAE,OAAGC,IAAE,GAAE,IAAE,WAAS,IAAE,OAAK;AAAE,aAAM,CAAC,WAAU;AAAC,eAAOF,GAAE,EAAG,CAAA;AAAA,MAAC,GAAE,SAAO,IAAE,SAAO,WAAU;AAAC,eAAOA,GAAE,EAAC,CAAE;AAAA,MAAC,CAAC;AAAA,IAAC,GAAE,CAAC,GAAE,GAAE,GAAE,CAAC,CAAC;AAAE,QAAI,IAAE,EAAE,GAAE,EAAE,CAAC,GAAE,EAAE,CAAC,CAAC;AACrf,MAAE,WAAU;AAAC,QAAE,WAAS;AAAG,QAAE,QAAM;AAAA,IAAC,GAAE,CAAC,CAAC,CAAC;AAAE,MAAE,CAAC;AAAE,WAAO;AAAA,EAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-selector.production.min.mjs","sources":["../../../../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim/with-selector.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 h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n"],"names":["require$$0","require$$1","a","c","d","b","e"],"mappings":";;;;;;;;;;;;;;;;;AASa,MAAI,IAAEA,qBAAiB,IAAEC,YAAuC;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,sBAAqB,IAAE,EAAE,QAAO,IAAE,EAAE,WAAU,IAAE,EAAE,SAAQ,IAAE,EAAE;AAC/P,8BAAA,mCAAyC,SAAS,GAAE,GAAE,GAAE,GAAE,GAAE;AAAC,QAAI,IAAE,EAAE,IAAI;AAAE,QAAG,SAAO,EAAE,SAAQ;AAAC,UAAI,IAAE,EAAC,UAAS,OAAG,OAAM,KAAI;AAAE,QAAE,UAAQ;AAAA,IAAC;AAAM,UAAE,EAAE;AAAQ,QAAE,EAAE,WAAU;AAAC,eAASC,GAAEA,IAAE;AAAC,YAAG,CAACC,IAAE;AAAC,UAAAA,KAAE;AAAG,UAAAC,KAAEF;AAAE,UAAAA,KAAE,EAAEA,EAAC;AAAE,cAAG,WAAS,KAAG,EAAE,UAAS;AAAC,gBAAIG,KAAE,EAAE;AAAM,gBAAG,EAAEA,IAAEH,EAAC;AAAE,qBAAO,IAAEG;AAAA,UAAC;AAAC,iBAAO,IAAEH;AAAA,QAAC;AAAC,QAAAG,KAAE;AAAE,YAAG,EAAED,IAAEF,EAAC;AAAE,iBAAOG;AAAE,YAAIC,KAAE,EAAEJ,EAAC;AAAE,YAAG,WAAS,KAAG,EAAEG,IAAEC,EAAC;AAAE,iBAAOD;AAAE,QAAAD,KAAEF;AAAE,eAAO,IAAEI;AAAA,MAAC;AAAC,UAAIH,KAAE,OAAGC,IAAE,GAAE,IAAE,WAAS,IAAE,OAAK;AAAE,aAAM,CAAC,WAAU;AAAC,eAAOF,GAAE,EAAG,CAAA;AAAA,MAAC,GAAE,SAAO,IAAE,SAAO,WAAU;AAAC,eAAOA,GAAE,EAAC,CAAE;AAAA,MAAC,CAAC;AAAA,IAAC,GAAE,CAAC,GAAE,GAAE,GAAE,CAAC,CAAC;AAAE,QAAI,IAAE,EAAE,GAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"with-selector.production.min.mjs","sources":["../../../../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js"],"sourcesContent":["/**\n * @license React\n * use-sync-external-store-shim/with-selector.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 h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n"],"names":["require$$0","require$$1","a","c","d","b","e"],"mappings":";;;;;;;;;;;;;;;;;AASa,MAAI,IAAEA,qBAAiB,IAAEC,YAAuC;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,sBAAqB,IAAE,EAAE,QAAO,IAAE,EAAE,WAAU,IAAE,EAAE,SAAQ,IAAE,EAAE;AAC/P,8BAAA,mCAAyC,SAAS,GAAE,GAAE,GAAE,GAAE,GAAE;AAAC,QAAI,IAAE,EAAE,IAAI;AAAE,QAAG,SAAO,EAAE,SAAQ;AAAC,UAAI,IAAE,EAAC,UAAS,OAAG,OAAM,KAAI;AAAE,QAAE,UAAQ;AAAA,IAAC;AAAM,UAAE,EAAE;AAAQ,QAAE,EAAE,WAAU;AAAC,eAASC,GAAEA,IAAE;AAAC,YAAG,CAACC,IAAE;AAAC,UAAAA,KAAE;AAAG,UAAAC,KAAEF;AAAE,UAAAA,KAAE,EAAEA,EAAC;AAAE,cAAG,WAAS,KAAG,EAAE,UAAS;AAAC,gBAAIG,KAAE,EAAE;AAAM,gBAAG,EAAEA,IAAEH,EAAC;AAAE,qBAAO,IAAEG;AAAA,UAAC;AAAC,iBAAO,IAAEH;AAAA,QAAC;AAAC,QAAAG,KAAE;AAAE,YAAG,EAAED,IAAEF,EAAC;AAAE,iBAAOG;AAAE,YAAIC,KAAE,EAAEJ,EAAC;AAAE,YAAG,WAAS,KAAG,EAAEG,IAAE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