@sunrise-upc/sales-static-components 4.0.0 → 4.0.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Constants.js +1 -1
- package/dist/cjs/components/Constants.js.map +1 -1
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.css +60 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.js +3 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.js.map +1 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.module.scss.css +60 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.module.scss.js +3 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.module.scss.js.map +1 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartFooter/CartFooter.css +113 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartFooter/CartFooter.js +3 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartFooter/CartFooter.js.map +1 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartFooter/CartFooter.module.scss.css +113 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartFooter/CartFooter.module.scss.js +3 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartFooter/CartFooter.module.scss.js.map +1 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.css +154 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.js +3 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.js.map +1 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.module.scss.css +154 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.module.scss.js +3 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.module.scss.js.map +1 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartOverlay.css +41 -64
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartOverlay.js +1 -1
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartOverlay.js.map +1 -1
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartOverlay.module.scss.css +41 -64
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/CartOverlay.module.scss.js +1 -1
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.css +80 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.js +3 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.js.map +1 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.module.scss.css +80 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.module.scss.js +3 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.module.scss.js.map +1 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/useCartData.js +2 -0
- package/dist/cjs/components/FalconMainNavigation/CartOverlay/useCartData.js.map +1 -0
- package/dist/cjs/components/FalconMainNavigation/FalconMainNavigation.js +1 -1
- package/dist/cjs/components/FalconMainNavigation/FalconMainNavigation.js.map +1 -1
- package/dist/cjs/components/FalconMainNavigation/ProfileLinkOut/ProfileLinkOut.css +4 -2
- package/dist/cjs/components/FalconMainNavigation/ProfileLinkOut/ProfileLinkOut.module.scss.css +4 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/algoliasearch/dist/lite/builds/browser.js +1 -1
- package/dist/cjs/node_modules/algoliasearch/dist/lite/builds/browser.js.map +1 -1
- package/dist/cjs/node_modules/algoliasearch-helper/src/version.js +1 -1
- package/dist/cjs/node_modules/algoliasearch-helper/src/version.js.map +1 -1
- package/dist/cjs/node_modules/instantsearch.js/es/helpers/insights.js +1 -1
- package/dist/cjs/node_modules/instantsearch.js/es/helpers/insights.js.map +1 -1
- package/dist/cjs/node_modules/instantsearch.js/es/lib/InstantSearch.js +1 -1
- package/dist/cjs/node_modules/instantsearch.js/es/lib/InstantSearch.js.map +1 -1
- package/dist/cjs/node_modules/instantsearch.js/es/lib/utils/buildWidgetTree.js +2 -0
- package/dist/cjs/node_modules/instantsearch.js/es/lib/utils/buildWidgetTree.js.map +1 -0
- package/dist/cjs/node_modules/instantsearch.js/es/lib/utils/extractWidgetPayload.js +2 -0
- package/dist/cjs/node_modules/instantsearch.js/es/lib/utils/extractWidgetPayload.js.map +1 -0
- package/dist/cjs/node_modules/instantsearch.js/es/lib/utils/now.js +2 -0
- package/dist/cjs/node_modules/instantsearch.js/es/lib/utils/now.js.map +1 -0
- package/dist/cjs/node_modules/instantsearch.js/es/lib/utils/omit.js +2 -0
- package/dist/cjs/node_modules/instantsearch.js/es/lib/utils/omit.js.map +1 -0
- package/dist/cjs/node_modules/instantsearch.js/es/lib/version.js +1 -1
- package/dist/cjs/node_modules/instantsearch.js/es/lib/version.js.map +1 -1
- package/dist/cjs/node_modules/instantsearch.js/es/middlewares/createInsightsMiddleware.js +1 -1
- package/dist/cjs/node_modules/instantsearch.js/es/middlewares/createInsightsMiddleware.js.map +1 -1
- package/dist/cjs/node_modules/instantsearch.js/es/middlewares/createMetadataMiddleware.js +1 -1
- package/dist/cjs/node_modules/instantsearch.js/es/middlewares/createMetadataMiddleware.js.map +1 -1
- package/dist/cjs/node_modules/instantsearch.js/es/widgets/index/index.js +1 -1
- package/dist/cjs/node_modules/instantsearch.js/es/widgets/index/index.js.map +1 -1
- package/dist/cjs/node_modules/react-instantsearch/dist/es/ui/SearchBox.js +1 -1
- package/dist/cjs/node_modules/react-instantsearch/dist/es/ui/SearchBox.js.map +1 -1
- package/dist/cjs/node_modules/react-instantsearch-core/dist/es/version.js +1 -1
- package/dist/cjs/node_modules/react-instantsearch-core/dist/es/version.js.map +1 -1
- package/dist/cjs/services/CartPropConfig.js +2 -0
- package/dist/cjs/services/CartPropConfig.js.map +1 -0
- package/dist/cjs/services/CartService.js +2 -0
- package/dist/cjs/services/CartService.js.map +1 -0
- package/dist/cjs/services/api-constants.js +1 -1
- package/dist/cjs/services/api-constants.js.map +1 -1
- package/dist/cjs/utils/utilities.js +2 -0
- package/dist/cjs/utils/utilities.js.map +1 -0
- package/dist/esm/components/Constants.js +1 -1
- package/dist/esm/components/Constants.js.map +1 -1
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.css +60 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.js +3 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.js.map +1 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.module.scss.css +60 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.module.scss.js +3 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.module.scss.js.map +1 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartFooter/CartFooter.css +113 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartFooter/CartFooter.js +3 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartFooter/CartFooter.js.map +1 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartFooter/CartFooter.module.scss.css +113 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartFooter/CartFooter.module.scss.js +3 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartFooter/CartFooter.module.scss.js.map +1 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.css +154 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.js +3 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.js.map +1 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.module.scss.css +154 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.module.scss.js +3 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.module.scss.js.map +1 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartOverlay.css +41 -64
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartOverlay.js +1 -1
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartOverlay.js.map +1 -1
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartOverlay.module.scss.css +41 -64
- package/dist/esm/components/FalconMainNavigation/CartOverlay/CartOverlay.module.scss.js +1 -1
- package/dist/esm/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.css +80 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.js +3 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.js.map +1 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.module.scss.css +80 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.module.scss.js +3 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.module.scss.js.map +1 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/useCartData.js +2 -0
- package/dist/esm/components/FalconMainNavigation/CartOverlay/useCartData.js.map +1 -0
- package/dist/esm/components/FalconMainNavigation/FalconMainNavigation.js +1 -1
- package/dist/esm/components/FalconMainNavigation/FalconMainNavigation.js.map +1 -1
- package/dist/esm/components/FalconMainNavigation/ProfileLinkOut/ProfileLinkOut.css +4 -2
- package/dist/esm/components/FalconMainNavigation/ProfileLinkOut/ProfileLinkOut.module.scss.css +4 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/node_modules/algoliasearch/dist/lite/builds/browser.js +1 -1
- package/dist/esm/node_modules/algoliasearch/dist/lite/builds/browser.js.map +1 -1
- package/dist/esm/node_modules/algoliasearch-helper/src/version.js +1 -1
- package/dist/esm/node_modules/algoliasearch-helper/src/version.js.map +1 -1
- package/dist/esm/node_modules/instantsearch.js/es/helpers/insights.js +1 -1
- package/dist/esm/node_modules/instantsearch.js/es/helpers/insights.js.map +1 -1
- package/dist/esm/node_modules/instantsearch.js/es/lib/InstantSearch.js +1 -1
- package/dist/esm/node_modules/instantsearch.js/es/lib/InstantSearch.js.map +1 -1
- package/dist/esm/node_modules/instantsearch.js/es/lib/utils/buildWidgetTree.js +2 -0
- package/dist/esm/node_modules/instantsearch.js/es/lib/utils/buildWidgetTree.js.map +1 -0
- package/dist/esm/node_modules/instantsearch.js/es/lib/utils/extractWidgetPayload.js +2 -0
- package/dist/esm/node_modules/instantsearch.js/es/lib/utils/extractWidgetPayload.js.map +1 -0
- package/dist/esm/node_modules/instantsearch.js/es/lib/utils/now.js +2 -0
- package/dist/esm/node_modules/instantsearch.js/es/lib/utils/now.js.map +1 -0
- package/dist/esm/node_modules/instantsearch.js/es/lib/utils/omit.js +2 -0
- package/dist/esm/node_modules/instantsearch.js/es/lib/utils/omit.js.map +1 -0
- package/dist/esm/node_modules/instantsearch.js/es/lib/version.js +1 -1
- package/dist/esm/node_modules/instantsearch.js/es/lib/version.js.map +1 -1
- package/dist/esm/node_modules/instantsearch.js/es/middlewares/createInsightsMiddleware.js +1 -1
- package/dist/esm/node_modules/instantsearch.js/es/middlewares/createInsightsMiddleware.js.map +1 -1
- package/dist/esm/node_modules/instantsearch.js/es/middlewares/createMetadataMiddleware.js +1 -1
- package/dist/esm/node_modules/instantsearch.js/es/middlewares/createMetadataMiddleware.js.map +1 -1
- package/dist/esm/node_modules/instantsearch.js/es/widgets/index/index.js +1 -1
- package/dist/esm/node_modules/instantsearch.js/es/widgets/index/index.js.map +1 -1
- package/dist/esm/node_modules/react-instantsearch/dist/es/ui/SearchBox.js +1 -1
- package/dist/esm/node_modules/react-instantsearch/dist/es/ui/SearchBox.js.map +1 -1
- package/dist/esm/node_modules/react-instantsearch-core/dist/es/version.js +1 -1
- package/dist/esm/node_modules/react-instantsearch-core/dist/es/version.js.map +1 -1
- package/dist/esm/services/CartPropConfig.js +2 -0
- package/dist/esm/services/CartPropConfig.js.map +1 -0
- package/dist/esm/services/CartService.js +2 -0
- package/dist/esm/services/CartService.js.map +1 -0
- package/dist/esm/services/api-constants.js +1 -1
- package/dist/esm/services/api-constants.js.map +1 -1
- package/dist/esm/utils/utilities.js +2 -0
- package/dist/esm/utils/utilities.js.map +1 -0
- package/dist/index.d.ts +40 -6
- package/dist/navigation.css +807 -413
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/instantsearch.js/es/widgets/index/index.js"],"sourcesContent":["import { _ } from '@swc/helpers/esm/_define_property.js';\nimport { _ as _$5 } from '@swc/helpers/esm/_instanceof.js';\nimport { _ as _$3 } from '@swc/helpers/esm/_object_spread.js';\nimport { _ as _$2 } from '@swc/helpers/esm/_object_spread_props.js';\nimport { _ as _$4 } from '@swc/helpers/esm/_object_without_properties.js';\nimport { _ as _$1 } from '@swc/helpers/esm/_to_consumable_array.js';\nimport algoliasearchHelper from 'algoliasearch-helper';\nimport { addWidgetId } from '../../lib/utils/addWidgetId.js';\nimport { defer } from '../../lib/utils/defer.js';\nimport { resolveSearchParameters } from '../../lib/utils/resolveSearchParameters.js';\nimport { createDocumentationMessageGenerator } from '../../lib/utils/documentation.js';\nimport { isIndexWidget } from '../../lib/utils/isIndexWidget.js';\nimport { mergeSearchParameters } from '../../lib/utils/mergeSearchParameters.js';\nimport { createInitArgs, storeRenderState, createRenderArgs } from '../../lib/utils/render-args.js';\n\nvar withUsage = createDocumentationMessageGenerator({\n name: 'index-widget'\n});\n/**\n * This is the same content as helper._change / setState, but allowing for extra\n * UiState to be synchronized.\n * see: https://github.com/algolia/algoliasearch-helper-js/blob/6b835ffd07742f2d6b314022cce6848f5cfecd4a/src/algoliasearch.helper.js#L1311-L1324\n */ function privateHelperSetState(helper, param) {\n var state = param.state, recommendState = param.recommendState, isPageReset = param.isPageReset, _uiState = param._uiState;\n if (state !== helper.state) {\n helper.state = state;\n helper.emit('change', {\n state: helper.state,\n results: helper.lastResults,\n isPageReset: isPageReset,\n _uiState: _uiState\n });\n }\n if (recommendState !== helper.recommendState) {\n helper.recommendState = recommendState;\n // eslint-disable-next-line no-warning-comments\n // TODO: emit \"change\" event when events for Recommend are implemented\n }\n}\nfunction getLocalWidgetsUiState(widgets, widgetStateOptions) {\n var initialUiState = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n return widgets.reduce(function(uiState, widget) {\n if (isIndexWidget(widget)) {\n return uiState;\n }\n if (!widget.getWidgetUiState && !widget.getWidgetState) {\n return uiState;\n }\n if (widget.getWidgetUiState) {\n return widget.getWidgetUiState(uiState, widgetStateOptions);\n }\n return widget.getWidgetState(uiState, widgetStateOptions);\n }, initialUiState);\n}\nfunction getLocalWidgetsSearchParameters(widgets, widgetSearchParametersOptions) {\n var initialSearchParameters = widgetSearchParametersOptions.initialSearchParameters, rest = _$4(widgetSearchParametersOptions, [\n \"initialSearchParameters\"\n ]);\n return widgets.reduce(function(state, widget) {\n if (!widget.getWidgetSearchParameters || isIndexWidget(widget)) {\n return state;\n }\n if (widget.dependsOn === 'search' && widget.getWidgetParameters) {\n return widget.getWidgetParameters(state, rest);\n }\n return widget.getWidgetSearchParameters(state, rest);\n }, initialSearchParameters);\n}\nfunction getLocalWidgetsRecommendParameters(widgets, widgetRecommendParametersOptions) {\n var initialRecommendParameters = widgetRecommendParametersOptions.initialRecommendParameters, rest = _$4(widgetRecommendParametersOptions, [\n \"initialRecommendParameters\"\n ]);\n return widgets.reduce(function(state, widget) {\n if (!isIndexWidget(widget) && widget.dependsOn === 'recommend' && widget.getWidgetParameters) {\n return widget.getWidgetParameters(state, rest);\n }\n return state;\n }, initialRecommendParameters);\n}\nfunction resetPageFromWidgets(widgets) {\n var indexWidgets = widgets.filter(isIndexWidget);\n if (indexWidgets.length === 0) {\n return;\n }\n indexWidgets.forEach(function(widget) {\n var widgetHelper = widget.getHelper();\n privateHelperSetState(widgetHelper, {\n state: widgetHelper.state.resetPage(),\n recommendState: widgetHelper.recommendState,\n isPageReset: true\n });\n resetPageFromWidgets(widget.getWidgets());\n });\n}\nfunction resolveScopedResultsFromWidgets(widgets) {\n var indexWidgets = widgets.filter(isIndexWidget);\n return indexWidgets.reduce(function(scopedResults, current) {\n var _scopedResults;\n return (_scopedResults = scopedResults).concat.apply(_scopedResults, [\n {\n indexId: current.getIndexId(),\n results: current.getResults(),\n helper: current.getHelper()\n }\n ].concat(_$1(resolveScopedResultsFromWidgets(current.getWidgets()))));\n }, []);\n}\nvar index = function index(widgetParams) {\n if (widgetParams === undefined || widgetParams.indexName === undefined && !widgetParams.EXPERIMENTAL_isolated) {\n throw new Error(withUsage('The `indexName` option is required.'));\n }\n // When isolated=true, we use an empty string as the default indexName.\n // This is intentional: isolated indices do not require a real index name.\n var _widgetParams_indexName = widgetParams.indexName, indexName = _widgetParams_indexName === void 0 ? '' : _widgetParams_indexName, _widgetParams_indexId = widgetParams.indexId, indexId = _widgetParams_indexId === void 0 ? indexName : _widgetParams_indexId, tmp = widgetParams.EXPERIMENTAL_isolated, isolated = tmp === void 0 ? false : tmp;\n var localWidgets = [];\n var localUiState = {};\n var localInstantSearchInstance = null;\n var localParent = null;\n var helper = null;\n var derivedHelper = null;\n var lastValidSearchParameters = null;\n var hasRecommendWidget = false;\n var hasSearchWidget = false;\n return {\n $$type: 'ais.index',\n $$widgetType: 'ais.index',\n _isolated: isolated,\n getIndexName: function getIndexName() {\n return indexName;\n },\n getIndexId: function getIndexId() {\n return indexId;\n },\n getHelper: function getHelper() {\n return helper;\n },\n getResults: function getResults() {\n if (!(derivedHelper === null || derivedHelper === void 0 ? void 0 : derivedHelper.lastResults)) return null;\n // To make the UI optimistic, we patch the state to display to the current\n // one instead of the one associated with the latest results.\n // This means user-driven UI changes (e.g., checked checkbox) are reflected\n // immediately instead of waiting for Algolia to respond, regardless of\n // the status of the network request.\n derivedHelper.lastResults._state = helper.state;\n return derivedHelper.lastResults;\n },\n getResultsForWidget: function getResultsForWidget(widget) {\n if (widget.dependsOn !== 'recommend' || isIndexWidget(widget) || widget.$$id === undefined) {\n return this.getResults();\n }\n if (!(helper === null || helper === void 0 ? void 0 : helper.lastRecommendResults)) {\n return null;\n }\n return helper.lastRecommendResults[widget.$$id];\n },\n getPreviousState: function getPreviousState() {\n return lastValidSearchParameters;\n },\n getScopedResults: function getScopedResults() {\n var widgetParent = this.getParent();\n var widgetSiblings;\n if (widgetParent) {\n widgetSiblings = widgetParent.getWidgets();\n } else if (indexName.length === 0) {\n // The widget is the root but has no index name:\n // we resolve results from its children index widgets\n widgetSiblings = this.getWidgets();\n } else {\n // The widget is the root and has an index name:\n // we consider itself as the only sibling\n widgetSiblings = [\n this\n ];\n }\n return resolveScopedResultsFromWidgets(widgetSiblings);\n },\n getParent: function getParent() {\n return isolated ? null : localParent;\n },\n createURL: function createURL(nextState) {\n if (typeof nextState === 'function') {\n return localInstantSearchInstance._createURL(_({}, indexId, nextState(localUiState)));\n }\n return localInstantSearchInstance._createURL(_({}, indexId, getLocalWidgetsUiState(localWidgets, {\n searchParameters: nextState,\n helper: helper\n })));\n },\n scheduleLocalSearch: defer(function() {\n if (isolated) {\n helper === null || helper === void 0 ? void 0 : helper.search();\n }\n }),\n getWidgets: function getWidgets() {\n return localWidgets;\n },\n addWidgets: function addWidgets(widgets) {\n var _this = this;\n if (!Array.isArray(widgets)) {\n throw new Error(withUsage('The `addWidgets` method expects an array of widgets.'));\n }\n var flatWidgets = widgets.reduce(function(acc, w) {\n return acc.concat(Array.isArray(w) ? w : [\n w\n ]);\n }, []);\n if (flatWidgets.some(function(widget) {\n return typeof widget.init !== 'function' && typeof widget.render !== 'function';\n })) {\n throw new Error(withUsage('The widget definition expects a `render` and/or an `init` method.'));\n }\n flatWidgets.forEach(function(widget) {\n widget.parent = _this;\n if (isIndexWidget(widget)) {\n return;\n }\n if (localInstantSearchInstance && widget.dependsOn === 'recommend') {\n localInstantSearchInstance._hasRecommendWidget = true;\n } else if (localInstantSearchInstance) {\n localInstantSearchInstance._hasSearchWidget = true;\n } else if (widget.dependsOn === 'recommend') {\n hasRecommendWidget = true;\n } else {\n hasSearchWidget = true;\n }\n addWidgetId(widget);\n });\n localWidgets = localWidgets.concat(flatWidgets);\n if (localInstantSearchInstance && Boolean(flatWidgets.length)) {\n privateHelperSetState(helper, {\n state: getLocalWidgetsSearchParameters(localWidgets, {\n uiState: localUiState,\n initialSearchParameters: helper.state\n }),\n recommendState: getLocalWidgetsRecommendParameters(localWidgets, {\n uiState: localUiState,\n initialRecommendParameters: helper.recommendState\n }),\n _uiState: localUiState\n });\n // We compute the render state before calling `init` in a separate loop\n // to construct the whole render state object that is then passed to\n // `init`.\n flatWidgets.forEach(function(widget) {\n if (widget.getRenderState) {\n var renderState = widget.getRenderState(localInstantSearchInstance.renderState[_this.getIndexId()] || {}, createInitArgs(localInstantSearchInstance, _this, localInstantSearchInstance._initialUiState));\n storeRenderState({\n renderState: renderState,\n instantSearchInstance: localInstantSearchInstance,\n parent: _this\n });\n }\n });\n flatWidgets.forEach(function(widget) {\n if (widget.init) {\n widget.init(createInitArgs(localInstantSearchInstance, _this, localInstantSearchInstance._initialUiState));\n }\n });\n if (isolated) {\n this.scheduleLocalSearch();\n } else {\n localInstantSearchInstance.scheduleSearch();\n }\n }\n return this;\n },\n removeWidgets: function removeWidgets(widgets) {\n var _this = this;\n if (!Array.isArray(widgets)) {\n throw new Error(withUsage('The `removeWidgets` method expects an array of widgets.'));\n }\n var flatWidgets = widgets.reduce(function(acc, w) {\n return acc.concat(Array.isArray(w) ? w : [\n w\n ]);\n }, []);\n if (flatWidgets.some(function(widget) {\n return typeof widget.dispose !== 'function';\n })) {\n throw new Error(withUsage('The widget definition expects a `dispose` method.'));\n }\n localWidgets = localWidgets.filter(function(widget) {\n return flatWidgets.indexOf(widget) === -1;\n });\n localWidgets.forEach(function(widget) {\n widget.parent = undefined;\n if (isIndexWidget(widget)) {\n return;\n }\n if (localInstantSearchInstance && widget.dependsOn === 'recommend') {\n localInstantSearchInstance._hasRecommendWidget = true;\n } else if (localInstantSearchInstance) {\n localInstantSearchInstance._hasSearchWidget = true;\n } else if (widget.dependsOn === 'recommend') {\n hasRecommendWidget = true;\n } else {\n hasSearchWidget = true;\n }\n });\n if (localInstantSearchInstance && Boolean(flatWidgets.length)) {\n var _flatWidgets_reduce = flatWidgets.reduce(function(states, widget) {\n // the `dispose` method exists at this point we already assert it\n var next = widget.dispose({\n helper: helper,\n state: states.cleanedSearchState,\n recommendState: states.cleanedRecommendState,\n parent: _this\n });\n if (_$5(next, algoliasearchHelper.RecommendParameters)) {\n states.cleanedRecommendState = next;\n } else if (next) {\n states.cleanedSearchState = next;\n }\n return states;\n }, {\n cleanedSearchState: helper.state,\n cleanedRecommendState: helper.recommendState\n }), cleanedSearchState = _flatWidgets_reduce.cleanedSearchState, cleanedRecommendState = _flatWidgets_reduce.cleanedRecommendState;\n var newState = localInstantSearchInstance.future.preserveSharedStateOnUnmount ? getLocalWidgetsSearchParameters(localWidgets, {\n uiState: localUiState,\n initialSearchParameters: new algoliasearchHelper.SearchParameters({\n index: this.getIndexName()\n })\n }) : getLocalWidgetsSearchParameters(localWidgets, {\n uiState: getLocalWidgetsUiState(localWidgets, {\n searchParameters: cleanedSearchState,\n helper: helper\n }),\n initialSearchParameters: cleanedSearchState\n });\n localUiState = getLocalWidgetsUiState(localWidgets, {\n searchParameters: newState,\n helper: helper\n });\n helper.setState(newState);\n helper.recommendState = cleanedRecommendState;\n if (localWidgets.length) {\n if (isolated) {\n this.scheduleLocalSearch();\n } else {\n localInstantSearchInstance.scheduleSearch();\n }\n }\n }\n return this;\n },\n init: function init(param) {\n var _this = this;\n var instantSearchInstance = param.instantSearchInstance, parent = param.parent, uiState = param.uiState;\n var _instantSearchInstance__initialResults;\n if (helper !== null) {\n // helper is already initialized, therefore we do not need to set up\n // any listeners\n return;\n }\n localInstantSearchInstance = instantSearchInstance;\n localParent = parent;\n localUiState = uiState[indexId] || {};\n // The `mainHelper` is already defined at this point. The instance is created\n // inside InstantSearch at the `start` method, which occurs before the `init`\n // step.\n var mainHelper = instantSearchInstance.mainHelper;\n var parameters = getLocalWidgetsSearchParameters(localWidgets, {\n uiState: localUiState,\n initialSearchParameters: new algoliasearchHelper.SearchParameters({\n index: indexName\n })\n });\n var recommendParameters = getLocalWidgetsRecommendParameters(localWidgets, {\n uiState: localUiState,\n initialRecommendParameters: new algoliasearchHelper.RecommendParameters()\n });\n // This Helper is only used for state management we do not care about the\n // `searchClient`. Only the \"main\" Helper created at the `InstantSearch`\n // level is aware of the client.\n helper = algoliasearchHelper(mainHelper.getClient(), parameters.index, parameters);\n helper.recommendState = recommendParameters;\n // We forward the call to `search` to the \"main\" instance of the Helper\n // which is responsible for managing the queries (it's the only one that is\n // aware of the `searchClient`).\n helper.search = function() {\n if (isolated) {\n instantSearchInstance.status = 'loading';\n _this.render({\n instantSearchInstance: instantSearchInstance\n });\n return instantSearchInstance.compositionID ? helper.searchWithComposition() : helper.searchOnlyWithDerivedHelpers();\n }\n if (instantSearchInstance.onStateChange) {\n instantSearchInstance.onStateChange({\n uiState: instantSearchInstance.mainIndex.getWidgetUiState({}),\n setUiState: function setUiState(nextState) {\n return instantSearchInstance.setUiState(nextState, false);\n }\n });\n // We don't trigger a search when controlled because it becomes the\n // responsibility of `setUiState`.\n return mainHelper;\n }\n return mainHelper.search();\n };\n helper.searchWithoutTriggeringOnStateChange = function() {\n return mainHelper.search();\n };\n // We use the same pattern for the `searchForFacetValues`.\n helper.searchForFacetValues = function(facetName, facetValue, maxFacetHits, userState) {\n var state = mergeSearchParameters.apply(void 0, [\n mainHelper.state\n ].concat(_$1(resolveSearchParameters(_this)))).setQueryParameters(userState);\n return mainHelper.searchForFacetValues(facetName, facetValue, maxFacetHits, state);\n };\n var isolatedHelper = indexName ? helper : algoliasearchHelper({}, '__empty_index__', {});\n var derivingHelper = isolated ? isolatedHelper : nearestIsolatedHelper(parent, mainHelper);\n derivedHelper = derivingHelper.derive(function() {\n return mergeSearchParameters.apply(void 0, [\n mainHelper.state\n ].concat(_$1(resolveSearchParameters(_this))));\n }, function() {\n return _this.getHelper().recommendState;\n });\n var indexInitialResults = (_instantSearchInstance__initialResults = instantSearchInstance._initialResults) === null || _instantSearchInstance__initialResults === void 0 ? void 0 : _instantSearchInstance__initialResults[this.getIndexId()];\n if (indexInitialResults === null || indexInitialResults === void 0 ? void 0 : indexInitialResults.results) {\n // We restore the shape of the results provided to the instance to respect\n // the helper's structure.\n var results = new algoliasearchHelper.SearchResults(new algoliasearchHelper.SearchParameters(indexInitialResults.state), indexInitialResults.results);\n derivedHelper.lastResults = results;\n helper.lastResults = results;\n }\n if (indexInitialResults === null || indexInitialResults === void 0 ? void 0 : indexInitialResults.recommendResults) {\n var recommendResults = new algoliasearchHelper.RecommendResults(new algoliasearchHelper.RecommendParameters({\n params: indexInitialResults.recommendResults.params\n }), indexInitialResults.recommendResults.results);\n derivedHelper.lastRecommendResults = recommendResults;\n helper.lastRecommendResults = recommendResults;\n }\n // Subscribe to the Helper state changes for the page before widgets\n // are initialized. This behavior mimics the original one of the Helper.\n // It makes sense to replicate it at the `init` step. We have another\n // listener on `change` below, once `init` is done.\n helper.on('change', function(param) {\n var isPageReset = param.isPageReset;\n if (isPageReset) {\n resetPageFromWidgets(localWidgets);\n }\n });\n derivedHelper.on('search', function() {\n // The index does not manage the \"staleness\" of the search. This is the\n // responsibility of the main instance. It does not make sense to manage\n // it at the index level because it's either: all of them or none of them\n // that are stalled. The queries are performed into a single network request.\n instantSearchInstance.scheduleStalledRender();\n });\n derivedHelper.on('result', function(param) {\n var results = param.results;\n // The index does not render the results it schedules a new render\n // to let all the other indices emit their own results. It allows us to\n // run the render process in one pass.\n instantSearchInstance.scheduleRender();\n // the derived helper is the one which actually searches, but the helper\n // which is exposed e.g. via instance.helper, doesn't search, and thus\n // does not have access to lastResults, which it used to in pre-federated\n // search behavior.\n helper.lastResults = results;\n lastValidSearchParameters = results === null || results === void 0 ? void 0 : results._state;\n });\n // eslint-disable-next-line no-warning-comments\n // TODO: listen to \"result\" event when events for Recommend are implemented\n derivedHelper.on('recommend:result', function(param) {\n var recommend = param.recommend;\n // The index does not render the results it schedules a new render\n // to let all the other indices emit their own results. It allows us to\n // run the render process in one pass.\n instantSearchInstance.scheduleRender();\n // the derived helper is the one which actually searches, but the helper\n // which is exposed e.g. via instance.helper, doesn't search, and thus\n // does not have access to lastRecommendResults.\n helper.lastRecommendResults = recommend.results;\n });\n // We compute the render state before calling `init` in a separate loop\n // to construct the whole render state object that is then passed to\n // `init`.\n localWidgets.forEach(function(widget) {\n if (widget.getRenderState) {\n var renderState = widget.getRenderState(instantSearchInstance.renderState[_this.getIndexId()] || {}, createInitArgs(instantSearchInstance, _this, uiState));\n storeRenderState({\n renderState: renderState,\n instantSearchInstance: instantSearchInstance,\n parent: _this\n });\n }\n });\n localWidgets.forEach(function(widget) {\n if (widget.init) {\n widget.init(createInitArgs(instantSearchInstance, _this, uiState));\n }\n });\n // Subscribe to the Helper state changes for the `uiState` once widgets\n // are initialized. Until the first render, state changes are part of the\n // configuration step. This is mainly for backward compatibility with custom\n // widgets. When the subscription happens before the `init` step, the (static)\n // configuration of the widget is pushed in the URL. That's what we want to avoid.\n // https://github.com/algolia/instantsearch/pull/994/commits/4a672ae3fd78809e213de0368549ef12e9dc9454\n helper.on('change', function(event) {\n var state = event.state;\n var _uiState = event._uiState;\n localUiState = getLocalWidgetsUiState(localWidgets, {\n searchParameters: state,\n helper: helper\n }, _uiState || {});\n // We don't trigger an internal change when controlled because it\n // becomes the responsibility of `setUiState`.\n if (!instantSearchInstance.onStateChange) {\n instantSearchInstance.onInternalStateChange();\n }\n });\n if (indexInitialResults) {\n // If there are initial results, we're not notified of the next results\n // because we don't trigger an initial search. We therefore need to directly\n // schedule a render that will render the results injected on the helper.\n instantSearchInstance.scheduleRender();\n }\n if (hasRecommendWidget) {\n instantSearchInstance._hasRecommendWidget = true;\n }\n if (hasSearchWidget) {\n instantSearchInstance._hasSearchWidget = true;\n }\n },\n render: function render(param) {\n var _this = this;\n var instantSearchInstance = param.instantSearchInstance;\n // we can't attach a listener to the error event of search, as the error\n // then would no longer be thrown for global handlers.\n if (instantSearchInstance.status === 'error' && !instantSearchInstance.mainHelper.hasPendingRequests() && lastValidSearchParameters) {\n helper.setState(lastValidSearchParameters);\n }\n // We only render index widgets if there are no results.\n // This makes sure `render` is never called with `results` being `null`.\n // If it's an isolated index without an index name, we render all widgets,\n // as there are no results to display for the isolated index itself.\n var widgetsToRender = this.getResults() || (derivedHelper === null || derivedHelper === void 0 ? void 0 : derivedHelper.lastRecommendResults) || isolated && !indexName ? localWidgets : localWidgets.filter(function(widget) {\n return widget.shouldRender;\n });\n widgetsToRender = widgetsToRender.filter(function(widget) {\n if (!widget.shouldRender) {\n return true;\n }\n return widget.shouldRender({\n instantSearchInstance: instantSearchInstance\n });\n });\n widgetsToRender.forEach(function(widget) {\n if (widget.getRenderState) {\n var renderState = widget.getRenderState(instantSearchInstance.renderState[_this.getIndexId()] || {}, createRenderArgs(instantSearchInstance, _this, widget));\n storeRenderState({\n renderState: renderState,\n instantSearchInstance: instantSearchInstance,\n parent: _this\n });\n }\n });\n widgetsToRender.forEach(function(widget) {\n // At this point, all the variables used below are set. Both `helper`\n // and `derivedHelper` have been created at the `init` step. The attribute\n // `lastResults` might be `null` though. It's possible that a stalled render\n // happens before the result e.g with a dynamically added index the request might\n // be delayed. The render is triggered for the complete tree but some parts do\n // not have results yet.\n if (widget.render) {\n widget.render(createRenderArgs(instantSearchInstance, _this, widget));\n }\n });\n },\n dispose: function dispose() {\n var _this = this;\n localWidgets.forEach(function(widget) {\n if (widget.dispose && helper) {\n // The dispose function is always called once the instance is started\n // (it's an effect of `removeWidgets`). The index is initialized and\n // the Helper is available. We don't care about the return value of\n // `dispose` because the index is removed. We can't call `removeWidgets`\n // because we want to keep the widgets on the instance, to allow idempotent\n // operations on `add` & `remove`.\n widget.dispose({\n helper: helper,\n state: helper.state,\n recommendState: helper.recommendState,\n parent: _this\n });\n }\n });\n localInstantSearchInstance = null;\n localParent = null;\n helper === null || helper === void 0 ? void 0 : helper.removeAllListeners();\n helper = null;\n derivedHelper === null || derivedHelper === void 0 ? void 0 : derivedHelper.detach();\n derivedHelper = null;\n },\n getWidgetUiState: function getWidgetUiState(uiState) {\n return localWidgets.filter(isIndexWidget).filter(function(w) {\n return !w._isolated;\n }).reduce(function(previousUiState, innerIndex) {\n return innerIndex.getWidgetUiState(previousUiState);\n }, _$2(_$3({}, uiState), _({}, indexId, _$3({}, uiState[indexId], localUiState))));\n },\n getWidgetState: function getWidgetState(uiState) {\n return this.getWidgetUiState(uiState);\n },\n getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, param) {\n var uiState = param.uiState;\n return getLocalWidgetsSearchParameters(localWidgets, {\n uiState: uiState,\n initialSearchParameters: searchParameters\n });\n },\n shouldRender: function shouldRender() {\n return true;\n },\n refreshUiState: function refreshUiState() {\n localUiState = getLocalWidgetsUiState(localWidgets, {\n searchParameters: this.getHelper().state,\n helper: this.getHelper()\n }, localUiState);\n },\n setIndexUiState: function setIndexUiState(indexUiState) {\n var nextIndexUiState = typeof indexUiState === 'function' ? indexUiState(localUiState) : indexUiState;\n localInstantSearchInstance.setUiState(function(state) {\n return _$2(_$3({}, state), _({}, indexId, nextIndexUiState));\n });\n }\n };\n};\n/**\n * Walk up the parent chain to find the closest isolated index, or fall back to mainHelper\n */ function nearestIsolatedHelper(current, mainHelper) {\n while(current){\n if (current._isolated) {\n return current.getHelper();\n }\n current = current.getParent();\n }\n return mainHelper;\n}\n\nexport { index as default };\n"],"names":["withUsage","createDocumentationMessageGenerator","name","privateHelperSetState","helper","param","state","recommendState","isPageReset","_uiState","emit","results","lastResults","getLocalWidgetsUiState","widgets","widgetStateOptions","initialUiState","arguments","length","reduce","uiState","widget","isIndexWidget","getWidgetUiState","getWidgetState","getLocalWidgetsSearchParameters","widgetSearchParametersOptions","initialSearchParameters","rest","_$4","getWidgetSearchParameters","dependsOn","getWidgetParameters","getLocalWidgetsRecommendParameters","widgetRecommendParametersOptions","initialRecommendParameters","resetPageFromWidgets","indexWidgets","filter","forEach","widgetHelper","getHelper","resetPage","getWidgets","resolveScopedResultsFromWidgets","scopedResults","current","_scopedResults","concat","apply","indexId","getIndexId","getResults","_$1","widgetParams","undefined","indexName","EXPERIMENTAL_isolated","Error","_widgetParams_indexName","_widgetParams_indexId","tmp","isolated","localWidgets","localUiState","localInstantSearchInstance","localParent","derivedHelper","lastValidSearchParameters","hasRecommendWidget","hasSearchWidget","$$type","$$widgetType","_isolated","getIndexName","_state","getResultsForWidget","$$id","this","lastRecommendResults","getPreviousState","getScopedResults","widgetParent","getParent","createURL","nextState","_createURL","_","searchParameters","scheduleLocalSearch","defer","search","addWidgets","_this","Array","isArray","flatWidgets","acc","w","some","init","render","parent","_hasRecommendWidget","_hasSearchWidget","addWidgetId","Boolean","getRenderState","renderState","createInitArgs","_initialUiState","storeRenderState","instantSearchInstance","scheduleSearch","removeWidgets","dispose","indexOf","_flatWidgets_reduce","states","next","cleanedSearchState","cleanedRecommendState","_$5","algoliasearchHelper","RecommendParameters","newState","future","preserveSharedStateOnUnmount","SearchParameters","index","setState","_instantSearchInstance__initialResults","mainHelper","parameters","recommendParameters","getClient","status","compositionID","searchWithComposition","searchOnlyWithDerivedHelpers","onStateChange","mainIndex","setUiState","searchWithoutTriggeringOnStateChange","searchForFacetValues","facetName","facetValue","maxFacetHits","userState","mergeSearchParameters","resolveSearchParameters","setQueryParameters","isolatedHelper","derivingHelper","nearestIsolatedHelper","derive","indexInitialResults","_initialResults","SearchResults","recommendResults","RecommendResults","params","on","scheduleStalledRender","scheduleRender","recommend","event","onInternalStateChange","hasPendingRequests","widgetsToRender","shouldRender","createRenderArgs","removeAllListeners","detach","previousUiState","innerIndex","_$2","_$3","refreshUiState","setIndexUiState","indexUiState","nextIndexUiState"],"mappings":"8zBAeIA,EAAYC,EAAAA,oCAAoC,CAChDC,KAAM,iBAMN,SAASC,EAAsBC,EAAQC,GACvC,IAAIC,EAAQD,EAAMC,MAAOC,EAAiBF,EAAME,eAAgBC,EAAcH,EAAMG,YAAaC,EAAWJ,EAAMI,SAC9GH,IAAUF,EAAOE,QACjBF,EAAOE,MAAQA,EACfF,EAAOM,KAAK,SAAU,CAClBJ,MAAOF,EAAOE,MACdK,QAASP,EAAOQ,YAChBJ,YAAaA,EACbC,SAAUA,KAGdF,IAAmBH,EAAOG,iBAC1BH,EAAOG,eAAiBA,EAIhC,CACA,SAASM,EAAuBC,EAASC,GACrC,IAAIC,EAAiBC,UAAUC,OAAS,QAAsB,IAAjBD,UAAU,GAAgBA,UAAU,GAAK,CAAA,EACtF,OAAOH,EAAQK,OAAO,SAASC,EAASC,GACpC,OAAIC,EAAAA,cAAcD,GACPD,EAENC,EAAOE,kBAAqBF,EAAOG,eAGpCH,EAAOE,iBACAF,EAAOE,iBAAiBH,EAASL,GAErCM,EAAOG,eAAeJ,EAASL,GAL3BK,CAMf,EAAGJ,EACP,CACA,SAASS,EAAgCX,EAASY,GAC9C,IAAIC,EAA0BD,EAA8BC,wBAAyBC,EAAOC,EAAAA,EAAIH,EAA+B,CAC3H,4BAEJ,OAAOZ,EAAQK,OAAO,SAASb,EAAOe,GAClC,OAAKA,EAAOS,2BAA6BR,EAAAA,cAAcD,GAC5Cf,EAEc,WAArBe,EAAOU,WAA0BV,EAAOW,oBACjCX,EAAOW,oBAAoB1B,EAAOsB,GAEtCP,EAAOS,0BAA0BxB,EAAOsB,EACnD,EAAGD,EACP,CACA,SAASM,EAAmCnB,EAASoB,GACjD,IAAIC,EAA6BD,EAAiCC,2BAA4BP,EAAOC,EAAAA,EAAIK,EAAkC,CACvI,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C0D,EAAkBnF,GAC5E,IAAIe,EAAUf,EAAMe,QACpB,OAAOK,EAAgCsC,EAAc,CACjD3C,QAASA,EACTO,wBAAyB6D,GAEjC,EACAkF,aAAc,WACV,OAAO,CACX,EACAQ,eAAgB,WACZlH,EAAenD,EAAuBkD,EAAc,CAChDyB,iBAAkBV,KAAKrC,YAAYnC,MACnCF,OAAQ0E,KAAKrC,aACduB,EACP,EACAmH,gBAAiB,SAAyBC,GACtC,IAAIC,EAA2C,mBAAjBD,EAA8BA,EAAapH,GAAgBoH,EACzFnH,EAA2B6E,WAAW,SAASxI,GAC3C,OAAO0K,EAAAA,EAAIC,IAAI,CAAA,EAAI3K,GAAQiF,EAAAA,EAAE,CAAA,EAAIrC,EAASmI,GAC9C,EACJ,EAER","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/instantsearch.js/es/widgets/index/index.js"],"sourcesContent":["import { _ } from '@swc/helpers/esm/_define_property.js';\nimport { _ as _$5 } from '@swc/helpers/esm/_instanceof.js';\nimport { _ as _$3 } from '@swc/helpers/esm/_object_spread.js';\nimport { _ as _$2 } from '@swc/helpers/esm/_object_spread_props.js';\nimport { _ as _$4 } from '@swc/helpers/esm/_object_without_properties.js';\nimport { _ as _$1 } from '@swc/helpers/esm/_to_consumable_array.js';\nimport algoliasearchHelper from 'algoliasearch-helper';\nimport { addWidgetId } from '../../lib/utils/addWidgetId.js';\nimport { isIndexWidget } from '../../lib/utils/isIndexWidget.js';\nimport { defer } from '../../lib/utils/defer.js';\nimport { resolveSearchParameters } from '../../lib/utils/resolveSearchParameters.js';\nimport { createDocumentationMessageGenerator } from '../../lib/utils/documentation.js';\nimport { mergeSearchParameters } from '../../lib/utils/mergeSearchParameters.js';\nimport { createInitArgs, storeRenderState, createRenderArgs } from '../../lib/utils/render-args.js';\n\nvar withUsage = createDocumentationMessageGenerator({\n name: 'index-widget'\n});\n/**\n * This is the same content as helper._change / setState, but allowing for extra\n * UiState to be synchronized.\n * see: https://github.com/algolia/algoliasearch-helper-js/blob/6b835ffd07742f2d6b314022cce6848f5cfecd4a/src/algoliasearch.helper.js#L1311-L1324\n */ function privateHelperSetState(helper, param) {\n var state = param.state, recommendState = param.recommendState, isPageReset = param.isPageReset, _uiState = param._uiState;\n if (state !== helper.state) {\n helper.state = state;\n helper.emit('change', {\n state: helper.state,\n results: helper.lastResults,\n isPageReset: isPageReset,\n _uiState: _uiState\n });\n }\n if (recommendState !== helper.recommendState) {\n helper.recommendState = recommendState;\n // eslint-disable-next-line no-warning-comments\n // TODO: emit \"change\" event when events for Recommend are implemented\n }\n}\nfunction getLocalWidgetsUiState(widgets, widgetStateOptions) {\n var initialUiState = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n return widgets.reduce(function(uiState, widget) {\n if (isIndexWidget(widget)) {\n return uiState;\n }\n if (!widget.getWidgetUiState && !widget.getWidgetState) {\n return uiState;\n }\n if (widget.getWidgetUiState) {\n return widget.getWidgetUiState(uiState, widgetStateOptions);\n }\n return widget.getWidgetState(uiState, widgetStateOptions);\n }, initialUiState);\n}\nfunction getLocalWidgetsSearchParameters(widgets, widgetSearchParametersOptions) {\n var initialSearchParameters = widgetSearchParametersOptions.initialSearchParameters, rest = _$4(widgetSearchParametersOptions, [\n \"initialSearchParameters\"\n ]);\n return widgets.reduce(function(state, widget) {\n if (!widget.getWidgetSearchParameters || isIndexWidget(widget)) {\n return state;\n }\n if (widget.dependsOn === 'search' && widget.getWidgetParameters) {\n return widget.getWidgetParameters(state, rest);\n }\n return widget.getWidgetSearchParameters(state, rest);\n }, initialSearchParameters);\n}\nfunction getLocalWidgetsRecommendParameters(widgets, widgetRecommendParametersOptions) {\n var initialRecommendParameters = widgetRecommendParametersOptions.initialRecommendParameters, rest = _$4(widgetRecommendParametersOptions, [\n \"initialRecommendParameters\"\n ]);\n return widgets.reduce(function(state, widget) {\n if (!isIndexWidget(widget) && widget.dependsOn === 'recommend' && widget.getWidgetParameters) {\n return widget.getWidgetParameters(state, rest);\n }\n return state;\n }, initialRecommendParameters);\n}\nfunction resetPageFromWidgets(widgets) {\n var indexWidgets = widgets.filter(isIndexWidget);\n if (indexWidgets.length === 0) {\n return;\n }\n indexWidgets.forEach(function(widget) {\n var widgetHelper = widget.getHelper();\n privateHelperSetState(widgetHelper, {\n state: widgetHelper.state.resetPage(),\n recommendState: widgetHelper.recommendState,\n isPageReset: true\n });\n resetPageFromWidgets(widget.getWidgets());\n });\n}\nfunction resolveScopedResultsFromWidgets(widgets) {\n var indexWidgets = widgets.filter(isIndexWidget);\n return indexWidgets.reduce(function(scopedResults, current) {\n var _scopedResults;\n return (_scopedResults = scopedResults).concat.apply(_scopedResults, [\n {\n indexId: current.getIndexId(),\n results: current.getResults(),\n helper: current.getHelper()\n }\n ].concat(_$1(resolveScopedResultsFromWidgets(current.getWidgets()))));\n }, []);\n}\nvar index = function index(widgetParams) {\n if (widgetParams === undefined || widgetParams.indexName === undefined && !widgetParams.EXPERIMENTAL_isolated) {\n throw new Error(withUsage('The `indexName` option is required.'));\n }\n // When isolated=true, we use an empty string as the default indexName.\n // This is intentional: isolated indices do not require a real index name.\n var _widgetParams_indexName = widgetParams.indexName, indexName = _widgetParams_indexName === void 0 ? '' : _widgetParams_indexName, _widgetParams_indexId = widgetParams.indexId, indexId = _widgetParams_indexId === void 0 ? indexName : _widgetParams_indexId, tmp = widgetParams.EXPERIMENTAL_isolated, isolated = tmp === void 0 ? false : tmp;\n var localWidgets = [];\n var localUiState = {};\n var localInstantSearchInstance = null;\n var localParent = null;\n var helper = null;\n var derivedHelper = null;\n var lastValidSearchParameters = null;\n var hasRecommendWidget = false;\n var hasSearchWidget = false;\n return {\n $$type: 'ais.index',\n $$widgetType: 'ais.index',\n _isolated: isolated,\n getIndexName: function getIndexName() {\n return indexName;\n },\n getIndexId: function getIndexId() {\n return indexId;\n },\n getHelper: function getHelper() {\n return helper;\n },\n getResults: function getResults() {\n if (!(derivedHelper === null || derivedHelper === void 0 ? void 0 : derivedHelper.lastResults)) return null;\n // To make the UI optimistic, we patch the state to display to the current\n // one instead of the one associated with the latest results.\n // This means user-driven UI changes (e.g., checked checkbox) are reflected\n // immediately instead of waiting for Algolia to respond, regardless of\n // the status of the network request.\n derivedHelper.lastResults._state = helper.state;\n return derivedHelper.lastResults;\n },\n getResultsForWidget: function getResultsForWidget(widget) {\n if (widget.dependsOn !== 'recommend' || isIndexWidget(widget) || widget.$$id === undefined) {\n return this.getResults();\n }\n if (!(helper === null || helper === void 0 ? void 0 : helper.lastRecommendResults)) {\n return null;\n }\n return helper.lastRecommendResults[widget.$$id];\n },\n getPreviousState: function getPreviousState() {\n return lastValidSearchParameters;\n },\n getScopedResults: function getScopedResults() {\n var widgetParent = this.getParent();\n var widgetSiblings;\n if (widgetParent) {\n widgetSiblings = widgetParent.getWidgets();\n } else if (indexName.length === 0) {\n // The widget is the root but has no index name:\n // we resolve results from its children index widgets\n widgetSiblings = this.getWidgets();\n } else {\n // The widget is the root and has an index name:\n // we consider itself as the only sibling\n widgetSiblings = [\n this\n ];\n }\n return resolveScopedResultsFromWidgets(widgetSiblings);\n },\n getParent: function getParent() {\n return isolated ? null : localParent;\n },\n createURL: function createURL(nextState) {\n if (typeof nextState === 'function') {\n return localInstantSearchInstance._createURL(_({}, indexId, nextState(localUiState)));\n }\n return localInstantSearchInstance._createURL(_({}, indexId, getLocalWidgetsUiState(localWidgets, {\n searchParameters: nextState,\n helper: helper\n })));\n },\n scheduleLocalSearch: defer(function() {\n if (isolated) {\n helper === null || helper === void 0 ? void 0 : helper.search();\n }\n }),\n getWidgets: function getWidgets() {\n return localWidgets;\n },\n addWidgets: function addWidgets(widgets) {\n var _this = this;\n if (!Array.isArray(widgets)) {\n throw new Error(withUsage('The `addWidgets` method expects an array of widgets.'));\n }\n var flatWidgets = widgets.reduce(function(acc, w) {\n return acc.concat(Array.isArray(w) ? w : [\n w\n ]);\n }, []);\n if (flatWidgets.some(function(widget) {\n return typeof widget.init !== 'function' && typeof widget.render !== 'function';\n })) {\n throw new Error(withUsage('The widget definition expects a `render` and/or an `init` method.'));\n }\n flatWidgets.forEach(function(widget) {\n widget.parent = _this;\n if (isIndexWidget(widget)) {\n return;\n }\n if (localInstantSearchInstance && widget.dependsOn === 'recommend') {\n localInstantSearchInstance._hasRecommendWidget = true;\n } else if (localInstantSearchInstance) {\n localInstantSearchInstance._hasSearchWidget = true;\n } else if (widget.dependsOn === 'recommend') {\n hasRecommendWidget = true;\n } else {\n hasSearchWidget = true;\n }\n addWidgetId(widget);\n });\n localWidgets = localWidgets.concat(flatWidgets);\n if (localInstantSearchInstance && Boolean(flatWidgets.length)) {\n privateHelperSetState(helper, {\n state: getLocalWidgetsSearchParameters(localWidgets, {\n uiState: localUiState,\n initialSearchParameters: helper.state\n }),\n recommendState: getLocalWidgetsRecommendParameters(localWidgets, {\n uiState: localUiState,\n initialRecommendParameters: helper.recommendState\n }),\n _uiState: localUiState\n });\n // We compute the render state before calling `init` in a separate loop\n // to construct the whole render state object that is then passed to\n // `init`.\n flatWidgets.forEach(function(widget) {\n if (widget.getRenderState) {\n var renderState = widget.getRenderState(localInstantSearchInstance.renderState[_this.getIndexId()] || {}, createInitArgs(localInstantSearchInstance, _this, localInstantSearchInstance._initialUiState));\n storeRenderState({\n renderState: renderState,\n instantSearchInstance: localInstantSearchInstance,\n parent: _this\n });\n }\n });\n flatWidgets.forEach(function(widget) {\n if (widget.init) {\n widget.init(createInitArgs(localInstantSearchInstance, _this, localInstantSearchInstance._initialUiState));\n }\n });\n if (isolated) {\n this.scheduleLocalSearch();\n } else {\n localInstantSearchInstance.scheduleSearch();\n }\n }\n return this;\n },\n removeWidgets: function removeWidgets(widgets) {\n var _this = this;\n if (!Array.isArray(widgets)) {\n throw new Error(withUsage('The `removeWidgets` method expects an array of widgets.'));\n }\n var flatWidgets = widgets.reduce(function(acc, w) {\n return acc.concat(Array.isArray(w) ? w : [\n w\n ]);\n }, []);\n if (flatWidgets.some(function(widget) {\n return typeof widget.dispose !== 'function';\n })) {\n throw new Error(withUsage('The widget definition expects a `dispose` method.'));\n }\n localWidgets = localWidgets.filter(function(widget) {\n return flatWidgets.indexOf(widget) === -1;\n });\n localWidgets.forEach(function(widget) {\n widget.parent = undefined;\n if (isIndexWidget(widget)) {\n return;\n }\n if (localInstantSearchInstance && widget.dependsOn === 'recommend') {\n localInstantSearchInstance._hasRecommendWidget = true;\n } else if (localInstantSearchInstance) {\n localInstantSearchInstance._hasSearchWidget = true;\n } else if (widget.dependsOn === 'recommend') {\n hasRecommendWidget = true;\n } else {\n hasSearchWidget = true;\n }\n });\n if (localInstantSearchInstance && Boolean(flatWidgets.length)) {\n var _flatWidgets_reduce = flatWidgets.reduce(function(states, widget) {\n // the `dispose` method exists at this point we already assert it\n var next = widget.dispose({\n helper: helper,\n state: states.cleanedSearchState,\n recommendState: states.cleanedRecommendState,\n parent: _this\n });\n if (_$5(next, algoliasearchHelper.RecommendParameters)) {\n states.cleanedRecommendState = next;\n } else if (next) {\n states.cleanedSearchState = next;\n }\n return states;\n }, {\n cleanedSearchState: helper.state,\n cleanedRecommendState: helper.recommendState\n }), cleanedSearchState = _flatWidgets_reduce.cleanedSearchState, cleanedRecommendState = _flatWidgets_reduce.cleanedRecommendState;\n var newState = localInstantSearchInstance.future.preserveSharedStateOnUnmount ? getLocalWidgetsSearchParameters(localWidgets, {\n uiState: localUiState,\n initialSearchParameters: new algoliasearchHelper.SearchParameters({\n index: this.getIndexName()\n })\n }) : getLocalWidgetsSearchParameters(localWidgets, {\n uiState: getLocalWidgetsUiState(localWidgets, {\n searchParameters: cleanedSearchState,\n helper: helper\n }),\n initialSearchParameters: cleanedSearchState\n });\n localUiState = getLocalWidgetsUiState(localWidgets, {\n searchParameters: newState,\n helper: helper\n });\n helper.setState(newState);\n helper.recommendState = cleanedRecommendState;\n if (localWidgets.length) {\n if (isolated) {\n this.scheduleLocalSearch();\n } else {\n localInstantSearchInstance.scheduleSearch();\n }\n }\n }\n return this;\n },\n init: function init(param) {\n var _this = this;\n var instantSearchInstance = param.instantSearchInstance, parent = param.parent, uiState = param.uiState;\n var _instantSearchInstance__initialResults;\n if (helper !== null) {\n // helper is already initialized, therefore we do not need to set up\n // any listeners\n return;\n }\n localInstantSearchInstance = instantSearchInstance;\n localParent = parent;\n localUiState = uiState[indexId] || {};\n // The `mainHelper` is already defined at this point. The instance is created\n // inside InstantSearch at the `start` method, which occurs before the `init`\n // step.\n var mainHelper = instantSearchInstance.mainHelper;\n var parameters = getLocalWidgetsSearchParameters(localWidgets, {\n uiState: localUiState,\n initialSearchParameters: new algoliasearchHelper.SearchParameters({\n index: indexName\n })\n });\n var recommendParameters = getLocalWidgetsRecommendParameters(localWidgets, {\n uiState: localUiState,\n initialRecommendParameters: new algoliasearchHelper.RecommendParameters()\n });\n // This Helper is only used for state management we do not care about the\n // `searchClient`. Only the \"main\" Helper created at the `InstantSearch`\n // level is aware of the client.\n helper = algoliasearchHelper(mainHelper.getClient(), parameters.index, parameters);\n helper.recommendState = recommendParameters;\n // We forward the call to `search` to the \"main\" instance of the Helper\n // which is responsible for managing the queries (it's the only one that is\n // aware of the `searchClient`).\n helper.search = function() {\n if (isolated) {\n instantSearchInstance.status = 'loading';\n _this.render({\n instantSearchInstance: instantSearchInstance\n });\n return instantSearchInstance.compositionID ? helper.searchWithComposition() : helper.searchOnlyWithDerivedHelpers();\n }\n if (instantSearchInstance.onStateChange) {\n instantSearchInstance.onStateChange({\n uiState: instantSearchInstance.mainIndex.getWidgetUiState({}),\n setUiState: function setUiState(nextState) {\n return instantSearchInstance.setUiState(nextState, false);\n }\n });\n // We don't trigger a search when controlled because it becomes the\n // responsibility of `setUiState`.\n return mainHelper;\n }\n return mainHelper.search();\n };\n helper.searchWithoutTriggeringOnStateChange = function() {\n return mainHelper.search();\n };\n // We use the same pattern for the `searchForFacetValues`.\n helper.searchForFacetValues = function(facetName, facetValue, maxFacetHits, userState) {\n var state = mergeSearchParameters.apply(void 0, [\n mainHelper.state\n ].concat(_$1(resolveSearchParameters(_this)))).setQueryParameters(userState);\n return mainHelper.searchForFacetValues(facetName, facetValue, maxFacetHits, state);\n };\n var isolatedHelper = indexName ? helper : algoliasearchHelper({}, '__empty_index__', {});\n var derivingHelper = isolated ? isolatedHelper : nearestIsolatedHelper(parent, mainHelper);\n derivedHelper = derivingHelper.derive(function() {\n return mergeSearchParameters.apply(void 0, [\n mainHelper.state\n ].concat(_$1(resolveSearchParameters(_this))));\n }, function() {\n return _this.getHelper().recommendState;\n });\n var indexInitialResults = (_instantSearchInstance__initialResults = instantSearchInstance._initialResults) === null || _instantSearchInstance__initialResults === void 0 ? void 0 : _instantSearchInstance__initialResults[this.getIndexId()];\n if (indexInitialResults === null || indexInitialResults === void 0 ? void 0 : indexInitialResults.results) {\n // We restore the shape of the results provided to the instance to respect\n // the helper's structure.\n var results = new algoliasearchHelper.SearchResults(new algoliasearchHelper.SearchParameters(indexInitialResults.state), indexInitialResults.results);\n derivedHelper.lastResults = results;\n helper.lastResults = results;\n }\n if (indexInitialResults === null || indexInitialResults === void 0 ? void 0 : indexInitialResults.recommendResults) {\n var recommendResults = new algoliasearchHelper.RecommendResults(new algoliasearchHelper.RecommendParameters({\n params: indexInitialResults.recommendResults.params\n }), indexInitialResults.recommendResults.results);\n derivedHelper.lastRecommendResults = recommendResults;\n helper.lastRecommendResults = recommendResults;\n }\n // Subscribe to the Helper state changes for the page before widgets\n // are initialized. This behavior mimics the original one of the Helper.\n // It makes sense to replicate it at the `init` step. We have another\n // listener on `change` below, once `init` is done.\n helper.on('change', function(param) {\n var isPageReset = param.isPageReset;\n if (isPageReset) {\n resetPageFromWidgets(localWidgets);\n }\n });\n derivedHelper.on('search', function() {\n // The index does not manage the \"staleness\" of the search. This is the\n // responsibility of the main instance. It does not make sense to manage\n // it at the index level because it's either: all of them or none of them\n // that are stalled. The queries are performed into a single network request.\n instantSearchInstance.scheduleStalledRender();\n });\n derivedHelper.on('result', function(param) {\n var results = param.results;\n // The index does not render the results it schedules a new render\n // to let all the other indices emit their own results. It allows us to\n // run the render process in one pass.\n instantSearchInstance.scheduleRender();\n // the derived helper is the one which actually searches, but the helper\n // which is exposed e.g. via instance.helper, doesn't search, and thus\n // does not have access to lastResults, which it used to in pre-federated\n // search behavior.\n helper.lastResults = results;\n lastValidSearchParameters = results === null || results === void 0 ? void 0 : results._state;\n });\n // eslint-disable-next-line no-warning-comments\n // TODO: listen to \"result\" event when events for Recommend are implemented\n derivedHelper.on('recommend:result', function(param) {\n var recommend = param.recommend;\n // The index does not render the results it schedules a new render\n // to let all the other indices emit their own results. It allows us to\n // run the render process in one pass.\n instantSearchInstance.scheduleRender();\n // the derived helper is the one which actually searches, but the helper\n // which is exposed e.g. via instance.helper, doesn't search, and thus\n // does not have access to lastRecommendResults.\n helper.lastRecommendResults = recommend.results;\n });\n // We compute the render state before calling `init` in a separate loop\n // to construct the whole render state object that is then passed to\n // `init`.\n localWidgets.forEach(function(widget) {\n if (widget.getRenderState) {\n var renderState = widget.getRenderState(instantSearchInstance.renderState[_this.getIndexId()] || {}, createInitArgs(instantSearchInstance, _this, uiState));\n storeRenderState({\n renderState: renderState,\n instantSearchInstance: instantSearchInstance,\n parent: _this\n });\n }\n });\n localWidgets.forEach(function(widget) {\n if (widget.init) {\n widget.init(createInitArgs(instantSearchInstance, _this, uiState));\n }\n });\n // Subscribe to the Helper state changes for the `uiState` once widgets\n // are initialized. Until the first render, state changes are part of the\n // configuration step. This is mainly for backward compatibility with custom\n // widgets. When the subscription happens before the `init` step, the (static)\n // configuration of the widget is pushed in the URL. That's what we want to avoid.\n // https://github.com/algolia/instantsearch/pull/994/commits/4a672ae3fd78809e213de0368549ef12e9dc9454\n helper.on('change', function(event) {\n var state = event.state;\n var _uiState = event._uiState;\n localUiState = getLocalWidgetsUiState(localWidgets, {\n searchParameters: state,\n helper: helper\n }, _uiState || {});\n // We don't trigger an internal change when controlled because it\n // becomes the responsibility of `setUiState`.\n if (!instantSearchInstance.onStateChange) {\n instantSearchInstance.onInternalStateChange();\n }\n });\n if (indexInitialResults) {\n // If there are initial results, we're not notified of the next results\n // because we don't trigger an initial search. We therefore need to directly\n // schedule a render that will render the results injected on the helper.\n instantSearchInstance.scheduleRender();\n }\n if (hasRecommendWidget) {\n instantSearchInstance._hasRecommendWidget = true;\n }\n if (hasSearchWidget) {\n instantSearchInstance._hasSearchWidget = true;\n }\n },\n render: function render(param) {\n var _this = this;\n var instantSearchInstance = param.instantSearchInstance;\n // we can't attach a listener to the error event of search, as the error\n // then would no longer be thrown for global handlers.\n if (instantSearchInstance.status === 'error' && !instantSearchInstance.mainHelper.hasPendingRequests() && lastValidSearchParameters) {\n helper.setState(lastValidSearchParameters);\n }\n // We only render index widgets if there are no results.\n // This makes sure `render` is never called with `results` being `null`.\n // If it's an isolated index without an index name, we render all widgets,\n // as there are no results to display for the isolated index itself.\n var widgetsToRender = this.getResults() || (derivedHelper === null || derivedHelper === void 0 ? void 0 : derivedHelper.lastRecommendResults) || isolated && !indexName ? localWidgets : localWidgets.filter(function(widget) {\n return widget.shouldRender;\n });\n widgetsToRender = widgetsToRender.filter(function(widget) {\n if (!widget.shouldRender) {\n return true;\n }\n return widget.shouldRender({\n instantSearchInstance: instantSearchInstance\n });\n });\n widgetsToRender.forEach(function(widget) {\n if (widget.getRenderState) {\n var renderState = widget.getRenderState(instantSearchInstance.renderState[_this.getIndexId()] || {}, createRenderArgs(instantSearchInstance, _this, widget));\n storeRenderState({\n renderState: renderState,\n instantSearchInstance: instantSearchInstance,\n parent: _this\n });\n }\n });\n widgetsToRender.forEach(function(widget) {\n // At this point, all the variables used below are set. Both `helper`\n // and `derivedHelper` have been created at the `init` step. The attribute\n // `lastResults` might be `null` though. It's possible that a stalled render\n // happens before the result e.g with a dynamically added index the request might\n // be delayed. The render is triggered for the complete tree but some parts do\n // not have results yet.\n if (widget.render) {\n widget.render(createRenderArgs(instantSearchInstance, _this, widget));\n }\n });\n },\n dispose: function dispose() {\n var _this = this;\n localWidgets.forEach(function(widget) {\n if (widget.dispose && helper) {\n // The dispose function is always called once the instance is started\n // (it's an effect of `removeWidgets`). The index is initialized and\n // the Helper is available. We don't care about the return value of\n // `dispose` because the index is removed. We can't call `removeWidgets`\n // because we want to keep the widgets on the instance, to allow idempotent\n // operations on `add` & `remove`.\n widget.dispose({\n helper: helper,\n state: helper.state,\n recommendState: helper.recommendState,\n parent: _this\n });\n }\n });\n localInstantSearchInstance = null;\n localParent = null;\n helper === null || helper === void 0 ? void 0 : helper.removeAllListeners();\n helper = null;\n derivedHelper === null || derivedHelper === void 0 ? void 0 : derivedHelper.detach();\n derivedHelper = null;\n },\n getWidgetUiState: function getWidgetUiState(uiState) {\n return localWidgets.filter(isIndexWidget).filter(function(w) {\n return !w._isolated;\n }).reduce(function(previousUiState, innerIndex) {\n return innerIndex.getWidgetUiState(previousUiState);\n }, _$2(_$3({}, uiState), _({}, indexId, _$3({}, uiState[indexId], localUiState))));\n },\n getWidgetState: function getWidgetState(uiState) {\n return this.getWidgetUiState(uiState);\n },\n getWidgetSearchParameters: function getWidgetSearchParameters(searchParameters, param) {\n var uiState = param.uiState;\n return getLocalWidgetsSearchParameters(localWidgets, {\n uiState: uiState,\n initialSearchParameters: searchParameters\n });\n },\n shouldRender: function shouldRender() {\n return true;\n },\n refreshUiState: function refreshUiState() {\n localUiState = getLocalWidgetsUiState(localWidgets, {\n searchParameters: this.getHelper().state,\n helper: this.getHelper()\n }, localUiState);\n },\n setIndexUiState: function setIndexUiState(indexUiState) {\n var nextIndexUiState = typeof indexUiState === 'function' ? indexUiState(localUiState) : indexUiState;\n localInstantSearchInstance.setUiState(function(state) {\n return _$2(_$3({}, state), _({}, indexId, nextIndexUiState));\n });\n }\n };\n};\n/**\n * Walk up the parent chain to find the closest isolated index, or fall back to mainHelper\n */ function nearestIsolatedHelper(current, mainHelper) {\n while(current){\n if (current._isolated) {\n return current.getHelper();\n }\n current = current.getParent();\n }\n return mainHelper;\n}\n\nexport { index as default };\n"],"names":["withUsage","createDocumentationMessageGenerator","name","privateHelperSetState","helper","param","state","recommendState","isPageReset","_uiState","emit","results","lastResults","getLocalWidgetsUiState","widgets","widgetStateOptions","initialUiState","arguments","length","reduce","uiState","widget","isIndexWidget","getWidgetUiState","getWidgetState","getLocalWidgetsSearchParameters","widgetSearchParametersOptions","initialSearchParameters","rest","_$4","getWidgetSearchParameters","dependsOn","getWidgetParameters","getLocalWidgetsRecommendParameters","widgetRecommendParametersOptions","initialRecommendParameters","resetPageFromWidgets","indexWidgets","filter","forEach","widgetHelper","getHelper","resetPage","getWidgets","resolveScopedResultsFromWidgets","scopedResults","current","_scopedResults","concat","apply","indexId","getIndexId","getResults","_$1","widgetParams","undefined","indexName","EXPERIMENTAL_isolated","Error","_widgetParams_indexName","_widgetParams_indexId","tmp","isolated","localWidgets","localUiState","localInstantSearchInstance","localParent","derivedHelper","lastValidSearchParameters","hasRecommendWidget","hasSearchWidget","$$type","$$widgetType","_isolated","getIndexName","_state","getResultsForWidget","$$id","this","lastRecommendResults","getPreviousState","getScopedResults","widgetParent","getParent","createURL","nextState","_createURL","_","searchParameters","scheduleLocalSearch","defer","search","addWidgets","_this","Array","isArray","flatWidgets","acc","w","some","init","render","parent","_hasRecommendWidget","_hasSearchWidget","addWidgetId","Boolean","getRenderState","renderState","createInitArgs","_initialUiState","storeRenderState","instantSearchInstance","scheduleSearch","removeWidgets","dispose","indexOf","_flatWidgets_reduce","states","next","cleanedSearchState","cleanedRecommendState","_$5","algoliasearchHelper","RecommendParameters","newState","future","preserveSharedStateOnUnmount","SearchParameters","index","setState","_instantSearchInstance__initialResults","mainHelper","parameters","recommendParameters","getClient","status","compositionID","searchWithComposition","searchOnlyWithDerivedHelpers","onStateChange","mainIndex","setUiState","searchWithoutTriggeringOnStateChange","searchForFacetValues","facetName","facetValue","maxFacetHits","userState","mergeSearchParameters","resolveSearchParameters","setQueryParameters","isolatedHelper","derivingHelper","nearestIsolatedHelper","derive","indexInitialResults","_initialResults","SearchResults","recommendResults","RecommendResults","params","on","scheduleStalledRender","scheduleRender","recommend","event","onInternalStateChange","hasPendingRequests","widgetsToRender","shouldRender","createRenderArgs","removeAllListeners","detach","previousUiState","innerIndex","_$2","_$3","refreshUiState","setIndexUiState","indexUiState","nextIndexUiState"],"mappings":"8zBAeIA,EAAYC,EAAAA,oCAAoC,CAChDC,KAAM,iBAMN,SAASC,EAAsBC,EAAQC,GACvC,IAAIC,EAAQD,EAAMC,MAAOC,EAAiBF,EAAME,eAAgBC,EAAcH,EAAMG,YAAaC,EAAWJ,EAAMI,SAC9GH,IAAUF,EAAOE,QACjBF,EAAOE,MAAQA,EACfF,EAAOM,KAAK,SAAU,CAClBJ,MAAOF,EAAOE,MACdK,QAASP,EAAOQ,YAChBJ,YAAaA,EACbC,SAAUA,KAGdF,IAAmBH,EAAOG,iBAC1BH,EAAOG,eAAiBA,EAIhC,CACA,SAASM,EAAuBC,EAASC,GACrC,IAAIC,EAAiBC,UAAUC,OAAS,QAAsB,IAAjBD,UAAU,GAAgBA,UAAU,GAAK,CAAA,EACtF,OAAOH,EAAQK,OAAO,SAASC,EAASC,GACpC,OAAIC,EAAAA,cAAcD,GACPD,EAENC,EAAOE,kBAAqBF,EAAOG,eAGpCH,EAAOE,iBACAF,EAAOE,iBAAiBH,EAASL,GAErCM,EAAOG,eAAeJ,EAASL,GAL3BK,CAMf,EAAGJ,EACP,CACA,SAASS,EAAgCX,EAASY,GAC9C,IAAIC,EAA0BD,EAA8BC,wBAAyBC,EAAOC,EAAAA,EAAIH,EAA+B,CAC3H,4BAEJ,OAAOZ,EAAQK,OAAO,SAASb,EAAOe,GAClC,OAAKA,EAAOS,2BAA6BR,EAAAA,cAAcD,GAC5Cf,EAEc,WAArBe,EAAOU,WAA0BV,EAAOW,oBACjCX,EAAOW,oBAAoB1B,EAAOsB,GAEtCP,EAAOS,0BAA0BxB,EAAOsB,EACnD,EAAGD,EACP,CACA,SAASM,EAAmCnB,EAASoB,GACjD,IAAIC,EAA6BD,EAAiCC,2BAA4BP,EAAOC,EAAAA,EAAI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U,0BAA2B,SAAmC0D,EAAkBnF,GAC5E,IAAIe,EAAUf,EAAMe,QACpB,OAAOK,EAAgCsC,EAAc,CACjD3C,QAASA,EACTO,wBAAyB6D,GAEjC,EACAkF,aAAc,WACV,OAAO,CACX,EACAQ,eAAgB,WACZlH,EAAenD,EAAuBkD,EAAc,CAChDyB,iBAAkBV,KAAKrC,YAAYnC,MACnCF,OAAQ0E,KAAKrC,aACduB,EACP,EACAmH,gBAAiB,SAAyBC,GACtC,IAAIC,EAA2C,mBAAjBD,EAA8BA,EAAapH,GAAgBoH,EACzFnH,EAA2B6E,WAAW,SAASxI,GAC3C,OAAO0K,EAAAA,EAAIC,IAAI,CAAA,EAAI3K,GAAQiF,EAAAA,EAAE,CAAA,EAAIrC,EAASmI,GAC9C,EACJ,EAER","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("../../../../@swc/helpers/esm/_object_spread.js"),t=require("../../../../@swc/helpers/esm/_object_spread_props.js"),a=require("../../../../@swc/helpers/esm/_object_without_properties.js"),o=require("react"),n=require("../../../../instantsearch-ui-components/dist/es/lib/cx.js");function r(e){var t=e.classNames;return o.createElement("svg",{className:n.cx("ais-SearchBox-submitIcon",t.submitIcon),width:"10",height:"10",viewBox:"0 0 40 40","aria-hidden":"true"},o.createElement("path",{d:"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"}))}function
|
|
1
|
+
"use strict";var e=require("../../../../@swc/helpers/esm/_object_spread.js"),t=require("../../../../@swc/helpers/esm/_object_spread_props.js"),a=require("../../../../@swc/helpers/esm/_object_without_properties.js"),o=require("react"),n=require("../../../../instantsearch-ui-components/dist/es/lib/cx.js");function r(e){var t=e.classNames;return o.createElement("svg",{className:n.cx("ais-SearchBox-submitIcon",t.submitIcon),width:"10",height:"10",viewBox:"0 0 40 40","aria-hidden":"true"},o.createElement("path",{d:"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"}))}function l(e){var t=e.classNames;return o.createElement("svg",{className:n.cx("ais-SearchBox-resetIcon",t.resetIcon),viewBox:"0 0 20 20",width:"10",height:"10","aria-hidden":"true"},o.createElement("path",{d:"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"}))}function s(e){var t=e.classNames;return o.createElement("svg",{"aria-label":"Results are loading",width:"16",height:"16",viewBox:"0 0 38 38",stroke:"#444",className:n.cx("ais-SearchBox-loadingIcon",t.loadingIcon),"aria-hidden":"true"},o.createElement("g",{fill:"none",fillRule:"evenodd"},o.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},o.createElement("circle",{strokeOpacity:".5",cx:"18",cy:"18",r:"18"}),o.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},o.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function i(e){var t=e.classNames;return o.createElement("svg",{className:n.cx("ais-AiModeButton-icon",t.aiModeIcon),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",width:"16",height:"16","aria-hidden":"true"},o.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 1.875c.27 0 .51.173.594.43l1.593 4.844a1.043 1.043 0 0 0 .664.664l4.844 1.593a.625.625 0 0 1 0 1.188l-4.844 1.593a1.043 1.043 0 0 0-.664.664l-1.593 4.844a.625.625 0 0 1-1.188 0l-1.593-4.844a1.042 1.042 0 0 0-.664-.664l-4.844-1.593a.625.625 0 0 1 0-1.188l4.844-1.593a1.042 1.042 0 0 0 .664-.664l1.593-4.844a.625.625 0 0 1 .594-.43ZM9 7.539A2.292 2.292 0 0 1 7.54 9L4.5 10l3.04 1A2.292 2.292 0 0 1 9 12.46l1 3.04 1-3.04A2.293 2.293 0 0 1 12.46 11l3.04-1-3.04-1A2.292 2.292 0 0 1 11 7.54L10 4.5 9 7.54ZM4.167 1.875c.345 0 .625.28.625.625v3.333a.625.625 0 0 1-1.25 0V2.5c0-.345.28-.625.625-.625ZM15.833 13.542c.345 0 .625.28.625.625V17.5a.625.625 0 1 1-1.25 0v-3.333c0-.345.28-.625.625-.625Z",clipRule:"evenodd"}),o.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M1.875 4.167c0-.346.28-.625.625-.625h3.333a.625.625 0 1 1 0 1.25H2.5a.625.625 0 0 1-.625-.625ZM13.542 15.833c0-.345.28-.625.625-.625H17.5a.625.625 0 0 1 0 1.25h-3.333a.625.625 0 0 1-.625-.625Z",clipRule:"evenodd"}))}exports.SearchBox=function(c){var u=c.formRef,m=c.inputRef,d=c.inputProps,p=c.isSearchStalled,h=c.onChange,f=c.onReset,v=c.onSubmit,b=c.placeholder,x=void 0===b?"":b,g=c.value,B=c.autoFocus,E=c.resetIconComponent,N=void 0===E?l:E,C=c.submitIconComponent,M=void 0===C?r:C,I=c.loadingIconComponent,S=void 0===I?s:I,w=c.aiModeIconComponent,R=void 0===w?i:w,_=c.onAiModeClick,A=c.aiModeButtonDisabled,L=void 0!==A&&A,j=c.classNames,k=void 0===j?{}:j,y=c.translations,T=a._(c,["formRef","inputRef","inputProps","isSearchStalled","onChange","onReset","onSubmit","placeholder","value","autoFocus","resetIconComponent","submitIconComponent","loadingIconComponent","aiModeIconComponent","onAiModeClick","aiModeButtonDisabled","classNames","translations"]);return o.createElement("div",t._(e._({},T),{className:n.cx("ais-SearchBox",k.root,T.className)}),o.createElement("form",{ref:u,action:"",className:n.cx("ais-SearchBox-form",k.form),noValidate:!0,onSubmit:function(e){e.preventDefault(),e.stopPropagation(),v&&v(e),m.current&&m.current.blur()},onReset:function(e){e.preventDefault(),e.stopPropagation(),f(e),m.current&&m.current.focus()},role:"search"},o.createElement("input",t._(e._({},d),{ref:m,className:n.cx("ais-SearchBox-input",k.input,null==d?void 0:d.className),"aria-label":"Search",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",placeholder:x,spellCheck:!1,maxLength:512,type:"search",value:g,onChange:h,onCompositionEnd:h,autoFocus:B})),o.createElement("button",{className:n.cx("ais-SearchBox-submit",k.submit),type:"submit",title:y.submitButtonTitle,"aria-label":y.submitButtonTitle},o.createElement(M,{classNames:k})),o.createElement("button",{className:n.cx("ais-SearchBox-reset",k.reset),type:"reset",title:y.resetButtonTitle,"aria-label":y.resetButtonTitle,hidden:0===g.length||p},o.createElement(N,{classNames:k})),_&&o.createElement("button",{className:n.cx("ais-AiModeButton",k.aiModeButton),type:"button",title:y.aiModeButtonTitle||"AI Mode",disabled:L,onClick:function(e){e.preventDefault(),_()}},o.createElement(R,{classNames:k}),o.createElement("span",{className:"ais-AiModeButton-label"},y.aiModeButtonTitle||"AI Mode")),o.createElement("span",{className:n.cx("ais-SearchBox-loadingIndicator",k.loadingIndicator),hidden:!p},o.createElement(S,{classNames:k}))))};
|
|
2
2
|
//# sourceMappingURL=SearchBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBox.js","sources":["../../../../../../../node_modules/react-instantsearch/dist/es/ui/SearchBox.js"],"sourcesContent":["import { _ as _$2 } from '@swc/helpers/esm/_object_spread.js';\nimport { _ as _$1 } from '@swc/helpers/esm/_object_spread_props.js';\nimport { _ } from '@swc/helpers/esm/_object_without_properties.js';\nimport { cx } from 'instantsearch-ui-components';\nimport React from 'react';\n\nfunction DefaultSubmitIcon(param) {\n var classNames = param.classNames;\n return /*#__PURE__*/ React.createElement(\"svg\", {\n className: cx('ais-SearchBox-submitIcon', classNames.submitIcon),\n width: \"10\",\n height: \"10\",\n viewBox: \"0 0 40 40\",\n \"aria-hidden\": \"true\"\n }, /*#__PURE__*/ React.createElement(\"path\", {\n d: \"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z\"\n }));\n}\nfunction DefaultResetIcon(param) {\n var classNames = param.classNames;\n return /*#__PURE__*/ React.createElement(\"svg\", {\n className: cx('ais-SearchBox-resetIcon', classNames.resetIcon),\n viewBox: \"0 0 20 20\",\n width: \"10\",\n height: \"10\",\n \"aria-hidden\": \"true\"\n }, /*#__PURE__*/ React.createElement(\"path\", {\n d: \"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z\"\n }));\n}\nfunction DefaultLoadingIcon(param) {\n var classNames = param.classNames;\n return /*#__PURE__*/ React.createElement(\"svg\", {\n \"aria-label\": \"Results are loading\",\n width: \"16\",\n height: \"16\",\n viewBox: \"0 0 38 38\",\n stroke: \"#444\",\n className: cx('ais-SearchBox-loadingIcon', classNames.loadingIcon),\n \"aria-hidden\": \"true\"\n }, /*#__PURE__*/ React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n }, /*#__PURE__*/ React.createElement(\"g\", {\n transform: \"translate(1 1)\",\n strokeWidth: \"2\"\n }, /*#__PURE__*/ React.createElement(\"circle\", {\n strokeOpacity: \".5\",\n cx: \"18\",\n cy: \"18\",\n r: \"18\"\n }), /*#__PURE__*/ React.createElement(\"path\", {\n d: \"M36 18c0-9.94-8.06-18-18-18\"\n }, /*#__PURE__*/ React.createElement(\"animateTransform\", {\n attributeName: \"transform\",\n type: \"rotate\",\n from: \"0 18 18\",\n to: \"360 18 18\",\n dur: \"1s\",\n repeatCount: \"indefinite\"\n })))));\n}\nfunction DefaultAiModeIcon(param) {\n var classNames = param.classNames;\n return /*#__PURE__*/ React.createElement(\"svg\", {\n className: cx('ais-AiModeButton-icon', classNames.aiModeIcon),\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 20 20\",\n width: \"16\",\n height: \"16\",\n \"aria-hidden\": \"true\"\n }, /*#__PURE__*/ React.createElement(\"path\", {\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n d: \"M10 1.875c.27 0 .51.173.594.43l1.593 4.844a1.043 1.043 0 0 0 .664.664l4.844 1.593a.625.625 0 0 1 0 1.188l-4.844 1.593a1.043 1.043 0 0 0-.664.664l-1.593 4.844a.625.625 0 0 1-1.188 0l-1.593-4.844a1.042 1.042 0 0 0-.664-.664l-4.844-1.593a.625.625 0 0 1 0-1.188l4.844-1.593a1.042 1.042 0 0 0 .664-.664l1.593-4.844a.625.625 0 0 1 .594-.43ZM9 7.539A2.292 2.292 0 0 1 7.54 9L4.5 10l3.04 1A2.292 2.292 0 0 1 9 12.46l1 3.04 1-3.04A2.293 2.293 0 0 1 12.46 11l3.04-1-3.04-1A2.292 2.292 0 0 1 11 7.54L10 4.5 9 7.54ZM4.167 1.875c.345 0 .625.28.625.625v3.333a.625.625 0 0 1-1.25 0V2.5c0-.345.28-.625.625-.625ZM15.833 13.542c.345 0 .625.28.625.625V17.5a.625.625 0 1 1-1.25 0v-3.333c0-.345.28-.625.625-.625Z\",\n clipRule: \"evenodd\"\n }), /*#__PURE__*/ React.createElement(\"path\", {\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n d: \"M1.875 4.167c0-.346.28-.625.625-.625h3.333a.625.625 0 1 1 0 1.25H2.5a.625.625 0 0 1-.625-.625ZM13.542 15.833c0-.345.28-.625.625-.625H17.5a.625.625 0 0 1 0 1.25h-3.333a.625.625 0 0 1-.625-.625Z\",\n clipRule: \"evenodd\"\n }));\n}\nfunction SearchBox(_0) {\n var formRef = _0.formRef, inputRef = _0.inputRef, inputProps = _0.inputProps, isSearchStalled = _0.isSearchStalled, onChange = _0.onChange, onReset = _0.onReset, onSubmit = _0.onSubmit, _0_placeholder = _0.placeholder, placeholder = _0_placeholder === void 0 ? '' : _0_placeholder, value = _0.value, autoFocus = _0.autoFocus, tmp = _0.resetIconComponent, ResetIcon = tmp === void 0 ? DefaultResetIcon : tmp, tmp1 = _0.submitIconComponent, SubmitIcon = tmp1 === void 0 ? DefaultSubmitIcon : tmp1, tmp2 = _0.loadingIconComponent, LoadingIcon = tmp2 === void 0 ? DefaultLoadingIcon : tmp2, tmp3 = _0.aiModeIconComponent, AiModeIcon = tmp3 === void 0 ? DefaultAiModeIcon : tmp3, onAiModeClick = _0.onAiModeClick, _0_aiModeButtonDisabled = _0.aiModeButtonDisabled, aiModeButtonDisabled = _0_aiModeButtonDisabled === void 0 ? false : _0_aiModeButtonDisabled, _0_classNames = _0.classNames, classNames = _0_classNames === void 0 ? {} : _0_classNames, translations = _0.translations, props = _(_0, [\n \"formRef\",\n \"inputRef\",\n \"inputProps\",\n \"isSearchStalled\",\n \"onChange\",\n \"onReset\",\n \"onSubmit\",\n \"placeholder\",\n \"value\",\n \"autoFocus\",\n \"resetIconComponent\",\n \"submitIconComponent\",\n \"loadingIconComponent\",\n \"aiModeIconComponent\",\n \"onAiModeClick\",\n \"aiModeButtonDisabled\",\n \"classNames\",\n \"translations\"\n ]);\n function handleSubmit(event) {\n event.preventDefault();\n event.stopPropagation();\n if (onSubmit) {\n onSubmit(event);\n }\n if (inputRef.current) {\n inputRef.current.blur();\n }\n }\n function handleReset(event) {\n event.preventDefault();\n event.stopPropagation();\n onReset(event);\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }\n return /*#__PURE__*/ React.createElement(\"div\", _$1(_$2({}, props), {\n className: cx('ais-SearchBox', classNames.root, props.className)\n }), /*#__PURE__*/ React.createElement(\"form\", {\n ref: formRef,\n action: \"\",\n className: cx('ais-SearchBox-form', classNames.form),\n noValidate: true,\n onSubmit: handleSubmit,\n onReset: handleReset,\n role: \"search\"\n }, /*#__PURE__*/ React.createElement(\"input\", _$1(_$2({}, inputProps), {\n ref: inputRef,\n className: cx('ais-SearchBox-input', classNames.input, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className),\n \"aria-label\": \"Search\",\n autoComplete: \"off\",\n autoCorrect: \"off\",\n autoCapitalize: \"off\",\n placeholder: placeholder,\n spellCheck: false,\n maxLength: 512,\n type: \"search\",\n value: value,\n onChange: onChange,\n onCompositionEnd: onChange,\n autoFocus: autoFocus\n })), /*#__PURE__*/ React.createElement(\"button\", {\n className: cx('ais-SearchBox-submit', classNames.submit),\n type: \"submit\",\n title: translations.submitButtonTitle\n }, /*#__PURE__*/ React.createElement(SubmitIcon, {\n classNames: classNames\n })), /*#__PURE__*/ React.createElement(\"button\", {\n className: cx('ais-SearchBox-reset', classNames.reset),\n type: \"reset\",\n title: translations.resetButtonTitle,\n hidden: value.length === 0 || isSearchStalled\n }, /*#__PURE__*/ React.createElement(ResetIcon, {\n classNames: classNames\n })), onAiModeClick && /*#__PURE__*/ React.createElement(\"button\", {\n className: cx('ais-AiModeButton', classNames.aiModeButton),\n type: \"button\",\n title: translations.aiModeButtonTitle || 'AI Mode',\n disabled: aiModeButtonDisabled,\n onClick: function onClick(e) {\n e.preventDefault();\n onAiModeClick();\n }\n }, /*#__PURE__*/ React.createElement(AiModeIcon, {\n classNames: classNames\n }), /*#__PURE__*/ React.createElement(\"span\", {\n className: \"ais-AiModeButton-label\"\n }, translations.aiModeButtonTitle || 'AI Mode')), /*#__PURE__*/ React.createElement(\"span\", {\n className: cx('ais-SearchBox-loadingIndicator', classNames.loadingIndicator),\n hidden: !isSearchStalled\n }, /*#__PURE__*/ React.createElement(LoadingIcon, {\n classNames: classNames\n }))));\n}\n\nexport { SearchBox };\n"],"names":["DefaultSubmitIcon","param","classNames","React","createElement","className","cx","submitIcon","width","height","viewBox","d","DefaultResetIcon","resetIcon","DefaultLoadingIcon","stroke","loadingIcon","fill","fillRule","transform","strokeWidth","strokeOpacity","cy","r","attributeName","type","from","to","dur","repeatCount","DefaultAiModeIcon","aiModeIcon","xmlns","clipRule","_0","formRef","inputRef","inputProps","isSearchStalled","onChange","onReset","onSubmit","_0_placeholder","placeholder","value","autoFocus","tmp","resetIconComponent","ResetIcon","tmp1","submitIconComponent","SubmitIcon","tmp2","loadingIconComponent","LoadingIcon","tmp3","aiModeIconComponent","AiModeIcon","onAiModeClick","_0_aiModeButtonDisabled","aiModeButtonDisabled","_0_classNames","translations","props","_","_$1","_$2","root","ref","action","form","noValidate","event","preventDefault","stopPropagation","current","blur","focus","role","input","autoComplete","autoCorrect","autoCapitalize","spellCheck","maxLength","onCompositionEnd","submit","title","submitButtonTitle","reset","resetButtonTitle","hidden","length","aiModeButton","aiModeButtonTitle","disabled","onClick","e","loadingIndicator"],"mappings":"iTAMA,SAASA,EAAkBC,GACvB,IAAIC,EAAaD,EAAMC,WACvB,OAAqBC,EAAMC,cAAc,MAAO,CAC5CC,UAAWC,EAAAA,GAAG,2BAA4BJ,EAAWK,YACrDC,MAAO,K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CAC9CpD,WAAYA,MAEpB","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"SearchBox.js","sources":["../../../../../../../node_modules/react-instantsearch/dist/es/ui/SearchBox.js"],"sourcesContent":["import { _ as _$2 } from '@swc/helpers/esm/_object_spread.js';\nimport { _ as _$1 } from '@swc/helpers/esm/_object_spread_props.js';\nimport { _ } from '@swc/helpers/esm/_object_without_properties.js';\nimport { cx } from 'instantsearch-ui-components';\nimport React from 'react';\n\nfunction DefaultSubmitIcon(param) {\n var classNames = param.classNames;\n return /*#__PURE__*/ React.createElement(\"svg\", {\n className: cx('ais-SearchBox-submitIcon', classNames.submitIcon),\n width: \"10\",\n height: \"10\",\n viewBox: \"0 0 40 40\",\n \"aria-hidden\": \"true\"\n }, /*#__PURE__*/ React.createElement(\"path\", {\n d: \"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z\"\n }));\n}\nfunction DefaultResetIcon(param) {\n var classNames = param.classNames;\n return /*#__PURE__*/ React.createElement(\"svg\", {\n className: cx('ais-SearchBox-resetIcon', classNames.resetIcon),\n viewBox: \"0 0 20 20\",\n width: \"10\",\n height: \"10\",\n \"aria-hidden\": \"true\"\n }, /*#__PURE__*/ React.createElement(\"path\", {\n d: \"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z\"\n }));\n}\nfunction DefaultLoadingIcon(param) {\n var classNames = param.classNames;\n return /*#__PURE__*/ React.createElement(\"svg\", {\n \"aria-label\": \"Results are loading\",\n width: \"16\",\n height: \"16\",\n viewBox: \"0 0 38 38\",\n stroke: \"#444\",\n className: cx('ais-SearchBox-loadingIcon', classNames.loadingIcon),\n \"aria-hidden\": \"true\"\n }, /*#__PURE__*/ React.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n }, /*#__PURE__*/ React.createElement(\"g\", {\n transform: \"translate(1 1)\",\n strokeWidth: \"2\"\n }, /*#__PURE__*/ React.createElement(\"circle\", {\n strokeOpacity: \".5\",\n cx: \"18\",\n cy: \"18\",\n r: \"18\"\n }), /*#__PURE__*/ React.createElement(\"path\", {\n d: \"M36 18c0-9.94-8.06-18-18-18\"\n }, /*#__PURE__*/ React.createElement(\"animateTransform\", {\n attributeName: \"transform\",\n type: \"rotate\",\n from: \"0 18 18\",\n to: \"360 18 18\",\n dur: \"1s\",\n repeatCount: \"indefinite\"\n })))));\n}\nfunction DefaultAiModeIcon(param) {\n var classNames = param.classNames;\n return /*#__PURE__*/ React.createElement(\"svg\", {\n className: cx('ais-AiModeButton-icon', classNames.aiModeIcon),\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 20 20\",\n width: \"16\",\n height: \"16\",\n \"aria-hidden\": \"true\"\n }, /*#__PURE__*/ React.createElement(\"path\", {\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n d: \"M10 1.875c.27 0 .51.173.594.43l1.593 4.844a1.043 1.043 0 0 0 .664.664l4.844 1.593a.625.625 0 0 1 0 1.188l-4.844 1.593a1.043 1.043 0 0 0-.664.664l-1.593 4.844a.625.625 0 0 1-1.188 0l-1.593-4.844a1.042 1.042 0 0 0-.664-.664l-4.844-1.593a.625.625 0 0 1 0-1.188l4.844-1.593a1.042 1.042 0 0 0 .664-.664l1.593-4.844a.625.625 0 0 1 .594-.43ZM9 7.539A2.292 2.292 0 0 1 7.54 9L4.5 10l3.04 1A2.292 2.292 0 0 1 9 12.46l1 3.04 1-3.04A2.293 2.293 0 0 1 12.46 11l3.04-1-3.04-1A2.292 2.292 0 0 1 11 7.54L10 4.5 9 7.54ZM4.167 1.875c.345 0 .625.28.625.625v3.333a.625.625 0 0 1-1.25 0V2.5c0-.345.28-.625.625-.625ZM15.833 13.542c.345 0 .625.28.625.625V17.5a.625.625 0 1 1-1.25 0v-3.333c0-.345.28-.625.625-.625Z\",\n clipRule: \"evenodd\"\n }), /*#__PURE__*/ React.createElement(\"path\", {\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n d: \"M1.875 4.167c0-.346.28-.625.625-.625h3.333a.625.625 0 1 1 0 1.25H2.5a.625.625 0 0 1-.625-.625ZM13.542 15.833c0-.345.28-.625.625-.625H17.5a.625.625 0 0 1 0 1.25h-3.333a.625.625 0 0 1-.625-.625Z\",\n clipRule: \"evenodd\"\n }));\n}\nfunction SearchBox(_0) {\n var formRef = _0.formRef, inputRef = _0.inputRef, inputProps = _0.inputProps, isSearchStalled = _0.isSearchStalled, onChange = _0.onChange, onReset = _0.onReset, onSubmit = _0.onSubmit, _0_placeholder = _0.placeholder, placeholder = _0_placeholder === void 0 ? '' : _0_placeholder, value = _0.value, autoFocus = _0.autoFocus, tmp = _0.resetIconComponent, ResetIcon = tmp === void 0 ? DefaultResetIcon : tmp, tmp1 = _0.submitIconComponent, SubmitIcon = tmp1 === void 0 ? DefaultSubmitIcon : tmp1, tmp2 = _0.loadingIconComponent, LoadingIcon = tmp2 === void 0 ? DefaultLoadingIcon : tmp2, tmp3 = _0.aiModeIconComponent, AiModeIcon = tmp3 === void 0 ? DefaultAiModeIcon : tmp3, onAiModeClick = _0.onAiModeClick, _0_aiModeButtonDisabled = _0.aiModeButtonDisabled, aiModeButtonDisabled = _0_aiModeButtonDisabled === void 0 ? false : _0_aiModeButtonDisabled, _0_classNames = _0.classNames, classNames = _0_classNames === void 0 ? {} : _0_classNames, translations = _0.translations, props = _(_0, [\n \"formRef\",\n \"inputRef\",\n \"inputProps\",\n \"isSearchStalled\",\n \"onChange\",\n \"onReset\",\n \"onSubmit\",\n \"placeholder\",\n \"value\",\n \"autoFocus\",\n \"resetIconComponent\",\n \"submitIconComponent\",\n \"loadingIconComponent\",\n \"aiModeIconComponent\",\n \"onAiModeClick\",\n \"aiModeButtonDisabled\",\n \"classNames\",\n \"translations\"\n ]);\n function handleSubmit(event) {\n event.preventDefault();\n event.stopPropagation();\n if (onSubmit) {\n onSubmit(event);\n }\n if (inputRef.current) {\n inputRef.current.blur();\n }\n }\n function handleReset(event) {\n event.preventDefault();\n event.stopPropagation();\n onReset(event);\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }\n return /*#__PURE__*/ React.createElement(\"div\", _$1(_$2({}, props), {\n className: cx('ais-SearchBox', classNames.root, props.className)\n }), /*#__PURE__*/ React.createElement(\"form\", {\n ref: formRef,\n action: \"\",\n className: cx('ais-SearchBox-form', classNames.form),\n noValidate: true,\n onSubmit: handleSubmit,\n onReset: handleReset,\n role: \"search\"\n }, /*#__PURE__*/ React.createElement(\"input\", _$1(_$2({}, inputProps), {\n ref: inputRef,\n className: cx('ais-SearchBox-input', classNames.input, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className),\n \"aria-label\": \"Search\",\n autoComplete: \"off\",\n autoCorrect: \"off\",\n autoCapitalize: \"off\",\n placeholder: placeholder,\n spellCheck: false,\n maxLength: 512,\n type: \"search\",\n value: value,\n onChange: onChange,\n onCompositionEnd: onChange,\n autoFocus: autoFocus\n })), /*#__PURE__*/ React.createElement(\"button\", {\n className: cx('ais-SearchBox-submit', classNames.submit),\n type: \"submit\",\n title: translations.submitButtonTitle,\n \"aria-label\": translations.submitButtonTitle\n }, /*#__PURE__*/ React.createElement(SubmitIcon, {\n classNames: classNames\n })), /*#__PURE__*/ React.createElement(\"button\", {\n className: cx('ais-SearchBox-reset', classNames.reset),\n type: \"reset\",\n title: translations.resetButtonTitle,\n \"aria-label\": translations.resetButtonTitle,\n hidden: value.length === 0 || isSearchStalled\n }, /*#__PURE__*/ React.createElement(ResetIcon, {\n classNames: classNames\n })), onAiModeClick && /*#__PURE__*/ React.createElement(\"button\", {\n className: cx('ais-AiModeButton', classNames.aiModeButton),\n type: \"button\",\n title: translations.aiModeButtonTitle || 'AI Mode',\n disabled: aiModeButtonDisabled,\n onClick: function onClick(e) {\n e.preventDefault();\n onAiModeClick();\n }\n }, /*#__PURE__*/ React.createElement(AiModeIcon, {\n classNames: classNames\n }), /*#__PURE__*/ React.createElement(\"span\", {\n className: \"ais-AiModeButton-label\"\n }, translations.aiModeButtonTitle || 'AI Mode')), /*#__PURE__*/ React.createElement(\"span\", {\n className: cx('ais-SearchBox-loadingIndicator', classNames.loadingIndicator),\n hidden: !isSearchStalled\n }, /*#__PURE__*/ React.createElement(LoadingIcon, {\n classNames: classNames\n }))));\n}\n\nexport { SearchBox };\n"],"names":["DefaultSubmitIcon","param","classNames","React","createElement","className","cx","submitIcon","width","height","viewBox","d","DefaultResetIcon","resetIcon","DefaultLoadingIcon","stroke","loadingIcon","fill","fillRule","transform","strokeWidth","strokeOpacity","cy","r","attributeName","type","from","to","dur","repeatCount","DefaultAiModeIcon","aiModeIcon","xmlns","clipRule","_0","formRef","inputRef","inputProps","isSearchStalled","onChange","onReset","onSubmit","_0_placeholder","placeholder","value","autoFocus","tmp","resetIconComponent","ResetIcon","tmp1","submitIconComponent","SubmitIcon","tmp2","loadingIconComponent","LoadingIcon","tmp3","aiModeIconComponent","AiModeIcon","onAiModeClick","_0_aiModeButtonDisabled","aiModeButtonDisabled","_0_classNames","translations","props","_","_$1","_$2","root","ref","action","form","noValidate","event","preventDefault","stopPropagation","current","blur","focus","role","input","autoComplete","autoCorrect","autoCapitalize","spellCheck","maxLength","onCompositionEnd","submit","title","submitButtonTitle","reset","resetButtonTitle","hidden","length","aiModeButton","aiModeButtonTitle","disabled","onClick","e","loadingIndicator"],"mappings":"iTAMA,SAASA,EAAkBC,GACvB,IAAIC,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CAC1CC,UAAW,0BACZyD,EAAagC,mBAAqB,YAA2B3F,EAAMC,cAAc,OAAQ,CACxFC,UAAWC,EAAAA,GAAG,iCAAkCJ,EAAWgG,kBAC3DP,QAASrD,GACInC,EAAMC,cAAckD,EAAa,CAC9CpD,WAAYA,MAEpB","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.default="7.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.default="7.39.0";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../../../../node_modules/react-instantsearch-core/dist/es/version.js"],"sourcesContent":["var version = '7.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../../../../node_modules/react-instantsearch-core/dist/es/version.js"],"sourcesContent":["var version = '7.39.0';\n\nexport { version as default };\n"],"names":[],"mappings":"oFAAc","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";class t{constructor(t){this.config={baseURL:""},this.getConfig=()=>this.config,this.getBaseUrl=()=>{var t,i;return null!==(i=null===(t=this.config)||void 0===t?void 0:t.baseURL)&&void 0!==i?i:""},this.config=t}}t.getInstance=()=>t.instance,t.create=i=>{t.instance=new t(i)},exports.CartPropConfig=t;
|
|
2
|
+
//# sourceMappingURL=CartPropConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartPropConfig.js","sources":["../../../../src/services/CartPropConfig.ts"],"sourcesContent":[null],"names":["CartPropConfig","constructor","p_config","this","config","baseURL","getConfig","getBaseUrl","_b","_a","getInstance","instance","create"],"mappings":"mBAGaA,EAOT,WAAAC,CAAoBC,GAJpBC,KAAAC,OAA6B,CACzBC,QAAS,IAMbF,KAAAG,UAAY,IACDH,KAAKC,OAGhBD,KAAAI,WAAa,aACT,OAA2B,QAApBC,EAAW,UAAXL,KAAKC,cAAM,IAAAK,OAAA,EAAAA,EAAEJ,eAAO,IAAAG,EAAAA,EAAG,IAP9BL,KAAKC,OAASF,CAClB,EAScF,EAAAU,YAAc,IACjBV,EAAeW,SAEZX,EAAAY,OAAUV,IACpBF,EAAeW,SAAW,IAAIX,EAAeE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var r=require("@sunrise-upc/ajax-lib"),e=require("./CartPropConfig.js"),t=require("./APIResourceConstants.js"),n=require("uuid"),i=require("./api-constants.js");exports.getCartMiniSummary=a=>{var s;const o=null===(s=null===e.CartPropConfig||void 0===e.CartPropConfig?void 0:e.CartPropConfig.getInstance())||void 0===s?void 0:s.getBaseUrl(),u={params:{cartId:a},headers:{"x-sunrise-channel":t.apiResConstants.X_SUN_CHAL,"x-correlation-id":n.v4()}};try{const e=`${o}${i.API_BASE_BASEPOINT.MINI_SUMMARY}`;return r.ApiServiceV2.getApiServiceInstance().get(e,u).then(r=>200===(null==r?void 0:r.status)?null==r?void 0:r.data:null).catch(r=>{throw null==r?void 0:r.response})}catch(r){return r}};
|
|
2
|
+
//# sourceMappingURL=CartService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartService.js","sources":["../../../../src/services/CartService.ts"],"sourcesContent":[null],"names":["cartId","endPoint","_a","CartPropConfig","getInstance","getBaseUrl","options","params","headers","apiResConstants","X_SUN_CHAL","generateUID","URL","API_BASE_BASEPOINT","MINI_SUMMARY","ApiServiceV2","getApiServiceInstance","get","then","res","status","data","catch","err","response","error"],"mappings":"yMAMmCA,UACjC,MAAMC,EAAwC,QAA7BC,SAAAC,EAAAA,qBAAc,IAAdA,EAAAA,oBAAc,EAAdA,EAAAA,eAAgBC,qBAAa,IAAAF,OAAA,EAAAA,EAAEG,aAC1CC,EAAU,CACdC,OAAQ,CAAEP,UACVQ,QAAS,CACP,oBAAqBC,EAAAA,gBAAgBC,WACrC,mBAAoBC,EAAAA,OAIxB,IACE,MAAMC,EAAM,GAAGX,IAAWY,EAAAA,mBAAmBC,eAC7C,OAAOC,EAAAA,aAAaC,wBACjBC,IAAIL,EAAKN,GACTY,KAAMC,GACe,OAAhBA,aAAG,EAAHA,EAAKC,QACAD,eAAAA,EAAKE,KAEP,MAERC,MAAOC,IACN,MAAMA,eAAAA,EAAKC,UAEjB,CAAE,MAAOC,GACP,OAAOA,CACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";exports.API_BASE_BASEPOINT={ADDR_SUGG:"address-suggestion",CATELOG_MGMT:"catalogue-management",STORYBLOK:"storyblok-management",CUSTOMER:"customer-management"};
|
|
1
|
+
"use strict";exports.API_BASE_BASEPOINT={ADDR_SUGG:"address-suggestion",CATELOG_MGMT:"catalogue-management",STORYBLOK:"storyblok-management",CUSTOMER:"customer-management",MINI_SUMMARY:"carts/v3/mini-summary"};
|
|
2
2
|
//# sourceMappingURL=api-constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-constants.js","sources":["../../../../src/services/api-constants.ts"],"sourcesContent":[null],"names":["ADDR_SUGG","CATELOG_MGMT","STORYBLOK","CUSTOMER"],"mappings":"wCAAuC,CACnCA,UAAW,qBACXC,aAAc,uBACdC,UAAW,uBACXC,SAAU"}
|
|
1
|
+
{"version":3,"file":"api-constants.js","sources":["../../../../src/services/api-constants.ts"],"sourcesContent":[null],"names":["ADDR_SUGG","CATELOG_MGMT","STORYBLOK","CUSTOMER","MINI_SUMMARY"],"mappings":"wCAAuC,CACnCA,UAAW,qBACXC,aAAc,uBACdC,UAAW,uBACXC,SAAU,sBACVC,aAAc"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";exports.countZero=e=>{e=Number(e);let r=0;return r=new RegExp("^[0-9][^.]*$").test(e.toString())?e+".-":e.toFixed(2).replace(/\.00$/,""),r},exports.replacePlaceholderv2=(e,r)=>{let t=0;return null==e?void 0:e.replace(/{\d+}/gi,()=>(t++,r[t-1]?r[t-1]:""))};
|
|
2
|
+
//# sourceMappingURL=utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.js","sources":["../../../../src/utils/utilities.ts"],"sourcesContent":[null],"names":["value","Number","price","RegExp","test","toString","toFixed","replace","source","params","i"],"mappings":"+BAA0BA,IACxBA,EAAQC,OAAOD,GACf,IAAIE,EAAa,EAQjB,OAJEA,EAFqB,IAAIC,OADf,gBAC2BC,KAAKJ,EAAMK,YAExCL,EAAQ,KAERA,EAAMM,QAAQ,GAAGC,QAAQ,QAAS,IAErCL,gCAI2B,CAACM,EAAgBC,KACnD,IAAIC,EAAI,EAKR,OAJaF,aAAM,EAANA,EAAQD,QAAQ,UAAW,KACtCG,IACOD,EAAOC,EAAI,GAAKD,EAAOC,EAAI,GAAK"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e="center",t="left",r="right",
|
|
1
|
+
const e="center",t="left",r="right",c="transparent",o="00",a="#da291c",n="clicked",s="after",f="before",l="#ffffff",h="h1",g="h2",i="h3",m="h4",u="extra",p="semiextra",d="none",x=1439,k=1023,P=767,b="stack",v="col-lg-6",A="col-lg-4",G="col-lg-3",I="en",T="sunriseAuth",j=768,q=1024,w=1440,y="img",z="icon",B="svg",C="auth-stamp",D="PreToPost",E="customerGroup",F="one-commerce-cartId";export{s as AFTER,T as AUTHCOOKIE,C as AUTHSTAMP,f as BEFORE,F as CART_COOKIE,e as CENTER,G as COLLG3,A as COLLG4,v as COLLG6,l as COLORWHITE,E as CUSTOMER_GROUP_STORAGE_KEY,I as DEFAULTLOCALE,u as EXTRA,n as FALCONBUTTONCLICKED,h as H1,g as H2,i as H3,m as H4,z as ICON,y as IMG,t as LEFT,w as LGDESKSTART,x as MDDESKEND,q as MDDESKSTART,P as MOBEND,d as NONE,D as PRE_TO_POST_PROMOTION_ID,a as PRIMARYCOLORS,r as RIGHT,p as SEMIEXTRA,b as STACK,B as SVG,k as TABEND,j as TABSTART,c as TRANSPARENT,o as ZEROES};
|
|
2
2
|
//# sourceMappingURL=Constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.js","sources":["../../../../src/components/Constants.ts"],"sourcesContent":[null],"names":["CENTER","LEFT","RIGHT","TRANSPARENT","ZEROES","PRIMARYCOLORS","FALCONBUTTONCLICKED","AFTER","BEFORE","COLORWHITE","H1","H2","H3","H4","EXTRA","SEMIEXTRA","NONE","MDDESKEND","TABEND","MOBEND","STACK","COLLG6","COLLG4","COLLG3","DEFAULTLOCALE","AUTHCOOKIE","TABSTART","MDDESKSTART","LGDESKSTART","IMG","ICON","SVG","AUTHSTAMP","PRE_TO_POST_PROMOTION_ID","CUSTOMER_GROUP_STORAGE_KEY"],"mappings":"AAAO,MAAMA,EAAS,SACTC,EAAO,OACPC,EAAQ,QACRC,EAAc,cACdC,EAAS,KACTC,EAAgB,UAChBC,EAAsB,UACtBC,EAAQ,QACRC,EAAS,SAETC,EAAa,UACbC,EAAK,KACLC,EAAK,KACLC,EAAK,KACLC,EAAK,KACLC,EAAQ,QACRC,EAAY,YACZC,EAAM,OAENC,EAAY,KACZC,EAAS,KACTC,EAAS,IACTC,EAAQ,QACRC,EAAS,WACTC,EAAS,WACTC,EAAS,WAWTC,EAAgB,KAChBC,EAAa,cAcbC,EAAW,IACXC,EAAc,KACdC,EAAc,KAgCdC,EAAM,MACNC,EAAO,OACPC,EAAM,MA0DNC,EAAY,aAWZC,EAA2B,YAG3BC,EAA6B"}
|
|
1
|
+
{"version":3,"file":"Constants.js","sources":["../../../../src/components/Constants.ts"],"sourcesContent":[null],"names":["CENTER","LEFT","RIGHT","TRANSPARENT","ZEROES","PRIMARYCOLORS","FALCONBUTTONCLICKED","AFTER","BEFORE","COLORWHITE","H1","H2","H3","H4","EXTRA","SEMIEXTRA","NONE","MDDESKEND","TABEND","MOBEND","STACK","COLLG6","COLLG4","COLLG3","DEFAULTLOCALE","AUTHCOOKIE","TABSTART","MDDESKSTART","LGDESKSTART","IMG","ICON","SVG","AUTHSTAMP","PRE_TO_POST_PROMOTION_ID","CUSTOMER_GROUP_STORAGE_KEY","CART_COOKIE"],"mappings":"AAAO,MAAMA,EAAS,SACTC,EAAO,OACPC,EAAQ,QACRC,EAAc,cACdC,EAAS,KACTC,EAAgB,UAChBC,EAAsB,UACtBC,EAAQ,QACRC,EAAS,SAETC,EAAa,UACbC,EAAK,KACLC,EAAK,KACLC,EAAK,KACLC,EAAK,KACLC,EAAQ,QACRC,EAAY,YACZC,EAAM,OAENC,EAAY,KACZC,EAAS,KACTC,EAAS,IACTC,EAAQ,QACRC,EAAS,WACTC,EAAS,WACTC,EAAS,WAWTC,EAAgB,KAChBC,EAAa,cAcbC,EAAW,IACXC,EAAc,KACdC,EAAc,KAgCdC,EAAM,MACNC,EAAO,OACPC,EAAM,MA0DNC,EAAY,aAWZC,EAA2B,YAG3BC,EAA6B,gBAC7BC,EAAc"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* center a block element */
|
|
2
|
+
/* use this to any of the pseudo elements as these are the mandatory properties */
|
|
3
|
+
/* setting styles in separate formats for cross browser support */
|
|
4
|
+
/* specify the max width for an element and apply ellipses and truncate the overflow */
|
|
5
|
+
/* vertically center alilgn any HTML element */
|
|
6
|
+
/* add basePath to assets */
|
|
7
|
+
@keyframes CartDotLoader-module__dotBounce___Gv8-6 {
|
|
8
|
+
0%, 80%, 100% {
|
|
9
|
+
transform: translateY(0);
|
|
10
|
+
}
|
|
11
|
+
40% {
|
|
12
|
+
transform: translateY(-10px);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
.CartDotLoader-module__loaderWrapper___PmIHe {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
gap: 20px;
|
|
21
|
+
height: 100%;
|
|
22
|
+
min-height: 200px;
|
|
23
|
+
padding: 40px 24px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.CartDotLoader-module__dots___OiUF- {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: 8px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.CartDotLoader-module__dot___RsJtn {
|
|
33
|
+
display: block;
|
|
34
|
+
width: 12px;
|
|
35
|
+
height: 12px;
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
background-color: #da291c;
|
|
38
|
+
animation: CartDotLoader-module__dotBounce___Gv8-6 1.2s ease-in-out infinite;
|
|
39
|
+
}
|
|
40
|
+
.CartDotLoader-module__dot___RsJtn:nth-child(1) {
|
|
41
|
+
animation-delay: 0s;
|
|
42
|
+
}
|
|
43
|
+
.CartDotLoader-module__dot___RsJtn:nth-child(2) {
|
|
44
|
+
animation-delay: 0.2s;
|
|
45
|
+
}
|
|
46
|
+
.CartDotLoader-module__dot___RsJtn:nth-child(3) {
|
|
47
|
+
animation-delay: 0.4s;
|
|
48
|
+
}
|
|
49
|
+
.CartDotLoader-module__dot___RsJtn:nth-child(4) {
|
|
50
|
+
animation-delay: 0.6s;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.CartDotLoader-module__loaderText___7uOK9 {
|
|
54
|
+
font-size: 16px;
|
|
55
|
+
line-height: 24px;
|
|
56
|
+
font-weight: 700;
|
|
57
|
+
color: #3d3935;
|
|
58
|
+
margin: 0;
|
|
59
|
+
text-align: center;
|
|
60
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import './CartDotLoader.css';
|
|
2
|
+
import{jsxs as a,jsx as s}from"react/jsx-runtime";import e from"./CartDotLoader.module.scss.js";const o=({loadingMsg:o})=>a("output",{className:e.loaderWrapper,"aria-label":o,children:[a("div",{className:e.dots,children:[s("span",{className:e.dot}),s("span",{className:e.dot}),s("span",{className:e.dot}),s("span",{className:e.dot})]}),o&&s("p",{className:e.loaderText,children:o})]});export{o as default};
|
|
3
|
+
//# sourceMappingURL=CartDotLoader.js.map
|
package/dist/esm/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartDotLoader.js","sources":["../../../../../../../src/components/FalconMainNavigation/CartOverlay/CartDotLoader/CartDotLoader.tsx"],"sourcesContent":[null],"names":["CartDotLoader","loadingMsg","_jsxs","className","styles","loaderWrapper","children","dots","_jsx","dot","loaderText"],"mappings":"gGAMA,MAAMA,EAAgB,EAAGC,gBAErBC,EAAA,SAAA,CAAQC,UAAWC,EAAOC,cAAa,aAAcJ,EAAUK,SAAA,CAC7DJ,EAAA,MAAA,CAAKC,UAAWC,EAAOG,KAAID,SAAA,CACzBE,EAAA,OAAA,CAAML,UAAWC,EAAOK,MACxBD,EAAA,OAAA,CAAML,UAAWC,EAAOK,MACxBD,EAAA,OAAA,CAAML,UAAWC,EAAOK,MACxBD,EAAA,OAAA,CAAML,UAAWC,EAAOK,SAEzBR,GAAcO,EAAA,IAAA,CAAGL,UAAWC,EAAOM,WAAUJ,SAAGL"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* center a block element */
|
|
2
|
+
/* use this to any of the pseudo elements as these are the mandatory properties */
|
|
3
|
+
/* setting styles in separate formats for cross browser support */
|
|
4
|
+
/* specify the max width for an element and apply ellipses and truncate the overflow */
|
|
5
|
+
/* vertically center alilgn any HTML element */
|
|
6
|
+
/* add basePath to assets */
|
|
7
|
+
@keyframes CartDotLoader-module__dotBounce___Gv8-6 {
|
|
8
|
+
0%, 80%, 100% {
|
|
9
|
+
transform: translateY(0);
|
|
10
|
+
}
|
|
11
|
+
40% {
|
|
12
|
+
transform: translateY(-10px);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
.CartDotLoader-module__loaderWrapper___PmIHe {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
gap: 20px;
|
|
21
|
+
height: 100%;
|
|
22
|
+
min-height: 200px;
|
|
23
|
+
padding: 40px 24px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.CartDotLoader-module__dots___OiUF- {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: 8px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.CartDotLoader-module__dot___RsJtn {
|
|
33
|
+
display: block;
|
|
34
|
+
width: 12px;
|
|
35
|
+
height: 12px;
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
background-color: #da291c;
|
|
38
|
+
animation: CartDotLoader-module__dotBounce___Gv8-6 1.2s ease-in-out infinite;
|
|
39
|
+
}
|
|
40
|
+
.CartDotLoader-module__dot___RsJtn:nth-child(1) {
|
|
41
|
+
animation-delay: 0s;
|
|
42
|
+
}
|
|
43
|
+
.CartDotLoader-module__dot___RsJtn:nth-child(2) {
|
|
44
|
+
animation-delay: 0.2s;
|
|
45
|
+
}
|
|
46
|
+
.CartDotLoader-module__dot___RsJtn:nth-child(3) {
|
|
47
|
+
animation-delay: 0.4s;
|
|
48
|
+
}
|
|
49
|
+
.CartDotLoader-module__dot___RsJtn:nth-child(4) {
|
|
50
|
+
animation-delay: 0.6s;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.CartDotLoader-module__loaderText___7uOK9 {
|
|
54
|
+
font-size: 16px;
|
|
55
|
+
line-height: 24px;
|
|
56
|
+
font-weight: 700;
|
|
57
|
+
color: #3d3935;
|
|
58
|
+
margin: 0;
|
|
59
|
+
text-align: center;
|
|
60
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import './CartDotLoader.module.scss.css';
|
|
2
|
+
var o={loaderWrapper:"CartDotLoader-module__loaderWrapper___PmIHe",dots:"CartDotLoader-module__dots___OiUF-",dot:"CartDotLoader-module__dot___RsJtn",loaderText:"CartDotLoader-module__loaderText___7uOK9"};export{o as default};
|
|
3
|
+
//# sourceMappingURL=CartDotLoader.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartDotLoader.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|