@shopify/hydrogen-react 2026.1.1 → 2026.1.2
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/dist/browser-dev/analytics-schema-custom-storefront-customer-tracking.mjs +1 -1
- package/dist/{node-dev/packages/hydrogen-react → browser-dev}/package.json.mjs +1 -1
- package/dist/browser-dev/useCartAPIStateMachine.mjs +9 -9
- package/dist/browser-dev/useCartAPIStateMachine.mjs.map +1 -1
- package/dist/browser-dev/useMachine.mjs +68 -0
- package/dist/browser-dev/useMachine.mjs.map +1 -0
- package/dist/browser-prod/analytics-schema-custom-storefront-customer-tracking.mjs +1 -1
- package/dist/browser-prod/{packages/hydrogen-react/package.json.mjs → package.json.mjs} +1 -1
- package/dist/browser-prod/useCartAPIStateMachine.mjs +9 -9
- package/dist/browser-prod/useCartAPIStateMachine.mjs.map +1 -1
- package/dist/browser-prod/useMachine.mjs +68 -0
- package/dist/browser-prod/useMachine.mjs.map +1 -0
- package/dist/node-dev/analytics-schema-custom-storefront-customer-tracking.js +1 -1
- package/dist/node-dev/analytics-schema-custom-storefront-customer-tracking.mjs +1 -1
- package/dist/{node-prod/packages/hydrogen-react → node-dev}/package.json.js +1 -1
- package/dist/{node-prod/packages/hydrogen-react → node-dev}/package.json.mjs +1 -1
- package/dist/node-dev/useCartAPIStateMachine.js +10 -10
- package/dist/node-dev/useCartAPIStateMachine.js.map +1 -1
- package/dist/node-dev/useCartAPIStateMachine.mjs +9 -9
- package/dist/node-dev/useCartAPIStateMachine.mjs.map +1 -1
- package/dist/node-dev/useMachine.js +68 -0
- package/dist/node-dev/useMachine.js.map +1 -0
- package/dist/node-dev/useMachine.mjs +68 -0
- package/dist/node-dev/useMachine.mjs.map +1 -0
- package/dist/node-prod/analytics-schema-custom-storefront-customer-tracking.js +1 -1
- package/dist/node-prod/analytics-schema-custom-storefront-customer-tracking.mjs +1 -1
- package/dist/{node-dev/packages/hydrogen-react → node-prod}/package.json.js +1 -1
- package/dist/{browser-dev/packages/hydrogen-react → node-prod}/package.json.mjs +1 -1
- package/dist/node-prod/useCartAPIStateMachine.js +10 -10
- package/dist/node-prod/useCartAPIStateMachine.js.map +1 -1
- package/dist/node-prod/useCartAPIStateMachine.mjs +9 -9
- package/dist/node-prod/useCartAPIStateMachine.mjs.map +1 -1
- package/dist/node-prod/useMachine.js +68 -0
- package/dist/node-prod/useMachine.js.map +1 -0
- package/dist/node-prod/useMachine.mjs +68 -0
- package/dist/node-prod/useMachine.mjs.map +1 -0
- package/dist/types/useMachine.d.ts +11 -0
- package/dist/umd/hydrogen-react.dev.js +56 -251
- package/dist/umd/hydrogen-react.dev.js.map +1 -1
- package/dist/umd/hydrogen-react.prod.js +16 -32
- package/dist/umd/hydrogen-react.prod.js.map +1 -1
- package/package.json +4 -12
- package/dist/browser-dev/_virtual/index.mjs +0 -5
- package/dist/browser-dev/_virtual/index.mjs.map +0 -1
- package/dist/browser-dev/_virtual/use-sync-external-store-shim.development.mjs +0 -5
- package/dist/browser-dev/_virtual/use-sync-external-store-shim.development.mjs.map +0 -1
- package/dist/browser-dev/_virtual/use-sync-external-store-shim.production.mjs +0 -5
- package/dist/browser-dev/_virtual/use-sync-external-store-shim.production.mjs.map +0 -1
- package/dist/browser-dev/_virtual/with-selector.development.mjs +0 -5
- package/dist/browser-dev/_virtual/with-selector.development.mjs.map +0 -1
- package/dist/browser-dev/_virtual/with-selector.mjs +0 -6
- package/dist/browser-dev/_virtual/with-selector.mjs.map +0 -1
- package/dist/browser-dev/_virtual/with-selector.production.mjs +0 -5
- package/dist/browser-dev/_virtual/with-selector.production.mjs.map +0 -1
- package/dist/browser-dev/_virtual/with-selector2.mjs +0 -5
- package/dist/browser-dev/_virtual/with-selector2.mjs.map +0 -1
- package/dist/browser-dev/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs +0 -151
- package/dist/browser-dev/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs.map +0 -1
- package/dist/browser-dev/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/fsm.mjs +0 -89
- package/dist/browser-dev/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/fsm.mjs.map +0 -1
- package/dist/browser-dev/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/useConstant.mjs +0 -12
- package/dist/browser-dev/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/useConstant.mjs.map +0 -1
- package/dist/browser-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs +0 -82
- package/dist/browser-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +0 -1
- package/dist/browser-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs +0 -78
- package/dist/browser-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs.map +0 -1
- package/dist/browser-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs +0 -78
- package/dist/browser-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +0 -1
- package/dist/browser-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs +0 -63
- package/dist/browser-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs.map +0 -1
- package/dist/browser-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.mjs +0 -18
- package/dist/browser-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.mjs.map +0 -1
- package/dist/browser-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.mjs +0 -18
- package/dist/browser-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.mjs.map +0 -1
- package/dist/browser-prod/_virtual/index.mjs +0 -5
- package/dist/browser-prod/_virtual/index.mjs.map +0 -1
- package/dist/browser-prod/_virtual/use-sync-external-store-shim.development.mjs +0 -5
- package/dist/browser-prod/_virtual/use-sync-external-store-shim.development.mjs.map +0 -1
- package/dist/browser-prod/_virtual/use-sync-external-store-shim.production.mjs +0 -5
- package/dist/browser-prod/_virtual/use-sync-external-store-shim.production.mjs.map +0 -1
- package/dist/browser-prod/_virtual/with-selector.development.mjs +0 -5
- package/dist/browser-prod/_virtual/with-selector.development.mjs.map +0 -1
- package/dist/browser-prod/_virtual/with-selector.mjs +0 -6
- package/dist/browser-prod/_virtual/with-selector.mjs.map +0 -1
- package/dist/browser-prod/_virtual/with-selector.production.mjs +0 -5
- package/dist/browser-prod/_virtual/with-selector.production.mjs.map +0 -1
- package/dist/browser-prod/_virtual/with-selector2.mjs +0 -5
- package/dist/browser-prod/_virtual/with-selector2.mjs.map +0 -1
- package/dist/browser-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs +0 -151
- package/dist/browser-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs.map +0 -1
- package/dist/browser-prod/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/fsm.mjs +0 -89
- package/dist/browser-prod/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/fsm.mjs.map +0 -1
- package/dist/browser-prod/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/useConstant.mjs +0 -12
- package/dist/browser-prod/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/useConstant.mjs.map +0 -1
- package/dist/browser-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs +0 -82
- package/dist/browser-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +0 -1
- package/dist/browser-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs +0 -78
- package/dist/browser-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs.map +0 -1
- package/dist/browser-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs +0 -78
- package/dist/browser-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +0 -1
- package/dist/browser-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs +0 -63
- package/dist/browser-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs.map +0 -1
- package/dist/browser-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.mjs +0 -18
- package/dist/browser-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.mjs.map +0 -1
- package/dist/browser-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.mjs +0 -18
- package/dist/browser-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.mjs.map +0 -1
- package/dist/node-dev/_virtual/index.js +0 -5
- package/dist/node-dev/_virtual/index.js.map +0 -1
- package/dist/node-dev/_virtual/index.mjs +0 -5
- package/dist/node-dev/_virtual/index.mjs.map +0 -1
- package/dist/node-dev/_virtual/use-sync-external-store-shim.development.js +0 -5
- package/dist/node-dev/_virtual/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/node-dev/_virtual/use-sync-external-store-shim.development.mjs +0 -5
- package/dist/node-dev/_virtual/use-sync-external-store-shim.development.mjs.map +0 -1
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.js +0 -5
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.mjs +0 -5
- package/dist/node-dev/_virtual/use-sync-external-store-shim.production.mjs.map +0 -1
- package/dist/node-dev/_virtual/with-selector.development.js +0 -5
- package/dist/node-dev/_virtual/with-selector.development.js.map +0 -1
- package/dist/node-dev/_virtual/with-selector.development.mjs +0 -5
- package/dist/node-dev/_virtual/with-selector.development.mjs.map +0 -1
- package/dist/node-dev/_virtual/with-selector.js +0 -6
- package/dist/node-dev/_virtual/with-selector.js.map +0 -1
- package/dist/node-dev/_virtual/with-selector.mjs +0 -6
- package/dist/node-dev/_virtual/with-selector.mjs.map +0 -1
- package/dist/node-dev/_virtual/with-selector.production.js +0 -5
- package/dist/node-dev/_virtual/with-selector.production.js.map +0 -1
- package/dist/node-dev/_virtual/with-selector.production.mjs +0 -5
- package/dist/node-dev/_virtual/with-selector.production.mjs.map +0 -1
- package/dist/node-dev/_virtual/with-selector2.js +0 -5
- package/dist/node-dev/_virtual/with-selector2.js.map +0 -1
- package/dist/node-dev/_virtual/with-selector2.mjs +0 -5
- package/dist/node-dev/_virtual/with-selector2.mjs.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.js +0 -150
- package/dist/node-dev/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.js.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs +0 -151
- package/dist/node-dev/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/fsm.js +0 -89
- package/dist/node-dev/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/fsm.js.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/fsm.mjs +0 -89
- package/dist/node-dev/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/fsm.mjs.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/useConstant.js +0 -28
- package/dist/node-dev/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/useConstant.js.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/useConstant.mjs +0 -12
- package/dist/node-dev/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/useConstant.mjs.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -82
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs +0 -82
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -78
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs +0 -78
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -78
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs +0 -78
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -63
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs +0 -63
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.js +0 -18
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.js.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.mjs +0 -18
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.mjs.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.js +0 -18
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.js.map +0 -1
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.mjs +0 -18
- package/dist/node-dev/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.mjs.map +0 -1
- package/dist/node-prod/_virtual/index.js +0 -5
- package/dist/node-prod/_virtual/index.js.map +0 -1
- package/dist/node-prod/_virtual/index.mjs +0 -5
- package/dist/node-prod/_virtual/index.mjs.map +0 -1
- package/dist/node-prod/_virtual/use-sync-external-store-shim.development.js +0 -5
- package/dist/node-prod/_virtual/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/node-prod/_virtual/use-sync-external-store-shim.development.mjs +0 -5
- package/dist/node-prod/_virtual/use-sync-external-store-shim.development.mjs.map +0 -1
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.js +0 -5
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.mjs +0 -5
- package/dist/node-prod/_virtual/use-sync-external-store-shim.production.mjs.map +0 -1
- package/dist/node-prod/_virtual/with-selector.development.js +0 -5
- package/dist/node-prod/_virtual/with-selector.development.js.map +0 -1
- package/dist/node-prod/_virtual/with-selector.development.mjs +0 -5
- package/dist/node-prod/_virtual/with-selector.development.mjs.map +0 -1
- package/dist/node-prod/_virtual/with-selector.js +0 -6
- package/dist/node-prod/_virtual/with-selector.js.map +0 -1
- package/dist/node-prod/_virtual/with-selector.mjs +0 -6
- package/dist/node-prod/_virtual/with-selector.mjs.map +0 -1
- package/dist/node-prod/_virtual/with-selector.production.js +0 -5
- package/dist/node-prod/_virtual/with-selector.production.js.map +0 -1
- package/dist/node-prod/_virtual/with-selector.production.mjs +0 -5
- package/dist/node-prod/_virtual/with-selector.production.mjs.map +0 -1
- package/dist/node-prod/_virtual/with-selector2.js +0 -5
- package/dist/node-prod/_virtual/with-selector2.js.map +0 -1
- package/dist/node-prod/_virtual/with-selector2.mjs +0 -5
- package/dist/node-prod/_virtual/with-selector2.mjs.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.js +0 -150
- package/dist/node-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.js.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs +0 -151
- package/dist/node-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/fsm.js +0 -89
- package/dist/node-prod/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/fsm.js.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/fsm.mjs +0 -89
- package/dist/node-prod/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/fsm.mjs.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/useConstant.js +0 -28
- package/dist/node-prod/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/useConstant.js.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/useConstant.mjs +0 -12
- package/dist/node-prod/node_modules/.pnpm/@xstate_react@3.2.1_@types_react@18.3.28_@xstate_fsm@2.0.0_react@18.3.1/node_modules/@xstate/react/es/useConstant.mjs.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -82
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs +0 -82
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.mjs.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -78
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs +0 -78
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.mjs.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -78
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs +0 -78
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.mjs.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -63
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs +0 -63
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.mjs.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.js +0 -18
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.js.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.mjs +0 -18
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.mjs.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.js +0 -18
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.js.map +0 -1
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.mjs +0 -18
- package/dist/node-prod/node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.mjs.map +0 -1
- /package/dist/browser-dev/{packages/hydrogen-react/package.json.mjs.map → package.json.mjs.map} +0 -0
- /package/dist/browser-prod/{packages/hydrogen-react/package.json.mjs.map → package.json.mjs.map} +0 -0
- /package/dist/node-dev/{packages/hydrogen-react/package.json.js.map → package.json.js.map} +0 -0
- /package/dist/node-dev/{packages/hydrogen-react/package.json.mjs.map → package.json.mjs.map} +0 -0
- /package/dist/node-prod/{packages/hydrogen-react/package.json.js.map → package.json.js.map} +0 -0
- /package/dist/node-prod/{packages/hydrogen-react/package.json.mjs.map → package.json.mjs.map} +0 -0
package/dist/node-prod/node_modules/.pnpm/@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
/*! *****************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */
|
|
15
|
-
function t(t2, n2) {
|
|
16
|
-
var e2 = "function" == typeof Symbol && t2[Symbol.iterator];
|
|
17
|
-
if (!e2) return t2;
|
|
18
|
-
var r2, i2, o2 = e2.call(t2), a2 = [];
|
|
19
|
-
try {
|
|
20
|
-
for (; (void 0 === n2 || n2-- > 0) && !(r2 = o2.next()).done; ) a2.push(r2.value);
|
|
21
|
-
} catch (t3) {
|
|
22
|
-
i2 = { error: t3 };
|
|
23
|
-
} finally {
|
|
24
|
-
try {
|
|
25
|
-
r2 && !r2.done && (e2 = o2.return) && e2.call(o2);
|
|
26
|
-
} finally {
|
|
27
|
-
if (i2) throw i2.error;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return a2;
|
|
31
|
-
}
|
|
32
|
-
var n;
|
|
33
|
-
!(function(t2) {
|
|
34
|
-
t2[t2.NotStarted = 0] = "NotStarted", t2[t2.Running = 1] = "Running", t2[t2.Stopped = 2] = "Stopped";
|
|
35
|
-
})(n || (n = {}));
|
|
36
|
-
var e = { type: "xstate.init" };
|
|
37
|
-
function r(t2) {
|
|
38
|
-
return void 0 === t2 ? [] : [].concat(t2);
|
|
39
|
-
}
|
|
40
|
-
function i(t2) {
|
|
41
|
-
return { type: "xstate.assign", assignment: t2 };
|
|
42
|
-
}
|
|
43
|
-
function o(t2, n2) {
|
|
44
|
-
return "string" == typeof (t2 = "string" == typeof t2 && n2 && n2[t2] ? n2[t2] : t2) ? { type: t2 } : "function" == typeof t2 ? { type: t2.name, exec: t2 } : t2;
|
|
45
|
-
}
|
|
46
|
-
function a(t2) {
|
|
47
|
-
return function(n2) {
|
|
48
|
-
return t2 === n2;
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function u(t2) {
|
|
52
|
-
return "string" == typeof t2 ? { type: t2 } : t2;
|
|
53
|
-
}
|
|
54
|
-
function c(t2, n2) {
|
|
55
|
-
return { value: t2, context: n2, actions: [], changed: false, matches: a(t2) };
|
|
56
|
-
}
|
|
57
|
-
function f(t2, n2, e2) {
|
|
58
|
-
var r2 = n2, i2 = false;
|
|
59
|
-
return [t2.filter((function(t3) {
|
|
60
|
-
if ("xstate.assign" === t3.type) {
|
|
61
|
-
i2 = true;
|
|
62
|
-
var n3 = Object.assign({}, r2);
|
|
63
|
-
return "function" == typeof t3.assignment ? n3 = t3.assignment(r2, e2) : Object.keys(t3.assignment).forEach((function(i3) {
|
|
64
|
-
n3[i3] = "function" == typeof t3.assignment[i3] ? t3.assignment[i3](r2, e2) : t3.assignment[i3];
|
|
65
|
-
})), r2 = n3, false;
|
|
66
|
-
}
|
|
67
|
-
return true;
|
|
68
|
-
})), r2, i2];
|
|
69
|
-
}
|
|
70
|
-
function s(n2, i2) {
|
|
71
|
-
void 0 === i2 && (i2 = {});
|
|
72
|
-
var s2 = t(f(r(n2.states[n2.initial].entry).map((function(t2) {
|
|
73
|
-
return o(t2, i2.actions);
|
|
74
|
-
})), n2.context, e), 2), l2 = s2[0], v2 = s2[1], y = { config: n2, _options: i2, initialState: { value: n2.initial, actions: l2, context: v2, matches: a(n2.initial) }, transition: function(e2, i3) {
|
|
75
|
-
var s3, l3, v3 = "string" == typeof e2 ? { value: e2, context: n2.context } : e2, p = v3.value, g = v3.context, d = u(i3), x = n2.states[p];
|
|
76
|
-
if (x.on) {
|
|
77
|
-
var m = r(x.on[d.type]);
|
|
78
|
-
try {
|
|
79
|
-
for (var h = (function(t2) {
|
|
80
|
-
var n3 = "function" == typeof Symbol && Symbol.iterator, e3 = n3 && t2[n3], r2 = 0;
|
|
81
|
-
if (e3) return e3.call(t2);
|
|
82
|
-
if (t2 && "number" == typeof t2.length) return { next: function() {
|
|
83
|
-
return t2 && r2 >= t2.length && (t2 = void 0), { value: t2 && t2[r2++], done: !t2 };
|
|
84
|
-
} };
|
|
85
|
-
throw new TypeError(n3 ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
86
|
-
})(m), b = h.next(); !b.done; b = h.next()) {
|
|
87
|
-
var S = b.value;
|
|
88
|
-
if (void 0 === S) return c(p, g);
|
|
89
|
-
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() {
|
|
90
|
-
return true;
|
|
91
|
-
} : N, _ = void 0 === j, k = null != j ? j : p, T = n2.states[k];
|
|
92
|
-
if (O(g, d)) {
|
|
93
|
-
var q = t(f((_ ? r(R) : [].concat(x.exit, R, T.entry).filter((function(t2) {
|
|
94
|
-
return t2;
|
|
95
|
-
}))).map((function(t2) {
|
|
96
|
-
return o(t2, y._options.actions);
|
|
97
|
-
})), g, d), 3), z = q[0], A = q[1], B = q[2], C = null != j ? j : p;
|
|
98
|
-
return { value: C, context: A, actions: z, changed: j !== p || z.length > 0 || B, matches: a(C) };
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
} catch (t2) {
|
|
102
|
-
s3 = { error: t2 };
|
|
103
|
-
} finally {
|
|
104
|
-
try {
|
|
105
|
-
b && !b.done && (l3 = h.return) && l3.call(h);
|
|
106
|
-
} finally {
|
|
107
|
-
if (s3) throw s3.error;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return c(p, g);
|
|
112
|
-
} };
|
|
113
|
-
return y;
|
|
114
|
-
}
|
|
115
|
-
var l = function(t2, n2) {
|
|
116
|
-
return t2.actions.forEach((function(e2) {
|
|
117
|
-
var r2 = e2.exec;
|
|
118
|
-
return r2 && r2(t2.context, n2);
|
|
119
|
-
}));
|
|
120
|
-
};
|
|
121
|
-
function v(t2) {
|
|
122
|
-
var r2 = t2.initialState, i2 = n.NotStarted, o2 = /* @__PURE__ */ new Set(), c2 = { _machine: t2, send: function(e2) {
|
|
123
|
-
i2 === n.Running && (r2 = t2.transition(r2, e2), l(r2, u(e2)), o2.forEach((function(t3) {
|
|
124
|
-
return t3(r2);
|
|
125
|
-
})));
|
|
126
|
-
}, subscribe: function(t3) {
|
|
127
|
-
return o2.add(t3), t3(r2), { unsubscribe: function() {
|
|
128
|
-
return o2.delete(t3);
|
|
129
|
-
} };
|
|
130
|
-
}, start: function(o3) {
|
|
131
|
-
if (o3) {
|
|
132
|
-
var u2 = "object" == typeof o3 ? o3 : { context: t2.config.context, value: o3 };
|
|
133
|
-
r2 = { value: u2.value, actions: [], context: u2.context, matches: a(u2.value) };
|
|
134
|
-
} else r2 = t2.initialState;
|
|
135
|
-
return i2 = n.Running, l(r2, e), c2;
|
|
136
|
-
}, stop: function() {
|
|
137
|
-
return i2 = n.Stopped, o2.clear(), c2;
|
|
138
|
-
}, get state() {
|
|
139
|
-
return r2;
|
|
140
|
-
}, get status() {
|
|
141
|
-
return i2;
|
|
142
|
-
} };
|
|
143
|
-
return c2;
|
|
144
|
-
}
|
|
145
|
-
export {
|
|
146
|
-
n as InterpreterStatus,
|
|
147
|
-
i as assign,
|
|
148
|
-
s as createMachine,
|
|
149
|
-
v as interpret
|
|
150
|
-
};
|
|
151
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../../../../../node_modules/.pnpm/@xstate+fsm@2.0.0/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,GAAE,QAAOF;AAAE,MAAIG,IAAEC,IAAEC,KAAEH,GAAE,KAAKF,EAAC,GAAEM,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,GAAE,WAAU,SAASH,IAAE;AAAC,WAAOK,GAAE,IAAIL,EAAC,GAAEA,GAAEG,EAAC,GAAE,EAAC,aAAY,WAAU;AAAC,aAAOE,GAAE,OAAOL,EAAC;AAAA,IAAC,EAAC;AAAA,EAAC,GAAE,OAAM,SAASK,IAAE;AAAC,QAAGA,IAAE;AAAC,UAAIM,KAAE,YAAU,OAAON,KAAEA,KAAE,EAAC,SAAQL,GAAE,OAAO,SAAQ,OAAMK,GAAC;AAAE,MAAAF,KAAE,EAAC,OAAMQ,GAAE,OAAM,SAAQ,CAAA,GAAG,SAAQA,GAAE,SAAQ,SAAQ,EAAEA,GAAE,KAAK,EAAC;AAAA,IAAC,MAAM,CAAAR,KAAEH,GAAE;AAAa,WAAOI,KAAE,EAAE,SAAQ,EAAED,IAAE,CAAC,GAAEO;AAAA,EAAC,GAAE,MAAK,WAAU;AAAC,WAAON,KAAE,EAAE,SAAQC,GAAE,MAAK,GAAGK;AAAA,EAAC,GAAE,IAAI,QAAO;AAAC,WAAOP;AAAA,EAAC,GAAE,IAAI,SAAQ;AAAC,WAAOC;AAAA,EAAC,EAAC;AAAE,SAAOM;AAAC;","x_google_ignoreList":[0]}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.js");
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const useIsomorphicLayoutEffect = require("use-isomorphic-layout-effect");
|
|
6
|
-
const withSelector = require("../../../../../../../_virtual/with-selector.js");
|
|
7
|
-
const useConstant = require("./useConstant.js");
|
|
8
|
-
var __read = function(o, n) {
|
|
9
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
10
|
-
if (!m) return o;
|
|
11
|
-
var i = m.call(o), r, ar = [], e;
|
|
12
|
-
try {
|
|
13
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
14
|
-
} catch (error) {
|
|
15
|
-
e = { error };
|
|
16
|
-
} finally {
|
|
17
|
-
try {
|
|
18
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
19
|
-
} finally {
|
|
20
|
-
if (e) throw e.error;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
function identity(a) {
|
|
26
|
-
return a;
|
|
27
|
-
}
|
|
28
|
-
var getServiceState = function(service) {
|
|
29
|
-
var currentValue;
|
|
30
|
-
service.subscribe(function(state) {
|
|
31
|
-
currentValue = state;
|
|
32
|
-
}).unsubscribe();
|
|
33
|
-
return currentValue;
|
|
34
|
-
};
|
|
35
|
-
function useMachine(stateMachine, options) {
|
|
36
|
-
var persistedStateRef = React.useRef();
|
|
37
|
-
if (process.env.NODE_ENV !== "production") {
|
|
38
|
-
var _a = __read(React.useState(stateMachine), 1), initialMachine = _a[0];
|
|
39
|
-
if (stateMachine !== initialMachine) {
|
|
40
|
-
console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.");
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
var _b = __read(useConstant(function() {
|
|
44
|
-
var queue2 = [];
|
|
45
|
-
var service2 = index.interpret(index.createMachine(stateMachine.config, options ? options : stateMachine._options));
|
|
46
|
-
var send = service2.send;
|
|
47
|
-
service2.send = function(event) {
|
|
48
|
-
if (service2.status === index.InterpreterStatus.NotStarted) {
|
|
49
|
-
queue2.push(event);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
send(event);
|
|
53
|
-
persistedStateRef.current = service2.state;
|
|
54
|
-
};
|
|
55
|
-
return [service2, queue2];
|
|
56
|
-
}), 2), service = _b[0], queue = _b[1];
|
|
57
|
-
useIsomorphicLayoutEffect(function() {
|
|
58
|
-
if (options) {
|
|
59
|
-
service._machine._options = options;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
var useServiceResult = useService(service);
|
|
63
|
-
React.useEffect(function() {
|
|
64
|
-
service.start(persistedStateRef.current);
|
|
65
|
-
queue.forEach(service.send);
|
|
66
|
-
persistedStateRef.current = service.state;
|
|
67
|
-
return function() {
|
|
68
|
-
service.stop();
|
|
69
|
-
};
|
|
70
|
-
}, []);
|
|
71
|
-
return useServiceResult;
|
|
72
|
-
}
|
|
73
|
-
var isEqual = function(_prevState, nextState) {
|
|
74
|
-
return nextState.changed === false;
|
|
75
|
-
};
|
|
76
|
-
function useService(service) {
|
|
77
|
-
var getSnapshot = React.useCallback(function() {
|
|
78
|
-
return getServiceState(service);
|
|
79
|
-
}, [service]);
|
|
80
|
-
var subscribe = React.useCallback(function(handleStoreChange) {
|
|
81
|
-
var unsubscribe = service.subscribe(handleStoreChange).unsubscribe;
|
|
82
|
-
return unsubscribe;
|
|
83
|
-
}, [service]);
|
|
84
|
-
var storeSnapshot = withSelector.withSelectorExports.useSyncExternalStoreWithSelector(subscribe, getSnapshot, getSnapshot, identity, isEqual);
|
|
85
|
-
return [storeSnapshot, service.send, service];
|
|
86
|
-
}
|
|
87
|
-
exports.useMachine = useMachine;
|
|
88
|
-
exports.useService = useService;
|
|
89
|
-
//# sourceMappingURL=fsm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fsm.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@xstate+react@3.2.1_@types+react@18.3.28_@xstate+fsm@2.0.0_react@18.3.1/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":["useRef","useState","queue","service","interpret","createMachine","InterpreterStatus","useEffect","useCall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;AAC5B,UAAIA,SAAQ,WAAWG,MAAAA,kBAAkB,YAAY;AACjD,QAAAJ,OAAM,KAAK,KAAK;AAChB;AAAA,MACJ;AACA,WAAK,KAAK;AACV,wBAAkB,UAAUC,SAAQ;AAAA,IACxC;AACA,WAAO,CAACA,UAASD,MAAK;AAAA,EAC1B,CAAC,GAAG,CAAC,GAAG,UAAU,GAAG,CAAC,GAAG,QAAQ,GAAG,CAAC;AACrC,4BAA0B,WAAY;AAClC,QAAI,SAAS;AACT,cAAQ,SAAS,WAAW;AAAA,IAChC;AAAA,EACJ,CAAC;AACD,MAAI,mBAAmB,WAAW,OAAO;AACzCK,QAAAA,UAAU,WAAY;AAClB,YAAQ,MAAM,kBAAkB,OAAO;AACvC,UAAM,QAAQ,QAAQ,IAAI;AAC1B,sBAAkB,UAAU,QAAQ;AACpC,WAAO,WAAY;AACf,cAAQ,KAAI;AAAA,IAChB;AAAA,EACJ,GAAG,CAAA,CAAE;AACL,SAAO;AACX;AACA,IAAI,UAAU,SAAU,YAAY,WAAW;AAAE,SAAO,UAAU,YAAY;AAAO;AAC9E,SAAS,WAAW,SAAS;AAChC,MAAI,cAAcC,kBAAY,WAAY;AAAE,WAAO,gBAAgB,OAAO;AAAA,EAAG,GAAG,CAAC,OAAO,CAAC;AACzF,MAAI,YAAYA,kBAAY,SAAU,mBAAmB;AACrD,QAAI,cAAc,QAAQ,UAAU,iBAAiB,EAAE;AACvD,WAAO;AAAA,EACX,GAAG,CAAC,OAAO,CAAC;AACZ,MAAI,gBAAgBC,aAAAA,oBAAAA,iCAAiC,WAAW,aAAa,aAAa,UAAU,OAAO;AAC3G,SAAO,CAAC,eAAe,QAAQ,MAAM,OAAO;AAChD;;;","x_google_ignoreList":[0]}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { interpret as v, createMachine as s, InterpreterStatus as n } from "../../../../../@xstate_fsm@2.0.0/node_modules/@xstate/fsm/es/index.mjs";
|
|
2
|
-
import { useRef, useState, useEffect, useCallback } from "react";
|
|
3
|
-
import useIsomorphicLayoutEffect from "use-isomorphic-layout-effect";
|
|
4
|
-
import { w as withSelectorExports } from "../../../../../../../_virtual/with-selector.mjs";
|
|
5
|
-
import useConstant from "./useConstant.mjs";
|
|
6
|
-
var __read = function(o, n2) {
|
|
7
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
8
|
-
if (!m) return o;
|
|
9
|
-
var i = m.call(o), r, ar = [], e;
|
|
10
|
-
try {
|
|
11
|
-
while ((n2 === void 0 || n2-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
12
|
-
} catch (error) {
|
|
13
|
-
e = { error };
|
|
14
|
-
} finally {
|
|
15
|
-
try {
|
|
16
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
17
|
-
} finally {
|
|
18
|
-
if (e) throw e.error;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return ar;
|
|
22
|
-
};
|
|
23
|
-
function identity(a) {
|
|
24
|
-
return a;
|
|
25
|
-
}
|
|
26
|
-
var getServiceState = function(service) {
|
|
27
|
-
var currentValue;
|
|
28
|
-
service.subscribe(function(state) {
|
|
29
|
-
currentValue = state;
|
|
30
|
-
}).unsubscribe();
|
|
31
|
-
return currentValue;
|
|
32
|
-
};
|
|
33
|
-
function useMachine(stateMachine, options) {
|
|
34
|
-
var persistedStateRef = useRef();
|
|
35
|
-
if (process.env.NODE_ENV !== "production") {
|
|
36
|
-
var _a = __read(useState(stateMachine), 1), initialMachine = _a[0];
|
|
37
|
-
if (stateMachine !== initialMachine) {
|
|
38
|
-
console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.");
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
var _b = __read(useConstant(function() {
|
|
42
|
-
var queue2 = [];
|
|
43
|
-
var service2 = v(s(stateMachine.config, options ? options : stateMachine._options));
|
|
44
|
-
var send = service2.send;
|
|
45
|
-
service2.send = function(event) {
|
|
46
|
-
if (service2.status === n.NotStarted) {
|
|
47
|
-
queue2.push(event);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
send(event);
|
|
51
|
-
persistedStateRef.current = service2.state;
|
|
52
|
-
};
|
|
53
|
-
return [service2, queue2];
|
|
54
|
-
}), 2), service = _b[0], queue = _b[1];
|
|
55
|
-
useIsomorphicLayoutEffect(function() {
|
|
56
|
-
if (options) {
|
|
57
|
-
service._machine._options = options;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
var useServiceResult = useService(service);
|
|
61
|
-
useEffect(function() {
|
|
62
|
-
service.start(persistedStateRef.current);
|
|
63
|
-
queue.forEach(service.send);
|
|
64
|
-
persistedStateRef.current = service.state;
|
|
65
|
-
return function() {
|
|
66
|
-
service.stop();
|
|
67
|
-
};
|
|
68
|
-
}, []);
|
|
69
|
-
return useServiceResult;
|
|
70
|
-
}
|
|
71
|
-
var isEqual = function(_prevState, nextState) {
|
|
72
|
-
return nextState.changed === false;
|
|
73
|
-
};
|
|
74
|
-
function useService(service) {
|
|
75
|
-
var getSnapshot = useCallback(function() {
|
|
76
|
-
return getServiceState(service);
|
|
77
|
-
}, [service]);
|
|
78
|
-
var subscribe = useCallback(function(handleStoreChange) {
|
|
79
|
-
var unsubscribe = service.subscribe(handleStoreChange).unsubscribe;
|
|
80
|
-
return unsubscribe;
|
|
81
|
-
}, [service]);
|
|
82
|
-
var storeSnapshot = withSelectorExports.useSyncExternalStoreWithSelector(subscribe, getSnapshot, getSnapshot, identity, isEqual);
|
|
83
|
-
return [storeSnapshot, service.send, service];
|
|
84
|
-
}
|
|
85
|
-
export {
|
|
86
|
-
useMachine,
|
|
87
|
-
useService
|
|
88
|
-
};
|
|
89
|
-
//# sourceMappingURL=fsm.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fsm.mjs","sources":["../../../../../../../../../../../node_modules/.pnpm/@xstate+react@3.2.1_@types+react@18.3.28_@xstate+fsm@2.0.0_react@18.3.1/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":["n","queue","service","interpret","createMachine","InterpreterStatus","useSyncExternalStoreWithSelector"],"mappings":";;;;;AAAA,IAAI,SAAkC,SAAU,GAAGA,IAAG;AAClD,MAAI,IAAI,OAAO,WAAW,cAAc,EAAE,OAAO,QAAQ;AACzD,MAAI,CAAC,EAAG,QAAO;AACf,MAAI,IAAI,EAAE,KAAK,CAAC,GAAG,GAAG,KAAK,CAAA,GAAI;AAC/B,MAAI;AACA,YAAQA,OAAM,UAAUA,OAAM,MAAM,EAAE,IAAI,EAAE,KAAI,GAAI,KAAM,IAAG,KAAK,EAAE,KAAK;AAAA,EAC7E,SACO,OAAO;AAAE,QAAI,EAAE,MAAY;AAAA,EAAI,UAC1C;AACQ,QAAI;AACA,UAAI,KAAK,CAAC,EAAE,SAAS,IAAI,EAAE,QAAQ,GAAI,GAAE,KAAK,CAAC;AAAA,IACnD,UACR;AAAkB,UAAI,EAAG,OAAM,EAAE;AAAA,IAAO;AAAA,EACpC;AACA,SAAO;AACX;AAMA,SAAS,SAAS,GAAG;AACjB,SAAO;AACX;AACA,IAAI,kBAAkB,SAAU,SAAS;AACrC,MAAI;AACJ,UACK,UAAU,SAAU,OAAO;AAC5B,mBAAe;AAAA,EACnB,CAAC,EACI,YAAW;AAChB,SAAO;AACX;AACO,SAAS,WAAW,cAAc,SAAS;AAC9C,MAAI,oBAAoB,OAAM;AAC9B,MAAI,QAAQ,IAAI,aAAa,cAAc;AACvC,QAAI,KAAK,OAAO,SAAS,YAAY,GAAG,CAAC,GAAG,iBAAiB,GAAG,CAAC;AACjE,QAAI,iBAAiB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OAAO;AAC3G,SAAO,CAAC,eAAe,QAAQ,MAAM,OAAO;AAChD;","x_google_ignoreList":[0]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const React = require("react");
|
|
3
|
-
function _interopNamespaceDefault(e) {
|
|
4
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
5
|
-
if (e) {
|
|
6
|
-
for (const k in e) {
|
|
7
|
-
if (k !== "default") {
|
|
8
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
9
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: () => e[k]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
n.default = e;
|
|
17
|
-
return Object.freeze(n);
|
|
18
|
-
}
|
|
19
|
-
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
20
|
-
function useConstant(fn) {
|
|
21
|
-
var ref = React__namespace.useRef();
|
|
22
|
-
if (!ref.current) {
|
|
23
|
-
ref.current = { v: fn() };
|
|
24
|
-
}
|
|
25
|
-
return ref.current.v;
|
|
26
|
-
}
|
|
27
|
-
module.exports = useConstant;
|
|
28
|
-
//# sourceMappingURL=useConstant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useConstant.js","sources":["../../../../../../../../../../../node_modules/.pnpm/@xstate+react@3.2.1_@types+react@18.3.28_@xstate+fsm@2.0.0_react@18.3.1/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,iBAAM,OAAM;AACtB,MAAI,CAAC,IAAI,SAAS;AACd,QAAI,UAAU,EAAE,GAAG,GAAE,EAAE;AAAA,EAC3B;AACA,SAAO,IAAI,QAAQ;AACvB;;","x_google_ignoreList":[0]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
function useConstant(fn) {
|
|
3
|
-
var ref = React.useRef();
|
|
4
|
-
if (!ref.current) {
|
|
5
|
-
ref.current = { v: fn() };
|
|
6
|
-
}
|
|
7
|
-
return ref.current.v;
|
|
8
|
-
}
|
|
9
|
-
export {
|
|
10
|
-
useConstant as default
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=useConstant.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useConstant.mjs","sources":["../../../../../../../../../../../node_modules/.pnpm/@xstate+react@3.2.1_@types+react@18.3.28_@xstate+fsm@2.0.0_react@18.3.1/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":[],"mappings":";AACe,SAAS,YAAY,IAAI;AACpC,MAAI,MAAM,MAAM,OAAM;AACtB,MAAI,CAAC,IAAI,SAAS;AACd,QAAI,UAAU,EAAE,GAAG,GAAE,EAAE;AAAA,EAC3B;AACA,SAAO,IAAI,QAAQ;AACvB;","x_google_ignoreList":[0]}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const withSelector_development = require("../../../../../../../_virtual/with-selector.development.js");
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const index = require("../../shim/index.js");
|
|
6
|
-
/**
|
|
7
|
-
* @license React
|
|
8
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
11
|
-
*
|
|
12
|
-
* This source code is licensed under the MIT license found in the
|
|
13
|
-
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/
|
|
15
|
-
var hasRequiredWithSelector_development;
|
|
16
|
-
function requireWithSelector_development() {
|
|
17
|
-
if (hasRequiredWithSelector_development) return withSelector_development.__exports;
|
|
18
|
-
hasRequiredWithSelector_development = 1;
|
|
19
|
-
"production" !== process.env.NODE_ENV && (function() {
|
|
20
|
-
function is(x, y) {
|
|
21
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
22
|
-
}
|
|
23
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
24
|
-
var React$1 = React, shim = index.__require(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React$1.useRef, useEffect = React$1.useEffect, useMemo = React$1.useMemo, useDebugValue = React$1.useDebugValue;
|
|
25
|
-
withSelector_development.__exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
26
|
-
var instRef = useRef(null);
|
|
27
|
-
if (null === instRef.current) {
|
|
28
|
-
var inst = { hasValue: false, value: null };
|
|
29
|
-
instRef.current = inst;
|
|
30
|
-
} else inst = instRef.current;
|
|
31
|
-
instRef = useMemo(
|
|
32
|
-
function() {
|
|
33
|
-
function memoizedSelector(nextSnapshot) {
|
|
34
|
-
if (!hasMemo) {
|
|
35
|
-
hasMemo = true;
|
|
36
|
-
memoizedSnapshot = nextSnapshot;
|
|
37
|
-
nextSnapshot = selector(nextSnapshot);
|
|
38
|
-
if (void 0 !== isEqual && inst.hasValue) {
|
|
39
|
-
var currentSelection = inst.value;
|
|
40
|
-
if (isEqual(currentSelection, nextSnapshot))
|
|
41
|
-
return memoizedSelection = currentSelection;
|
|
42
|
-
}
|
|
43
|
-
return memoizedSelection = nextSnapshot;
|
|
44
|
-
}
|
|
45
|
-
currentSelection = memoizedSelection;
|
|
46
|
-
if (objectIs(memoizedSnapshot, nextSnapshot))
|
|
47
|
-
return currentSelection;
|
|
48
|
-
var nextSelection = selector(nextSnapshot);
|
|
49
|
-
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
|
|
50
|
-
return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
51
|
-
memoizedSnapshot = nextSnapshot;
|
|
52
|
-
return memoizedSelection = nextSelection;
|
|
53
|
-
}
|
|
54
|
-
var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
55
|
-
return [
|
|
56
|
-
function() {
|
|
57
|
-
return memoizedSelector(getSnapshot());
|
|
58
|
-
},
|
|
59
|
-
null === maybeGetServerSnapshot ? void 0 : function() {
|
|
60
|
-
return memoizedSelector(maybeGetServerSnapshot());
|
|
61
|
-
}
|
|
62
|
-
];
|
|
63
|
-
},
|
|
64
|
-
[getSnapshot, getServerSnapshot, selector, isEqual]
|
|
65
|
-
);
|
|
66
|
-
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
67
|
-
useEffect(
|
|
68
|
-
function() {
|
|
69
|
-
inst.hasValue = true;
|
|
70
|
-
inst.value = value;
|
|
71
|
-
},
|
|
72
|
-
[value]
|
|
73
|
-
);
|
|
74
|
-
useDebugValue(value);
|
|
75
|
-
return value;
|
|
76
|
-
};
|
|
77
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
78
|
-
})();
|
|
79
|
-
return withSelector_development.__exports;
|
|
80
|
-
}
|
|
81
|
-
exports.__require = requireWithSelector_development;
|
|
82
|
-
//# sourceMappingURL=with-selector.development.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"with-selector.development.js","sources":["../../../../../../../../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/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) Meta Platforms, Inc. and 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\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\n exports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n ) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot))\n return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n"],"names":["React","require$$0","require$$1","withSelector_development"],"mappings":";;;;;;;;;;;;;;;;;;AAWA,mBAAiB,QAAQ,IAAI,aAC1B,WAAY;AACX,aAAS,GAAG,GAAG,GAAG;AAChB,aAAQ,MAAM,MAAM,MAAM,KAAK,IAAI,MAAM,IAAI,MAAQ,MAAM,KAAK,MAAM;AAAA,IAC5E;AACI,oBAAgB,OAAO,kCACrB,eACE,OAAO,+BAA+B,+BACxC,+BAA+B,4BAA4B,OAAO;AACpE,QAAIA,UAAQC,OACV,OAAOC,MAAAA,UAAA,GACP,WAAW,eAAe,OAAO,OAAO,KAAK,OAAO,KAAK,IACzD,uBAAuB,KAAK,sBAC5B,SAASF,QAAM,QACf,YAAYA,QAAM,WAClB,UAAUA,QAAM,SAChB,gBAAgBA,QAAM;AACxBG,6BAAAA,6CAA2C,SACzC,WACA,aACA,mBACA,UACA,SACA;AACA,UAAI,UAAU,OAAO,I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vE,GAAG;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { __exports as withSelector_development } from "../../../../../../../_virtual/with-selector.development.mjs";
|
|
2
|
-
import React__default from "react";
|
|
3
|
-
import { __require as requireShim } from "../../shim/index.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* @license React
|
|
6
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
var hasRequiredWithSelector_development;
|
|
14
|
-
function requireWithSelector_development() {
|
|
15
|
-
if (hasRequiredWithSelector_development) return withSelector_development;
|
|
16
|
-
hasRequiredWithSelector_development = 1;
|
|
17
|
-
"production" !== process.env.NODE_ENV && (function() {
|
|
18
|
-
function is(x, y) {
|
|
19
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
20
|
-
}
|
|
21
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
22
|
-
var React = React__default, shim = requireShim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React.useRef, useEffect = React.useEffect, useMemo = React.useMemo, useDebugValue = React.useDebugValue;
|
|
23
|
-
withSelector_development.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
24
|
-
var instRef = useRef(null);
|
|
25
|
-
if (null === instRef.current) {
|
|
26
|
-
var inst = { hasValue: false, value: null };
|
|
27
|
-
instRef.current = inst;
|
|
28
|
-
} else inst = instRef.current;
|
|
29
|
-
instRef = useMemo(
|
|
30
|
-
function() {
|
|
31
|
-
function memoizedSelector(nextSnapshot) {
|
|
32
|
-
if (!hasMemo) {
|
|
33
|
-
hasMemo = true;
|
|
34
|
-
memoizedSnapshot = nextSnapshot;
|
|
35
|
-
nextSnapshot = selector(nextSnapshot);
|
|
36
|
-
if (void 0 !== isEqual && inst.hasValue) {
|
|
37
|
-
var currentSelection = inst.value;
|
|
38
|
-
if (isEqual(currentSelection, nextSnapshot))
|
|
39
|
-
return memoizedSelection = currentSelection;
|
|
40
|
-
}
|
|
41
|
-
return memoizedSelection = nextSnapshot;
|
|
42
|
-
}
|
|
43
|
-
currentSelection = memoizedSelection;
|
|
44
|
-
if (objectIs(memoizedSnapshot, nextSnapshot))
|
|
45
|
-
return currentSelection;
|
|
46
|
-
var nextSelection = selector(nextSnapshot);
|
|
47
|
-
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
|
|
48
|
-
return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
49
|
-
memoizedSnapshot = nextSnapshot;
|
|
50
|
-
return memoizedSelection = nextSelection;
|
|
51
|
-
}
|
|
52
|
-
var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
53
|
-
return [
|
|
54
|
-
function() {
|
|
55
|
-
return memoizedSelector(getSnapshot());
|
|
56
|
-
},
|
|
57
|
-
null === maybeGetServerSnapshot ? void 0 : function() {
|
|
58
|
-
return memoizedSelector(maybeGetServerSnapshot());
|
|
59
|
-
}
|
|
60
|
-
];
|
|
61
|
-
},
|
|
62
|
-
[getSnapshot, getServerSnapshot, selector, isEqual]
|
|
63
|
-
);
|
|
64
|
-
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
65
|
-
useEffect(
|
|
66
|
-
function() {
|
|
67
|
-
inst.hasValue = true;
|
|
68
|
-
inst.value = value;
|
|
69
|
-
},
|
|
70
|
-
[value]
|
|
71
|
-
);
|
|
72
|
-
useDebugValue(value);
|
|
73
|
-
return value;
|
|
74
|
-
};
|
|
75
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
76
|
-
})();
|
|
77
|
-
return withSelector_development;
|
|
78
|
-
}
|
|
79
|
-
export {
|
|
80
|
-
requireWithSelector_development as __require
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=with-selector.development.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"with-selector.development.mjs","sources":["../../../../../../../../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@18.3.1/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) Meta Platforms, Inc. and 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\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\n exports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n ) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot))\n return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n"],"names":["require$$0","require$$1"],"mappings":";;;;;;;;;;;;;;;;AAWA,mBAAiB,QAAQ,IAAI,aAC1B,WAAY;AACX,aAAS,GAAG,GAAG,GAAG;AAChB,aAAQ,MAAM,MAAM,MAAM,KAAK,IAAI,MAAM,IAAI,MAAQ,MAAM,KAAK,MAAM;AAAA,IAC5E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