@coveo/quantic 3.33.2 → 3.33.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/out/quantic-docs.json +13 -13
- package/force-app/main/default/lwc/quanticCategoryFacet/quanticCategoryFacet.js +1 -1
- package/force-app/main/default/lwc/quanticCitation/__tests__/quanticCitation.test.js +142 -3
- package/force-app/main/default/lwc/quanticCitation/quanticCitation.html +10 -4
- package/force-app/main/default/lwc/quanticCitation/quanticCitation.js +72 -31
- package/force-app/main/default/lwc/quanticFacet/quanticFacet.js +1 -1
- package/force-app/main/default/lwc/quanticHeading/quanticHeading.js +1 -1
- package/force-app/main/default/lwc/quanticResultsPerPage/quanticResultsPerPage.js +1 -1
- package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/quanticSearchBoxSuggestionsList.e2e.ts +0 -17
- package/force-app/main/default/lwc/quanticSummary/quanticSummary.js +1 -1
- package/force-app/main/default/lwc/quanticTimeframe/quanticTimeframe.js +2 -2
- package/force-app/main/default/lwc/quanticUtils/facetDependenciesUtils.js +2 -2
- package/force-app/main/default/lwc/quanticUtils/quanticUtils.js +4 -4
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +8 -8
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/common/product.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/search/date/date-format.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/search/plan/plan-response.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/search/search/stemming.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/case-assist-engine/case-assist-engine-configuration.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-engine/commerce-engine-configuration.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/engine-configuration.d.ts +7 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/insight-engine/insight-engine-configuration.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/recommendation-engine/recommendation-engine-configuration.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/search-engine/search-engine-configuration.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/breadcrumb-manager/headless-breadcrumb-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/breadcrumb-manager/headless-core-breadcrumb-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/parameter-manager/headless-core-parameter-manager.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-category-filter-suggestions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-filter-suggestions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/instant-products/headless-instant-products.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-listing/headless-product-listing.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recent-queries-list/headless-recent-queries-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recommendations/headless-recommendations.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/search/headless-search.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/breadcrumb-manager/headless-core-breadcrumb-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/headless-core-context.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/did-you-mean/headless-core-did-you-mean.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facet-manager/headless-core-facet-manager.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/category-facet/headless-core-category-facet.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/facet/headless-core-facet.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/date-facet/headless-core-date-facet.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/date-facet/headless-core-date-filter.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/numeric-facet/headless-core-numeric-facet.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/numeric-facet/headless-core-numeric-filter.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/folded-result-list/headless-core-folded-result-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/pager/headless-core-pager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/query-error/headless-core-query-error.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/recent-queries-list/headless-core-recent-queries-list.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/result-list/headless-core-result-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/results-per-page/headless-core-results-per-page.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/search-box/headless-core-search-box-options.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/smart-snippet-questions-list/headless-core-smart-snippet-questions-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/sort/headless-core-sort.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/status/headless-core-status.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/tab/headless-core-tab.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/triggers/headless-core-notify-trigger.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/triggers/headless-core-query-trigger.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/triggers/headless-core-redirection-trigger.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/dictionary-field-context/headless-dictionary-field-context.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/automatic-facet-generator/headless-automatic-facet-generator.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/field-suggestions/category-facet/headless-category-field-suggestions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/field-suggestions/facet/headless-field-suggestions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/history-manager/headless-history-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/instant-results/instant-results.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/query-summary/headless-query-summary.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/quickview/headless-quickview.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/recent-results-list/headless-recent-results-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/recommendation/headless-recommendation.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/relevance-inspector/headless-relevance-inspector.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/result-list/headless-interactive-result.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/smart-snippet-questions-list/headless-smart-snippet-questions-list.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/standalone-search-box/headless-standalone-search-box.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/static-filter/headless-static-filter.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/static-filter/static-filter-value.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-execute-trigger.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/url-manager/headless-url-manager.d.ts +5 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/advanced-search-queries/advanced-search-queries-state.d.ts +6 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/analytics-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/search-action-cause.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/search-analytics-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-assist-configuration/case-assist-configuration-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-assist-configuration/case-assist-configuration-state.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-field/case-field-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-input/case-input-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/configuration/configuration-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/configuration/configuration-state.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/core-facet/core-facet-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/location-facet/location-facet-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/numeric-facet/manual-numeric-facet-selectors.d.ts +1 -21
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/numeric-facet/numeric-facet-actions.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/pagination/pagination-selectors.d.ts +6 -126
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/product-listing/product-listing-selectors.d.ts +6 -160
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/query/query-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-selectors.d.ts +2 -42
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-selectors.d.ts +7 -181
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/configuration/configuration-actions.d.ts +13 -13
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/configuration/configuration-selectors.d.ts +4 -48
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/configuration/configuration-state.d.ts +5 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/context/context-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/context/context-selector.d.ts +2 -24
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/debug/ranking-info-parser.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/dictionary-field-context/dictionary-field-context-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/did-you-mean/did-you-mean-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/did-you-mean/did-you-mean-selectors.d.ts +1 -21
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/excerpt-length/excerpt-length-selectors.d.ts +2 -24
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facet-options/facet-options-actions-loader.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/category-facet-set/category-facet-set-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/category-facet-set/category-facet-set-actions.d.ts +5 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-set/facet-set-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-set/facet-set-actions.d.ts +6 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/date-facet-set/date-facet-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/date-facet-set/date-facet-actions.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/numeric-facet-set/numeric-facet-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/numeric-facet-set/numeric-facet-actions.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/fields/fields-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-actions.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-analytics-actions.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-insight-analytics-actions.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-mocks.d.ts +11 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/instant-items/instant-items-state.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/pipeline/select-pipeline.d.ts +2 -24
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query/query-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query/query-selectors.d.ts +4 -48
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query/query-state.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query-suggest/query-suggest-actions.d.ts +6 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query-suggest/query-suggest-state.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/question-answering/question-answering-state.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/recommendation/recommendation-state.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-hub/search-hub-selectors.d.ts +2 -24
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-parameters/search-parameter-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort-criteria/criteria-parser.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort-criteria/sort-criteria-selectors.d.ts +2 -24
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/static-filter-set/static-filter-set-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/static-filter-set/static-filter-set-state.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/tab-set/tab-set-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/tab-set/tab-set-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/insight.index.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/range-facet/date-facet/headless-date-facet.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/facets/range-facet/numeric-facet/headless-numeric-facet.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/search/controllers/static-filter/headless-static-filter.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/controller-definitions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controller-utils.d.ts +6 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/facets/range-facet/date-facet/headless-date-facet.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/facets/range-facet/numeric-facet/headless-numeric-facet.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/controllers/static-filter/headless-static-filter.ssr.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/engine/search-engine.ssr.d.ts +13 -25
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/factories/build-factory.d.ts +8 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/factories/hydrated-state-factory.d.ts +5 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/factories/static-state-factory.d.ts +3 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/types/build.d.ts +16 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/types/controller-definition.d.ts +19 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/types/engine.d.ts +26 -8
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/types/fetch-static-state.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/utils/controller-wiring.d.ts +21 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/utils/engine-wiring.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next.index.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-ssr-controller-definitions.d.ts +12 -0
- package/force-app/main/default/staticresources/coveoheadless/headless.js +10 -10
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +9 -9
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +7 -7
- package/package.json +2 -2
|
@@ -14,21 +14,21 @@ function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){
|
|
|
14
14
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
|
-
*/(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define&&define.amd){define("CoveoHeadlessRecommendation",["crypto"],function(_d_0){var d={"crypto":_d_0},r=function(m){if(m in d)return d[m];if(typeof require=="function")return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else{var gN={"crypto":"crypto"},gReq=function(r){var mod=r in gN?g[gN[r]]:g[r];return mod};g["CoveoHeadlessRecommendation"]=f(gReq)}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:this,function(require){var exports={};var __exports=exports;var module={exports};"use strict";var
|
|
18
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,m=!1;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return a=f.done,f},e:function(f){m=!0,i=f},f:function(){try{a||r.return==null||r.return()}finally{if(m)throw i}}}}function Fi(){return Fi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=Uf(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Fi.apply(null,arguments)}function Jt(e){return Jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jt(e)}function Vf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oi(e,t)}function tc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tc=function(){return!!e})()}function Lf(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nf(e)}function Oi(e,t){return Oi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Oi(e,t)}function Uf(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Jt(e))!==null;);return e}function Qf(e,t,r,n){var o=Fi(Jt(1&n?e.prototype:e),t,r);return 2&n&&typeof o=="function"?function(i){return o.apply(r,i)}:o}function Bf(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $f(e){var t=Bf(e,"string");return typeof t=="symbol"?t:t+""}function Hf(e,t){if(e){if(typeof e=="string")return Js(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Js(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function zf(e){var t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}function Gf(e){if(e===void 0)if(typeof document>"u")e=new Error("This operation was aborted"),e.name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch{e=new Error("This operation was aborted"),e.name="AbortError"}return e}var ec=function(){function e(){Ti(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return Di(e,[{key:"addEventListener",value:function(r,n,o){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:n,options:o})}},{key:"removeEventListener",value:function(r,n){if(r in this.listeners){for(var o=this.listeners[r],i=0,a=o.length;i<a;i++)if(o[i].callback===n){o.splice(i,1);return}}}},{key:"dispatchEvent",value:function(r){var n=this;if(r.type in this.listeners){for(var o=this.listeners[r.type],i=o.slice(),a=function(){var y=i[m];try{y.callback.call(n,r)}catch(h){Promise.resolve().then(function(){throw h})}y.options&&y.options.once&&n.removeEventListener(r.type,y.callback)},m=0,f=i.length;m<f;m++)a();return!r.defaultPrevented}}}])}(),qi=function(e){function t(){var r;return Ti(this,t),r=_f(this,t),r.listeners||ec.call(r),Object.defineProperty(r,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(r,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(r,"reason",{value:void 0,writable:!0,configurable:!0}),r}return Vf(t,e),Di(t,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(n){n.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,n)),Qf(t,"dispatchEvent",this,3)([n])}},{key:"throwIfAborted",value:function(){var n=this.aborted,o=this.reason,i=o===void 0?"Aborted":o;if(n)throw i}}],[{key:"timeout",value:function(n){var o=new qn;return setTimeout(function(){return o.abort(new DOMException("This signal is timeout in ".concat(n,"ms"),"TimeoutError"))},n),o.signal}},{key:"any",value:function(n){var o=new qn;function i(){o.abort(this.reason),a()}function a(){var y=Zs(n),h;try{for(y.s();!(h=y.n()).done;){var S=h.value;S.removeEventListener("abort",i)}}catch(g){y.e(g)}finally{y.f()}}var m=Zs(n),f;try{for(m.s();!(f=m.n()).done;){var p=f.value;if(p.aborted){o.abort(p.reason);break}else p.addEventListener("abort",i)}}catch(y){m.e(y)}finally{m.f()}return o.signal}}])}(ec),qn=function(){function e(){Ti(this,e),Object.defineProperty(this,"signal",{value:new qi,writable:!0,configurable:!0})}return Di(e,[{key:"abort",value:function(r){var n=Gf(r),o=zf(n);this.signal.reason=n,this.signal.dispatchEvent(o)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(qn.prototype[Symbol.toStringTag]="AbortController",qi.prototype[Symbol.toStringTag]="AbortSignal");function Wf(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function Kf(e){typeof e=="function"&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,o=n===void 0?r.Request:n,i=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,m=a===void 0?!1:a;if(!Wf({fetch:r,Request:o,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:m}))return{fetch:r,Request:f};var f=o;(f&&!f.prototype.hasOwnProperty("signal")||m)&&(f=function(S,g){var v;g&&g.signal&&(v=g.signal,delete g.signal);var R=new o(S,g);return v&&Object.defineProperty(R,"signal",{writable:!1,enumerable:!1,configurable:!0,value:v}),R},f.prototype=o.prototype);var p=r,y=function(S,g){var v=f&&f.prototype.isPrototypeOf(S)?S.signal:g?g.signal:void 0;if(v){var R;try{R=new DOMException("Aborted","AbortError")}catch{R=new Error("Aborted"),R.name="AbortError"}if(v.aborted)return Promise.reject(R);var P=new Promise(function(x,F){v.addEventListener("abort",function(){return F(R)},{once:!0})});return g&&g.signal&&delete g.signal,Promise.race([P,p(S,g)])}return p(S,g)};return{fetch:y,Request:f}}Hr.AbortController=qn;Hr.AbortSignal=qi;Hr.abortableFetch=Kf});var rc,s,b,l=$r(()=>{"use strict";rc=Be(ji(),1),s=Be(ji(),1),{fetch:b}=(0,rc.abortableFetch)({fetch})});function zr(e){if(im.test(e)||e.trim()==="")throw new TypeError("Invalid character in header field name");return e.trim().toLowerCase()}function Mi(e){return e.replace(am,"")}function Gr(e){if(typeof e!="string"||e.length===0)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>127||!sm(r))return!1}return!0}function sm(e){return![127,32,"(",")","<",">","@",",",";",":","\\","\"","/","[","]","?","=","{","}"].includes(e)}function oc(e){if(typeof e!="string"||e.trim()!==e)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r===0||r===10||r===13)return!1}return!0}var Yf,uc,Jf,lc,Xf,Zf,em,tm,rm,nm,om,im,nc,am,Xt,Ni,ic,ac,sc,cc,C,pc=$r(()=>{"use strict";d();c();l();u();Yf=Object.create,uc=Object.defineProperty,Jf=Object.getOwnPropertyDescriptor,lc=Object.getOwnPropertyNames,Xf=Object.getPrototypeOf,Zf=Object.prototype.hasOwnProperty,em=(e,t)=>function(){return t||(0,e[lc(e)[0]])((t={exports:{}}).exports,t),t.exports},tm=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of lc(t))!Zf.call(e,o)&&o!==r&&uc(e,o,{get:()=>t[o],enumerable:!(n=Jf(t,o))||n.enumerable});return e},rm=(e,t,r)=>(r=e!=null?Yf(Xf(e)):{},tm(t||!e||!e.__esModule?uc(r,"default",{value:e,enumerable:!0}):r,e)),nm=em({"node_modules/set-cookie-parser/lib/set-cookie.js"(e,t){"use strict";var r={decodeValues:!0,map:!1,silent:!1};function n(f){return typeof f=="string"&&!!f.trim()}function o(f,p){var y=f.split(";").filter(n),h=y.shift(),S=i(h),g=S.name,v=S.value;p=p?Object.assign({},r,p):r;try{v=p.decodeValues?decodeURIComponent(v):v}catch(P){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+v+"'. Set options.decodeValues to false to disable this feature.",P)}var R={name:g,value:v};return y.forEach(function(P){var x=P.split("="),F=x.shift().trimLeft().toLowerCase(),w=x.join("=");F==="expires"?R.expires=new Date(w):F==="max-age"?R.maxAge=parseInt(w,10):F==="secure"?R.secure=!0:F==="httponly"?R.httpOnly=!0:F==="samesite"?R.sameSite=w:R[F]=w}),R}function i(f){var p="",y="",h=f.split("=");return h.length>1?(p=h.shift(),y=h.join("=")):y=f,{name:p,value:y}}function a(f,p){if(p=p?Object.assign({},r,p):r,!f)return p.map?{}:[];if(f.headers)if(typeof f.headers.getSetCookie=="function")f=f.headers.getSetCookie();else if(f.headers["set-cookie"])f=f.headers["set-cookie"];else{var y=f.headers[Object.keys(f.headers).find(function(S){return S.toLowerCase()==="set-cookie"})];!y&&f.headers.cookie&&!p.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),f=y}if(Array.isArray(f)||(f=[f]),p=p?Object.assign({},r,p):r,p.map){var h={};return f.filter(n).reduce(function(S,g){var v=o(g,p);return S[v.name]=v,S},h)}else return f.filter(n).map(function(S){return o(S,p)})}function m(f){if(Array.isArray(f))return f;if(typeof f!="string")return[];var p=[],y=0,h,S,g,v,R;function P(){for(;y<f.length&&/\s/.test(f.charAt(y));)y+=1;return y<f.length}function x(){return S=f.charAt(y),S!=="="&&S!==";"&&S!==","}for(;y<f.length;){for(h=y,R=!1;P();)if(S=f.charAt(y),S===","){for(g=y,y+=1,P(),v=y;y<f.length&&x();)y+=1;y<f.length&&f.charAt(y)==="="?(R=!0,y=v,p.push(f.substring(h,g)),h=y):y=g+1}else y+=1;(!R||y>=f.length)&&p.push(f.substring(h,f.length))}return p}t.exports=a,t.exports.parse=a,t.exports.parseString=o,t.exports.splitCookiesString=m}}),om=rm(nm()),im=/[^a-z0-9\-#$%&'*+.^_`|~]/i;nc=[`
|
|
19
|
-
`,"\r","\t"," "],am=new RegExp(`(^[${nc.join("")}]|$[${nc.join("")}])`,"g");Xt=Symbol("normalizedHeaders"),Ni=Symbol("rawHeaderNames"),ic=", ",C=class dc{constructor(t){this[ac]={},this[sc]=new Map,this[cc]="Headers",["Headers","HeadersPolyfill"].includes(t?.constructor.name)||t instanceof dc||typeof A.Headers<"u"&&t instanceof A.Headers?t.forEach((n,o)=>{this.append(o,n)},this):Array.isArray(t)?t.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(ic):n)}):t&&Object.getOwnPropertyNames(t).forEach(r=>{let n=t[r];this.append(r,Array.isArray(n)?n.join(ic):n)})}[(ac=Xt,sc=Ni,cc=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(let[t]of this.entries())yield t}*values(){for(let[,t]of this.entries())yield t}*entries(){let t=Object.keys(this[Xt]).sort((r,n)=>r.localeCompare(n));for(let r of t)if(r==="set-cookie")for(let n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(t){if(!Gr(t))throw new TypeError(`Invalid header name "${t}"`);return this[Xt].hasOwnProperty(zr(t))}get(t){if(!Gr(t))throw TypeError(`Invalid header name "${t}"`);return this[Xt][zr(t)]??null}set(t,r){if(!Gr(t)||!oc(r))return;let n=zr(t),o=Mi(r);this[Xt][n]=Mi(o),this[Ni].set(n,t)}append(t,r){if(!Gr(t)||!oc(r))return;let n=zr(t),o=Mi(r),i=this.has(n)?`${this.get(n)}, ${o}`:o;this.set(t,i)}delete(t){if(!Gr(t)||!this.has(t))return;let r=zr(t);delete this[Xt][r],this[Ni].delete(r)}forEach(t,r){for(let[n,o]of this.entries())t.call(r,o,n,this)}getSetCookie(){let t=this.get("set-cookie");return t===null?[]:t===""?[""]:(0,om.splitCookiesString)(t)}}});var d=$r(()=>{"use strict";pc()});var Ac=Se(Yr=>{"use strict";d();c();l();u();var _n=Yr&&Yr.__assign||function(){return _n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},_n.apply(this,arguments)};Object.defineProperty(Yr,"__esModule",{value:!0});var ym={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function hm(e){var t=_n(_n({},ym),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Yr.getSanitizedOptions=hm});var bc=Se(Ui=>{"use strict";d();c();l();u();Object.defineProperty(Ui,"__esModule",{value:!0});function Sm(e){var t=Math.random()*e;return Math.round(t)}Ui.fullJitter=Sm});var Cc=Se(Qi=>{"use strict";d();c();l();u();Object.defineProperty(Qi,"__esModule",{value:!0});function vm(e){return e}Qi.noJitter=vm});var wc=Se(Bi=>{"use strict";d();c();l();u();Object.defineProperty(Bi,"__esModule",{value:!0});var Am=bc(),bm=Cc();function Cm(e){switch(e.jitter){case"full":return Am.fullJitter;case"none":default:return bm.noJitter}}Bi.JitterFactory=Cm});var Hi=Se($i=>{"use strict";d();c();l();u();Object.defineProperty($i,"__esModule",{value:!0});var wm=wc(),xm=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=wm.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,o=t*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();$i.Delay=xm});var xc=Se(tt=>{"use strict";d();c();l();u();var Rm=tt&&tt.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Em=tt&&tt.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(y){try{p(n.next(y))}catch(h){a(h)}}function f(y){try{p(n.throw(y))}catch(h){a(h)}}function p(y){y.done?i(y.value):o(y.value).then(m,f)}p((n=n.apply(e,t||[])).next())})},Im=tt&&tt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(p){return function(y){return f([p,y])}}function f(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=p[0]&2?o.return:p[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,p[1])).done)return i;switch(o=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,o=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){r.label=p[1];break}if(p[0]===6&&r.label<i[1]){r.label=i[1],i=p;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(p);break}i[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(y){p=[6,y],o=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}};Object.defineProperty(tt,"__esModule",{value:!0});var Pm=Hi(),km=function(e){Rm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return Em(this,void 0,void 0,function(){return Im(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(Pm.Delay);tt.SkipFirstDelay=km});var Rc=Se(Jr=>{"use strict";d();c();l();u();var Fm=Jr&&Jr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Jr,"__esModule",{value:!0});var Om=Hi(),Tm=function(e){Fm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Om.Delay);Jr.AlwaysDelay=Tm});var Ec=Se(zi=>{"use strict";d();c();l();u();Object.defineProperty(zi,"__esModule",{value:!0});var Dm=xc(),qm=Rc();function jm(e,t){var r=Mm(e);return r.setAttemptNumber(t),r}zi.DelayFactory=jm;function Mm(e){return e.delayFirstAttempt?new qm.AlwaysDelay(e):new Dm.SkipFirstDelay(e)}});var Ic=Se(qt=>{"use strict";d();c();l();u();var Gi=qt&&qt.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(y){try{p(n.next(y))}catch(h){a(h)}}function f(y){try{p(n.throw(y))}catch(h){a(h)}}function p(y){y.done?i(y.value):o(y.value).then(m,f)}p((n=n.apply(e,t||[])).next())})},Wi=qt&&qt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(p){return function(y){return f([p,y])}}function f(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=p[0]&2?o.return:p[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,p[1])).done)return i;switch(o=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,o=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){r.label=p[1];break}if(p[0]===6&&r.label<i[1]){r.label=i[1],i=p;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(p);break}i[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(y){p=[6,y],o=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}};Object.defineProperty(qt,"__esModule",{value:!0});var Nm=Ac(),_m=Ec();function Vm(e,t){return t===void 0&&(t={}),Gi(this,void 0,void 0,function(){var r,n;return Wi(this,function(o){switch(o.label){case 0:return r=Nm.getSanitizedOptions(t),n=new Lm(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}qt.backOff=Vm;var Lm=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Gi(this,void 0,void 0,function(){var t,r;return Wi(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.sent(),!r||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Gi(this,void 0,void 0,function(){var t;return Wi(this,function(r){switch(r.label){case 0:return t=_m.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var zo=Se((os,is)=>{"use strict";d();c();l();u();(function(e,t){typeof os=="object"&&typeof is<"u"?is.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof A<"u"?A:e||self).dayjs=t()})(os,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",m="day",f="week",p="month",y="quarter",h="year",S="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,P={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(U){var V=["th","st","nd","rd"],_=U%100;return"["+U+(V[(_-20)%10]||V[_]||V[0])+"]"}},x=function(U,V,_){var B=String(U);return!B||B.length>=V?U:""+Array(V+1-B.length).join(_)+U},F={s:x,z:function(U){var V=-U.utcOffset(),_=Math.abs(V),B=Math.floor(_/60),L=_%60;return(V<=0?"+":"-")+x(B,2,"0")+":"+x(L,2,"0")},m:function U(V,_){if(V.date()<_.date())return-U(_,V);var B=12*(_.year()-V.year())+(_.month()-V.month()),L=V.clone().add(B,p),z=_-L<0,G=V.clone().add(B+(z?-1:1),p);return+(-(B+(_-L)/(z?L-G:G-L))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:p,y:h,w:f,d:m,D:S,h:a,m:i,s:o,ms:n,Q:y}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},w="en",E={};E[w]=P;var M="$isDayjsObject",O=function(U){return U instanceof N||!(!U||!U[M])},I=function U(V,_,B){var L;if(!V)return w;if(typeof V=="string"){var z=V.toLowerCase();E[z]&&(L=z),_&&(E[z]=_,L=z);var G=V.split("-");if(!L&&G.length>1)return U(G[0])}else{var Y=V.name;E[Y]=V,L=Y}return!B&&L&&(w=L),L||!B&&w},k=function(U,V){if(O(U))return U.clone();var _=typeof V=="object"?V:{};return _.date=U,_.args=arguments,new N(_)},D=F;D.l=I,D.i=O,D.w=function(U,V){return k(U,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var N=function(){function U(_){this.$L=I(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[M]=!0}var V=U.prototype;return V.parse=function(_){this.$d=function(B){var L=B.date,z=B.utc;if(L===null)return new Date(NaN);if(D.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var G=L.match(v);if(G){var Y=G[2]-1||0,te=(G[7]||"0").substring(0,3);return z?new Date(Date.UTC(G[1],Y,G[3]||1,G[4]||0,G[5]||0,G[6]||0,te)):new Date(G[1],Y,G[3]||1,G[4]||0,G[5]||0,G[6]||0,te)}}return new Date(L)}(_),this.init()},V.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},V.$utils=function(){return D},V.isValid=function(){return this.$d.toString()!==g},V.isSame=function(_,B){var L=k(_);return this.startOf(B)<=L&&L<=this.endOf(B)},V.isAfter=function(_,B){return k(_)<this.startOf(B)},V.isBefore=function(_,B){return this.endOf(B)<k(_)},V.$g=function(_,B,L){return D.u(_)?this[B]:this.set(L,_)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(_,B){var L=this,z=!!D.u(B)||B,G=D.p(_),Y=function(ue,me){var he=D.w(L.$u?Date.UTC(L.$y,me,ue):new Date(L.$y,me,ue),L);return z?he:he.endOf(m)},te=function(ue,me){return D.w(L.toDate()[ue].apply(L.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(me)),L)},ce=this.$W,ee=this.$M,re=this.$D,Z="set"+(this.$u?"UTC":"");switch(G){case h:return z?Y(1,0):Y(31,11);case p:return z?Y(1,ee):Y(0,ee+1);case f:var oe=this.$locale().weekStart||0,ye=(ce<oe?ce+7:ce)-oe;return Y(z?re-ye:re+(6-ye),ee);case m:case S:return te(Z+"Hours",0);case a:return te(Z+"Minutes",1);case i:return te(Z+"Seconds",2);case o:return te(Z+"Milliseconds",3);default:return this.clone()}},V.endOf=function(_){return this.startOf(_,!1)},V.$set=function(_,B){var L,z=D.p(_),G="set"+(this.$u?"UTC":""),Y=(L={},L[m]=G+"Date",L[S]=G+"Date",L[p]=G+"Month",L[h]=G+"FullYear",L[a]=G+"Hours",L[i]=G+"Minutes",L[o]=G+"Seconds",L[n]=G+"Milliseconds",L)[z],te=z===m?this.$D+(B-this.$W):B;if(z===p||z===h){var ce=this.clone().set(S,1);ce.$d[Y](te),ce.init(),this.$d=ce.set(S,Math.min(this.$D,ce.daysInMonth())).$d}else Y&&this.$d[Y](te);return this.init(),this},V.set=function(_,B){return this.clone().$set(_,B)},V.get=function(_){return this[D.p(_)]()},V.add=function(_,B){var L,z=this;_=Number(_);var G=D.p(B),Y=function(ee){var re=k(z);return D.w(re.date(re.date()+Math.round(ee*_)),z)};if(G===p)return this.set(p,this.$M+_);if(G===h)return this.set(h,this.$y+_);if(G===m)return Y(1);if(G===f)return Y(7);var te=(L={},L[i]=t,L[a]=r,L[o]=e,L)[G]||1,ce=this.$d.getTime()+_*te;return D.w(ce,this)},V.subtract=function(_,B){return this.add(-1*_,B)},V.format=function(_){var B=this,L=this.$locale();if(!this.isValid())return L.invalidDate||g;var z=_||"YYYY-MM-DDTHH:mm:ssZ",G=D.z(this),Y=this.$H,te=this.$m,ce=this.$M,ee=L.weekdays,re=L.months,Z=L.meridiem,oe=function(me,he,ke,_e){return me&&(me[he]||me(B,z))||ke[he].slice(0,_e)},ye=function(me){return D.s(Y%12||12,me,"0")},ue=Z||function(me,he,ke){var _e=me<12?"AM":"PM";return ke?_e.toLowerCase():_e};return z.replace(R,function(me,he){return he||function(ke){switch(ke){case"YY":return String(B.$y).slice(-2);case"YYYY":return D.s(B.$y,4,"0");case"M":return ce+1;case"MM":return D.s(ce+1,2,"0");case"MMM":return oe(L.monthsShort,ce,re,3);case"MMMM":return oe(re,ce);case"D":return B.$D;case"DD":return D.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return oe(L.weekdaysMin,B.$W,ee,2);case"ddd":return oe(L.weekdaysShort,B.$W,ee,3);case"dddd":return ee[B.$W];case"H":return String(Y);case"HH":return D.s(Y,2,"0");case"h":return ye(1);case"hh":return ye(2);case"a":return ue(Y,te,!0);case"A":return ue(Y,te,!1);case"m":return String(te);case"mm":return D.s(te,2,"0");case"s":return String(B.$s);case"ss":return D.s(B.$s,2,"0");case"SSS":return D.s(B.$ms,3,"0");case"Z":return G}return null}(me)||G.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(_,B,L){var z,G=this,Y=D.p(B),te=k(_),ce=(te.utcOffset()-this.utcOffset())*t,ee=this-te,re=function(){return D.m(G,te)};switch(Y){case h:z=re()/12;break;case p:z=re();break;case y:z=re()/3;break;case f:z=(ee-ce)/6048e5;break;case m:z=(ee-ce)/864e5;break;case a:z=ee/r;break;case i:z=ee/t;break;case o:z=ee/e;break;default:z=ee}return L?z:D.a(z)},V.daysInMonth=function(){return this.endOf(p).$D},V.$locale=function(){return E[this.$L]},V.locale=function(_,B){if(!_)return this.$L;var L=this.clone(),z=I(_,B,!0);return z&&(L.$L=z),L},V.clone=function(){return D.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},U}(),$=N.prototype;return k.prototype=$,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",m],["$M",p],["$y",h],["$D",S]].forEach(function(U){$[U[1]]=function(V){return this.$g(V,U[0],U[1])}}),k.extend=function(U,V){return U.$i||(U(V,N,k),U.$i=!0),k},k.locale=I,k.isDayjs=O,k.unix=function(U){return k(1e3*U)},k.en=E[w],k.Ls=E,k.p={},k})});var td=Se((as,ss)=>{"use strict";d();c();l();u();(function(e,t){typeof as=="object"&&typeof ss<"u"?ss.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof A<"u"?A:e||self).dayjs_plugin_quarterOfYear=t()})(as,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(m){return this.$utils().u(m)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(m-1))};var i=o.add;o.add=function(m,f){return m=Number(m),this.$utils().p(f)===t?this.add(3*m,e):i.bind(this)(m,f)};var a=o.startOf;o.startOf=function(m,f){var p=this.$utils(),y=!!p.u(f)||f;if(p.p(m)===t){var h=this.quarter()-1;return y?this.month(3*h).startOf(e).startOf("day"):this.month(3*h+2).endOf(e).endOf("day")}return a.bind(this)(m,f)}}})});var rd=Se((cs,us)=>{"use strict";d();c();l();u();(function(e,t){typeof cs=="object"&&typeof us<"u"?us.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof A<"u"?A:e||self).dayjs_plugin_customParseFormat=t()})(cs,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},m=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(R){this[v]=+R}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(R){if(!R||R==="Z")return 0;var P=R.match(/([+-]|\d\d)/g),x=60*P[1]+(+P[2]||0);return x===0?0:P[0]==="+"?-x:x}(v)}],y=function(v){var R=a[v];return R&&(R.indexOf?R:R.s.concat(R.f))},h=function(v,R){var P,x=a.meridiem;if(x){for(var F=1;F<=24;F+=1)if(v.indexOf(x(F,0,R))>-1){P=F>12;break}}else P=v===(R?"pm":"PM");return P},S={A:[i,function(v){this.afternoon=h(v,!1)}],a:[i,function(v){this.afternoon=h(v,!0)}],Q:[r,function(v){this.month=3*(v-1)+1}],S:[r,function(v){this.milliseconds=100*+v}],SS:[n,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[o,f("seconds")],ss:[o,f("seconds")],m:[o,f("minutes")],mm:[o,f("minutes")],H:[o,f("hours")],h:[o,f("hours")],HH:[o,f("hours")],hh:[o,f("hours")],D:[o,f("day")],DD:[n,f("day")],Do:[i,function(v){var R=a.ordinal,P=v.match(/\d+/);if(this.day=P[0],R)for(var x=1;x<=31;x+=1)R(x).replace(/\[|\]/g,"")===v&&(this.day=x)}],w:[o,f("week")],ww:[n,f("week")],M:[o,f("month")],MM:[n,f("month")],MMM:[i,function(v){var R=y("months"),P=(y("monthsShort")||R.map(function(x){return x.slice(0,3)})).indexOf(v)+1;if(P<1)throw new Error;this.month=P%12||P}],MMMM:[i,function(v){var R=y("months").indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],Y:[/[+-]?\d+/,f("year")],YY:[n,function(v){this.year=m(v)}],YYYY:[/\d{4}/,f("year")],Z:p,ZZ:p};function g(v){var R,P;R=v,P=a&&a.formats;for(var x=(v=R.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(k,D,N){var $=N&&N.toUpperCase();return D||P[N]||e[N]||P[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(U,V,_){return V||_.slice(1)})})).match(t),F=x.length,w=0;w<F;w+=1){var E=x[w],M=S[E],O=M&&M[0],I=M&&M[1];x[w]=I?{regex:O,parser:I}:E.replace(/^\[|\]$/g,"")}return function(k){for(var D={},N=0,$=0;N<F;N+=1){var U=x[N];if(typeof U=="string")$+=U.length;else{var V=U.regex,_=U.parser,B=k.slice($),L=V.exec(B)[0];_.call(D,L),k=k.replace(L,"")}}return function(z){var G=z.afternoon;if(G!==void 0){var Y=z.hours;G?Y<12&&(z.hours+=12):Y===12&&(z.hours=0),delete z.afternoon}}(D),D}}return function(v,R,P){P.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(m=v.parseTwoDigitYear);var x=R.prototype,F=x.parse;x.parse=function(w){var E=w.date,M=w.utc,O=w.args;this.$u=M;var I=O[1];if(typeof I=="string"){var k=O[2]===!0,D=O[3]===!0,N=k||D,$=O[2];D&&($=O[2]),a=this.$locale(),!k&&$&&(a=P.Ls[$]),this.$d=function(B,L,z,G){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*B);var Y=g(L)(B),te=Y.year,ce=Y.month,ee=Y.day,re=Y.hours,Z=Y.minutes,oe=Y.seconds,ye=Y.milliseconds,ue=Y.zone,me=Y.week,he=new Date,ke=ee||(te||ce?1:he.getDate()),_e=te||he.getFullYear(),dt=0;te&&!ce||(dt=ce>0?ce-1:he.getMonth());var Kt,Yt=re||0,Qr=Z||0,Pi=oe||0,ki=ye||0;return ue?new Date(Date.UTC(_e,dt,ke,Yt,Qr,Pi,ki+60*ue.offset*1e3)):z?new Date(Date.UTC(_e,dt,ke,Yt,Qr,Pi,ki)):(Kt=new Date(_e,dt,ke,Yt,Qr,Pi,ki),me&&(Kt=G(Kt).week(me).toDate()),Kt)}catch{return new Date("")}}(E,I,M,P),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),N&&E!=this.format(I)&&(this.$d=new Date("")),a={}}else if(I instanceof Array)for(var U=I.length,V=1;V<=U;V+=1){O[1]=I[V-1];var _=P.apply(this,O);if(_.isValid()){this.$d=_.$d,this.$L=_.$L,this.init();break}V===U&&(this.$d=new Date(""))}else F.call(this,w)}}})});var Yd=Se((Es,Is)=>{"use strict";d();c();l();u();(function(e,t){typeof Es=="object"&&typeof Is<"u"?Is.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof A<"u"?A:e||self).dayjs_plugin_timezone=t()})(Es,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,o){var i,a=function(y,h,S){S===void 0&&(S={});var g=new Date(y),v=function(R,P){P===void 0&&(P={});var x=P.timeZoneName||"short",F=R+"|"+x,w=t[F];return w||(w=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:R,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:x}),t[F]=w),w}(h,S);return v.formatToParts(g)},m=function(y,h){for(var S=a(y,h),g=[],v=0;v<S.length;v+=1){var R=S[v],P=R.type,x=R.value,F=e[P];F>=0&&(g[F]=parseInt(x,10))}var w=g[3],E=w===24?0:w,M=g[0]+"-"+g[1]+"-"+g[2]+" "+E+":"+g[4]+":"+g[5]+":000",O=+y;return(o.utc(M).valueOf()-(O-=O%1e3))/6e4},f=n.prototype;f.tz=function(y,h){y===void 0&&(y=i);var S,g=this.utcOffset(),v=this.toDate(),R=v.toLocaleString("en-US",{timeZone:y}),P=Math.round((v-new Date(R))/1e3/60),x=15*-Math.round(v.getTimezoneOffset()/15)-P;if(!Number(x))S=this.utcOffset(0,h);else if(S=o(R,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(x,!0),h){var F=S.utcOffset();S=S.add(g-F,"minute")}return S.$x.$timezone=y,S},f.offsetName=function(y){var h=this.$x.$timezone||o.tz.guess(),S=a(this.valueOf(),h,{timeZoneName:y}).find(function(g){return g.type.toLowerCase()==="timezonename"});return S&&S.value};var p=f.startOf;f.startOf=function(y,h){if(!this.$x||!this.$x.$timezone)return p.call(this,y,h);var S=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return p.call(S,y,h).tz(this.$x.$timezone,!0)},o.tz=function(y,h,S){var g=S&&h,v=S||h||i,R=m(+o(),v);if(typeof y!="string")return o(y).tz(v);var P=function(E,M,O){var I=E-60*M*1e3,k=m(I,O);if(M===k)return[I,M];var D=m(I-=60*(k-M)*1e3,O);return k===D?[I,k]:[E-60*Math.min(k,D)*1e3,Math.max(k,D)]}(o.utc(y,g).valueOf(),R,v),x=P[0],F=P[1],w=o(x).utcOffset(F);return w.$x.$timezone=v,w},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(y){i=y}}})});var Jd=Se((Ps,ks)=>{"use strict";d();c();l();u();(function(e,t){typeof Ps=="object"&&typeof ks<"u"?ks.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof A<"u"?A:e||self).dayjs_plugin_utc=t()})(Ps,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(g){var v={date:g,utc:!0,args:arguments};return new o(v)},a.utc=function(g){var v=i(this.toDate(),{locale:this.$L,utc:!0});return g?v.add(this.utcOffset(),e):v},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var m=a.parse;a.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),m.call(this,g)};var f=a.init;a.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else f.call(this)};var p=a.utcOffset;a.utcOffset=function(g,v){var R=this.$utils().u;if(R(g))return this.$u?0:R(this.$offset)?p.call(this):this.$offset;if(typeof g=="string"&&(g=function(w){w===void 0&&(w="");var E=w.match(t);if(!E)return null;var M=(""+E[0]).match(r)||["-",0,0],O=M[0],I=60*+M[1]+ +M[2];return I===0?0:O==="+"?I:-I}(g),g===null))return this;var P=Math.abs(g)<=16?60*g:g,x=this;if(v)return x.$offset=P,x.$u=g===0,x;if(g!==0){var F=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(P+F,e)).$offset=P,x.$x.$localOffset=F}else x=this.utc();return x};var y=a.format;a.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,v)},a.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var h=a.toDate;a.toDate=function(g){return g==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var S=a.diff;a.diff=function(g,v,R){if(g&&this.$u===g.$u)return S.call(this,g,v,R);var P=this.local(),x=i(g).local();return S.call(P,x,v,R)}}})});var pp=Se((UL,dp)=>{"use strict";d();c();l();u();function nA(e){try{return JSON.stringify(e)}catch{return"\"[Circular]\""}}dp.exports=oA;function oA(e,t,r){var n=r&&r.stringify||nA,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var m=1;m<i;m++)a[m]=n(t[m]);return a.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var p="",y=1-o,h=-1,S=e&&e.length||0,g=0;g<S;){if(e.charCodeAt(g)===37&&g+1<S){switch(h=h>-1?h:0,e.charCodeAt(g+1)){case 100:case 102:if(y>=f||t[y]==null)break;h<g&&(p+=e.slice(h,g)),p+=Number(t[y]),h=g+2,g++;break;case 105:if(y>=f||t[y]==null)break;h<g&&(p+=e.slice(h,g)),p+=Math.floor(Number(t[y])),h=g+2,g++;break;case 79:case 111:case 106:if(y>=f||t[y]===void 0)break;h<g&&(p+=e.slice(h,g));var v=typeof t[y];if(v==="string"){p+="'"+t[y]+"'",h=g+2,g++;break}if(v==="function"){p+=t[y].name||"<anonymous>",h=g+2,g++;break}p+=n(t[y]),h=g+2,g++;break;case 115:if(y>=f)break;h<g&&(p+=e.slice(h,g)),p+=String(t[y]),h=g+2,g++;break;case 37:h<g&&(p+=e.slice(h,g)),p+="%",h=g+2,g++,y--;break}++y}++g}return h===-1?e:(h<S&&(p+=e.slice(h)),p)}});var Sp=Se((zL,ei)=>{"use strict";d();c();l();u();var fp=pp();ei.exports=lt;var In=vA().console||{},iA={mapHttpRequest:Zo,mapHttpResponse:Zo,wrapRequestSerializer:Ts,wrapResponseSerializer:Ts,wrapErrorSerializer:Ts,req:Zo,res:Zo,err:gp,errWithCause:gp};function Et(e,t){return e==="silent"?1/0:t.levels.values[e]}var js=Symbol("pino.logFuncs"),Ds=Symbol("pino.hierarchy"),aA={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function mp(e,t){let r={logger:t,parent:e[Ds]};t[Ds]=r}function sA(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:In[o]||In[aA[o]||"log"]||qr}),e[js]=n}function cA(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function lt(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||In;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=cA(e.browser.serialize,n),i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);let a=Object.keys(e.customLevels||{}),m=["error","fatal","warn","info","debug","trace"].concat(a);typeof r=="function"&&m.forEach(function(R){r[R]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let f=e.level||"info",p=Object.create(r);p.log||(p.log=qr),sA(p,m,r),mp({},p),Object.defineProperty(p,"levelVal",{get:h}),Object.defineProperty(p,"level",{get:S,set:g});let y={transmit:t,serialize:o,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,levels:m,timestamp:yA(e),messageKey:e.messageKey||"msg",onChild:e.onChild||qr};p.levels=uA(e),p.level=f,p.isLevelEnabled=function(R){return this.levels.values[R]?this.levels.values[R]>=this.levels.values[this.level]:!1},p.setMaxListeners=p.getMaxListeners=p.emit=p.addListener=p.on=p.prependListener=p.once=p.prependOnceListener=p.removeListener=p.removeAllListeners=p.listeners=p.listenerCount=p.eventNames=p.write=p.flush=qr,p.serializers=n,p._serialize=o,p._stdErrSerialize=i,p.child=function(...R){return v.call(this,y,...R)},t&&(p._logEvent=qs());function h(){return Et(this.level,this)}function S(){return this._level}function g(R){if(R!=="silent"&&!this.levels.values[R])throw Error("unknown level "+R);this._level=R,Ht(this,y,p,"error"),Ht(this,y,p,"fatal"),Ht(this,y,p,"warn"),Ht(this,y,p,"info"),Ht(this,y,p,"debug"),Ht(this,y,p,"trace"),a.forEach(P=>{Ht(this,y,p,P)})}function v(R,P,x){if(!P)throw new Error("missing bindings for child Pino");x=x||{},o&&P.serializers&&(x.serializers=P.serializers);let F=x.serializers;if(o&&F){var w=Object.assign({},n,F),E=e.browser.serialize===!0?Object.keys(w):o;delete P.serializers,Ms([P],E,w,this._stdErrSerialize)}function M(I){this._childLevel=(I._childLevel|0)+1,this.bindings=P,w&&(this.serializers=w,this._serialize=E),t&&(this._logEvent=qs([].concat(I._logEvent.bindings,P)))}M.prototype=this;let O=new M(this);return mp(this,O),O.child=function(...I){return v.call(this,R,...I)},O.level=x.level||this.level,R.onChild(O),O}return p}function uA(e){let t=e.customLevels||{},r=Object.assign({},lt.levels.values,t),n=Object.assign({},lt.levels.labels,lA(t));return{values:r,labels:n}}function lA(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}lt.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};lt.stdSerializers=iA;lt.stdTimeFunctions=Object.assign({},{nullTime:yp,epochTime:hp,unixTime:hA,isoTime:SA});function dA(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[Ds];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Ht(e,t,r,n){if(Object.defineProperty(e,n,{value:Et(e.level,r)>Et(n,r)?qr:r[js][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===qr){if(!t.transmit)return;let i=t.transmit.level||e.level,a=Et(i,r);if(Et(n,r)<a)return}e[n]=fA(e,t,r,n);let o=dA(e);o.length!==0&&(e[n]=pA(o,e[n]))}function pA(e,t){return function(){return t.apply(this,[...e,...arguments])}}function fA(e,t,r,n){return function(o){return function(){let a=t.timestamp(),m=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===In?In:this;for(var p=0;p<m.length;p++)m[p]=arguments[p];var y=!1;if(t.serialize&&(Ms(m,this._serialize,this.serializers,this._stdErrSerialize),y=!0),t.asObject||t.formatters?o.call(f,...mA(this,n,m,a,t)):o.apply(f,m),t.transmit){let h=t.transmit.level||e._level,S=Et(h,r),g=Et(n,r);if(g<S)return;gA(this,{ts:a,methodLevel:n,methodValue:g,transmitLevel:h,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Et(e._level,r)},m,y)}}}(e[js][n])}function mA(e,t,r,n,o){let{level:i,log:a=h=>h}=o.formatters||{},m=r.slice(),f=m[0],p={},y=(e._childLevel|0)+1;if(y<1&&(y=1),n&&(p.time=n),i){let h=i(t,e.levels.values[t]);Object.assign(p,h)}else p.level=e.levels.values[t];if(o.asObjectBindingsOnly){if(f!==null&&typeof f=="object")for(;y--&&typeof m[0]=="object";)Object.assign(p,m.shift());return[a(p),...m]}else{if(f!==null&&typeof f=="object"){for(;y--&&typeof m[0]=="object";)Object.assign(p,m.shift());f=m.length?fp(m.shift(),m):void 0}else typeof f=="string"&&(f=fp(m.shift(),m));return f!==void 0&&(p[o.messageKey]=f),[a(p)]}}function Ms(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=lt.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(let i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function gA(e,t,r,n=!1){let o=t.send,i=t.ts,a=t.methodLevel,m=t.methodValue,f=t.val,p=e._logEvent.bindings;n||Ms(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(y){return p.indexOf(y)===-1}),e._logEvent.level.label=a,e._logEvent.level.value=m,o(a,e._logEvent,f),e._logEvent=qs(p)}function qs(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function gp(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function yA(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?yp:hp}function Zo(){return{}}function Ts(e){return e}function qr(){}function yp(){return!1}function hp(){return Date.now()}function hA(){return Math.round(Date.now()/1e3)}function SA(){return new Date(Date.now()).toISOString()}function vA(){function e(t){return typeof t<"u"&&t}try{return typeof A<"u"?A:(Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),A)}catch{return e(self)||e(window)||e(this)||{}}}ei.exports.default=lt;ei.exports.pino=lt});var Ob={};Ks(Ob,{DefaultFieldsToInclude:()=>Ws,EcommerceDefaultFieldsToInclude:()=>Cf,HighlightUtils:()=>Li,MinimumFieldsToInclude:()=>Ei,ResultTemplatesHelpers:()=>bd,buildContext:()=>Pp,buildController:()=>It,buildDictionaryFieldContext:()=>kp,buildInteractiveResult:()=>Sf,buildRecommendationEngine:()=>Rp,buildRecommendationList:()=>yf,buildResultTemplatesManager:()=>Rf,getAnalyticsNextApiBaseUrl:()=>Vn,getOrganizationEndpoint:()=>Pe,getSampleRecommendationEngineConfiguration:()=>Ns,loadAdvancedSearchQueryActions:()=>yb,loadClickAnalyticsActions:()=>Ib,loadConfigurationActions:()=>hb,loadContextActions:()=>vb,loadDebugActions:()=>Ab,loadDictionaryFieldContextActions:()=>bb,loadFieldActions:()=>xb,loadPaginationActions:()=>Gs,loadPipelineActions:()=>Rb,loadRecommendationActions:()=>Eb,loadSearchConfigurationActions:()=>Sb,loadSearchHubActions:()=>Fb});module.exports=Tf(Ob);d();c();l();u();var Li={};Ks(Li,{escapeHtml:()=>Zt,getHighlightedSuggestion:()=>gm,highlightString:()=>mm});d();c();l();u();d();c();l();u();function cm(e,t){let r=`
|
|
17
|
+
*/(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define&&define.amd){define("CoveoHeadlessRecommendation",["crypto"],function(_d_0){var d={"crypto":_d_0},r=function(m){if(m in d)return d[m];if(typeof require=="function")return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else{var gN={"crypto":"crypto"},gReq=function(r){var mod=r in gN?g[gN[r]]:g[r];return mod};g["CoveoHeadlessRecommendation"]=f(gReq)}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:this,function(require){var exports={};var __exports=exports;var module={exports};"use strict";var rm=Object.create;var tn=Object.defineProperty;var nm=Object.getOwnPropertyDescriptor;var om=Object.getOwnPropertyNames;var im=Object.getPrototypeOf,am=Object.prototype.hasOwnProperty;var sm=(e,t,r)=>t in e?tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var rn=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),sc=(e,t)=>{for(var r in t)tn(e,r,{get:t[r],enumerable:!0})},cc=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of om(t))!am.call(e,o)&&o!==r&&tn(e,o,{get:()=>t[o],enumerable:!(n=nm(t,o))||n.enumerable});return e};var Wn=(e,t,r)=>(r=e!=null?rm(im(e)):{},cc(t||!e||!e.__esModule?tn(r,"default",{value:e,enumerable:!0}):r,e)),cm=e=>cc(tn({},"__esModule",{value:!0}),e);var oe=(e,t,r)=>sm(e,typeof t!="symbol"?t+"":t,r);var A,u=rn(()=>{"use strict";A=typeof globalThis<"u"?globalThis:window});function Yn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Yn=function(t){return typeof t}:Yn=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}function dm(){"navigator"in this||(this.navigator={}),typeof this.navigator.sendBeacon!="function"&&(this.navigator.sendBeacon=pm.bind(this))}function pm(e,t){var r=this.event&&this.event.type,n=r==="unload"||r==="beforeunload",o="XMLHttpRequest"in this?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");o.open("POST",e,!n),o.withCredentials=!0,o.setRequestHeader("Accept","*/*"),um(t)?(o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),o.responseType="text"):lm(t)&&t.type&&o.setRequestHeader("Content-Type",t.type);try{o.send(t)}catch{return!1}return!0}var um,lm,l=rn(()=>{"use strict";um=function(t){return typeof t=="string"},lm=function(t){return t instanceof Blob};dm.call((typeof window>"u"?"undefined":Yn(window))==="object"?window:{})});var Ji=Ue(nn=>{"use strict";p();u();d();l();Object.defineProperty(nn,"__esModule",{value:!0});function uc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function fm(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mm(e,t,r){return t=cr(t),ym(e,fc()?Reflect.construct(t,r||[],cr(e).constructor):t.apply(e,r))}function Wi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Am(n.key),n)}}function Yi(e,t,r){return t&&lc(e.prototype,t),r&&lc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function dc(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Cm(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
18
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,m=!1;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return a=f.done,f},e:function(f){m=!0,i=f},f:function(){try{a||r.return==null||r.return()}finally{if(m)throw i}}}}function zi(){return zi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=hm(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},zi.apply(null,arguments)}function cr(e){return cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},cr(e)}function gm(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gi(e,t)}function fc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fc=function(){return!!e})()}function ym(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fm(e)}function Gi(e,t){return Gi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Gi(e,t)}function hm(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=cr(e))!==null;);return e}function Sm(e,t,r,n){var o=zi(cr(1&n?e.prototype:e),t,r);return 2&n&&typeof o=="function"?function(i){return o.apply(r,i)}:o}function vm(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Am(e){var t=vm(e,"string");return typeof t=="symbol"?t:t+""}function Cm(e,t){if(e){if(typeof e=="string")return uc(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?uc(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function bm(e){var t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}function wm(e){if(e===void 0)if(typeof document>"u")e=new Error("This operation was aborted"),e.name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch{e=new Error("This operation was aborted"),e.name="AbortError"}return e}var pc=function(){function e(){Wi(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return Yi(e,[{key:"addEventListener",value:function(r,n,o){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:n,options:o})}},{key:"removeEventListener",value:function(r,n){if(r in this.listeners){for(var o=this.listeners[r],i=0,a=o.length;i<a;i++)if(o[i].callback===n){o.splice(i,1);return}}}},{key:"dispatchEvent",value:function(r){var n=this;if(r.type in this.listeners){for(var o=this.listeners[r.type],i=o.slice(),a=function(){var g=i[m];try{g.callback.call(n,r)}catch(h){Promise.resolve().then(function(){throw h})}g.options&&g.options.once&&n.removeEventListener(r.type,g.callback)},m=0,f=i.length;m<f;m++)a();return!r.defaultPrevented}}}])}(),Ki=function(e){function t(){var r;return Wi(this,t),r=mm(this,t),r.listeners||pc.call(r),Object.defineProperty(r,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(r,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(r,"reason",{value:void 0,writable:!0,configurable:!0}),r}return gm(t,e),Yi(t,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(n){n.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,n)),Sm(t,"dispatchEvent",this,3)([n])}},{key:"throwIfAborted",value:function(){var n=this.aborted,o=this.reason,i=o===void 0?"Aborted":o;if(n)throw i}}],[{key:"timeout",value:function(n){var o=new Kn;return setTimeout(function(){return o.abort(new DOMException("This signal is timeout in ".concat(n,"ms"),"TimeoutError"))},n),o.signal}},{key:"any",value:function(n){var o=new Kn;function i(){o.abort(this.reason),a()}function a(){var g=dc(n),h;try{for(g.s();!(h=g.n()).done;){var S=h.value;S.removeEventListener("abort",i)}}catch(y){g.e(y)}finally{g.f()}}var m=dc(n),f;try{for(m.s();!(f=m.n()).done;){var s=f.value;if(s.aborted){o.abort(s.reason);break}else s.addEventListener("abort",i)}}catch(g){m.e(g)}finally{m.f()}return o.signal}}])}(pc),Kn=function(){function e(){Wi(this,e),Object.defineProperty(this,"signal",{value:new Ki,writable:!0,configurable:!0})}return Yi(e,[{key:"abort",value:function(r){var n=wm(r),o=bm(n);this.signal.reason=n,this.signal.dispatchEvent(o)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(Kn.prototype[Symbol.toStringTag]="AbortController",Ki.prototype[Symbol.toStringTag]="AbortSignal");function xm(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function Rm(e){typeof e=="function"&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,o=n===void 0?r.Request:n,i=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,m=a===void 0?!1:a;if(!xm({fetch:r,Request:o,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:m}))return{fetch:r,Request:f};var f=o;(f&&!f.prototype.hasOwnProperty("signal")||m)&&(f=function(S,y){var b;y&&y.signal&&(b=y.signal,delete y.signal);var R=new o(S,y);return b&&Object.defineProperty(R,"signal",{writable:!1,enumerable:!1,configurable:!0,value:b}),R},f.prototype=o.prototype);var s=r,g=function(S,y){var b=f&&f.prototype.isPrototypeOf(S)?S.signal:y?y.signal:void 0;if(b){var R;try{R=new DOMException("Aborted","AbortError")}catch{R=new Error("Aborted"),R.name="AbortError"}if(b.aborted)return Promise.reject(R);var F=new Promise(function(x,I){b.addEventListener("abort",function(){return I(R)},{once:!0})});return y&&y.signal&&delete y.signal,Promise.race([F,s(S,y)])}return s(S,y)};return{fetch:g,Request:f}}nn.AbortController=Kn;nn.AbortSignal=Ki;nn.abortableFetch=Rm});var mc,c,v,d=rn(()=>{"use strict";mc=Wn(Ji(),1),c=Wn(Ji(),1),{fetch:v}=(0,mc.abortableFetch)({fetch})});function on(e){if(Mm.test(e)||e.trim()==="")throw new TypeError("Invalid character in header field name");return e.trim().toLowerCase()}function Xi(e){return e.replace(Nm,"")}function an(e){if(typeof e!="string"||e.length===0)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>127||!jm(r))return!1}return!0}function jm(e){return![127,32,"(",")","<",">","@",",",";",":","\\","\"","/","[","]","?","=","{","}"].includes(e)}function yc(e){if(typeof e!="string"||e.trim()!==e)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r===0||r===10||r===13)return!1}return!0}var Em,Cc,Im,bc,Fm,Pm,km,Om,Tm,Dm,qm,Mm,gc,Nm,ur,Zi,hc,Sc,vc,Ac,C,xc=rn(()=>{"use strict";p();u();d();l();Em=Object.create,Cc=Object.defineProperty,Im=Object.getOwnPropertyDescriptor,bc=Object.getOwnPropertyNames,Fm=Object.getPrototypeOf,Pm=Object.prototype.hasOwnProperty,km=(e,t)=>function(){return t||(0,e[bc(e)[0]])((t={exports:{}}).exports,t),t.exports},Om=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of bc(t))!Pm.call(e,o)&&o!==r&&Cc(e,o,{get:()=>t[o],enumerable:!(n=Im(t,o))||n.enumerable});return e},Tm=(e,t,r)=>(r=e!=null?Em(Fm(e)):{},Om(t||!e||!e.__esModule?Cc(r,"default",{value:e,enumerable:!0}):r,e)),Dm=km({"node_modules/set-cookie-parser/lib/set-cookie.js"(e,t){"use strict";var r={decodeValues:!0,map:!1,silent:!1};function n(f){return typeof f=="string"&&!!f.trim()}function o(f,s){var g=f.split(";").filter(n),h=g.shift(),S=i(h),y=S.name,b=S.value;s=s?Object.assign({},r,s):r;try{b=s.decodeValues?decodeURIComponent(b):b}catch(F){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+b+"'. Set options.decodeValues to false to disable this feature.",F)}var R={name:y,value:b};return g.forEach(function(F){var x=F.split("="),I=x.shift().trimLeft().toLowerCase(),w=x.join("=");I==="expires"?R.expires=new Date(w):I==="max-age"?R.maxAge=parseInt(w,10):I==="secure"?R.secure=!0:I==="httponly"?R.httpOnly=!0:I==="samesite"?R.sameSite=w:R[I]=w}),R}function i(f){var s="",g="",h=f.split("=");return h.length>1?(s=h.shift(),g=h.join("=")):g=f,{name:s,value:g}}function a(f,s){if(s=s?Object.assign({},r,s):r,!f)return s.map?{}:[];if(f.headers)if(typeof f.headers.getSetCookie=="function")f=f.headers.getSetCookie();else if(f.headers["set-cookie"])f=f.headers["set-cookie"];else{var g=f.headers[Object.keys(f.headers).find(function(S){return S.toLowerCase()==="set-cookie"})];!g&&f.headers.cookie&&!s.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),f=g}if(Array.isArray(f)||(f=[f]),s=s?Object.assign({},r,s):r,s.map){var h={};return f.filter(n).reduce(function(S,y){var b=o(y,s);return S[b.name]=b,S},h)}else return f.filter(n).map(function(S){return o(S,s)})}function m(f){if(Array.isArray(f))return f;if(typeof f!="string")return[];var s=[],g=0,h,S,y,b,R;function F(){for(;g<f.length&&/\s/.test(f.charAt(g));)g+=1;return g<f.length}function x(){return S=f.charAt(g),S!=="="&&S!==";"&&S!==","}for(;g<f.length;){for(h=g,R=!1;F();)if(S=f.charAt(g),S===","){for(y=g,g+=1,F(),b=g;g<f.length&&x();)g+=1;g<f.length&&f.charAt(g)==="="?(R=!0,g=b,s.push(f.substring(h,y)),h=g):g=y+1}else g+=1;(!R||g>=f.length)&&s.push(f.substring(h,f.length))}return s}t.exports=a,t.exports.parse=a,t.exports.parseString=o,t.exports.splitCookiesString=m}}),qm=Tm(Dm()),Mm=/[^a-z0-9\-#$%&'*+.^_`|~]/i;gc=[`
|
|
19
|
+
`,"\r","\t"," "],Nm=new RegExp(`(^[${gc.join("")}]|$[${gc.join("")}])`,"g");ur=Symbol("normalizedHeaders"),Zi=Symbol("rawHeaderNames"),hc=", ",C=class wc{constructor(t){this[Sc]={},this[vc]=new Map,this[Ac]="Headers",["Headers","HeadersPolyfill"].includes(t?.constructor.name)||t instanceof wc||typeof A.Headers<"u"&&t instanceof A.Headers?t.forEach((n,o)=>{this.append(o,n)},this):Array.isArray(t)?t.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(hc):n)}):t&&Object.getOwnPropertyNames(t).forEach(r=>{let n=t[r];this.append(r,Array.isArray(n)?n.join(hc):n)})}[(Sc=ur,vc=Zi,Ac=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(let[t]of this.entries())yield t}*values(){for(let[,t]of this.entries())yield t}*entries(){let t=Object.keys(this[ur]).sort((r,n)=>r.localeCompare(n));for(let r of t)if(r==="set-cookie")for(let n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(t){if(!an(t))throw new TypeError(`Invalid header name "${t}"`);return this[ur].hasOwnProperty(on(t))}get(t){if(!an(t))throw TypeError(`Invalid header name "${t}"`);return this[ur][on(t)]??null}set(t,r){if(!an(t)||!yc(r))return;let n=on(t),o=Xi(r);this[ur][n]=Xi(o),this[Zi].set(n,t)}append(t,r){if(!an(t)||!yc(r))return;let n=on(t),o=Xi(r),i=this.has(n)?`${this.get(n)}, ${o}`:o;this.set(t,i)}delete(t){if(!an(t)||!this.has(t))return;let r=on(t);delete this[ur][r],this[Zi].delete(r)}forEach(t,r){for(let[n,o]of this.entries())t.call(r,o,n,this)}getSetCookie(){let t=this.get("set-cookie");return t===null?[]:t===""?[""]:(0,qm.splitCookiesString)(t)}}});var p=rn(()=>{"use strict";xc()});var Tc=Ue(un=>{"use strict";p();u();d();l();var eo=un&&un.__assign||function(){return eo=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},eo.apply(this,arguments)};Object.defineProperty(un,"__esModule",{value:!0});var zm={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function Gm(e){var t=eo(eo({},zm),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}un.getSanitizedOptions=Gm});var Dc=Ue(na=>{"use strict";p();u();d();l();Object.defineProperty(na,"__esModule",{value:!0});function Wm(e){var t=Math.random()*e;return Math.round(t)}na.fullJitter=Wm});var qc=Ue(oa=>{"use strict";p();u();d();l();Object.defineProperty(oa,"__esModule",{value:!0});function Ym(e){return e}oa.noJitter=Ym});var Mc=Ue(ia=>{"use strict";p();u();d();l();Object.defineProperty(ia,"__esModule",{value:!0});var Km=Dc(),Jm=qc();function Xm(e){switch(e.jitter){case"full":return Km.fullJitter;case"none":default:return Jm.noJitter}}ia.JitterFactory=Xm});var sa=Ue(aa=>{"use strict";p();u();d();l();Object.defineProperty(aa,"__esModule",{value:!0});var Zm=Mc(),eg=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=Zm.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,o=t*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();aa.Delay=eg});var Nc=Ue(it=>{"use strict";p();u();d();l();var tg=it&&it.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),rg=it&&it.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(g){try{s(n.next(g))}catch(h){a(h)}}function f(g){try{s(n.throw(g))}catch(h){a(h)}}function s(g){g.done?i(g.value):o(g.value).then(m,f)}s((n=n.apply(e,t||[])).next())})},ng=it&&it.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(s){return function(g){return f([s,g])}}function f(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(g){s=[6,g],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(it,"__esModule",{value:!0});var og=sa(),ig=function(e){tg(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return rg(this,void 0,void 0,function(){return ng(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(og.Delay);it.SkipFirstDelay=ig});var jc=Ue(ln=>{"use strict";p();u();d();l();var ag=ln&&ln.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ln,"__esModule",{value:!0});var sg=sa(),cg=function(e){ag(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(sg.Delay);ln.AlwaysDelay=cg});var _c=Ue(ca=>{"use strict";p();u();d();l();Object.defineProperty(ca,"__esModule",{value:!0});var ug=Nc(),lg=jc();function dg(e,t){var r=pg(e);return r.setAttemptNumber(t),r}ca.DelayFactory=dg;function pg(e){return e.delayFirstAttempt?new lg.AlwaysDelay(e):new ug.SkipFirstDelay(e)}});var Vc=Ue(Qt=>{"use strict";p();u();d();l();var ua=Qt&&Qt.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(g){try{s(n.next(g))}catch(h){a(h)}}function f(g){try{s(n.throw(g))}catch(h){a(h)}}function s(g){g.done?i(g.value):o(g.value).then(m,f)}s((n=n.apply(e,t||[])).next())})},la=Qt&&Qt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(s){return function(g){return f([s,g])}}function f(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(g){s=[6,g],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(Qt,"__esModule",{value:!0});var fg=Tc(),mg=_c();function gg(e,t){return t===void 0&&(t={}),ua(this,void 0,void 0,function(){var r,n;return la(this,function(o){switch(o.label){case 0:return r=fg.getSanitizedOptions(t),n=new yg(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}Qt.backOff=gg;var yg=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return ua(this,void 0,void 0,function(){var t,r;return la(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.sent(),!r||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return ua(this,void 0,void 0,function(){var t;return la(this,function(r){switch(r.label){case 0:return t=mg.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Lp=Ue((yQ,Vp)=>{"use strict";p();u();d();l();function nC(e){try{return JSON.stringify(e)}catch{return"\"[Circular]\""}}Vp.exports=oC;function oC(e,t,r){var n=r&&r.stringify||nC,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var m=1;m<i;m++)a[m]=n(t[m]);return a.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var s="",g=1-o,h=-1,S=e&&e.length||0,y=0;y<S;){if(e.charCodeAt(y)===37&&y+1<S){switch(h=h>-1?h:0,e.charCodeAt(y+1)){case 100:case 102:if(g>=f||t[g]==null)break;h<y&&(s+=e.slice(h,y)),s+=Number(t[g]),h=y+2,y++;break;case 105:if(g>=f||t[g]==null)break;h<y&&(s+=e.slice(h,y)),s+=Math.floor(Number(t[g])),h=y+2,y++;break;case 79:case 111:case 106:if(g>=f||t[g]===void 0)break;h<y&&(s+=e.slice(h,y));var b=typeof t[g];if(b==="string"){s+="'"+t[g]+"'",h=y+2,y++;break}if(b==="function"){s+=t[g].name||"<anonymous>",h=y+2,y++;break}s+=n(t[g]),h=y+2,y++;break;case 115:if(g>=f)break;h<y&&(s+=e.slice(h,y)),s+=String(t[g]),h=y+2,y++;break;case 37:h<y&&(s+=e.slice(h,y)),s+="%",h=y+2,y++,g--;break}++g}++y}return h===-1?e:(h<S&&(s+=e.slice(h)),s)}});var zp=Ue((CQ,yi)=>{"use strict";p();u();d();l();var Up=Lp();yi.exports=mt;var Un=vC().console||{},iC={mapHttpRequest:gi,mapHttpResponse:gi,wrapRequestSerializer:Bs,wrapResponseSerializer:Bs,wrapErrorSerializer:Bs,req:gi,res:gi,err:Bp,errWithCause:Bp};function qt(e,t){return e==="silent"?1/0:t.levels.values[e]}var zs=Symbol("pino.logFuncs"),$s=Symbol("pino.hierarchy"),aC={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function Qp(e,t){let r={logger:t,parent:e[$s]};t[$s]=r}function sC(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:Un[o]||Un[aC[o]||"log"]||zr}),e[zs]=n}function cC(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function mt(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||Un;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=cC(e.browser.serialize,n),i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);let a=Object.keys(e.customLevels||{}),m=["error","fatal","warn","info","debug","trace"].concat(a);typeof r=="function"&&m.forEach(function(R){r[R]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let f=e.level||"info",s=Object.create(r);s.log||(s.log=zr),sC(s,m,r),Qp({},s),Object.defineProperty(s,"levelVal",{get:h}),Object.defineProperty(s,"level",{get:S,set:y});let g={transmit:t,serialize:o,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,levels:m,timestamp:yC(e),messageKey:e.messageKey||"msg",onChild:e.onChild||zr};s.levels=uC(e),s.level=f,s.isLevelEnabled=function(R){return this.levels.values[R]?this.levels.values[R]>=this.levels.values[this.level]:!1},s.setMaxListeners=s.getMaxListeners=s.emit=s.addListener=s.on=s.prependListener=s.once=s.prependOnceListener=s.removeListener=s.removeAllListeners=s.listeners=s.listenerCount=s.eventNames=s.write=s.flush=zr,s.serializers=n,s._serialize=o,s._stdErrSerialize=i,s.child=function(...R){return b.call(this,g,...R)},t&&(s._logEvent=Hs());function h(){return qt(this.level,this)}function S(){return this._level}function y(R){if(R!=="silent"&&!this.levels.values[R])throw Error("unknown level "+R);this._level=R,or(this,g,s,"error"),or(this,g,s,"fatal"),or(this,g,s,"warn"),or(this,g,s,"info"),or(this,g,s,"debug"),or(this,g,s,"trace"),a.forEach(F=>{or(this,g,s,F)})}function b(R,F,x){if(!F)throw new Error("missing bindings for child Pino");x=x||{},o&&F.serializers&&(x.serializers=F.serializers);let I=x.serializers;if(o&&I){var w=Object.assign({},n,I),E=e.browser.serialize===!0?Object.keys(w):o;delete F.serializers,Gs([F],E,w,this._stdErrSerialize)}function M(P){this._childLevel=(P._childLevel|0)+1,this.bindings=F,w&&(this.serializers=w,this._serialize=E),t&&(this._logEvent=Hs([].concat(P._logEvent.bindings,F)))}M.prototype=this;let k=new M(this);return Qp(this,k),k.child=function(...P){return b.call(this,R,...P)},k.level=x.level||this.level,R.onChild(k),k}return s}function uC(e){let t=e.customLevels||{},r=Object.assign({},mt.levels.values,t),n=Object.assign({},mt.levels.labels,lC(t));return{values:r,labels:n}}function lC(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}mt.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};mt.stdSerializers=iC;mt.stdTimeFunctions=Object.assign({},{nullTime:$p,epochTime:Hp,unixTime:hC,isoTime:SC});function dC(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[$s];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function or(e,t,r,n){if(Object.defineProperty(e,n,{value:qt(e.level,r)>qt(n,r)?zr:r[zs][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===zr){if(!t.transmit)return;let i=t.transmit.level||e.level,a=qt(i,r);if(qt(n,r)<a)return}e[n]=fC(e,t,r,n);let o=dC(e);o.length!==0&&(e[n]=pC(o,e[n]))}function pC(e,t){return function(){return t.apply(this,[...e,...arguments])}}function fC(e,t,r,n){return function(o){return function(){let a=t.timestamp(),m=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Un?Un:this;for(var s=0;s<m.length;s++)m[s]=arguments[s];var g=!1;if(t.serialize&&(Gs(m,this._serialize,this.serializers,this._stdErrSerialize),g=!0),t.asObject||t.formatters?o.call(f,...mC(this,n,m,a,t)):o.apply(f,m),t.transmit){let h=t.transmit.level||e._level,S=qt(h,r),y=qt(n,r);if(y<S)return;gC(this,{ts:a,methodLevel:n,methodValue:y,transmitLevel:h,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:qt(e._level,r)},m,g)}}}(e[zs][n])}function mC(e,t,r,n,o){let{level:i,log:a=h=>h}=o.formatters||{},m=r.slice(),f=m[0],s={},g=(e._childLevel|0)+1;if(g<1&&(g=1),n&&(s.time=n),i){let h=i(t,e.levels.values[t]);Object.assign(s,h)}else s.level=e.levels.values[t];if(o.asObjectBindingsOnly){if(f!==null&&typeof f=="object")for(;g--&&typeof m[0]=="object";)Object.assign(s,m.shift());return[a(s),...m]}else{if(f!==null&&typeof f=="object"){for(;g--&&typeof m[0]=="object";)Object.assign(s,m.shift());f=m.length?Up(m.shift(),m):void 0}else typeof f=="string"&&(f=Up(m.shift(),m));return f!==void 0&&(s[o.messageKey]=f),[a(s)]}}function Gs(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=mt.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(let i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function gC(e,t,r,n=!1){let o=t.send,i=t.ts,a=t.methodLevel,m=t.methodValue,f=t.val,s=e._logEvent.bindings;n||Gs(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(g){return s.indexOf(g)===-1}),e._logEvent.level.label=a,e._logEvent.level.value=m,o(a,e._logEvent,f),e._logEvent=Hs(s)}function Hs(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Bp(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function yC(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?$p:Hp}function gi(){return{}}function Bs(e){return e}function zr(){}function $p(){return!1}function Hp(){return Date.now()}function hC(){return Math.round(Date.now()/1e3)}function SC(){return new Date(Date.now()).toISOString()}function vC(){function e(t){return typeof t<"u"&&t}try{return typeof A<"u"?A:(Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),A)}catch{return e(self)||e(window)||e(this)||{}}}yi.exports.default=mt;yi.exports.pino=mt});var Ob={};sc(Ob,{DefaultFieldsToInclude:()=>ic,EcommerceDefaultFieldsToInclude:()=>Kf,HighlightUtils:()=>ra,MinimumFieldsToInclude:()=>Qi,ResultTemplatesHelpers:()=>Yd,buildContext:()=>rf,buildController:()=>Mt,buildDictionaryFieldContext:()=>nf,buildInteractiveResult:()=>zf,buildRecommendationEngine:()=>Zp,buildRecommendationList:()=>$f,buildResultTemplatesManager:()=>Zf,getAnalyticsNextApiBaseUrl:()=>to,getOrganizationEndpoint:()=>Ie,getSampleRecommendationEngineConfiguration:()=>Ws,loadAdvancedSearchQueryActions:()=>yb,loadClickAnalyticsActions:()=>Ib,loadConfigurationActions:()=>hb,loadContextActions:()=>vb,loadDebugActions:()=>Ab,loadDictionaryFieldContextActions:()=>Cb,loadFieldActions:()=>xb,loadPaginationActions:()=>oc,loadPipelineActions:()=>Rb,loadRecommendationActions:()=>Eb,loadSearchConfigurationActions:()=>Sb,loadSearchHubActions:()=>kb});module.exports=cm(Ob);p();u();d();l();var ra={};sc(ra,{escapeHtml:()=>lr,getHighlightedSuggestion:()=>Hm,highlightString:()=>$m});p();u();d();l();p();u();d();l();function _m(e,t){let r=`
|
|
20
20
|
The following properties are invalid:
|
|
21
21
|
|
|
22
22
|
${e.join(`
|
|
23
23
|
`)}
|
|
24
24
|
|
|
25
25
|
${t}
|
|
26
|
-
`;return new Wr(r)}var Wr=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Fe=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw cm(n,t);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;r!==void 0&&(e[t]=r)}return e}},fe=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&X(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return this.baseConfig.required===!0}};function ve(e){return e===void 0}function um(e){return e===null}function X(e){return ve(e)||um(e)}var ne=class{constructor(e={}){pe(this,"value");this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(lm(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function lm(e){return ve(e)||fc(e)}function fc(e){return typeof e=="boolean"}var J=class{constructor(e={}){pe(this,"value");this.config=e,this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(dm(e)?e<this.config.min?`minimum value of ${this.config.min} not respected.`:e>this.config.max?`maximum value of ${this.config.max} not respected.`:null:"value is not a number.")}get default(){return this.value.default}get required(){return this.value.required}};function dm(e){return ve(e)||mc(e)}function mc(e){return typeof e=="number"&&!Number.isNaN(e)}var pm=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,H=class{constructor(e={}){pe(this,"value");pe(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new fe(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,a=this.value.validate(e);if(a)return a;if(ve(e))return null;if(!jn(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(pm.test(e)&&new Date(e).toString()!=="Invalid Date")?"value is not a valid ISO8601 date string":null}get default(){return this.value.default}get required(){return this.value.required}};function jn(e){return Object.prototype.toString.call(e)==="[object String]"}var K=class{constructor(e={}){pe(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(ve(e))return this.config.options.required?"value is required and is currently undefined":null;if(!gc(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&X(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=` ${i}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function gc(e){return e!==void 0&&typeof e=="object"}var ie=class{constructor(e={}){pe(this,"value");this.config=e,this.value=new fe(this.config)}validate(e){if(!X(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(X(e))return null;if(this.config.max!==void 0&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(this.config.min!==void 0&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(this.config.each!==void 0){let r="";return e.forEach(n=>{this.config.each.required&&X(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=` ${o}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return fc(e)||jn(e)||mc(e)||gc(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function yc(e){return Array.isArray(e)}var _i=class{constructor(e){pe(this,"value");this.config=e,this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t!==null?t:ve(e)||Object.values(this.config.enum).find(n=>n===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};d();c();l();u();function hc(e){return Array.isArray(e)}function Mn(e){return e.trim()===""}var fm=new Set(["1",1,"yes",!0]);function Sc(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>fm.has(r))}function vc(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Kr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Nn(e,t,r={}){let n;return(...o)=>{let i=r.isImmediate&&!n;if(clearTimeout(n),n=setTimeout(()=>{n=void 0,r.isImmediate||e.apply(void 0,o)},t),i)return e.apply(void 0,o)}}function mm(e){if(Mn(e.openingDelimiter)||Mn(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(X(e.content)||Mn(e.content))return e.content;if(e.highlights.length===0)return Zt(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,m=a+i.length;if(m>t)break;r+=Zt(e.content.slice(n,a)),r+=e.openingDelimiter,r+=Zt(e.content.slice(a,m)),r+=e.closingDelimiter,n=m}return n!==t&&(r+=Zt(e.content.slice(n))),r}function gm(e,t){return e=Zt(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Vi(n,t.notMatchDelimiters):o?Vi(o,t.exactMatchDelimiters):i?Vi(i,t.correctionDelimiters):r)}function Vi(e,t){return t?t.open+e+t.close:e}function Zt(e){let t={"&":"&","<":"<",">":">","\"":""","'":"'","`":"`"},r=`(?:${Object.keys(t).join("|")})`,n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}d();c();l();u();var Oc=Be(Ic(),1);d();c();l();u();var Ge=new Error("Failed to load reducers."),er=class extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}},jt=class extends Error{constructor(r,n){super();pe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};d();c();l();u();function Pc(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function kc(e){return typeof e!="object"||!e?!1:Object.values(e).every(Um)}function Um(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Fc(e){return e===429}var $e=class e{static call(t){return _asyncToGenerator(function*(){let r=Qm(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,m=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let f=yield b(i,a);if(Fc(f.status))throw f;return f});return function m(){return _ref.apply(this,arguments)}}();try{let f=yield(0,Oc.backOff)(m,{retry:p=>{let y=p&&Fc(p.status);return y&&n.info("Platform retrying request"),y}});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new er;case 404:throw new jt(i,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new jt(i):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,p=Kr(f);try{let y=yield o(t,n,a);return{...t,...y}}catch(y){i.error(y,"Platform request preprocessing failed. Returning default request options.")}return p})()}};function Pe(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function pt(e,t="prod"){return`${Pe(e,t)}/rest/search/v2`}function Vn(e,t="prod"){return`${Pe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Qm(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=Bm(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(m&&{body:f}),signal:a}}function Bm(e,t){return t==="application/x-www-form-urlencoded"?kc(e)?Pc(e):"":JSON.stringify(e)}d();c();l();u();d();c();l();u();var Ln=e=>e;d();c();l();u();d();c();l();u();function Un(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function We(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Un(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Un(),extendedResults:{},searchAction:void 0}}d();c();l();u();function ft(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var mt=e=>{let{response:t}=e;return t.body?$m(e):Hm(t)},$m=e=>Gm(e)?Wm(e):zm(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Hm=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function zm(e){return e.body.statusCode!==void 0}function Gm(e){return e.body.exception!==void 0}var Wm=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});d();c();l();u();var gt=class{constructor(){pe(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController;_this.currentAbortController=new s.AbortController;let o=_this.currentAbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return yield t(o?.signal??null)}finally{_this.currentAbortController===o&&(_this.currentAbortController=null)}})()}};d();c();l();u();d();c();l();u();var Xr=class{constructor(t){pe(this,"_basePath");pe(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};d();c();l();u();function Tc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}d();c();l();u();var rt=(e,t,r,n)=>{let o=new Xr(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var Dc=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield $e.call({...rt(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:ft(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=Tc(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Km(a)?{success:a}:{error:mt({response:r,body:a})}});return function Dc(_x,_x2){return _ref2.apply(this,arguments)}}();function Km(e){return typeof e=="string"}d();c();l();u();function Ym(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Jm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Qn(e,t){if(t&&e.name==="AbortError")return{error:Jm(e)};if(e instanceof jt)return{error:Ym(e)};throw e}var Bn=class{constructor(t){this.options=t;pe(this,"apiCallsQueues",{unknown:new gt,mainSearch:new gt,facetValues:new gt,foldingCollection:new gt,instantResults:new gt})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"POST","application/json","/plan"),requestParams:ft(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return Qn(r);let n=yield r.json();return Zm(n)?{success:n}:{error:mt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:ft(t),..._this3.options});if(r instanceof Error)return Qn(r);let n=yield r.json(),o={response:r,body:n};return Xm(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:mt(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(m=>$e.call({...rt(t,"POST","application/json",""),requestParams:ft(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:m??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Qn(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return qc(i)?(a.body=jc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:mt(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"POST","application/json","/facet"),requestParams:ft(t),requestMetadata:{method:"facetSearch"},..._this5.options});if(r instanceof Error)throw r;let n=yield r.json(),o={response:r,body:n};return(yield _this5.options.postprocessFacetSearchResponseMiddleware(o)).body})()}recommendations(t){var _this6=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"POST","application/json",""),requestParams:ft(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(qc(n)){let o={response:r,body:n};return o.body=jc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:mt({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return Dc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return eg(n)?{success:n}:{error:mt({response:r,body:n})}})()}},$n=e=>e.success!==void 0,Oe=e=>e.error!==void 0;function qc(e){return e.results!==void 0}function jc(e){let t=Un();return X(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function Xm(e){return e.completions!==void 0}function Zm(e){return e.preprocessingOutput!==void 0}function eg(e){return e.fields!==void 0}d();c();l();u();var Mc=e=>e,Nc=e=>e,_c=e=>e;d();c();l();u();d();c();l();u();d();c();l();u();function Ae(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var tg=typeof Symbol=="function"&&Symbol.observable||"@@observable",Vc=tg,Ki=()=>Math.random().toString(36).substring(7).split("").join("."),rg={INIT:`@@redux/INIT${Ki()}`,REPLACE:`@@redux/REPLACE${Ki()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ki()}`},Hn=rg;function Ke(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Yi(e,t,r){if(typeof e!="function")throw new Error(Ae(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ae(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ae(1));return r(Yi)(e,t)}let n=e,o=t,i=new Map,a=i,m=0,f=!1;function p(){a===i&&(a=new Map,i.forEach((P,x)=>{a.set(x,P)}))}function y(){if(f)throw new Error(Ae(3));return o}function h(P){if(typeof P!="function")throw new Error(Ae(4));if(f)throw new Error(Ae(5));let x=!0;p();let F=m++;return a.set(F,P),function(){if(x){if(f)throw new Error(Ae(6));x=!1,p(),a.delete(F),i=null}}}function S(P){if(!Ke(P))throw new Error(Ae(7));if(typeof P.type>"u")throw new Error(Ae(8));if(typeof P.type!="string")throw new Error(Ae(17));if(f)throw new Error(Ae(9));try{f=!0,o=n(o,P)}finally{f=!1}return(i=a).forEach(F=>{F()}),P}function g(P){if(typeof P!="function")throw new Error(Ae(10));n=P,S({type:Hn.REPLACE})}function v(){let P=h;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(Ae(11));function F(){let E=x;E.next&&E.next(y())}return F(),{unsubscribe:P(F)}},[Vc](){return this}}}return S({type:Hn.INIT}),{dispatch:S,subscribe:h,getState:y,replaceReducer:g,[Vc]:v}}function ng(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Hn.INIT})>"u")throw new Error(Ae(12));if(typeof r(void 0,{type:Hn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ae(13))})}function tr(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let m=t[a];typeof e[m]=="function"&&(r[m]=e[m])}let n=Object.keys(r),o,i;try{ng(r)}catch(a){i=a}return function(m={},f){if(i)throw i;let p=!1,y={};for(let h=0;h<n.length;h++){let S=n[h],g=r[S],v=m[S],R=g(v,f);if(typeof R>"u"){let P=f&&f.type;throw new Error(Ae(14))}y[S]=R,p=p||R!==v}return p=p||n.length!==Object.keys(m).length,p?y:m}}function rr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Lc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(Ae(15))},a={getState:o.getState,dispatch:(f,...p)=>i(f,...p)},m=e.map(f=>f(a));return i=rr(...m)(o.dispatch),{...o,dispatch:i}}}function zn(e){return Ke(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var aa=Symbol.for("immer-nothing"),Zr=Symbol.for("immer-draftable"),Te=Symbol.for("immer-state");function be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Nt=Object.getPrototypeOf;function Me(e){return!!e&&!!e[Te]}function De(e){return e?Hc(e)||Array.isArray(e)||!!e[Zr]||!!e.constructor?.[Zr]||nr(e)||an(e):!1}var og=Object.prototype.constructor.toString();function Hc(e){if(!e||typeof e!="object")return!1;let t=Nt(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===og}function sa(e){return Me(e)||be(15,e),e[Te].base_}function en(e,t){_t(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function _t(e){let t=e[Te];return t?t.type_:Array.isArray(e)?1:nr(e)?2:an(e)?3:0}function tn(e,t){return _t(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ji(e,t){return _t(e)===2?e.get(t):e[t]}function zc(e,t,r){let n=_t(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ig(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nr(e){return e instanceof Map}function an(e){return e instanceof Set}function Mt(e){return e.copy_||e.base_}function ea(e,t){if(nr(e))return new Map(e);if(an(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Hc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Te];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],m=n[a];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(n[a]={configurable:!0,writable:!0,enumerable:m.enumerable,value:e[a]})}return Object.create(Nt(e),n)}else{let n=Nt(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function Yn(e,t=!1){return Jn(e)||Me(e)||!De(e)||(_t(e)>1&&Object.defineProperties(e,{set:{value:Gn},add:{value:Gn},clear:{value:Gn},delete:{value:Gn}}),Object.freeze(e),t&&Object.values(e).forEach(r=>Yn(r,!0))),e}function Gn(){be(2)}function Jn(e){return Object.isFrozen(e)}var ta={};function Vt(e){let t=ta[e];return t||be(0,e),t}function ag(e,t){ta[e]||(ta[e]=t)}var rn;function Gc(){return rn}function sg(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Uc(e,t){t&&(Vt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ra(e){na(e),e.drafts_.forEach(cg),e.drafts_=null}function na(e){e===rn&&(rn=e.parent_)}function Qc(e){return rn=sg(rn,e)}function cg(e){let t=e[Te];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Bc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Te].modified_&&(ra(t),be(4)),De(e)&&(e=Wn(t,e),t.parent_||Kn(t,e)),t.patches_&&Vt("Patches").generateReplacementPatches_(r[Te].base_,e,t.patches_,t.inversePatches_)):e=Wn(t,r,[]),ra(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==aa?e:void 0}function Wn(e,t,r){if(Jn(t))return t;let n=t[Te];if(!n)return en(t,(o,i)=>$c(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Kn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),en(i,(m,f)=>$c(e,n,o,m,f,r,a)),Kn(e,o,!1),r&&e.patches_&&Vt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function $c(e,t,r,n,o,i,a){if(Me(o)){let m=i&&t&&t.type_!==3&&!tn(t.assigned_,n)?i.concat(n):void 0,f=Wn(e,o,m);if(zc(r,n,f),Me(f))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(De(o)&&!Jn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Wn(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(nr(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Kn(e,o)}}function Kn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Yn(t,r)}function ug(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Gc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=ca;r&&(o=[n],i=nn);let{revoke:a,proxy:m}=Proxy.revocable(o,i);return n.draft_=m,n.revoke_=a,m}var ca={get(e,t){if(t===Te)return e;let r=Mt(e);if(!tn(r,t))return lg(e,r,t);let n=r[t];return e.finalized_||!De(n)?n:n===Xi(e.base_,t)?(Zi(e),e.copy_[t]=ia(n,e)):n},has(e,t){return t in Mt(e)},ownKeys(e){return Reflect.ownKeys(Mt(e))},set(e,t,r){let n=Wc(Mt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Xi(Mt(e),t),i=o?.[Te];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(ig(r,o)&&(r!==void 0||tn(e.base_,t)))return!0;Zi(e),oa(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Xi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Zi(e),oa(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Mt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){be(11)},getPrototypeOf(e){return Nt(e.base_)},setPrototypeOf(){be(12)}},nn={};en(ca,(e,t)=>{nn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});nn.deleteProperty=function(e,t){return nn.set.call(this,e,t,void 0)};nn.set=function(e,t,r){return ca.set.call(this,e[0],t,r,e[0])};function Xi(e,t){let r=e[Te];return(r?Mt(r):e)[t]}function lg(e,t,r){let n=Wc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Wc(e,t){if(!(t in e))return;let r=Nt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Nt(r)}}function oa(e){e.modified_||(e.modified_=!0,e.parent_&&oa(e.parent_))}function Zi(e){e.copy_||(e.copy_=ea(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var dg=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(f=i,...p){return a.produce(f,y=>r.call(this,y,...p))}}typeof r!="function"&&be(6),n!==void 0&&typeof n!="function"&&be(7);let o;if(De(t)){let i=Qc(this),a=ia(t,void 0),m=!0;try{o=r(a),m=!1}finally{m?ra(i):na(i)}return Uc(i,n),Bc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===aa&&(o=void 0),this.autoFreeze_&&Yn(o,!0),n){let i=[],a=[];Vt("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else be(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...m)=>this.produceWithPatches(a,f=>t(f,...m));let n,o;return[this.produce(t,r,(a,m)=>{n=a,o=m}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){De(e)||be(8),Me(e)&&(e=Kc(e));let t=Qc(this),r=ia(e,void 0);return r[Te].isManual_=!0,na(t),r}finishDraft(e,t){let r=e&&e[Te];(!r||!r.isManual_)&&be(9);let{scope_:n}=r;return Uc(n,t),Bc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Vt("Patches").applyPatches_;return Me(e)?n(e,t):this.produce(e,o=>n(o,t))}};function ia(e,t){let r=nr(e)?Vt("MapSet").proxyMap_(e,t):an(e)?Vt("MapSet").proxySet_(e,t):ug(e,t);return(t?t.scope_:Gc()).drafts_.push(r),r}function Kc(e){return Me(e)||be(10,e),Yc(e)}function Yc(e){if(!De(e)||Jn(e))return e;let t=e[Te],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ea(e,t.scope_.immer_.useStrictShallowCopy_)}else r=ea(e,!0);return en(r,(n,o)=>{zc(r,n,Yc(o))}),t&&(t.finalized_=!1),r}function Jc(){let t="replace",r="add",n="remove";function o(S,g,v,R){switch(S.type_){case 0:case 2:return a(S,g,v,R);case 1:return i(S,g,v,R);case 3:return m(S,g,v,R)}}function i(S,g,v,R){let{base_:P,assigned_:x}=S,F=S.copy_;F.length<P.length&&([P,F]=[F,P],[v,R]=[R,v]);for(let w=0;w<P.length;w++)if(x[w]&&F[w]!==P[w]){let E=g.concat([w]);v.push({op:t,path:E,value:h(F[w])}),R.push({op:t,path:E,value:h(P[w])})}for(let w=P.length;w<F.length;w++){let E=g.concat([w]);v.push({op:r,path:E,value:h(F[w])})}for(let w=F.length-1;P.length<=w;--w){let E=g.concat([w]);R.push({op:n,path:E})}}function a(S,g,v,R){let{base_:P,copy_:x}=S;en(S.assigned_,(F,w)=>{let E=Ji(P,F),M=Ji(x,F),O=w?tn(P,F)?t:r:n;if(E===M&&O===t)return;let I=g.concat(F);v.push(O===n?{op:O,path:I}:{op:O,path:I,value:M}),R.push(O===r?{op:n,path:I}:O===n?{op:r,path:I,value:h(E)}:{op:t,path:I,value:h(E)})})}function m(S,g,v,R){let{base_:P,copy_:x}=S,F=0;P.forEach(w=>{if(!x.has(w)){let E=g.concat([F]);v.push({op:n,path:E,value:w}),R.unshift({op:r,path:E,value:w})}F++}),F=0,x.forEach(w=>{if(!P.has(w)){let E=g.concat([F]);v.push({op:r,path:E,value:w}),R.unshift({op:n,path:E,value:w})}F++})}function f(S,g,v,R){v.push({op:t,path:[],value:g===aa?void 0:g}),R.push({op:t,path:[],value:S})}function p(S,g){return g.forEach(v=>{let{path:R,op:P}=v,x=S;for(let M=0;M<R.length-1;M++){let O=_t(x),I=R[M];typeof I!="string"&&typeof I!="number"&&(I=""+I),(O===0||O===1)&&(I==="__proto__"||I==="constructor")&&be(19),typeof x=="function"&&I==="prototype"&&be(19),x=Ji(x,I),typeof x!="object"&&be(18,R.join("/"))}let F=_t(x),w=y(v.value),E=R[R.length-1];switch(P){case t:switch(F){case 2:return x.set(E,w);case 3:be(16);default:return x[E]=w}case r:switch(F){case 1:return E==="-"?x.push(w):x.splice(E,0,w);case 2:return x.set(E,w);case 3:return x.add(w);default:return x[E]=w}case n:switch(F){case 1:return x.splice(E,1);case 2:return x.delete(E);case 3:return x.delete(v.value);default:return delete x[E]}default:be(17,P)}}),S}function y(S){if(!De(S))return S;if(Array.isArray(S))return S.map(y);if(nr(S))return new Map(Array.from(S.entries()).map(([v,R])=>[v,y(R)]));if(an(S))return new Set(Array.from(S).map(y));let g=Object.create(Nt(S));for(let v in S)g[v]=y(S[v]);return tn(S,Zr)&&(g[Zr]=S[Zr]),g}function h(S){return Me(S)?y(S):S}ag("Patches",{applyPatches_:p,generatePatches_:o,generateReplacementPatches_:f})}var on=new dg,nt=on.produce,Xn=on.produceWithPatches.bind(on);var ua=on.applyPatches.bind(on);d();c();l();u();function pg(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function fg(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function mg(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Xc=e=>Array.isArray(e)?e:[e];function gg(e){let t=Array.isArray(e[0])?e[0]:e;return mg(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function yg(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var aR=Symbol();var sR=Object.getPrototypeOf({});var hg=class{constructor(e){this.value=e}deref(){return this.value}},Sg=typeof WeakRef<"u"?WeakRef:hg,vg=0,Zc=1;function Zn(){return{s:vg,v:void 0,o:null,p:null}}function or(e,t={}){let r=Zn(),{resultEqualityCheck:n}=t,o,i=0;function a(){let m=r,{length:f}=arguments;for(let h=0,S=f;h<S;h++){let g=arguments[h];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=m.o;v===null&&(m.o=v=new WeakMap);let R=v.get(g);R===void 0?(m=Zn(),v.set(g,m)):m=R}else{let v=m.p;v===null&&(m.p=v=new Map);let R=v.get(g);R===void 0?(m=Zn(),v.set(g,m)):m=R}}let p=m,y;if(m.s===Zc)y=m.v;else if(y=e.apply(null,arguments),i++,n){let h=o?.deref?.()??o;h!=null&&n(h,y)&&(y=h,i!==0&&i--),o=typeof y=="object"&&y!==null||typeof y=="function"?new Sg(y):y}return p.s=Zc,p.v=y,y}return a.clearCache=()=>{r=Zn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function eu(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,m,f={},p=o.pop();typeof p=="object"&&(f=p,p=o.pop()),pg(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);let y={...r,...f},{memoize:h,memoizeOptions:S=[],argsMemoize:g=or,argsMemoizeOptions:v=[],devModeChecks:R={}}=y,P=Xc(S),x=Xc(v),F=gg(o),w=h(function(){return i++,p.apply(null,arguments)},...P),E=!0,M=g(function(){a++;let I=yg(F,arguments);return m=w.apply(null,I),m},...x);return Object.assign(M,{resultFunc:p,memoizedResultFunc:w,dependencies:F,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>m,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:h,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var se=eu(or),Ag=Object.assign((e,t=se)=>{fg(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,m,f)=>(a[r[f]]=m,a),{}))},{withTypes:()=>Ag});d();c();l();u();function tu(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var ru=tu(),nu=tu;var bg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rr:rr.apply(null,arguments)},RR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Cg=e=>e&&typeof e.match=="function";function T(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(He(0));return{type:e,payload:o.payload,...("meta"in o&&{meta:o.meta}),...("error"in o&&{error:o.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>zn(n)&&n.type===e,r}var cu=class sn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,sn.prototype)}static get[Symbol.species](){return sn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new sn(...t[0].concat(this)):new sn(...t.concat(this))}};function ou(e){return De(e)?nt(e,()=>{}):e}function iu(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function wg(e){return typeof e=="boolean"}var xg=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new cu;return r&&(wg(r)?a.push(ru):a.push(nu(r.extraArgument))),a},cn="RTK_autoBatch",ar=()=>e=>({payload:e,meta:{[cn]:!0}}),au=e=>t=>{setTimeout(t,e)},Rg=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,m=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:au(10):e.type==="callback"?e.queueNotification:au(e.timeout),p=()=>{a=!1,i&&(i=!1,m.forEach(y=>y()))};return Object.assign({},n,{subscribe(y){let h=()=>o&&y(),S=n.subscribe(h);return m.add(y),()=>{S(),m.delete(y)}},dispatch(y){try{return o=!y?.meta?.[cn],i=!o,i&&(a||(a=!0,f(p))),n.dispatch(y)}finally{o=!0}}})},Eg=e=>function(r){let{autoBatch:n=!0}=r??{},o=new cu(e);return n&&o.push(Rg(typeof n=="object"?n:void 0)),o};function uu(e){let t=xg(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},m;if(typeof r=="function")m=r;else if(Ke(r))m=tr(r);else throw new Error(He(1));let f;typeof n=="function"?f=n(t):f=t();let p=rr;o&&(p=bg({trace:!1,...(typeof o=="object"&&o)}));let y=Lc(...f),h=Eg(y),S=typeof a=="function"?a(h):h(),g=p(...S);return Yi(m,i,g)}function lu(e){let t={},r=[],n,o={addCase(i,a){let m=typeof i=="string"?i:i.type;if(!m)throw new Error(He(28));if(m in t)throw new Error(He(29));return t[m]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function Ig(e){return typeof e=="function"}function ge(e,t){let[r,n,o]=lu(t),i;if(Ig(e))i=()=>ou(e());else{let m=ou(e);i=()=>m}function a(m=i(),f){let p=[r[f.type],...n.filter(({matcher:y})=>y(f)).map(({reducer:y})=>y)];return p.filter(y=>!!y).length===0&&(p=[o]),p.reduce((y,h)=>{if(h)if(Me(y)){let g=h(y,f);return g===void 0?y:g}else{if(De(y))return nt(y,S=>h(S,f));{let S=h(y,f);if(S===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return y},m)}return a.getInitialState=i,a}var du=(e,t)=>Cg(e)?e.match(t):e(t);function Ye(...e){return t=>e.some(r=>du(r,t))}function ir(...e){return t=>e.every(r=>du(r,t))}function to(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function un(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ro(...e){return e.length===0?t=>to(t,["pending"]):un(e)?Ye(...e.map(t=>t.pending)):ro()(e[0])}function Lt(...e){return e.length===0?t=>to(t,["rejected"]):un(e)?Ye(...e.map(t=>t.rejected)):Lt()(e[0])}function ln(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ir(Lt(...e),t):un(e)?ir(Lt(...e),t):ln()(e[0])}function ot(...e){return e.length===0?t=>to(t,["fulfilled"]):un(e)?Ye(...e.map(t=>t.fulfilled)):ot()(e[0])}function no(...e){return e.length===0?t=>to(t,["pending","fulfilled","rejected"]):un(e)?Ye(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):no()(e[0])}var Pg="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",oo=(e=21)=>{let t="",r=e;for(;r--;)t+=Pg[Math.random()*64|0];return t},kg=["name","message","stack","code"],la=class{constructor(e,t){pe(this,"_type");this.payload=e,this.meta=t}},su=class{constructor(e,t){pe(this,"_type");this.payload=e,this.meta=t}},Fg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of kg)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},le=(()=>{function e(t,r,n){let o=T(t+"/fulfilled",(f,p,y,h)=>({payload:f,meta:{...(h||{}),arg:y,requestId:p,requestStatus:"fulfilled"}})),i=T(t+"/pending",(f,p,y)=>({payload:void 0,meta:{...(y||{}),arg:p,requestId:f,requestStatus:"pending"}})),a=T(t+"/rejected",(f,p,y,h,S)=>({payload:h,error:(n&&n.serializeError||Fg)(f||"Rejected"),meta:{...(S||{}),arg:y,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function m(f){return(p,y,h)=>{let S=n?.idGenerator?n.idGenerator(f):oo(),g=new s.AbortController,v,R;function P(F){R=F,g.abort()}let x=_asyncToGenerator(function*(){let F;try{let E=n?.condition?.(f,{getState:y,extra:h});if(Tg(E)&&(E=yield E),E===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let M=new Promise((O,I)=>{v=()=>{I({name:"AbortError",message:R||"Aborted"})},g.signal.addEventListener("abort",v)});p(i(S,f,n?.getPendingMeta?.({requestId:S,arg:f},{getState:y,extra:h}))),F=yield Promise.race([M,Promise.resolve(r(f,{dispatch:p,getState:y,extra:h,requestId:S,signal:g.signal,abort:P,rejectWithValue:(O,I)=>new la(O,I),fulfillWithValue:(O,I)=>new su(O,I)})).then(O=>{if(O instanceof la)throw O;return O instanceof su?o(O.payload,S,f,O.meta):o(O,S,f)})])}catch(E){F=E instanceof la?a(null,S,f,E.payload,E.meta):a(E,S,f)}finally{v&&g.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&a.match(F)&&F.meta.condition||p(F),F})();return Object.assign(x,{abort:P,requestId:S,arg:f,unwrap(){return x.then(Og)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:Ye(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Og(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Tg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var pu=Symbol.for("rtk-slice-createasyncthunk"),FR={[pu]:le};function Dg(e,t){return`${e}/${t}`}function qg({creators:e}={}){let t=e?.asyncThunk?.[pu];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(He(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(Mg()):n.reducers)||{},m=Object.keys(a),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(F,w){let E=typeof F=="string"?F:F.type;if(!E)throw new Error(He(12));if(E in f.sliceCaseReducersByType)throw new Error(He(13));return f.sliceCaseReducersByType[E]=w,p},addMatcher(F,w){return f.sliceMatchers.push({matcher:F,reducer:w}),p},exposeAction(F,w){return f.actionCreators[F]=w,p},exposeCaseReducer(F,w){return f.sliceCaseReducersByName[F]=w,p}};m.forEach(F=>{let w=a[F],E={reducerName:F,type:Dg(o,F),createNotation:typeof n.reducers=="function"};_g(w)?Lg(E,w,p,t):Ng(E,w,p)});function y(){let[F={},w=[],E=void 0]=typeof n.extraReducers=="function"?lu(n.extraReducers):[n.extraReducers],M={...F,...f.sliceCaseReducersByType};return ge(n.initialState,O=>{for(let I in M)O.addCase(I,M[I]);for(let I of f.sliceMatchers)O.addMatcher(I.matcher,I.reducer);for(let I of w)O.addMatcher(I.matcher,I.reducer);E&&O.addDefaultCase(E)})}let h=F=>F,S=new Map,g;function v(F,w){return g||(g=y()),g(F,w)}function R(){return g||(g=y()),g.getInitialState()}function P(F,w=!1){function E(O){let I=O[F];return typeof I>"u"&&w&&(I=R()),I}function M(O=h){let I=iu(S,w,()=>new WeakMap);return iu(I,O,()=>{let k={};for(let[D,N]of Object.entries(n.selectors??{}))k[D]=jg(N,O,R,w);return k})}return{reducerPath:F,getSelectors:M,get selectors(){return M(E)},selectSlice:E}}let x={name:o,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:R,...P(i),injectInto(F,{reducerPath:w,...E}={}){let M=w??i;return F.inject({reducerPath:M,reducer:v},E),{...x,...P(M,!0)}}};return x}}function jg(e,t,r,n){function o(i,...a){let m=t(i);return typeof m>"u"&&n&&(m=r()),e(m,...a)}return o.unwrapped=e,o}var Ut=qg();function Mg(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Ng({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!Vg(n))throw new Error(He(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?T(e,a):T(e))}function _g(e){return e._reducerDefinitionType==="asyncThunk"}function Vg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Lg({type:e,reducerName:t},r,n,o){if(!o)throw new Error(He(18));let{payloadCreator:i,fulfilled:a,pending:m,rejected:f,settled:p,options:y}=r,h=o(e,i,y);n.exposeAction(t,h),a&&n.addCase(h.fulfilled,a),m&&n.addCase(h.pending,m),f&&n.addCase(h.rejected,f),p&&n.addMatcher(h.settled,p),n.exposeCaseReducer(t,{fulfilled:a||eo,pending:m||eo,rejected:f||eo,settled:p||eo})}function eo(){}var fu="listener",mu="completed",gu="cancelled",OR=`task-${gu}`,TR=`task-${mu}`,DR=`${fu}-${gu}`,qR=`${fu}-${mu}`;var{assign:yu}=Object;var da="listenerMiddleware";var Ug=yu(T(`${da}/add`),{withTypes:()=>Ug}),jR=T(`${da}/removeAll`),Qg=yu(T(`${da}/remove`),{withTypes:()=>Qg});var MR=Symbol.for("rtk-state-proxy-original");function He(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}d();c();l();u();var W=new H({required:!0,emptyAllowed:!1}),Ce=new H({required:!1,emptyAllowed:!1}),we=new H({required:!0,emptyAllowed:!0}),GR=new H({required:!1,emptyAllowed:!0}),io=new ie({each:W,required:!0}),hu=new H({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Su=new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),WR=new H({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),it=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Ve=(e,t)=>{if("required"in t)return{payload:new Fe({value:t}).validate({value:e}).value};let o=new K({options:{required:!0},values:t}).validate(e);if(o)throw new Wr(o);return{payload:e}},Q=(e,t)=>{try{return Ve(e,t)}catch(r){return{payload:e,error:it(r)}}},vu=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return bu(e,t,r,o,"Controller initialization error")},Au=(e,t,r,n)=>{let o=`Check the options of ${n}`;return bu(e,t,r,o,"Controller initialization error")},bu=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};d();c();l();u();var sr="3.34.2",Cu=["@coveo/atomic","@coveo/quantic"];var pa=()=>Ce,wu=()=>W,yt=T("configuration/updateBasicConfiguration",e=>Q(e,{accessToken:Ce,environment:new H({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:Ce})),Je=T("configuration/updateSearchConfiguration",e=>Q(e,{proxyBaseUrl:new H({required:!1,url:!0}),pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:Ce,timezone:Ce,locale:Ce,authenticationProviders:new ie({required:!1,each:W})})),Bg={enabled:new ne({default:!0}),originContext:pa(),originLevel2:pa(),originLevel3:pa(),proxyBaseUrl:new H({required:!1,url:!0}),runtimeEnvironment:new fe,anonymous:new ne({default:!1}),deviceId:Ce,userDisplayName:Ce,documentLocation:Ce,trackingId:Su,analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new K({options:{required:!1},values:Cu.reduce((e,t)=>(e[t]=hu,e),{})})},cr=T("configuration/updateAnalyticsConfiguration",e=>Q(e,Bg)),ur=T("configuration/analytics/disable"),lr=T("configuration/analytics/enable"),ao=T("configuration/analytics/originlevel2",e=>Q(e,{originLevel2:wu()})),so=T("configuration/analytics/originlevel3",e=>Q(e,{originLevel3:wu()}));d();c();l();u();d();c();l();u();d();c();l();u();var xu={q:new H,enableQuerySyntax:new ne,aq:new H,cq:new H,firstResult:new J({min:0}),numberOfResults:new J({min:0}),sortCriteria:new H,f:new K,fExcluded:new K,cf:new K,nf:new K,mnf:new K,df:new K,debug:new ne,sf:new K,tab:new H,af:new K};var ht=T("searchParameters/restore",e=>Q(e,xu)),Ru=T("searchParameters/restoreTab",e=>Q(e,W));d();c();l();u();var co=T("debug/enable"),uo=T("debug/disable");d();c();l();u();var lo=()=>!1;var po=ge(lo(),e=>{e.addCase(co,()=>!0).addCase(uo,()=>!1).addCase(ht,(t,r)=>r.payload.debug??t)});d();c();l();u();var dr=T("pipeline/set",e=>Q(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();d();c();l();u();var $g=T("history/undo"),Hg=T("history/redo"),Xe=T("history/snapshot"),nI=le("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t($g()),yield t(qe())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),oI=le("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(Hg()),yield t(qe())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),qe=le("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());d();c();l();u();var pr=()=>"";var fr=ge(pr(),e=>{e.addCase(dr,(t,r)=>r.payload).addCase(qe.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Je,(t,r)=>r.payload.pipeline||t)});d();c();l();u();d();c();l();u();var fo=T("app/setError");d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var mr=class e{static set(t,r,n){let o,i,a;n&&(i=new Date,i.setTime(i.getTime()+n));let m=window.location.hostname,f=/^(\d{1,3}\.){3}\d{1,3}$/,p=/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/;f.test(m)||p.test(m)||m.indexOf(".")===-1?fa(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],fa(t,r,i,o))}static get(t){let r=t+"=",n=document.cookie.split(";");for(let o=0;o<n.length;o++){let i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function fa(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}d();c();l();u();function zg(){return typeof navigator<"u"}function Eu(){try{return typeof localStorage<"u"}catch{return!1}}function Iu(){try{return typeof sessionStorage<"u"}catch{return!1}}function Pu(){return!!(zg()&&navigator.cookieEnabled)}var ku=null;function Fu(){return ku||(Eu()?localStorage:Pu()?new ma:Iu()?sessionStorage:new ga)}var gr=class gr{getItem(t){return mr.get(`${gr.prefix}${t}`)}removeItem(t){mr.erase(`${gr.prefix}${t}`)}setItem(t,r,n){mr.set(`${gr.prefix}${t}`,r,n)}};pe(gr,"prefix","coveo_");var ma=gr;var ga=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var mo="__coveo.analytics.history",Gg=20,Wg=1e3*60,Kg=75,Qt=class Qt{constructor(t){pe(this,"store");this.store=t||Fu()}static getInstance(t){return Qt.instance||(Qt.instance=new Qt(t)),Qt.instance}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!==null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){var _this9=this;return _asyncToGenerator(function*(){t.internalTime=new Date().getTime(),t=_this9.cropQueryElement(_this9.stripEmptyQuery(t));let r=yield _this9.getHistoryWithInternalTimeAsync();r!==null?_this9.isValidEntry(t)&&_this9.setHistory([t].concat(r)):_this9.setHistory([t])})()}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){var _this0=this;return _asyncToGenerator(function*(){let t=yield _this0.getHistoryWithInternalTimeAsync();return _this0.stripEmptyQueries(_this0.stripInternalTime(t))})()}getHistoryWithInternalTime(){try{let t=this.store.getItem(mo);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){var _this1=this;return _asyncToGenerator(function*(){try{let t=yield _this1.store.getItem(mo);return t?JSON.parse(t):[]}catch{return[]}})()}setHistory(t){try{this.store.setItem(mo,JSON.stringify(t.slice(0,Gg)))}catch{}}clear(){try{this.store.removeItem(mo)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Kg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>Wg:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};pe(Qt,"instance",null);var ya=Qt,Le=ya;d();c();l();u();d();c();l();u();var yr=se(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${sr}`));d();c();l();u();d();c();l();u();function at(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function q(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(y){try{p(n.next(y))}catch(h){a(h)}}function f(y){try{p(n.throw(y))}catch(h){a(h)}}function p(y){y.done?i(y.value):o(y.value).then(m,f)}p((n=n.apply(e,t||[])).next())})}var ae;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ae||(ae={}));function va(){return typeof window<"u"}function Ta(){return typeof navigator<"u"}function hr(){return typeof document<"u"}function Aa(){try{return typeof localStorage<"u"}catch{return!1}}function Yg(){try{return typeof sessionStorage<"u"}catch{return!1}}function $u(){return Ta()&&navigator.cookieEnabled}var Jg=[ae.click,ae.custom,ae.search,ae.view],Xg=(e,t)=>Jg.indexOf(e)!==-1?Object.assign({language:hr()?document.documentElement.lang:"unknown",userAgent:Ta()?navigator.userAgent:"unknown"},t):t,pn=class e{static set(t,r,n){var o,i,a,m;n&&(i=new Date,i.setTime(i.getTime()+n)),m=window.location.hostname,m.indexOf(".")===-1?Ou(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],Ou(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function Ou(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Zg(){return Aa()?localStorage:$u()?new fn:Yg()?sessionStorage:new vr}var fn=class e{getItem(t){return pn.get(`${e.prefix}${t}`)}removeItem(t){pn.erase(`${e.prefix}${t}`)}setItem(t,r,n){pn.set(`${e.prefix}${t}`,r,n)}};fn.prefix="coveo_";var ba=class{constructor(){this.cookieStorage=new fn}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},vr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},go="__coveo.analytics.history",ey=20,ty=1e3*60,ry=75,So=class{constructor(t){this.store=t||Zg()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return q(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return q(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(go);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return q(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(go);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(go,JSON.stringify(t.slice(0,ey)))}catch{}}clear(){try{this.store.removeItem(go)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,ry)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ty:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var ny=(e,t)=>q(void 0,void 0,void 0,function*(){return e===ae.view?(yield oy(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),oy=e=>q(void 0,void 0,void 0,function*(){let t=new So,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),yo,iy=new Uint8Array(16);function ay(){if(!yo&&(yo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!yo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yo(iy)}var sy=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function vo(e){return typeof e=="string"&&sy.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function Hu(e,t=0){return xe[e[t+0]]+xe[e[t+1]]+xe[e[t+2]]+xe[e[t+3]]+"-"+xe[e[t+4]]+xe[e[t+5]]+"-"+xe[e[t+6]]+xe[e[t+7]]+"-"+xe[e[t+8]]+xe[e[t+9]]+"-"+xe[e[t+10]]+xe[e[t+11]]+xe[e[t+12]]+xe[e[t+13]]+xe[e[t+14]]+xe[e[t+15]]}function cy(e){if(!vo(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function uy(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var ly="6ba7b810-9dad-11d1-80b4-00c04fd430c8",dy="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function py(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=uy(o)),typeof i=="string"&&(i=cy(i)),((f=i)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let p=new Uint8Array(16+o.length);if(p.set(i),p.set(o,i.length),p=r(p),p[6]=p[6]&15|t,p[8]=p[8]&63|128,a){m=m||0;for(let y=0;y<16;++y)a[m+y]=p[y];return a}return Hu(p)}try{n.name=e}catch{}return n.DNS=ly,n.URL=dy,n}var fy=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Tu={randomUUID:fy};function Bt(e,t,r){if(Tu.randomUUID&&!t&&!e)return Tu.randomUUID();e=e||{};let n=e.random||(e.rng||ay)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Hu(n)}function my(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function ha(e,t){return e<<t|e>>>32-t}function gy(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let m=0;m<a.length;++m)e.push(a.charCodeAt(m))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let m=new Uint32Array(16);for(let f=0;f<16;++f)m[f]=e[a*64+f*4]<<24|e[a*64+f*4+1]<<16|e[a*64+f*4+2]<<8|e[a*64+f*4+3];i[a]=m}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let m=new Uint32Array(80);for(let g=0;g<16;++g)m[g]=i[a][g];for(let g=16;g<80;++g)m[g]=ha(m[g-3]^m[g-8]^m[g-14]^m[g-16],1);let f=r[0],p=r[1],y=r[2],h=r[3],S=r[4];for(let g=0;g<80;++g){let v=Math.floor(g/20),R=ha(f,5)+my(v,p,y,h)+S+t[v]+m[g]>>>0;S=h,h=y,y=ha(p,30)>>>0,p=f,f=R}r[0]=r[0]+f>>>0,r[1]=r[1]+p>>>0,r[2]=r[2]+y>>>0,r[3]=r[3]+h>>>0,r[4]=r[4]+S>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var yy=py("v5",80,gy),Du=yy,zu="2.30.49",qu=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,dn={pageview:"pageview",event:"event"},Ao=class{constructor({client:t,uuidGenerator:r=Bt}){this.client=t,this.uuidGenerator=r}},Ca=class extends Ao{constructor({client:t,uuidGenerator:r=Bt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=qu(window.location),this.lastReferrer=hr()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return null}}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:hr()?document.title:"",encoding:hr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===dn.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===dn.pageview?this.nextPageViewId:this.pageViewId,referrer:t===dn.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===dn.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return qu(window.location)}},St=class e{constructor(t,r){if(!vo(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return vo(i)?new e(i,Number.parseInt(o)*1e3):null}};St.cvo_cid="cvo_cid";St.expirationTime=120;var wa=class extends Ao{constructor({client:t,uuidGenerator:r=Bt}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return q(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(St.cvo_cid,new St(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};wa.Id="link";var Qe=Object.keys;function ho(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Sa=128,Gu=192,ju=224,Mu=240;function hy(e){return(e&248)===Mu?4:(e&Mu)===ju?3:(e&ju)===Gu?2:1}function Sy(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&Sa)!=Sa)break;if(r-=3,(n&Gu)!=Sa){t-r>=hy(n)*3&&(r=t);break}}return e.substring(0,r)}var xa={id:"svc_ticket_id",subject:"svc_ticket_subject",description:"svc_ticket_description",category:"svc_ticket_category",productId:"svc_ticket_product_id",custom:"svc_ticket_custom"},vy=Qe(xa).map(e=>xa[e]),Ay=[...vy].join("|"),by=new RegExp(`^(${Ay}$)`),Cy={svcAction:"svc_action",svcActionData:"svc_action_data"},wy=e=>Qe(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=xa[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),xy=e=>by.test(e),Ry=[xy],Nu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},_u={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ee={action:"pa",list:"pal",listSource:"pls"},bo={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Ey=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Ra={id:"quoteId",affiliation:"quoteAffiliation"},Ea={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Iy={add:Ee,bookmark_add:Ee,bookmark_remove:Ee,click:Ee,checkout:Ee,checkout_option:Ee,detail:Ee,impression:Ee,remove:Ee,refund:Object.assign(Object.assign({},Ee),bo),purchase:Object.assign(Object.assign({},Ee),bo),quickview:Ee,quote:Object.assign(Object.assign({},Ee),Ra),review:Object.assign(Object.assign({},Ee),Ea)},Py=Qe(Nu).map(e=>Nu[e]),ky=Qe(_u).map(e=>_u[e]),Fy=Qe(Ee).map(e=>Ee[e]),Oy=Qe(bo).map(e=>bo[e]),Ty=Qe(Ea).map(e=>Ea[e]),Dy=Qe(Ra).map(e=>Ra[e]),qy=[...Py,"custom"].join("|"),jy=[...ky,"custom"].join("|"),Wu="(pr[0-9]+)",Ku="(il[0-9]+pi[0-9]+)",My=new RegExp(`^${Wu}(${qy})$`),Ny=new RegExp(`^(${Ku}(${jy}))|(il[0-9]+nm)$`),_y=new RegExp(`^(${Fy.join("|")})$`),Vy=new RegExp(`^(${Oy.join("|")})$`),Ly=new RegExp(`^${Wu}custom$`),Uy=new RegExp(`^${Ku}custom$`),Qy=new RegExp(`^(${[...Ey,...Ty,...Dy].join("|")})$`),By=e=>My.test(e),$y=e=>Ny.test(e),Hy=e=>_y.test(e),zy=e=>Vy.test(e),Gy=e=>Qy.test(e),Wy=[$y,By,Hy,zy,Gy],Ky=[Ly,Uy],Yy={anonymizeIp:"aip"},Jy={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Xy={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Zy=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],eh=Object.assign(Object.assign(Object.assign(Object.assign({},Yy),Jy),Xy),Zy.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Ia=Object.assign(Object.assign({},eh),Cy),th=e=>{let t=!!e.action&&Iy[e.action]||{};return Qe(e).reduce((r,n)=>{let o=t[n]||Ia[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},rh=Qe(Ia).map(e=>Ia[e]),nh=e=>rh.indexOf(e)!==-1,oh=e=>e==="custom",ih=e=>[...Wy,...Ry,nh,oh].some(t=>t(e)),ah=e=>Qe(e).reduce((t,r)=>{let n=sh(r);return n?Object.assign(Object.assign({},t),ch(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),sh=e=>{let t;return[...Ky].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},ch=(e,t)=>Qe(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Pa=class{constructor(t){this.opts=t}sendEvent(t,r){return q(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error("navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like \"sendbeacon-polyfill\".");let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:m}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),f=this.encodeForEventType(t,m),p=new Blob([f],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,p)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return q(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:m,body:f}=a;o=m||t;try{i=JSON.parse(f)}catch(p){console.error("Unable to process the request body as a JSON string",p)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return q(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},ka=class{sendEvent(t,r){return q(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return q(this,void 0,void 0,function*(){return Promise.resolve()})}},Vu=A.fetch,Co=class{constructor(t){this.opts=t}sendEvent(t,r){return q(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",m={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},f=Object.assign(Object.assign({},m),i?yield i(m,"analyticsFetch"):{}),{url:p}=f,y=at(f,["url"]),h;try{h=yield Vu(p,y)}catch(S){console.error("An error has occured when sending the event.",S);return}if(h.ok){let S=yield h.json();return S.visitorId&&o.setCurrentVisitorId(S.visitorId),S}else{try{h.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,h,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return q(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Vu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}getVisitorIdParam(){return q(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},Fa=class{constructor(t,r){Aa()&&$u()?this.storage=new ba:Aa()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new vr),this.client=new Co(t),this.beaconClient=new Pa(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Oa=class{constructor(t,r){this.storage=r||new vr,this.client=new Co(t)}getClientDependingOnEventType(t){return this.client}},wo=class{constructor(){this.storage=new vr,this.client=new ka}getClientDependingOnEventType(t){return this.client}},uh="xx",lh=e=>e?.startsWith(uh)||!1,dh=`
|
|
26
|
+
`;return new sn(r)}var sn=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},ke=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw _m(n,t);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;r!==void 0&&(e[t]=r)}return e}},ce=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&H(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return this.baseConfig.required===!0}};function ge(e){return e===void 0}function Vm(e){return e===null}function H(e){return ge(e)||Vm(e)}var K=class{constructor(e={}){oe(this,"value");this.value=new ce(e)}validate(e){let t=this.value.validate(e);return t||(Lm(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Lm(e){return ge(e)||Rc(e)}function Rc(e){return typeof e=="boolean"}var $=class{constructor(e={}){oe(this,"value");this.config=e,this.value=new ce(e)}validate(e){let t=this.value.validate(e);return t||(Um(e)?e<this.config.min?`minimum value of ${this.config.min} not respected.`:e>this.config.max?`maximum value of ${this.config.max} not respected.`:null:"value is not a number.")}get default(){return this.value.default}get required(){return this.value.required}};function Um(e){return ge(e)||Ec(e)}function Ec(e){return typeof e=="number"&&!Number.isNaN(e)}var Qm=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,V=class{constructor(e={}){oe(this,"value");oe(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new ce(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,a=this.value.validate(e);if(a)return a;if(ge(e))return null;if(!Jn(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(Qm.test(e)&&new Date(e).toString()!=="Invalid Date")?"value is not a valid ISO8601 date string":null}get default(){return this.value.default}get required(){return this.value.required}};function Jn(e){return Object.prototype.toString.call(e)==="[object String]"}var Q=class{constructor(e={}){oe(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(ge(e))return this.config.options.required?"value is required and is currently undefined":null;if(!Ic(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&H(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=` ${i}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function Ic(e){return e!==void 0&&typeof e=="object"}var J=class{constructor(e={}){oe(this,"value");this.config=e,this.value=new ce(this.config)}validate(e){if(!H(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(H(e))return null;if(this.config.max!==void 0&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(this.config.min!==void 0&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(this.config.each!==void 0){let r="";return e.forEach(n=>{this.config.each.required&&H(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=` ${o}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return Rc(e)||Jn(e)||Ec(e)||Ic(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Fc(e){return Array.isArray(e)}var ea=class{constructor(e){oe(this,"value");this.config=e,this.value=new ce(e)}validate(e){let t=this.value.validate(e);return t!==null?t:ge(e)||Object.values(this.config.enum).find(n=>n===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};p();u();d();l();function Pc(e){return Array.isArray(e)}function Xn(e){return e.trim()===""}var Bm=new Set(["1",1,"yes",!0]);function kc(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>Bm.has(r))}function Oc(e){let t={};for(let[r,n]of e)t[r]=n;return t}function cn(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Zn(e,t,r={}){let n;return(...o)=>{let i=r.isImmediate&&!n;if(clearTimeout(n),n=setTimeout(()=>{n=void 0,r.isImmediate||e.apply(void 0,o)},t),i)return e.apply(void 0,o)}}function $m(e){if(Xn(e.openingDelimiter)||Xn(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(H(e.content)||Xn(e.content))return e.content;if(e.highlights.length===0)return lr(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,m=a+i.length;if(m>t)break;r+=lr(e.content.slice(n,a)),r+=e.openingDelimiter,r+=lr(e.content.slice(a,m)),r+=e.closingDelimiter,n=m}return n!==t&&(r+=lr(e.content.slice(n))),r}function Hm(e,t){return e=lr(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?ta(n,t.notMatchDelimiters):o?ta(o,t.exactMatchDelimiters):i?ta(i,t.correctionDelimiters):r)}function ta(e,t){return t?t.open+e+t.close:e}function lr(e){let t={"&":"&","<":"<",">":">","\"":""","'":"'","`":"`"},r=`(?:${Object.keys(t).join("|")})`,n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}p();u();d();l();var Bc=Wn(Vc(),1);p();u();d();l();var Ke=new Error("Failed to load reducers."),dr=class extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}},Bt=class extends Error{constructor(r,n){super();oe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};p();u();d();l();function Lc(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function Uc(e){return typeof e!="object"||!e?!1:Object.values(e).every(hg)}function hg(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Qc(e){return e===429}var ze=class e{static call(t){return _asyncToGenerator(function*(){let r=Sg(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,m=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let f=yield v(i,a);if(Qc(f.status))throw f;return f});return function m(){return _ref.apply(this,arguments)}}();try{let f=yield(0,Bc.backOff)(m,{startingDelay:100,timeMultiple:2,maxDelay:800,numOfAttempts:4,jitter:"full",retry:function(){var _ref2=_asyncToGenerator(function*(s){let g=s&&Qc(s.status);return g&&(n.info("Platform retrying request"),yield new Promise(h=>setTimeout(h,1e3))),g});return function retry(_x){return _ref2.apply(this,arguments)}}()});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new dr;case 404:throw new Bt(i,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new Bt(i):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,s=cn(f);try{let g=yield o(t,n,a);return{...t,...g}}catch(g){i.error(g,"Platform request preprocessing failed. Returning default request options.")}return s})()}};function Ie(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function yt(e,t="prod"){return`${Ie(e,t)}/rest/search/v2`}function to(e,t="prod"){return`${Ie(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Sg(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=vg(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(m&&{body:f}),signal:a}}function vg(e,t){return t==="application/x-www-form-urlencoded"?Uc(e)?Lc(e):"":JSON.stringify(e)}p();u();d();l();p();u();d();l();var ro=e=>e;p();u();d();l();p();u();d();l();function no(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function Je(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:no(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:no(),extendedResults:{},searchAction:void 0}}p();u();d();l();function ht(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var St=e=>{let{response:t}=e;return t.body?Ag(e):Cg(t)},Ag=e=>wg(e)?xg(e):bg(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Cg=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function bg(e){return e.body.statusCode!==void 0}function wg(e){return e.body.exception!==void 0}var xg=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});p();u();d();l();var vt=class{constructor(){oe(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController;_this.currentAbortController=new c.AbortController;let o=_this.currentAbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return yield t(o?.signal??null)}finally{_this.currentAbortController===o&&(_this.currentAbortController=null)}})()}};p();u();d();l();p();u();d();l();var dn=class{constructor(t){oe(this,"_basePath");oe(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};p();u();d();l();function $c(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}p();u();d();l();var at=(e,t,r,n)=>{let o=new dn(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var Hc=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(function*(e,t){let r=yield ze.call({...at(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:ht(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=$c(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Rg(a)?{success:a}:{error:St({response:r,body:a})}});return function Hc(_x2,_x3){return _ref3.apply(this,arguments)}}();function Rg(e){return typeof e=="string"}p();u();d();l();function Eg(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Ig(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function oo(e,t){if(t&&e.name==="AbortError")return{error:Ig(e)};if(e instanceof Bt)return{error:Eg(e)};throw e}var io=class{constructor(t){this.options=t;oe(this,"apiCallsQueues",{unknown:new vt,mainSearch:new vt,facetValues:new vt,foldingCollection:new vt,instantResults:new vt})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield ze.call({...at(t,"POST","application/json","/plan"),requestParams:ht(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return oo(r);let n=yield r.json();return Pg(n)?{success:n}:{error:St({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield ze.call({...at(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:ht(t),..._this3.options});if(r instanceof Error)return oo(r);let n=yield r.json(),o={response:r,body:n};return Fg(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:St(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(m=>ze.call({...at(t,"POST","application/json",""),requestParams:ht(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:m??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return oo(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return zc(i)?(a.body=Gc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:St(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield ze.call({...at(t,"POST","application/json","/facet"),requestParams:ht(t),requestMetadata:{method:"facetSearch"},..._this5.options});if(r instanceof Error)throw r;let n=yield r.json(),o={response:r,body:n};return(yield _this5.options.postprocessFacetSearchResponseMiddleware(o)).body})()}recommendations(t){var _this6=this;return _asyncToGenerator(function*(){let r=yield ze.call({...at(t,"POST","application/json",""),requestParams:ht(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(zc(n)){let o={response:r,body:n};return o.body=Gc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:St({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return Hc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield ze.call({...at(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return kg(n)?{success:n}:{error:St({response:r,body:n})}})()}},ao=e=>e.success!==void 0,Oe=e=>e.error!==void 0;function zc(e){return e.results!==void 0}function Gc(e){let t=no();return H(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function Fg(e){return e.completions!==void 0}function Pg(e){return e.preprocessingOutput!==void 0}function kg(e){return e.fields!==void 0}p();u();d();l();var Wc=e=>e,Yc=e=>e,Kc=e=>e;p();u();d();l();p();u();d();l();p();u();d();l();function ye(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Og=typeof Symbol=="function"&&Symbol.observable||"@@observable",Jc=Og,da=()=>Math.random().toString(36).substring(7).split("").join("."),Tg={INIT:`@@redux/INIT${da()}`,REPLACE:`@@redux/REPLACE${da()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${da()}`},so=Tg;function Xe(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function pa(e,t,r){if(typeof e!="function")throw new Error(ye(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ye(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ye(1));return r(pa)(e,t)}let n=e,o=t,i=new Map,a=i,m=0,f=!1;function s(){a===i&&(a=new Map,i.forEach((F,x)=>{a.set(x,F)}))}function g(){if(f)throw new Error(ye(3));return o}function h(F){if(typeof F!="function")throw new Error(ye(4));if(f)throw new Error(ye(5));let x=!0;s();let I=m++;return a.set(I,F),function(){if(x){if(f)throw new Error(ye(6));x=!1,s(),a.delete(I),i=null}}}function S(F){if(!Xe(F))throw new Error(ye(7));if(typeof F.type>"u")throw new Error(ye(8));if(typeof F.type!="string")throw new Error(ye(17));if(f)throw new Error(ye(9));try{f=!0,o=n(o,F)}finally{f=!1}return(i=a).forEach(I=>{I()}),F}function y(F){if(typeof F!="function")throw new Error(ye(10));n=F,S({type:so.REPLACE})}function b(){let F=h;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(ye(11));function I(){let E=x;E.next&&E.next(g())}return I(),{unsubscribe:F(I)}},[Jc](){return this}}}return S({type:so.INIT}),{dispatch:S,subscribe:h,getState:g,replaceReducer:y,[Jc]:b}}function Dg(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:so.INIT})>"u")throw new Error(ye(12));if(typeof r(void 0,{type:so.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ye(13))})}function pr(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let m=t[a];typeof e[m]=="function"&&(r[m]=e[m])}let n=Object.keys(r),o,i;try{Dg(r)}catch(a){i=a}return function(m={},f){if(i)throw i;let s=!1,g={};for(let h=0;h<n.length;h++){let S=n[h],y=r[S],b=m[S],R=y(b,f);if(typeof R>"u"){let F=f&&f.type;throw new Error(ye(14))}g[S]=R,s=s||R!==b}return s=s||n.length!==Object.keys(m).length,s?g:m}}function fr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Xc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(ye(15))},a={getState:o.getState,dispatch:(f,...s)=>i(f,...s)},m=e.map(f=>f(a));return i=fr(...m)(o.dispatch),{...o,dispatch:i}}}function co(e){return Xe(e)&&"type"in e&&typeof e.type=="string"}p();u();d();l();var ba=Symbol.for("immer-nothing"),pn=Symbol.for("immer-draftable"),Te=Symbol.for("immer-state");function he(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ht=Object.getPrototypeOf;function Ne(e){return!!e&&!!e[Te]}function De(e){return e?nu(e)||Array.isArray(e)||!!e[pn]||!!e.constructor?.[pn]||mr(e)||Sn(e):!1}var qg=Object.prototype.constructor.toString();function nu(e){if(!e||typeof e!="object")return!1;let t=Ht(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===qg}function wa(e){return Ne(e)||he(15,e),e[Te].base_}function fn(e,t){zt(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function zt(e){let t=e[Te];return t?t.type_:Array.isArray(e)?1:mr(e)?2:Sn(e)?3:0}function mn(e,t){return zt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function fa(e,t){return zt(e)===2?e.get(t):e[t]}function ou(e,t,r){let n=zt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Mg(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function mr(e){return e instanceof Map}function Sn(e){return e instanceof Set}function $t(e){return e.copy_||e.base_}function ya(e,t){if(mr(e))return new Map(e);if(Sn(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=nu(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Te];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],m=n[a];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(n[a]={configurable:!0,writable:!0,enumerable:m.enumerable,value:e[a]})}return Object.create(Ht(e),n)}else{let n=Ht(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function fo(e,t=!1){return mo(e)||Ne(e)||!De(e)||(zt(e)>1&&Object.defineProperties(e,{set:{value:uo},add:{value:uo},clear:{value:uo},delete:{value:uo}}),Object.freeze(e),t&&Object.values(e).forEach(r=>fo(r,!0))),e}function uo(){he(2)}function mo(e){return Object.isFrozen(e)}var ha={};function Gt(e){let t=ha[e];return t||he(0,e),t}function Ng(e,t){ha[e]||(ha[e]=t)}var gn;function iu(){return gn}function jg(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Zc(e,t){t&&(Gt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Sa(e){va(e),e.drafts_.forEach(_g),e.drafts_=null}function va(e){e===gn&&(gn=e.parent_)}function eu(e){return gn=jg(gn,e)}function _g(e){let t=e[Te];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function tu(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Te].modified_&&(Sa(t),he(4)),De(e)&&(e=lo(t,e),t.parent_||po(t,e)),t.patches_&&Gt("Patches").generateReplacementPatches_(r[Te].base_,e,t.patches_,t.inversePatches_)):e=lo(t,r,[]),Sa(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ba?e:void 0}function lo(e,t,r){if(mo(t))return t;let n=t[Te];if(!n)return fn(t,(o,i)=>ru(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return po(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),fn(i,(m,f)=>ru(e,n,o,m,f,r,a)),po(e,o,!1),r&&e.patches_&&Gt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function ru(e,t,r,n,o,i,a){if(Ne(o)){let m=i&&t&&t.type_!==3&&!mn(t.assigned_,n)?i.concat(n):void 0,f=lo(e,o,m);if(ou(r,n,f),Ne(f))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(De(o)&&!mo(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;lo(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(mr(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&po(e,o)}}function po(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&fo(t,r)}function Vg(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:iu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=xa;r&&(o=[n],i=yn);let{revoke:a,proxy:m}=Proxy.revocable(o,i);return n.draft_=m,n.revoke_=a,m}var xa={get(e,t){if(t===Te)return e;let r=$t(e);if(!mn(r,t))return Lg(e,r,t);let n=r[t];return e.finalized_||!De(n)?n:n===ma(e.base_,t)?(ga(e),e.copy_[t]=Ca(n,e)):n},has(e,t){return t in $t(e)},ownKeys(e){return Reflect.ownKeys($t(e))},set(e,t,r){let n=au($t(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=ma($t(e),t),i=o?.[Te];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Mg(r,o)&&(r!==void 0||mn(e.base_,t)))return!0;ga(e),Aa(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ma(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ga(e),Aa(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=$t(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){he(11)},getPrototypeOf(e){return Ht(e.base_)},setPrototypeOf(){he(12)}},yn={};fn(xa,(e,t)=>{yn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});yn.deleteProperty=function(e,t){return yn.set.call(this,e,t,void 0)};yn.set=function(e,t,r){return xa.set.call(this,e[0],t,r,e[0])};function ma(e,t){let r=e[Te];return(r?$t(r):e)[t]}function Lg(e,t,r){let n=au(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function au(e,t){if(!(t in e))return;let r=Ht(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ht(r)}}function Aa(e){e.modified_||(e.modified_=!0,e.parent_&&Aa(e.parent_))}function ga(e){e.copy_||(e.copy_=ya(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ug=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(f=i,...s){return a.produce(f,g=>r.call(this,g,...s))}}typeof r!="function"&&he(6),n!==void 0&&typeof n!="function"&&he(7);let o;if(De(t)){let i=eu(this),a=Ca(t,void 0),m=!0;try{o=r(a),m=!1}finally{m?Sa(i):va(i)}return Zc(i,n),tu(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===ba&&(o=void 0),this.autoFreeze_&&fo(o,!0),n){let i=[],a=[];Gt("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else he(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...m)=>this.produceWithPatches(a,f=>t(f,...m));let n,o;return[this.produce(t,r,(a,m)=>{n=a,o=m}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){De(e)||he(8),Ne(e)&&(e=su(e));let t=eu(this),r=Ca(e,void 0);return r[Te].isManual_=!0,va(t),r}finishDraft(e,t){let r=e&&e[Te];(!r||!r.isManual_)&&he(9);let{scope_:n}=r;return Zc(n,t),tu(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Gt("Patches").applyPatches_;return Ne(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Ca(e,t){let r=mr(e)?Gt("MapSet").proxyMap_(e,t):Sn(e)?Gt("MapSet").proxySet_(e,t):Vg(e,t);return(t?t.scope_:iu()).drafts_.push(r),r}function su(e){return Ne(e)||he(10,e),cu(e)}function cu(e){if(!De(e)||mo(e))return e;let t=e[Te],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ya(e,t.scope_.immer_.useStrictShallowCopy_)}else r=ya(e,!0);return fn(r,(n,o)=>{ou(r,n,cu(o))}),t&&(t.finalized_=!1),r}function uu(){let t="replace",r="add",n="remove";function o(S,y,b,R){switch(S.type_){case 0:case 2:return a(S,y,b,R);case 1:return i(S,y,b,R);case 3:return m(S,y,b,R)}}function i(S,y,b,R){let{base_:F,assigned_:x}=S,I=S.copy_;I.length<F.length&&([F,I]=[I,F],[b,R]=[R,b]);for(let w=0;w<F.length;w++)if(x[w]&&I[w]!==F[w]){let E=y.concat([w]);b.push({op:t,path:E,value:h(I[w])}),R.push({op:t,path:E,value:h(F[w])})}for(let w=F.length;w<I.length;w++){let E=y.concat([w]);b.push({op:r,path:E,value:h(I[w])})}for(let w=I.length-1;F.length<=w;--w){let E=y.concat([w]);R.push({op:n,path:E})}}function a(S,y,b,R){let{base_:F,copy_:x}=S;fn(S.assigned_,(I,w)=>{let E=fa(F,I),M=fa(x,I),k=w?mn(F,I)?t:r:n;if(E===M&&k===t)return;let P=y.concat(I);b.push(k===n?{op:k,path:P}:{op:k,path:P,value:M}),R.push(k===r?{op:n,path:P}:k===n?{op:r,path:P,value:h(E)}:{op:t,path:P,value:h(E)})})}function m(S,y,b,R){let{base_:F,copy_:x}=S,I=0;F.forEach(w=>{if(!x.has(w)){let E=y.concat([I]);b.push({op:n,path:E,value:w}),R.unshift({op:r,path:E,value:w})}I++}),I=0,x.forEach(w=>{if(!F.has(w)){let E=y.concat([I]);b.push({op:r,path:E,value:w}),R.unshift({op:n,path:E,value:w})}I++})}function f(S,y,b,R){b.push({op:t,path:[],value:y===ba?void 0:y}),R.push({op:t,path:[],value:S})}function s(S,y){return y.forEach(b=>{let{path:R,op:F}=b,x=S;for(let M=0;M<R.length-1;M++){let k=zt(x),P=R[M];typeof P!="string"&&typeof P!="number"&&(P=""+P),(k===0||k===1)&&(P==="__proto__"||P==="constructor")&&he(19),typeof x=="function"&&P==="prototype"&&he(19),x=fa(x,P),typeof x!="object"&&he(18,R.join("/"))}let I=zt(x),w=g(b.value),E=R[R.length-1];switch(F){case t:switch(I){case 2:return x.set(E,w);case 3:he(16);default:return x[E]=w}case r:switch(I){case 1:return E==="-"?x.push(w):x.splice(E,0,w);case 2:return x.set(E,w);case 3:return x.add(w);default:return x[E]=w}case n:switch(I){case 1:return x.splice(E,1);case 2:return x.delete(E);case 3:return x.delete(b.value);default:return delete x[E]}default:he(17,F)}}),S}function g(S){if(!De(S))return S;if(Array.isArray(S))return S.map(g);if(mr(S))return new Map(Array.from(S.entries()).map(([b,R])=>[b,g(R)]));if(Sn(S))return new Set(Array.from(S).map(g));let y=Object.create(Ht(S));for(let b in S)y[b]=g(S[b]);return mn(S,pn)&&(y[pn]=S[pn]),y}function h(S){return Ne(S)?g(S):S}Ng("Patches",{applyPatches_:s,generatePatches_:o,generateReplacementPatches_:f})}var hn=new Ug,st=hn.produce,go=hn.produceWithPatches.bind(hn);var Ra=hn.applyPatches.bind(hn);p();u();d();l();function Qg(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Bg(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function $g(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var lu=e=>Array.isArray(e)?e:[e];function Hg(e){let t=Array.isArray(e[0])?e[0]:e;return $g(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function zg(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var iE=Symbol();var aE=Object.getPrototypeOf({});var Gg=class{constructor(e){this.value=e}deref(){return this.value}},Wg=typeof WeakRef<"u"?WeakRef:Gg,Yg=0,du=1;function yo(){return{s:Yg,v:void 0,o:null,p:null}}function gr(e,t={}){let r=yo(),{resultEqualityCheck:n}=t,o,i=0;function a(){let m=r,{length:f}=arguments;for(let h=0,S=f;h<S;h++){let y=arguments[h];if(typeof y=="function"||typeof y=="object"&&y!==null){let b=m.o;b===null&&(m.o=b=new WeakMap);let R=b.get(y);R===void 0?(m=yo(),b.set(y,m)):m=R}else{let b=m.p;b===null&&(m.p=b=new Map);let R=b.get(y);R===void 0?(m=yo(),b.set(y,m)):m=R}}let s=m,g;if(m.s===du)g=m.v;else if(g=e.apply(null,arguments),i++,n){let h=o?.deref?.()??o;h!=null&&n(h,g)&&(g=h,i!==0&&i--),o=typeof g=="object"&&g!==null||typeof g=="function"?new Wg(g):g}return s.s=du,s.v=g,g}return a.clearCache=()=>{r=yo(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function pu(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,m,f={},s=o.pop();typeof s=="object"&&(f=s,s=o.pop()),Qg(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let g={...r,...f},{memoize:h,memoizeOptions:S=[],argsMemoize:y=gr,argsMemoizeOptions:b=[],devModeChecks:R={}}=g,F=lu(S),x=lu(b),I=Hg(o),w=h(function(){return i++,s.apply(null,arguments)},...F),E=!0,M=y(function(){a++;let P=zg(I,arguments);return m=w.apply(null,P),m},...x);return Object.assign(M,{resultFunc:s,memoizedResultFunc:w,dependencies:I,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>m,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:h,argsMemoize:y})};return Object.assign(n,{withTypes:()=>n}),n}var de=pu(gr),Kg=Object.assign((e,t=de)=>{Bg(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,m,f)=>(a[r[f]]=m,a),{}))},{withTypes:()=>Kg});p();u();d();l();function fu(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var mu=fu(),gu=fu;var Jg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?fr:fr.apply(null,arguments)},xE=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Xg=e=>e&&typeof e.match=="function";function T(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Ge(0));return{type:e,payload:o.payload,...("meta"in o&&{meta:o.meta}),...("error"in o&&{error:o.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>co(n)&&n.type===e,r}var Au=class vn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,vn.prototype)}static get[Symbol.species](){return vn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new vn(...t[0].concat(this)):new vn(...t.concat(this))}};function yu(e){return De(e)?st(e,()=>{}):e}function hu(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Zg(e){return typeof e=="boolean"}var ey=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Au;return r&&(Zg(r)?a.push(mu):a.push(gu(r.extraArgument))),a},An="RTK_autoBatch",hr=()=>e=>({payload:e,meta:{[An]:!0}}),Su=e=>t=>{setTimeout(t,e)},ty=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,m=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Su(10):e.type==="callback"?e.queueNotification:Su(e.timeout),s=()=>{a=!1,i&&(i=!1,m.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let h=()=>o&&g(),S=n.subscribe(h);return m.add(g),()=>{S(),m.delete(g)}},dispatch(g){try{return o=!g?.meta?.[An],i=!o,i&&(a||(a=!0,f(s))),n.dispatch(g)}finally{o=!0}}})},ry=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Au(e);return n&&o.push(ty(typeof n=="object"?n:void 0)),o};function Cu(e){let t=ey(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},m;if(typeof r=="function")m=r;else if(Xe(r))m=pr(r);else throw new Error(Ge(1));let f;typeof n=="function"?f=n(t):f=t();let s=fr;o&&(s=Jg({trace:!1,...(typeof o=="object"&&o)}));let g=Xc(...f),h=ry(g),S=typeof a=="function"?a(h):h(),y=s(...S);return pa(m,i,y)}function bu(e){let t={},r=[],n,o={addCase(i,a){let m=typeof i=="string"?i:i.type;if(!m)throw new Error(Ge(28));if(m in t)throw new Error(Ge(29));return t[m]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function ny(e){return typeof e=="function"}function le(e,t){let[r,n,o]=bu(t),i;if(ny(e))i=()=>yu(e());else{let m=yu(e);i=()=>m}function a(m=i(),f){let s=[r[f.type],...n.filter(({matcher:g})=>g(f)).map(({reducer:g})=>g)];return s.filter(g=>!!g).length===0&&(s=[o]),s.reduce((g,h)=>{if(h)if(Ne(g)){let y=h(g,f);return y===void 0?g:y}else{if(De(g))return st(g,S=>h(S,f));{let S=h(g,f);if(S===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return g},m)}return a.getInitialState=i,a}var wu=(e,t)=>Xg(e)?e.match(t):e(t);function Ze(...e){return t=>e.some(r=>wu(r,t))}function yr(...e){return t=>e.every(r=>wu(r,t))}function So(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Cn(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function vo(...e){return e.length===0?t=>So(t,["pending"]):Cn(e)?Ze(...e.map(t=>t.pending)):vo()(e[0])}function Wt(...e){return e.length===0?t=>So(t,["rejected"]):Cn(e)?Ze(...e.map(t=>t.rejected)):Wt()(e[0])}function bn(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?yr(Wt(...e),t):Cn(e)?yr(Wt(...e),t):bn()(e[0])}function ct(...e){return e.length===0?t=>So(t,["fulfilled"]):Cn(e)?Ze(...e.map(t=>t.fulfilled)):ct()(e[0])}function Ao(...e){return e.length===0?t=>So(t,["pending","fulfilled","rejected"]):Cn(e)?Ze(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ao()(e[0])}var oy="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Co=(e=21)=>{let t="",r=e;for(;r--;)t+=oy[Math.random()*64|0];return t},iy=["name","message","stack","code"],Ea=class{constructor(e,t){oe(this,"_type");this.payload=e,this.meta=t}},vu=class{constructor(e,t){oe(this,"_type");this.payload=e,this.meta=t}},ay=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of iy)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},re=(()=>{function e(t,r,n){let o=T(t+"/fulfilled",(f,s,g,h)=>({payload:f,meta:{...(h||{}),arg:g,requestId:s,requestStatus:"fulfilled"}})),i=T(t+"/pending",(f,s,g)=>({payload:void 0,meta:{...(g||{}),arg:s,requestId:f,requestStatus:"pending"}})),a=T(t+"/rejected",(f,s,g,h,S)=>({payload:h,error:(n&&n.serializeError||ay)(f||"Rejected"),meta:{...(S||{}),arg:g,requestId:s,rejectedWithValue:!!h,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function m(f){return(s,g,h)=>{let S=n?.idGenerator?n.idGenerator(f):Co(),y=new c.AbortController,b,R;function F(I){R=I,y.abort()}let x=_asyncToGenerator(function*(){let I;try{let E=n?.condition?.(f,{getState:g,extra:h});if(cy(E)&&(E=yield E),E===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let M=new Promise((k,P)=>{b=()=>{P({name:"AbortError",message:R||"Aborted"})},y.signal.addEventListener("abort",b)});s(i(S,f,n?.getPendingMeta?.({requestId:S,arg:f},{getState:g,extra:h}))),I=yield Promise.race([M,Promise.resolve(r(f,{dispatch:s,getState:g,extra:h,requestId:S,signal:y.signal,abort:F,rejectWithValue:(k,P)=>new Ea(k,P),fulfillWithValue:(k,P)=>new vu(k,P)})).then(k=>{if(k instanceof Ea)throw k;return k instanceof vu?o(k.payload,S,f,k.meta):o(k,S,f)})])}catch(E){I=E instanceof Ea?a(null,S,f,E.payload,E.meta):a(E,S,f)}finally{b&&y.signal.removeEventListener("abort",b)}return n&&!n.dispatchConditionRejection&&a.match(I)&&I.meta.condition||s(I),I})();return Object.assign(x,{abort:F,requestId:S,arg:f,unwrap(){return x.then(sy)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:Ze(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function sy(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function cy(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var xu=Symbol.for("rtk-slice-createasyncthunk"),PE={[xu]:re};function uy(e,t){return`${e}/${t}`}function ly({creators:e}={}){let t=e?.asyncThunk?.[xu];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(Ge(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(py()):n.reducers)||{},m=Object.keys(a),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(I,w){let E=typeof I=="string"?I:I.type;if(!E)throw new Error(Ge(12));if(E in f.sliceCaseReducersByType)throw new Error(Ge(13));return f.sliceCaseReducersByType[E]=w,s},addMatcher(I,w){return f.sliceMatchers.push({matcher:I,reducer:w}),s},exposeAction(I,w){return f.actionCreators[I]=w,s},exposeCaseReducer(I,w){return f.sliceCaseReducersByName[I]=w,s}};m.forEach(I=>{let w=a[I],E={reducerName:I,type:uy(o,I),createNotation:typeof n.reducers=="function"};my(w)?yy(E,w,s,t):fy(E,w,s)});function g(){let[I={},w=[],E=void 0]=typeof n.extraReducers=="function"?bu(n.extraReducers):[n.extraReducers],M={...I,...f.sliceCaseReducersByType};return le(n.initialState,k=>{for(let P in M)k.addCase(P,M[P]);for(let P of f.sliceMatchers)k.addMatcher(P.matcher,P.reducer);for(let P of w)k.addMatcher(P.matcher,P.reducer);E&&k.addDefaultCase(E)})}let h=I=>I,S=new Map,y;function b(I,w){return y||(y=g()),y(I,w)}function R(){return y||(y=g()),y.getInitialState()}function F(I,w=!1){function E(k){let P=k[I];return typeof P>"u"&&w&&(P=R()),P}function M(k=h){let P=hu(S,w,()=>new WeakMap);return hu(P,k,()=>{let O={};for(let[j,_]of Object.entries(n.selectors??{}))O[j]=dy(_,k,R,w);return O})}return{reducerPath:I,getSelectors:M,get selectors(){return M(E)},selectSlice:E}}let x={name:o,reducer:b,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:R,...F(i),injectInto(I,{reducerPath:w,...E}={}){let M=w??i;return I.inject({reducerPath:M,reducer:b},E),{...x,...F(M,!0)}}};return x}}function dy(e,t,r,n){function o(i,...a){let m=t(i);return typeof m>"u"&&n&&(m=r()),e(m,...a)}return o.unwrapped=e,o}var Yt=ly();function py(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function fy({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!gy(n))throw new Error(Ge(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?T(e,a):T(e))}function my(e){return e._reducerDefinitionType==="asyncThunk"}function gy(e){return e._reducerDefinitionType==="reducerWithPrepare"}function yy({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Ge(18));let{payloadCreator:i,fulfilled:a,pending:m,rejected:f,settled:s,options:g}=r,h=o(e,i,g);n.exposeAction(t,h),a&&n.addCase(h.fulfilled,a),m&&n.addCase(h.pending,m),f&&n.addCase(h.rejected,f),s&&n.addMatcher(h.settled,s),n.exposeCaseReducer(t,{fulfilled:a||ho,pending:m||ho,rejected:f||ho,settled:s||ho})}function ho(){}var Ru="listener",Eu="completed",Iu="cancelled",kE=`task-${Iu}`,OE=`task-${Eu}`,TE=`${Ru}-${Iu}`,DE=`${Ru}-${Eu}`;var{assign:Fu}=Object;var Ia="listenerMiddleware";var hy=Fu(T(`${Ia}/add`),{withTypes:()=>hy}),qE=T(`${Ia}/removeAll`),Sy=Fu(T(`${Ia}/remove`),{withTypes:()=>Sy});var ME=Symbol.for("rtk-state-proxy-original");function Ge(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}p();u();d();l();var U=new V({required:!0,emptyAllowed:!1}),Se=new V({required:!1,emptyAllowed:!1}),ve=new V({required:!0,emptyAllowed:!0}),zE=new V({required:!1,emptyAllowed:!0}),bo=new J({each:U,required:!0}),Pu=new V({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),ku=new V({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),GE=new V({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),ut=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Qe=(e,t)=>{if("required"in t)return{payload:new ke({value:t}).validate({value:e}).value};let o=new Q({options:{required:!0},values:t}).validate(e);if(o)throw new sn(o);return{payload:e}},N=(e,t)=>{try{return Qe(e,t)}catch(r){return{payload:e,error:ut(r)}}},Ou=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return Du(e,t,r,o,"Controller initialization error")},Tu=(e,t,r,n)=>{let o=`Check the options of ${n}`;return Du(e,t,r,o,"Controller initialization error")},Du=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};p();u();d();l();var Sr="3.35.1",qu=["@coveo/atomic","@coveo/quantic"];var Fa=()=>Se,Mu=()=>U,At=T("configuration/updateBasicConfiguration",e=>N(e,{accessToken:Se,environment:new V({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:Se})),et=T("configuration/updateSearchConfiguration",e=>N(e,{proxyBaseUrl:new V({required:!1,url:!0}),pipeline:new V({required:!1,emptyAllowed:!0}),searchHub:Se,timezone:Se,locale:Se,authenticationProviders:new J({required:!1,each:U})})),vy={enabled:new K({default:!0}),originContext:Fa(),originLevel2:Fa(),originLevel3:Fa(),proxyBaseUrl:new V({required:!1,url:!0}),runtimeEnvironment:new ce,anonymous:new K({default:!1}),deviceId:Se,userDisplayName:Se,documentLocation:Se,trackingId:ku,analyticsMode:new V({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new Q({options:{required:!1},values:qu.reduce((e,t)=>(e[t]=Pu,e),{})})},vr=T("configuration/updateAnalyticsConfiguration",e=>N(e,vy)),Ar=T("configuration/analytics/disable"),Cr=T("configuration/analytics/enable"),wo=T("configuration/analytics/originlevel2",e=>N(e,{originLevel2:Mu()})),xo=T("configuration/analytics/originlevel3",e=>N(e,{originLevel3:Mu()}));p();u();d();l();p();u();d();l();p();u();d();l();var Nu={q:new V,enableQuerySyntax:new K,aq:new V,cq:new V,firstResult:new $({min:0}),numberOfResults:new $({min:0}),sortCriteria:new V,f:new Q,fExcluded:new Q,cf:new Q,nf:new Q,mnf:new Q,df:new Q,debug:new K,sf:new Q,tab:new V,af:new Q};var Ct=T("searchParameters/restore",e=>N(e,Nu)),ju=T("searchParameters/restoreTab",e=>N(e,U));p();u();d();l();var Ro=T("debug/enable"),Eo=T("debug/disable");p();u();d();l();var Io=()=>!1;var Fo=le(Io(),e=>{e.addCase(Ro,()=>!0).addCase(Eo,()=>!1).addCase(Ct,(t,r)=>r.payload.debug??t)});p();u();d();l();var br=T("pipeline/set",e=>N(e,new V({required:!0,emptyAllowed:!0})));p();u();d();l();p();u();d();l();var Ay=T("history/undo"),Cy=T("history/redo"),tt=T("history/snapshot"),rF=re("history/back",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(Ay()),yield t(qe())});return function(_x4,_x5){return _ref5.apply(this,arguments)}}()),nF=re("history/forward",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{dispatch:t}){t(Cy()),yield t(qe())});return function(_x6,_x7){return _ref6.apply(this,arguments)}}()),qe=re("history/change",/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x8,_x9){return _ref7.apply(this,arguments)}}());p();u();d();l();var wr=()=>"";var xr=le(wr(),e=>{e.addCase(br,(t,r)=>r.payload).addCase(qe.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(et,(t,r)=>r.payload.pipeline||t)});p();u();d();l();p();u();d();l();var Po=T("app/setError");p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();var Rr=class e{static set(t,r,n){let o,i,a;n&&(i=new Date,i.setTime(i.getTime()+n));let m=window.location.hostname,f=/^(\d{1,3}\.){3}\d{1,3}$/,s=/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/;f.test(m)||s.test(m)||m.indexOf(".")===-1?Pa(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],Pa(t,r,i,o))}static get(t){let r=t+"=",n=document.cookie.split(";");for(let o=0;o<n.length;o++){let i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function Pa(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}p();u();d();l();function by(){return typeof navigator<"u"}function _u(){try{return typeof localStorage<"u"}catch{return!1}}function Vu(){try{return typeof sessionStorage<"u"}catch{return!1}}function Lu(){return!!(by()&&navigator.cookieEnabled)}var Uu=null;function Qu(){return Uu||(_u()?localStorage:Lu()?new ka:Vu()?sessionStorage:new Oa)}var Er=class Er{getItem(t){return Rr.get(`${Er.prefix}${t}`)}removeItem(t){Rr.erase(`${Er.prefix}${t}`)}setItem(t,r,n){Rr.set(`${Er.prefix}${t}`,r,n)}};oe(Er,"prefix","coveo_");var ka=Er;var Oa=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var ko="__coveo.analytics.history",wy=20,xy=1e3*60,Ry=75,Kt=class Kt{constructor(t){oe(this,"store");this.store=t||Qu()}static getInstance(t){return Kt.instance||(Kt.instance=new Kt(t)),Kt.instance}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!==null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){var _this9=this;return _asyncToGenerator(function*(){t.internalTime=new Date().getTime(),t=_this9.cropQueryElement(_this9.stripEmptyQuery(t));let r=yield _this9.getHistoryWithInternalTimeAsync();r!==null?_this9.isValidEntry(t)&&_this9.setHistory([t].concat(r)):_this9.setHistory([t])})()}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){var _this0=this;return _asyncToGenerator(function*(){let t=yield _this0.getHistoryWithInternalTimeAsync();return _this0.stripEmptyQueries(_this0.stripInternalTime(t))})()}getHistoryWithInternalTime(){try{let t=this.store.getItem(ko);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){var _this1=this;return _asyncToGenerator(function*(){try{let t=yield _this1.store.getItem(ko);return t?JSON.parse(t):[]}catch{return[]}})()}setHistory(t){try{this.store.setItem(ko,JSON.stringify(t.slice(0,wy)))}catch{}}clear(){try{this.store.removeItem(ko)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Ry)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>xy:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};oe(Kt,"instance",null);var Ta=Kt,Be=Ta;p();u();d();l();p();u();d();l();var Ir=de(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Sr}`));p();u();d();l();p();u();d();l();function lt(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function D(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(g){try{s(n.next(g))}catch(h){a(h)}}function f(g){try{s(n.throw(g))}catch(h){a(h)}}function s(g){g.done?i(g.value):o(g.value).then(m,f)}s((n=n.apply(e,t||[])).next())})}var X;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(X||(X={}));function Ma(){return typeof window<"u"}function Wa(){return typeof navigator<"u"}function Fr(){return typeof document<"u"}function Na(){try{return typeof localStorage<"u"}catch{return!1}}function Ey(){try{return typeof sessionStorage<"u"}catch{return!1}}function rl(){return Wa()&&navigator.cookieEnabled}var Iy=[X.click,X.custom,X.search,X.view],Fy=(e,t)=>Iy.indexOf(e)!==-1?Object.assign({language:Fr()?document.documentElement.lang:"unknown",userAgent:Wa()?navigator.userAgent:"unknown"},t):t,xn=class e{static set(t,r,n){var o,i,a,m;n&&(i=new Date,i.setTime(i.getTime()+n)),m=window.location.hostname,m.indexOf(".")===-1?Bu(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],Bu(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function Bu(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Py(){return Na()?localStorage:rl()?new Rn:Ey()?sessionStorage:new kr}var Rn=class e{getItem(t){return xn.get(`${e.prefix}${t}`)}removeItem(t){xn.erase(`${e.prefix}${t}`)}setItem(t,r,n){xn.set(`${e.prefix}${t}`,r,n)}};Rn.prefix="coveo_";var ja=class{constructor(){this.cookieStorage=new Rn}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},kr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Oo="__coveo.analytics.history",ky=20,Oy=1e3*60,Ty=75,qo=class{constructor(t){this.store=t||Py()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return D(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return D(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Oo);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return D(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Oo);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Oo,JSON.stringify(t.slice(0,ky)))}catch{}}clear(){try{this.store.removeItem(Oo)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Ty)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Oy:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var Dy=(e,t)=>D(void 0,void 0,void 0,function*(){return e===X.view?(yield qy(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),qy=e=>D(void 0,void 0,void 0,function*(){let t=new qo,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),To,My=new Uint8Array(16);function Ny(){if(!To&&(To=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!To))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return To(My)}var jy=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Mo(e){return typeof e=="string"&&jy.test(e)}var Ae=[];for(let e=0;e<256;++e)Ae.push((e+256).toString(16).slice(1));function nl(e,t=0){return Ae[e[t+0]]+Ae[e[t+1]]+Ae[e[t+2]]+Ae[e[t+3]]+"-"+Ae[e[t+4]]+Ae[e[t+5]]+"-"+Ae[e[t+6]]+Ae[e[t+7]]+"-"+Ae[e[t+8]]+Ae[e[t+9]]+"-"+Ae[e[t+10]]+Ae[e[t+11]]+Ae[e[t+12]]+Ae[e[t+13]]+Ae[e[t+14]]+Ae[e[t+15]]}function _y(e){if(!Mo(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function Vy(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Ly="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Uy="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Qy(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=Vy(o)),typeof i=="string"&&(i=_y(i)),((f=i)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+o.length);if(s.set(i),s.set(o,i.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,a){m=m||0;for(let g=0;g<16;++g)a[m+g]=s[g];return a}return nl(s)}try{n.name=e}catch{}return n.DNS=Ly,n.URL=Uy,n}var By=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$u={randomUUID:By};function Jt(e,t,r){if($u.randomUUID&&!t&&!e)return $u.randomUUID();e=e||{};let n=e.random||(e.rng||Ny)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return nl(n)}function $y(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function Da(e,t){return e<<t|e>>>32-t}function Hy(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let m=0;m<a.length;++m)e.push(a.charCodeAt(m))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let m=new Uint32Array(16);for(let f=0;f<16;++f)m[f]=e[a*64+f*4]<<24|e[a*64+f*4+1]<<16|e[a*64+f*4+2]<<8|e[a*64+f*4+3];i[a]=m}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let m=new Uint32Array(80);for(let y=0;y<16;++y)m[y]=i[a][y];for(let y=16;y<80;++y)m[y]=Da(m[y-3]^m[y-8]^m[y-14]^m[y-16],1);let f=r[0],s=r[1],g=r[2],h=r[3],S=r[4];for(let y=0;y<80;++y){let b=Math.floor(y/20),R=Da(f,5)+$y(b,s,g,h)+S+t[b]+m[y]>>>0;S=h,h=g,g=Da(s,30)>>>0,s=f,f=R}r[0]=r[0]+f>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+h>>>0,r[4]=r[4]+S>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var zy=Qy("v5",80,Hy),Hu=zy,ol="2.30.49",zu=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,wn={pageview:"pageview",event:"event"},No=class{constructor({client:t,uuidGenerator:r=Jt}){this.client=t,this.uuidGenerator=r}},_a=class extends No{constructor({client:t,uuidGenerator:r=Jt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=zu(window.location),this.lastReferrer=Fr()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return null}}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:Fr()?document.title:"",encoding:Fr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===wn.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===wn.pageview?this.nextPageViewId:this.pageViewId,referrer:t===wn.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===wn.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return zu(window.location)}},bt=class e{constructor(t,r){if(!Mo(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Mo(i)?new e(i,Number.parseInt(o)*1e3):null}};bt.cvo_cid="cvo_cid";bt.expirationTime=120;var Va=class extends No{constructor({client:t,uuidGenerator:r=Jt}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return D(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(bt.cvo_cid,new bt(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Va.Id="link";var He=Object.keys;function Do(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var qa=128,il=192,Gu=224,Wu=240;function Gy(e){return(e&248)===Wu?4:(e&Wu)===Gu?3:(e&Gu)===il?2:1}function Wy(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&qa)!=qa)break;if(r-=3,(n&il)!=qa){t-r>=Gy(n)*3&&(r=t);break}}return e.substring(0,r)}var La={id:"svc_ticket_id",subject:"svc_ticket_subject",description:"svc_ticket_description",category:"svc_ticket_category",productId:"svc_ticket_product_id",custom:"svc_ticket_custom"},Yy=He(La).map(e=>La[e]),Ky=[...Yy].join("|"),Jy=new RegExp(`^(${Ky}$)`),Xy={svcAction:"svc_action",svcActionData:"svc_action_data"},Zy=e=>He(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=La[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),eh=e=>Jy.test(e),th=[eh],Yu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Ku={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},xe={action:"pa",list:"pal",listSource:"pls"},jo={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},rh=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Ua={id:"quoteId",affiliation:"quoteAffiliation"},Qa={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},nh={add:xe,bookmark_add:xe,bookmark_remove:xe,click:xe,checkout:xe,checkout_option:xe,detail:xe,impression:xe,remove:xe,refund:Object.assign(Object.assign({},xe),jo),purchase:Object.assign(Object.assign({},xe),jo),quickview:xe,quote:Object.assign(Object.assign({},xe),Ua),review:Object.assign(Object.assign({},xe),Qa)},oh=He(Yu).map(e=>Yu[e]),ih=He(Ku).map(e=>Ku[e]),ah=He(xe).map(e=>xe[e]),sh=He(jo).map(e=>jo[e]),ch=He(Qa).map(e=>Qa[e]),uh=He(Ua).map(e=>Ua[e]),lh=[...oh,"custom"].join("|"),dh=[...ih,"custom"].join("|"),al="(pr[0-9]+)",sl="(il[0-9]+pi[0-9]+)",ph=new RegExp(`^${al}(${lh})$`),fh=new RegExp(`^(${sl}(${dh}))|(il[0-9]+nm)$`),mh=new RegExp(`^(${ah.join("|")})$`),gh=new RegExp(`^(${sh.join("|")})$`),yh=new RegExp(`^${al}custom$`),hh=new RegExp(`^${sl}custom$`),Sh=new RegExp(`^(${[...rh,...ch,...uh].join("|")})$`),vh=e=>ph.test(e),Ah=e=>fh.test(e),Ch=e=>mh.test(e),bh=e=>gh.test(e),wh=e=>Sh.test(e),xh=[Ah,vh,Ch,bh,wh],Rh=[yh,hh],Eh={anonymizeIp:"aip"},Ih={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Fh={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Ph=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],kh=Object.assign(Object.assign(Object.assign(Object.assign({},Eh),Ih),Fh),Ph.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Ba=Object.assign(Object.assign({},kh),Xy),Oh=e=>{let t=!!e.action&&nh[e.action]||{};return He(e).reduce((r,n)=>{let o=t[n]||Ba[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Th=He(Ba).map(e=>Ba[e]),Dh=e=>Th.indexOf(e)!==-1,qh=e=>e==="custom",Mh=e=>[...xh,...th,Dh,qh].some(t=>t(e)),Nh=e=>He(e).reduce((t,r)=>{let n=jh(r);return n?Object.assign(Object.assign({},t),_h(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),jh=e=>{let t;return[...Rh].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},_h=(e,t)=>He(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),$a=class{constructor(t){this.opts=t}sendEvent(t,r){return D(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error("navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like \"sendbeacon-polyfill\".");let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:m}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),f=this.encodeForEventType(t,m),s=new Blob([f],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return D(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:m,body:f}=a;o=m||t;try{i=JSON.parse(f)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return D(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[X.click,X.custom,X.search,X.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},Ha=class{sendEvent(t,r){return D(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return D(this,void 0,void 0,function*(){return Promise.resolve()})}},Ju=A.fetch,_o=class{constructor(t){this.opts=t}sendEvent(t,r){return D(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",m={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},f=Object.assign(Object.assign({},m),i?yield i(m,"analyticsFetch"):{}),{url:s}=f,g=lt(f,["url"]),h;try{h=yield Ju(s,g)}catch(S){console.error("An error has occured when sending the event.",S);return}if(h.ok){let S=yield h.json();return S.visitorId&&o.setCurrentVisitorId(S.visitorId),S}else{try{h.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,h,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return D(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Ju(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[X.click,X.custom,X.search,X.view].indexOf(t)!==-1}getVisitorIdParam(){return D(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},za=class{constructor(t,r){Na()&&rl()?this.storage=new ja:Na()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new kr),this.client=new _o(t),this.beaconClient=new $a(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Ga=class{constructor(t,r){this.storage=r||new kr,this.client=new _o(t)}getClientDependingOnEventType(t){return this.client}},Vo=class{constructor(){this.storage=new kr,this.client=new Ha}getClientDependingOnEventType(t){return this.client}},Vh="xx",Lh=e=>e?.startsWith(Vh)||!1,Uh=`
|
|
27
27
|
We've detected you're using React Native but have not provided the corresponding runtime,
|
|
28
28
|
for an optimal experience please use the "coveo.analytics/react-native" subpackage.
|
|
29
29
|
Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
|
|
30
|
-
`;function ph(){return typeof navigator<"u"&&navigator.product=="ReactNative"}var fh=["1",1,"yes",!0];function xo(){let e=[];return va()&&e.push(window.doNotTrack),Ta()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(t=>fh.indexOf(t)!==-1)}var Yu="v15",Ju={default:"https://analytics.cloud.coveo.com/rest/ua",production:"https://analytics.cloud.coveo.com/rest/ua",hipaa:"https://analyticshipaa.cloud.coveo.com/rest/ua"};function mh(e=Ju.default,t=Yu,r=!1){if(e=e.replace(/\/$/,""),r)return`${e}/${t}`;let n=e.endsWith("/rest")||e.endsWith("/rest/ua");return`${e}${n?"":"/rest"}/${t}`}var gh="38824e1f-37f5-42d3-8372-a4b8fa9df946",Ze=class{get defaultOptions(){return{endpoint:Ju.default,isCustomEndpoint:!1,token:"",version:Yu,beforeSendHooks:[],afterSendHooks:[]}}get version(){return zu}constructor(t){if(this.acceptedLinkReferrers=[],!t)throw new Error("You have to pass options to this constructor");this.options=Object.assign(Object.assign({},this.defaultOptions),t),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[ny,Xg].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};let r={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};xo()?this.runtime=new wo:this.runtime=this.options.runtimeEnvironment||this.initRuntime(r),this.addEventTypeMapping(ae.view,{newEventType:ae.view,addClientIdParameter:!0}),this.addEventTypeMapping(ae.click,{newEventType:ae.click,addClientIdParameter:!0}),this.addEventTypeMapping(ae.custom,{newEventType:ae.custom,addClientIdParameter:!0}),this.addEventTypeMapping(ae.search,{newEventType:ae.search,addClientIdParameter:!0})}initRuntime(t){return va()&&hr()?new Fa(t,()=>{let r=[...this.bufferedRequests];return this.bufferedRequests=[],r}):(ph()&&console.warn(dh),new Oa(t))}get storage(){return this.runtime.storage}determineVisitorId(){return q(this,void 0,void 0,function*(){try{return va()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||Bt()}catch(t){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),Bt()}})}getCurrentVisitorId(){return q(this,void 0,void 0,function*(){if(!this.visitorId){let t=yield this.determineVisitorId();yield this.setCurrentVisitorId(t)}return this.visitorId})}setCurrentVisitorId(t){return q(this,void 0,void 0,function*(){this.visitorId=t,yield this.storage.setItem("visitorId",t)})}setClientId(t,r){return q(this,void 0,void 0,function*(){if(vo(t))this.setCurrentVisitorId(t.toLowerCase());else{if(!r)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(Du(t,Du(r,gh)))}})}getParameters(t,...r){return q(this,void 0,void 0,function*(){return yield this.resolveParameters(t,...r)})}getPayload(t,...r){return q(this,void 0,void 0,function*(){let n=yield this.resolveParameters(t,...r);return yield this.resolvePayloadForParameters(t,n)})}get currentVisitorId(){return typeof(this.visitorId||this.storage.getItem("visitorId"))!="string"&&this.setCurrentVisitorId(Bt()),this.visitorId}set currentVisitorId(t){this.visitorId=t,this.storage.setItem("visitorId",t)}extractClientIdFromLink(t){if(xo())return null;try{let r=new URL(t).searchParams.get(St.cvo_cid);if(r==null)return null;let n=St.fromString(r);return!n||!hr()||!n.validate(document.referrer,this.acceptedLinkReferrers)?null:n.clientId}catch{}return null}resolveParameters(t,...r){return q(this,void 0,void 0,function*(){let{variableLengthArgumentsNames:n=[],addVisitorIdParameter:o=!1,usesMeasurementProtocol:i=!1,addClientIdParameter:a=!1}=this.eventTypeMapping[t]||{};return yield[g=>n.length>0?this.parseVariableArgumentsPayload(n,g):g[0],g=>q(this,void 0,void 0,function*(){return Object.assign(Object.assign({},g),{visitorId:o?yield this.getCurrentVisitorId():""})}),g=>q(this,void 0,void 0,function*(){return a?Object.assign(Object.assign({},g),{clientId:yield this.getCurrentVisitorId()}):g}),g=>i?this.ensureAnonymousUserWhenUsingApiKey(g):g,g=>this.beforeSendHooks.reduce((v,R)=>q(this,void 0,void 0,function*(){let P=yield v;return yield R(t,P)}),g)].reduce((g,v)=>q(this,void 0,void 0,function*(){let R=yield g;return yield v(R)}),Promise.resolve(r))})}resolvePayloadForParameters(t,r){return q(this,void 0,void 0,function*(){let{usesMeasurementProtocol:n=!1}=this.eventTypeMapping[t]||{};return yield[h=>this.setTrackingIdIfTrackingIdNotPresent(h),h=>this.removeEmptyPayloadValues(h,t),h=>this.validateParams(h,t),h=>n?th(h):h,h=>n?this.removeUnknownParameters(h):h,h=>n?this.processCustomParameters(h):this.mapCustomParametersToCustomData(h)].reduce((h,S)=>q(this,void 0,void 0,function*(){let g=yield h;return yield S(g)}),Promise.resolve(r))})}makeEvent(t,...r){return q(this,void 0,void 0,function*(){let{newEventType:n=t}=this.eventTypeMapping[t]||{},o=yield this.resolveParameters(t,...r),i=yield this.resolvePayloadForParameters(t,o);return{eventType:n,payload:i,log:a=>q(this,void 0,void 0,function*(){return this.bufferedRequests.push({eventType:n,payload:Object.assign(Object.assign({},i),a)}),yield Promise.all(this.afterSendHooks.map(m=>m(t,Object.assign(Object.assign({},o),a)))),yield this.deferExecution(),yield this.sendFromBuffer()})}})}sendEvent(t,...r){return q(this,void 0,void 0,function*(){return(yield this.makeEvent(t,...r)).log({})})}deferExecution(){return new Promise(t=>setTimeout(t,0))}sendFromBuffer(){return q(this,void 0,void 0,function*(){let t=this.bufferedRequests.shift();if(t){let{eventType:r,payload:n}=t;return this.runtime.getClientDependingOnEventType(r).sendEvent(r,n)}})}clear(){this.storage.removeItem("visitorId"),new So().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.search,t)})}sendSearchEvent(t){return q(this,void 0,void 0,function*(){var{searchQueryUid:r}=t,n=at(t,["searchQueryUid"]);return(yield this.makeSearchEvent(n)).log({searchQueryUid:r})})}makeClickEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.click,t)})}sendClickEvent(t){return q(this,void 0,void 0,function*(){var{searchQueryUid:r}=t,n=at(t,["searchQueryUid"]);return(yield this.makeClickEvent(n)).log({searchQueryUid:r})})}makeCustomEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.custom,t)})}sendCustomEvent(t){return q(this,void 0,void 0,function*(){var{lastSearchQueryUid:r}=t,n=at(t,["lastSearchQueryUid"]);return(yield this.makeCustomEvent(n)).log({lastSearchQueryUid:r})})}makeViewEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.view,t)})}sendViewEvent(t){return q(this,void 0,void 0,function*(){return(yield this.makeViewEvent(t)).log({})})}getVisit(){return q(this,void 0,void 0,function*(){let r=yield(yield b(`${this.baseUrl}/analytics/visit`)).json();return this.visitorId=r.visitorId,r})}getHealth(){return q(this,void 0,void 0,function*(){return yield(yield b(`${this.baseUrl}/analytics/monitoring/health`)).json()})}registerBeforeSendEventHook(t){this.beforeSendHooks.push(t)}registerAfterSendEventHook(t){this.afterSendHooks.push(t)}addEventTypeMapping(t,r){this.eventTypeMapping[t]=r}setAcceptedLinkReferrers(t){if(Array.isArray(t)&&t.every(r=>typeof r=="string"))this.acceptedLinkReferrers=t;else throw Error("Parameter should be an array of domain strings")}parseVariableArgumentsPayload(t,r){let n={};for(let o=0,i=r.length;o<i;o++){let a=r[o];if(typeof a=="string")n[t[o]]=a;else if(typeof a=="object")return Object.assign(Object.assign({},n),a)}return n}isKeyAllowedEmpty(t,r){return({[ae.search]:["queryText"]}[t]||[]).indexOf(r)!==-1}removeEmptyPayloadValues(t,r){let n=o=>typeof o<"u"&&o!==null&&o!=="";return Object.keys(t).filter(o=>this.isKeyAllowedEmpty(r,o)||n(t[o])).reduce((o,i)=>Object.assign(Object.assign({},o),{[i]:t[i]}),{})}removeUnknownParameters(t){return Object.keys(t).filter(n=>{if(ih(n))return!0;console.log(n,"is not processed by coveoua")}).reduce((n,o)=>Object.assign(Object.assign({},n),{[o]:t[o]}),{})}processCustomParameters(t){let{custom:r}=t,n=at(t,["custom"]),o={};r&&ho(r)&&(o=this.lowercaseKeys(r));let i=ah(n);return Object.assign(Object.assign({},o),i)}mapCustomParametersToCustomData(t){let{custom:r}=t,n=at(t,["custom"]);if(r&&ho(r)){let o=this.lowercaseKeys(r);return Object.assign(Object.assign({},n),{customData:Object.assign(Object.assign({},o),t.customData)})}else return t}lowercaseKeys(t){let r=Object.keys(t),n={};return r.forEach(o=>{n[o.toLowerCase()]=t[o]}),n}validateParams(t,r){let{anonymizeIp:n}=t,o=at(t,["anonymizeIp"]);return n!==void 0&&["0","false","undefined","null","{}","[]",""].indexOf(`${n}`.toLowerCase())==-1&&(o.anonymizeIp=1),(r==ae.view||r==ae.click||r==ae.search||r==ae.custom)&&(o.originLevel3=this.limit(o.originLevel3,1024)),r==ae.view&&(o.location=this.limit(o.location,1024)),(r=="pageview"||r=="event")&&(o.referrer=this.limit(o.referrer,2048),o.location=this.limit(o.location,2048),o.page=this.limit(o.page,2048)),o}ensureAnonymousUserWhenUsingApiKey(t){let{userId:r}=t,n=at(t,["userId"]);return lh(this.options.token)&&!r?(n.userId="anonymous",n):t}setTrackingIdIfTrackingIdNotPresent(t){let{trackingId:r}=t,n=at(t,["trackingId"]);return r?t:(n.hasOwnProperty("custom")&&ho(n.custom)&&(n.custom.hasOwnProperty("context_website")||n.custom.hasOwnProperty("siteName"))&&(n.trackingId=n.custom.context_website||n.custom.siteName),n.hasOwnProperty("customData")&&ho(n.customData)&&(n.customData.hasOwnProperty("context_website")||n.customData.hasOwnProperty("siteName"))&&(n.trackingId=n.customData.context_website||n.customData.siteName),n)}limit(t,r){return typeof t=="string"?Sy(t,r):t}get baseUrl(){return mh(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}},st;(function(e){e.contextChanged="contextChanged",e.expandToFullUI="expandToFullUI",e.openUserActions="openUserActions",e.showPrecedingSessions="showPrecedingSessions",e.showFollowingSessions="showFollowingSessions",e.clickViewedDocument="clickViewedDocument",e.clickPageView="clickPageView",e.createArticle="createArticle"})(st||(st={}));var j;(function(e){e.interfaceLoad="interfaceLoad",e.interfaceChange="interfaceChange",e.didyoumeanAutomatic="didyoumeanAutomatic",e.didyoumeanClick="didyoumeanClick",e.resultsSort="resultsSort",e.searchboxSubmit="searchboxSubmit",e.searchboxClear="searchboxClear",e.searchboxAsYouType="searchboxAsYouType",e.breadcrumbFacet="breadcrumbFacet",e.breadcrumbResetAll="breadcrumbResetAll",e.documentQuickview="documentQuickview",e.documentOpen="documentOpen",e.omniboxAnalytics="omniboxAnalytics",e.omniboxFromLink="omniboxFromLink",e.searchFromLink="searchFromLink",e.triggerNotify="notify",e.triggerExecute="execute",e.triggerQuery="query",e.undoTriggerQuery="undoQuery",e.triggerRedirect="redirect",e.pagerResize="pagerResize",e.pagerNumber="pagerNumber",e.pagerNext="pagerNext",e.pagerPrevious="pagerPrevious",e.pagerScrolling="pagerScrolling",e.staticFilterClearAll="staticFilterClearAll",e.staticFilterSelect="staticFilterSelect",e.staticFilterDeselect="staticFilterDeselect",e.facetClearAll="facetClearAll",e.facetSearch="facetSearch",e.facetSelect="facetSelect",e.facetSelectAll="facetSelectAll",e.facetDeselect="facetDeselect",e.facetExclude="facetExclude",e.facetUnexclude="facetUnexclude",e.facetUpdateSort="facetUpdateSort",e.facetShowMore="showMoreFacetResults",e.facetShowLess="showLessFacetResults",e.queryError="query",e.queryErrorBack="errorBack",e.queryErrorClear="errorClearQuery",e.queryErrorRetry="errorRetry",e.recommendation="recommendation",e.recommendationInterfaceLoad="recommendationInterfaceLoad",e.recommendationOpen="recommendationOpen",e.likeSmartSnippet="likeSmartSnippet",e.dislikeSmartSnippet="dislikeSmartSnippet",e.expandSmartSnippet="expandSmartSnippet",e.collapseSmartSnippet="collapseSmartSnippet",e.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",e.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",e.sendSmartSnippetReason="sendSmartSnippetReason",e.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",e.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",e.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",e.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",e.openSmartSnippetSource="openSmartSnippetSource",e.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",e.openSmartSnippetInlineLink="openSmartSnippetInlineLink",e.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",e.recentQueryClick="recentQueriesClick",e.clearRecentQueries="clearRecentQueries",e.recentResultClick="recentResultClick",e.clearRecentResults="clearRecentResults",e.noResultsBack="noResultsBack",e.showMoreFoldedResults="showMoreFoldedResults",e.showLessFoldedResults="showLessFoldedResults",e.copyToClipboard="copyToClipboard",e.caseSendEmail="Case.SendEmail",e.feedItemTextPost="FeedItem.TextPost",e.caseAttach="caseAttach",e.caseDetach="caseDetach",e.retryGeneratedAnswer="retryGeneratedAnswer",e.likeGeneratedAnswer="likeGeneratedAnswer",e.dislikeGeneratedAnswer="dislikeGeneratedAnswer",e.openGeneratedAnswerSource="openGeneratedAnswerSource",e.generatedAnswerStreamEnd="generatedAnswerStreamEnd",e.generatedAnswerSourceHover="generatedAnswerSourceHover",e.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",e.generatedAnswerHideAnswers="generatedAnswerHideAnswers",e.generatedAnswerShowAnswers="generatedAnswerShowAnswers",e.generatedAnswerExpand="generatedAnswerExpand",e.generatedAnswerCollapse="generatedAnswerCollapse",e.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",e.rephraseGeneratedAnswer="rephraseGeneratedAnswer",e.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2",e.generatedAnswerCitationClick="generatedAnswerCitationClick"})(j||(j={}));var Lu={[j.triggerNotify]:"queryPipelineTriggers",[j.triggerExecute]:"queryPipelineTriggers",[j.triggerQuery]:"queryPipelineTriggers",[j.triggerRedirect]:"queryPipelineTriggers",[j.queryErrorBack]:"errors",[j.queryErrorClear]:"errors",[j.queryErrorRetry]:"errors",[j.pagerNext]:"getMoreResults",[j.pagerPrevious]:"getMoreResults",[j.pagerNumber]:"getMoreResults",[j.pagerResize]:"getMoreResults",[j.pagerScrolling]:"getMoreResults",[j.facetSearch]:"facet",[j.facetShowLess]:"facet",[j.facetShowMore]:"facet",[j.recommendation]:"recommendation",[j.likeSmartSnippet]:"smartSnippet",[j.dislikeSmartSnippet]:"smartSnippet",[j.expandSmartSnippet]:"smartSnippet",[j.collapseSmartSnippet]:"smartSnippet",[j.openSmartSnippetFeedbackModal]:"smartSnippet",[j.closeSmartSnippetFeedbackModal]:"smartSnippet",[j.sendSmartSnippetReason]:"smartSnippet",[j.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[j.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[j.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[j.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[j.clearRecentQueries]:"recentQueries",[j.recentResultClick]:"recentlyClickedDocuments",[j.clearRecentResults]:"recentlyClickedDocuments",[j.showLessFoldedResults]:"folding",[j.caseDetach]:"case",[j.likeGeneratedAnswer]:"generatedAnswer",[j.dislikeGeneratedAnswer]:"generatedAnswer",[j.openGeneratedAnswerSource]:"generatedAnswer",[j.generatedAnswerStreamEnd]:"generatedAnswer",[j.generatedAnswerSourceHover]:"generatedAnswer",[j.generatedAnswerCopyToClipboard]:"generatedAnswer",[j.generatedAnswerHideAnswers]:"generatedAnswer",[j.generatedAnswerShowAnswers]:"generatedAnswer",[j.generatedAnswerExpand]:"generatedAnswer",[j.generatedAnswerCollapse]:"generatedAnswer",[j.generatedAnswerFeedbackSubmit]:"generatedAnswer",[j.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[st.expandToFullUI]:"interface",[st.openUserActions]:"User Actions",[st.showPrecedingSessions]:"User Actions",[st.showFollowingSessions]:"User Actions",[st.clickViewedDocument]:"User Actions",[st.clickPageView]:"User Actions",[st.createArticle]:"createArticle"},Ar=class{constructor(){this.runtime=new wo,this.currentVisitorId=""}getPayload(){return Promise.resolve()}getParameters(){return Promise.resolve()}makeEvent(t){return Promise.resolve({eventType:t,payload:null,log:()=>Promise.resolve()})}sendEvent(){return Promise.resolve()}makeSearchEvent(){return this.makeEvent(ae.search)}sendSearchEvent(){return Promise.resolve()}makeClickEvent(){return this.makeEvent(ae.click)}sendClickEvent(){return Promise.resolve()}makeCustomEvent(){return this.makeEvent(ae.custom)}sendCustomEvent(){return Promise.resolve()}makeViewEvent(){return this.makeEvent(ae.view)}sendViewEvent(){return Promise.resolve()}getVisit(){return Promise.resolve({id:"",visitorId:""})}getHealth(){return Promise.resolve({status:""})}registerBeforeSendEventHook(){}registerAfterSendEventHook(){}addEventTypeMapping(){}get version(){return zu}};function yh(e){let t="";return e.filter(r=>{let n=r!==t;return t=r,n})}function hh(e){return e.map(t=>t.replace(/;/g,""))}function Xu(e){let r=e.join(";");return r.length<=256?r:Xu(e.slice(1))}var Uu=e=>{let t=hh(e),r=yh(t);return Xu(r)};function Qu(e){let t=typeof e.partialQueries=="string"?e.partialQueries:Uu(e.partialQueries),r=typeof e.suggestions=="string"?e.suggestions:Uu(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}var Ro=class{constructor(t,r){this.opts=t,this.provider=r;let n=t.enableAnalytics===!1||xo();this.coveoAnalyticsClient=n?new Ar:new Ze(t)}disable(){this.coveoAnalyticsClient=new Ar}enable(){this.coveoAnalyticsClient=new Ze(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(j.interfaceLoad)}logInterfaceLoad(){return q(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(j.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return q(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(j.recommendation)}logRecommendation(){return q(this,void 0,void 0,function*(){return(yield this.makeRecommendation()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationOpen(t,r){return this.makeClickEvent(j.recommendationOpen,t,r)}logRecommendationOpen(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeRecommendationOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterClearAll(t){return this.makeSearchEvent(j.staticFilterClearAll,t)}logStaticFilterClearAll(t){return q(this,void 0,void 0,function*(){return(yield this.makeStaticFilterClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterSelect(t){return this.makeSearchEvent(j.staticFilterSelect,t)}logStaticFilterSelect(t){return q(this,void 0,void 0,function*(){return(yield this.makeStaticFilterSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterDeselect(t){return this.makeSearchEvent(j.staticFilterDeselect,t)}logStaticFilterDeselect(t){return q(this,void 0,void 0,function*(){return(yield this.makeStaticFilterDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFetchMoreResults(){return this.makeCustomEvent(j.pagerScrolling,{type:"getMoreResults"})}logFetchMoreResults(){return q(this,void 0,void 0,function*(){return(yield this.makeFetchMoreResults()).log({searchUID:this.provider.getSearchUID()})})}makeInterfaceChange(t){return this.makeSearchEvent(j.interfaceChange,t)}logInterfaceChange(t){return q(this,void 0,void 0,function*(){return(yield this.makeInterfaceChange(t)).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanAutomatic(){return this.makeSearchEvent(j.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return q(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(j.didyoumeanClick)}logDidYouMeanClick(){return q(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(t){return this.makeSearchEvent(j.resultsSort,t)}logResultsSort(t){return q(this,void 0,void 0,function*(){return(yield this.makeResultsSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxSubmit(){return this.makeSearchEvent(j.searchboxSubmit)}logSearchboxSubmit(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(j.searchboxClear)}logSearchboxClear(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(j.searchboxAsYouType)}logSearchboxAsYouType(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(t){return this.makeSearchEvent(j.breadcrumbFacet,t)}logBreadcrumbFacet(t){return q(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbFacet(t)).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbResetAll(){return this.makeSearchEvent(j.breadcrumbResetAll)}logBreadcrumbResetAll(){return q(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbResetAll()).log({searchUID:this.provider.getSearchUID()})})}makeDocumentQuickview(t,r){return this.makeClickEvent(j.documentQuickview,t,r)}logDocumentQuickview(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeDocumentQuickview(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeDocumentOpen(t,r){return this.makeClickEvent(j.documentOpen,t,r)}logDocumentOpen(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeDocumentOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxAnalytics(t){return this.makeSearchEvent(j.omniboxAnalytics,Qu(t))}logOmniboxAnalytics(t){return q(this,void 0,void 0,function*(){return(yield this.makeOmniboxAnalytics(t)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxFromLink(t){return this.makeSearchEvent(j.omniboxFromLink,Qu(t))}logOmniboxFromLink(t){return q(this,void 0,void 0,function*(){return(yield this.makeOmniboxFromLink(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchFromLink(){return this.makeSearchEvent(j.searchFromLink)}logSearchFromLink(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(t){return this.makeCustomEvent(j.triggerNotify,t)}logTriggerNotify(t){return q(this,void 0,void 0,function*(){return(yield this.makeTriggerNotify(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerExecute(t){return this.makeCustomEvent(j.triggerExecute,t)}logTriggerExecute(t){return q(this,void 0,void 0,function*(){return(yield this.makeTriggerExecute(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerQuery(){return this.makeCustomEvent(j.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")}logTriggerQuery(){return q(this,void 0,void 0,function*(){return(yield this.makeTriggerQuery()).log({searchUID:this.provider.getSearchUID()})})}makeUndoTriggerQuery(t){return this.makeSearchEvent(j.undoTriggerQuery,t)}logUndoTriggerQuery(t){return q(this,void 0,void 0,function*(){return(yield this.makeUndoTriggerQuery(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerRedirect(t){return this.makeCustomEvent(j.triggerRedirect,Object.assign(Object.assign({},t),{query:this.provider.getSearchEventRequestPayload().queryText}))}logTriggerRedirect(t){return q(this,void 0,void 0,function*(){return(yield this.makeTriggerRedirect(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerResize(t){return this.makeCustomEvent(j.pagerResize,t)}logPagerResize(t){return q(this,void 0,void 0,function*(){return(yield this.makePagerResize(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNumber(t){return this.makeCustomEvent(j.pagerNumber,t)}logPagerNumber(t){return q(this,void 0,void 0,function*(){return(yield this.makePagerNumber(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNext(t){return this.makeCustomEvent(j.pagerNext,t)}logPagerNext(t){return q(this,void 0,void 0,function*(){return(yield this.makePagerNext(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerPrevious(t){return this.makeCustomEvent(j.pagerPrevious,t)}logPagerPrevious(t){return q(this,void 0,void 0,function*(){return(yield this.makePagerPrevious(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerScrolling(){return this.makeCustomEvent(j.pagerScrolling)}logPagerScrolling(){return q(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(t){return this.makeSearchEvent(j.facetClearAll,t)}logFacetClearAll(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSearch(t){return this.makeSearchEvent(j.facetSearch,t)}logFacetSearch(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetSearch(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelect(t){return this.makeSearchEvent(j.facetSelect,t)}logFacetSelect(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetDeselect(t){return this.makeSearchEvent(j.facetDeselect,t)}logFacetDeselect(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetExclude(t){return this.makeSearchEvent(j.facetExclude,t)}logFacetExclude(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetExclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUnexclude(t){return this.makeSearchEvent(j.facetUnexclude,t)}logFacetUnexclude(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetUnexclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelectAll(t){return this.makeSearchEvent(j.facetSelectAll,t)}logFacetSelectAll(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetSelectAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUpdateSort(t){return this.makeSearchEvent(j.facetUpdateSort,t)}logFacetUpdateSort(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetUpdateSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowMore(t){return this.makeCustomEvent(j.facetShowMore,t)}logFacetShowMore(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetShowMore(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowLess(t){return this.makeCustomEvent(j.facetShowLess,t)}logFacetShowLess(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetShowLess(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryError(t){return this.makeCustomEvent(j.queryError,t)}logQueryError(t){return q(this,void 0,void 0,function*(){return(yield this.makeQueryError(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorBack(){return q(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(j.queryErrorBack);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(j.queryErrorBack)})}})}logQueryErrorBack(){return q(this,void 0,void 0,function*(){return(yield this.makeQueryErrorBack()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorRetry(){return q(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(j.queryErrorRetry);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(j.queryErrorRetry)})}})}logQueryErrorRetry(){return q(this,void 0,void 0,function*(){return(yield this.makeQueryErrorRetry()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorClear(){return q(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(j.queryErrorClear);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(j.queryErrorClear)})}})}logQueryErrorClear(){return q(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(j.likeSmartSnippet)}logLikeSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(j.dislikeSmartSnippet)}logDislikeSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(j.expandSmartSnippet)}logExpandSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(j.collapseSmartSnippet)}logCollapseSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(j.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(j.closeSmartSnippetFeedbackModal)}logCloseSmartSnippetFeedbackModal(){return q(this,void 0,void 0,function*(){return(yield this.makeCloseSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeSmartSnippetFeedbackReason(t,r){return this.makeCustomEvent(j.sendSmartSnippetReason,{reason:t,details:r})}logSmartSnippetFeedbackReason(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeSmartSnippetFeedbackReason(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippetSuggestion(t){return this.makeCustomEvent(j.expandSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logExpandSmartSnippetSuggestion(t){return q(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippetSuggestion(t){return this.makeCustomEvent(j.collapseSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logCollapseSmartSnippetSuggestion(t){return q(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreSmartSnippetSuggestion(t){return this.makeCustomEvent(j.showMoreSmartSnippetSuggestion,t)}logShowMoreSmartSnippetSuggestion(t){return q(this,void 0,void 0,function*(){return(yield this.makeShowMoreSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessSmartSnippetSuggestion(t){return this.makeCustomEvent(j.showLessSmartSnippetSuggestion,t)}logShowLessSmartSnippetSuggestion(t){return q(this,void 0,void 0,function*(){return(yield this.makeShowLessSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSource(t,r){return this.makeClickEvent(j.openSmartSnippetSource,t,r)}logOpenSmartSnippetSource(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionSource(t,r){return this.makeClickEvent(j.openSmartSnippetSuggestionSource,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}makeCopyToClipboard(t,r){return this.makeClickEvent(j.copyToClipboard,t,r)}logCopyToClipboard(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeCopyToClipboard(t,r)).log({searchUID:this.provider.getSearchUID()})})}logOpenSmartSnippetSuggestionSource(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetInlineLink(t,r){return this.makeClickEvent(j.openSmartSnippetInlineLink,t,{contentIDKey:r.contentIDKey,contentIDValue:r.contentIDValue},r)}logOpenSmartSnippetInlineLink(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionInlineLink(t,r){return this.makeClickEvent(j.openSmartSnippetSuggestionInlineLink,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logOpenSmartSnippetSuggestionInlineLink(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeRecentQueryClick(){return this.makeSearchEvent(j.recentQueryClick)}logRecentQueryClick(){return q(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(j.clearRecentQueries)}logClearRecentQueries(){return q(this,void 0,void 0,function*(){return(yield this.makeClearRecentQueries()).log({searchUID:this.provider.getSearchUID()})})}makeRecentResultClick(t,r){return this.makeCustomEvent(j.recentResultClick,{info:t,identifier:r})}logRecentResultClick(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeRecentResultClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentResults(){return this.makeCustomEvent(j.clearRecentResults)}logClearRecentResults(){return q(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(j.noResultsBack)}logNoResultsBack(){return q(this,void 0,void 0,function*(){return(yield this.makeNoResultsBack()).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreFoldedResults(t,r){return this.makeClickEvent(j.showMoreFoldedResults,t,r)}logShowMoreFoldedResults(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeShowMoreFoldedResults(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessFoldedResults(){return this.makeCustomEvent(j.showLessFoldedResults)}logShowLessFoldedResults(){return q(this,void 0,void 0,function*(){return(yield this.makeShowLessFoldedResults()).log({searchUID:this.provider.getSearchUID()})})}makeEventDescription(t,r){var n;return{actionCause:r,customData:(n=t.payload)===null||n===void 0?void 0:n.customData}}makeCustomEvent(t,r){return q(this,arguments,void 0,function*(n,o,i=Lu[n]){this.coveoAnalyticsClient.getParameters;let a=Object.assign(Object.assign({},this.provider.getBaseMetadata()),o),m=Object.assign(Object.assign({},yield this.getBaseEventRequest(a)),{eventType:i,eventValue:n}),f=yield this.coveoAnalyticsClient.makeCustomEvent(m);return{description:this.makeEventDescription(f,n),log:({searchUID:p})=>f.log({lastSearchQueryUid:p})}})}logCustomEvent(t,r){return q(this,arguments,void 0,function*(n,o,i=Lu[n]){return(yield this.makeCustomEvent(n,o,i)).log({searchUID:this.provider.getSearchUID()})})}makeCustomEventWithType(t,r,n){return q(this,void 0,void 0,function*(){let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),n),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:r,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEventWithType(t,r,n){return q(this,void 0,void 0,function*(){return(yield this.makeCustomEventWithType(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}logSearchEvent(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeSearchEvent(t,r){return q(this,void 0,void 0,function*(){let n=yield this.getBaseSearchEventRequest(t,r),o=yield this.coveoAnalyticsClient.makeSearchEvent(n);return{description:this.makeEventDescription(o,t),log:({searchUID:i})=>o.log({searchQueryUid:i})}})}makeClickEvent(t,r,n,o){return q(this,void 0,void 0,function*(){let i=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{queryPipeline:this.provider.getPipeline(),actionCause:t}),a=yield this.coveoAnalyticsClient.makeClickEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({searchQueryUid:m})}})}logClickEvent(t,r,n,o){return q(this,void 0,void 0,function*(){return(yield this.makeClickEvent(t,r,n,o)).log({searchUID:this.provider.getSearchUID()})})}getBaseSearchEventRequest(t,r){return q(this,void 0,void 0,function*(){var n,o;return Object.assign(Object.assign(Object.assign({},yield this.getBaseEventRequest(Object.assign(Object.assign({},r),(o=(n=this.provider).getGeneratedAnswerMetadata)===null||o===void 0?void 0:o.call(n)))),this.provider.getSearchEventRequestPayload()),{queryPipeline:this.provider.getPipeline(),actionCause:t})})}getBaseEventRequest(t){return q(this,void 0,void 0,function*(){let r=Object.assign(Object.assign({},this.provider.getBaseMetadata()),t);return Object.assign(Object.assign(Object.assign({},this.getOrigins()),this.getSplitTestRun()),{customData:r,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous(),clientId:yield this.getClientId()})})}getOrigins(){var t,r;return{originContext:(r=(t=this.provider).getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}}getClientId(){return this.coveoAnalyticsClient instanceof Ze?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getSplitTestRun(){let t=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",r=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return Object.assign(Object.assign({},t&&{splitTestRunName:t}),r&&{splitTestRunVersion:r})}makeLikeGeneratedAnswer(t){return this.makeCustomEvent(j.likeGeneratedAnswer,t)}logLikeGeneratedAnswer(t){return q(this,void 0,void 0,function*(){return(yield this.makeLikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeDislikeGeneratedAnswer(t){return this.makeCustomEvent(j.dislikeGeneratedAnswer,t)}logDislikeGeneratedAnswer(t){return q(this,void 0,void 0,function*(){return(yield this.makeDislikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenGeneratedAnswerSource(t){return this.makeCustomEvent(j.openGeneratedAnswerSource,t)}logOpenGeneratedAnswerSource(t){return q(this,void 0,void 0,function*(){return(yield this.makeOpenGeneratedAnswerSource(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCitationClick(t,r){return this.makeClickEvent(j.generatedAnswerCitationClick,Object.assign(Object.assign({},t),{documentPosition:1}),{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logGeneratedAnswerCitationClick(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCitationClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerSourceHover(t){return this.makeCustomEvent(j.generatedAnswerSourceHover,t)}logGeneratedAnswerSourceHover(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerSourceHover(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCopyToClipboard(t){return this.makeCustomEvent(j.generatedAnswerCopyToClipboard,t)}logGeneratedAnswerCopyToClipboard(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCopyToClipboard(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerHideAnswers(t){return this.makeCustomEvent(j.generatedAnswerHideAnswers,t)}logGeneratedAnswerHideAnswers(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerHideAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerShowAnswers(t){return this.makeCustomEvent(j.generatedAnswerShowAnswers,t)}logGeneratedAnswerShowAnswers(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerShowAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerExpand(t){return this.makeCustomEvent(j.generatedAnswerExpand,t)}logGeneratedAnswerExpand(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerExpand(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCollapse(t){return this.makeCustomEvent(j.generatedAnswerCollapse,t)}logGeneratedAnswerCollapse(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCollapse(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmit(t){return this.makeCustomEvent(j.generatedAnswerFeedbackSubmit,t)}logGeneratedAnswerFeedbackSubmit(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmit(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmitV2(t){return this.makeCustomEvent(j.generatedAnswerFeedbackSubmitV2,t)}logGeneratedAnswerFeedbackSubmitV2(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmitV2(t)).log({searchUID:this.provider.getSearchUID()})})}makeRephraseGeneratedAnswer(t){return this.makeSearchEvent(j.rephraseGeneratedAnswer,t)}logRephraseGeneratedAnswer(t){return q(this,void 0,void 0,function*(){return(yield this.makeRephraseGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeRetryGeneratedAnswer(){return this.makeSearchEvent(j.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return q(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(t){return this.makeCustomEvent(j.generatedAnswerStreamEnd,t)}logGeneratedAnswerStreamEnd(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(t)).log({searchUID:this.provider.getSearchUID()})})}},Eo=Object.assign({},dn),Bu=Object.keys(Eo).map(e=>Eo[e]),Sr=class extends Ca{constructor({client:t,uuidGenerator:r=Bt}){super({client:t,uuidGenerator:r}),this.ticket={}}getApi(t){let r=super.getApi(t);if(r!==null)return r;switch(t){case"setTicket":return this.setTicket;default:return null}}addHooks(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()}setTicket(t){this.ticket=t}clearPluginData(){this.ticket={}}addHooksForSVCEvents(){this.client.registerBeforeSendEventHook((t,...[r])=>Bu.indexOf(t)!==-1?this.addSVCDataToPayload(t,r):r),this.client.registerAfterSendEventHook((t,...[r])=>(Bu.indexOf(t)!==-1&&this.updateLocationInformation(t,r),r))}addHooksForPageView(){this.client.addEventTypeMapping(Eo.pageview,{newEventType:ae.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addHooksForEvent(){this.client.addEventTypeMapping(Eo.event,{newEventType:ae.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addSVCDataToPayload(t,r){var n;let o=Object.assign(Object.assign(Object.assign(Object.assign({},this.getLocationInformation(t,r)),this.getDefaultContextInformation(t)),this.action?{svcAction:this.action}:{}),Object.keys((n=this.actionData)!==null&&n!==void 0?n:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),Object.assign(Object.assign(Object.assign({},i),o),r)}getTicketPayload(){return wy(this.ticket)}};Sr.Id="svc";var Io;(function(e){e.click="click",e.flowStart="flowStart"})(Io||(Io={}));var Ue;(function(e){e.enterInterface="ticket_create_start",e.fieldUpdate="ticket_field_update",e.fieldSuggestionClick="ticket_classification_click",e.documentSuggestionClick="documentSuggestionClick",e.documentSuggestionQuickview="documentSuggestionQuickview",e.suggestionRate="suggestion_rate",e.nextCaseStep="ticket_next_stage",e.caseCancelled="ticket_cancel",e.caseSolved="ticket_cancel",e.caseCreated="ticket_create"})(Ue||(Ue={}));var Po;(function(e){e.quit="Quit",e.solved="Solved"})(Po||(Po={}));var ko=class{constructor(t,r){var n;this.options=t,this.provider=r;let o=((n=t.enableAnalytics)!==null&&n!==void 0?n:!0)&&!xo();this.coveoAnalyticsClient=o?new Ze(t):new Ar,this.svc=new Sr({client:this.coveoAnalyticsClient})}disable(){this.coveoAnalyticsClient=new Ar,this.svc=new Sr({client:this.coveoAnalyticsClient})}enable(){this.coveoAnalyticsClient=new Ze(this.options),this.svc=new Sr({client:this.coveoAnalyticsClient})}logEnterInterface(t){return this.svc.setAction(Ue.enterInterface),this.svc.setTicket(t.ticket),this.sendFlowStartEvent()}logUpdateCaseField(t){return this.svc.setAction(Ue.fieldUpdate,{fieldName:t.fieldName}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectFieldSuggestion(t){return this.svc.setAction(Ue.fieldSuggestionClick,t.suggestion),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectDocumentSuggestion(t){return this.logClickEvent(Ue.documentSuggestionClick,t.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:t.suggestion.permanentId})}logQuickviewDocumentSuggestion(t){return this.logClickEvent(Ue.documentSuggestionQuickview,t.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:t.suggestion.permanentId})}logRateDocumentSuggestion(t){return this.svc.setAction(Ue.suggestionRate,Object.assign({rate:t.rating},t.suggestion)),this.svc.setTicket(t.ticket),this.sendClickEvent()}logMoveToNextCaseStep(t){return this.svc.setAction(Ue.nextCaseStep,{stage:t?.stage}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCancelled(t){return this.svc.setAction(Ue.caseCancelled,{reason:Po.quit}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseSolved(t){return this.svc.setAction(Ue.caseSolved,{reason:Po.solved}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCreated(t){return this.svc.setAction(Ue.caseCreated),this.svc.setTicket(t.ticket),this.sendClickEvent()}sendFlowStartEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",Io.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}sendClickEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",Io.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}getBaseEventRequest(t){return q(this,void 0,void 0,function*(){var r,n;let o=Object.assign({},t);return Object.assign(Object.assign({},this.getOrigins()),{customData:o,language:(r=this.provider)===null||r===void 0?void 0:r.getLanguage(),anonymous:(n=this.provider)===null||n===void 0?void 0:n.getIsAnonymous(),clientId:yield this.getClientId()})})}getClientId(){return this.coveoAnalyticsClient instanceof Ze?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getOrigins(){var t,r,n,o,i;return{originContext:(r=(t=this.provider)===null||t===void 0?void 0:t.getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:(n=this.provider)===null||n===void 0?void 0:n.getOriginLevel1(),originLevel2:(o=this.provider)===null||o===void 0?void 0:o.getOriginLevel2(),originLevel3:(i=this.provider)===null||i===void 0?void 0:i.getOriginLevel3()}}logClickEvent(t,r,n,o){return q(this,void 0,void 0,function*(){var i,a;let m=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{searchQueryUid:(a=(i=this.provider)===null||i===void 0?void 0:i.getSearchUID())!==null&&a!==void 0?a:"",actionCause:t});return this.coveoAnalyticsClient.sendClickEvent(m)})}};var Zu=e=>new Ze(e).getCurrentVisitorId(),mn=(e,t)=>typeof t=="function"?(...r)=>{let n=Kr(r[0]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics preprocessRequest. Returning original request."),n}}:void 0,gn=(e,t)=>(...r)=>{let n=Kr(r[1]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics hook. Returning original request."),n}};d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();function Fo(){return{desiredCount:5,numberOfValues:8,set:{}}}d();c();l();u();d();c();l();u();d();c();l();u();function el(e){let{activeValue:t,ancestryMap:r}=Sh(e);return t?vh(t,r):[]}function Sh(e){let t=[...e],r=new Map;for(;t.length>0;){let n=t.shift();if(n.state==="selected")return{activeValue:n,ancestryMap:r};if(r)for(let o of n.children)r.set(o,n);t.unshift(...n.children)}return{}}function vh(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}var Ah=(e,t)=>e.categoryFacetSet[t]?.request;var ja=(e,t)=>{let r=Ah(e,t);return el(r?.currentValues??[])};d();c();l();u();function Oo(){return{}}d();c();l();u();function To(){return{}}d();c();l();u();function Do(){return{}}d();c();l();u();function qo(){return{}}function Ma(e){return{facetSet:e.facetSet??qo(),categoryFacetSet:e.categoryFacetSet??Oo(),dateFacetSet:e.dateFacetSet??To(),numericFacetSet:e.numericFacetSet??Do(),automaticFacetSet:e.automaticFacetSet??Fo()}}var Na=e=>{let t=[];return wh(e).forEach((r,n)=>{let o=Oh(e,r.facetId),i=kh(r,n+1);if(Ch(r)){if(!!!ja(e,r.facetId).length)return;t.push({...i,...Ih(e,r.facetId),facetType:o,state:"selected"});return}r.currentValues.forEach((a,m)=>{if(a.state==="idle")return;let f=tl(a,m+1,o),p=bh(r)?rl(a):Rh(a);t.push({...i,...f,...p})})}),xh(e).forEach((r,n)=>{let o=Ph(r,n+1);r.values.forEach((i,a)=>{if(i.state==="idle")return;let m=tl(i,a+1,"specific"),f=rl(i);t.push({...o,...m,...f})})}),t},bh=e=>e.type==="specific",Ch=e=>e.type==="hierarchical",wh=e=>[...Object.values(e.facetSet),...Object.values(e.categoryFacetSet),...Object.values(e.dateFacetSet),...Object.values(e.numericFacetSet)].map(t=>t.request),xh=e=>[...Object.values(e.automaticFacetSet.set)].map(t=>t.response),tl=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),Rh=e=>({displayValue:`${e.start}..${e.end}`,value:`${e.start}..${e.end}`,start:e.start,end:e.end,endInclusive:e.endInclusive}),rl=e=>({displayValue:e.value,value:e.value}),Eh=(e,t)=>ja(e,t).map(n=>n.value).join(";"),Ih=(e,t)=>{let n=Eh(e,t);return{value:n,valuePosition:1,displayValue:n}},Ph=(e,t)=>({title:nl(e.field,e.field),field:e.field,id:e.field,facetPosition:t}),kh=(e,t)=>({title:nl(e.field,e.facetId),field:e.field,id:e.facetId,facetPosition:t}),nl=(e,t)=>`${e}_${t}`,Fh=(e,t)=>e.facetSet[t]?.request||e.categoryFacetSet[t]?.request||e.dateFacetSet[t]?.request||e.numericFacetSet[t]?.request||e.automaticFacetSet.set[t]?.response,Oh=(e,t)=>{let r=Fh(e,t);return r?r.type:"specific"};d();c();l();u();var br=e=>{if(Th(e))return e.generatedAnswer?.answerId;if(Dh(e))return e.search?.response?.extendedResults?.generativeQuestionAnsweringId},Th=e=>"answer"in e&&"generatedAnswer"in e&&!X(e.generatedAnswer?.answerConfigurationId),Dh=e=>"search"in e&&e.search!==void 0&&typeof e.search=="object",ol=e=>e.generatedAnswer?.fieldsToIncludeInCitations,qh=se(e=>e.generatedAnswer?.citations,(e,t)=>t,(e,t)=>e?.find(r=>r.id===t));d();c();l();u();var Ne=()=>({q:"",enableQuerySyntax:!1});d();c();l();u();d();c();l();u();var il=(r=>(r.Ascending="ascending",r.Descending="descending",r))(il||{}),al=(i=>(i.Relevancy="relevancy",i.QRE="qre",i.Date="date",i.Field="field",i.NoSort="nosort",i))(al||{}),_a=e=>{if(yc(e))return e.map(t=>_a(t)).join(",");switch(e.by){case"relevancy":case"qre":case"nosort":return e.by;case"date":return`date ${e.order}`;case"field":return`@${e.field} ${e.order}`;default:return""}},sl=()=>({by:"relevancy"});var Lk=new K({values:{by:new _i({enum:al,required:!0}),order:new _i({enum:il}),field:new H}});function jo(){return _a(sl())}d();c();l();u();d();c();l();u();var Cr=()=>"default";var jh=e=>{let t=e.configuration.search.locale.split("-")[0];return!t||t.length!==2?"en":t},ct=class{constructor(t){this.getState=t;pe(this,"state");this.state=t()}getLanguage(){return jh(this.state)}getBaseMetadata(){let{context:t,configuration:r}=this.state,n=t?.contextValues||{},o={};for(let[i,a]of Object.entries(n)){let m=`context_${i}`;o[m]=a}return r.analytics.analyticsMode==="legacy"&&(o.coveoHeadlessVersion=sr),o}getOriginContext(){return this.state.configuration.analytics.originContext}getOriginLevel1(){return this.state.searchHub||Cr()}getOriginLevel2(){return this.state.configuration.analytics.originLevel2}getOriginLevel3(){return this.state.configuration.analytics.originLevel3}getIsAnonymous(){return this.state.configuration.analytics.anonymous}};var yn=class yn extends ct{constructor(){super(...arguments);pe(this,"getFacetRequest",r=>this.state.facetSet?.[r]?.request||this.state.categoryFacetSet?.[r]?.request||this.state.dateFacetSet?.[r]?.request||this.state.numericFacetSet?.[r]?.request||this.state.automaticFacetSet?.set[r]?.response)}getFacetState(){return Na(Ma(this.getState()))}getPipeline(){return this.state.pipeline||this.state.search?.response.pipeline||yn.fallbackPipelineName}getSearchEventRequestPayload(){return{queryText:this.queryText,responseTime:this.responseTime,results:this.resultURIs,numberOfResults:this.numberOfResults}}getSearchUID(){let r=this.getState();return r.search?.searchResponseId||r.search?.response.searchUid||We().response.searchUid}getSplitTestRunName(){return this.state.search?.response.splitTestRun}getSplitTestRunVersion(){let r=!!this.getSplitTestRunName(),n=this.state.search?.response.pipeline||this.state.pipeline||yn.fallbackPipelineName;return r?n:void 0}getBaseMetadata(){let r=this.getState(),n=super.getBaseMetadata(),o=br(r);return o&&(n.generativeQuestionAnsweringId=o),n}getFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetValue:n,facetTitle:`${i}_${r}`}}getFacetClearAllMetadata(r){let o=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:o,facetTitle:`${o}_${r}`}}getFacetUpdateSortMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,criteria:n,facetTitle:`${i}_${r}`}}getRangeBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetRangeEnd:n.end,facetRangeEndInclusive:n.endInclusive,facetRangeStart:n.start,facetTitle:`${i}_${r}`}}getResultSortMetadata(){return{...this.getBaseMetadata(),resultsSortBy:this.state.sortCriteria??jo()}}getStaticFilterToggleMetadata(r,n){return{...this.getBaseMetadata(),staticFilterId:r,staticFilterValue:n}}getStaticFilterClearAllMetadata(r){return{...this.getBaseMetadata(),staticFilterId:r}}getUndoTriggerQueryMetadata(r){return{...this.getBaseMetadata(),undoneQuery:r}}getCategoryBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),categoryFacetId:r,categoryFacetField:i,categoryFacetPath:n,categoryFacetTitle:`${i}_${r}`}}getOmniboxAnalyticsMetadata(r,n){let o=this.state.querySuggest?.[r],i=o.completions.map(p=>p.expression),a=o.partialQueries.length-1,m=o.partialQueries[a]||"",f=o.responseId;return{...this.getBaseMetadata(),suggestionRanking:i.indexOf(n),partialQuery:m,partialQueries:o.partialQueries.length>0?o.partialQueries:"",suggestions:i.length>0?i:"",querySuggestResponseId:f}}getInterfaceChangeMetadata(){return{...this.getBaseMetadata(),interfaceChangeTo:this.state.configuration.analytics.originLevel2}}getOmniboxFromLinkMetadata(r){return{...this.getBaseMetadata(),...r}}getGeneratedAnswerMetadata(){let r=this.getState(),n={};return r.generatedAnswer?.isVisible!==void 0&&(n.showGeneratedAnswer=r.generatedAnswer.isVisible),n}get resultURIs(){return this.results?.map(r=>({documentUri:r.uri,documentUriHash:r.raw.urihash}))}get results(){return this.state.search?.response.results}get queryText(){return this.state.query?.q||Ne().q}get responseTime(){return this.state.search?.duration||We().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||We().response.totalCountFiltered}};pe(yn,"fallbackPipelineName","default");var vt=yn,cl=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Pe(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,p=i.configuration.analytics.enabled,y=new Ro({token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:mn(e,n),beforeSendHooks:[gn(e,r),(h,S)=>(e.info({...S,type:h,endpoint:m,token:a},"Analytics request"),S)]},o);return p||y.disable(),y},Va=()=>{let t=Le.getInstance().getHistory().reverse().find(r=>r.name==="PageView"&&r.value);return t?t.value:""};var Mo=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(e,t){let r=e.analyticsMode==="next";return{analytics:{clientId:yield Zu(e),clientTimestamp:new Date().toISOString(),documentReferrer:e.originLevel3,originContext:e.originContext,...(t&&{actionCause:t.actionCause,customData:t.customData}),...(t&&!r&&{customData:t.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.documentLocation&&{documentLocation:e.documentLocation}),...(e.deviceId&&{deviceId:e.deviceId}),...(Va()&&{pageId:Va()}),...(r&&e.trackingId&&{trackingId:e.trackingId}),capture:r,...(r&&{source:yr(e)})}}});return function Mo(_x9,_x0){return _ref7.apply(this,arguments)}}();d();c();l();u();d();c();l();u();d();c();l();u();var wr=()=>({duration:0,error:null,isLoading:!1,id:"Recommendation",recommendations:[],searchUid:"",splitTestRun:"",pipeline:""});var hn=class extends ct{getPipeline(){return this.state.pipeline||this.state.recommendation?.pipeline||"default"}getSearchEventRequestPayload(){return{queryText:Ne().q,responseTime:this.responseTime,results:this.mapResultsToAnalyticsDocument(),numberOfResults:this.numberOfResults}}getSearchUID(){return this.getState().recommendation?.searchUid||wr().searchUid}getSplitTestRunName(){return this.state.recommendation?.splitTestRun}getSplitTestRunVersion(){let t=!!this.getSplitTestRunName(),r=this.state.recommendation?.pipeline||this.state.pipeline||"default";return t?r:void 0}get responseTime(){return this.state.recommendation?.duration||wr().duration}mapResultsToAnalyticsDocument(){return this.state.recommendation?.recommendations.map(t=>({documentUri:t.uri,documentUriHash:t.raw.urihash}))}get numberOfResults(){return this.state.recommendation?.recommendations.length||wr().recommendations.length}};d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var ul=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Mh(e){return typeof e=="string"&&ul.test(e)}var La=Mh;d();c();l();u();var Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function ll(e,t=0){return(Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]).toLowerCase()}d();c();l();u();var Ua,Nh=new Uint8Array(16);function Qa(){if(!Ua){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ua=crypto.getRandomValues.bind(crypto)}return Ua(Nh)}d();c();l();u();d();c();l();u();var _h=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ba={randomUUID:_h};function Vh(e,t,r){if(Ba.randomUUID&&!t&&!e)return Ba.randomUUID();e=e||{};let n=e.random??e.rng?.()??Qa();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return ll(n)}var $a=Vh;d();c();l();u();function dl(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function Lh({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:i,mode:a}=e;a!=="disabled"&&(n.call(r),t.send(o,i,r))}var pl="visitorId";function Uh(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(pl),o=n&&La(n)?n:t.generateUUID();return r.setItem(pl,o),o}}}var hl="1.2.7",Ha=128,Sl=192,fl=224,ml=240,Qh=248;function Bh(e){return(e&Qh)===ml?4:(e&ml)===fl?3:(e&fl)===Sl?2:1}function $h(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&Ha)!=Ha)break;if(r-=3,(n&Sl)!=Ha){t-r>=Bh(n)*3&&(r=t);break}}return e.substring(0,r)}function Hh(e){let{trackingId:t}=e;return{trackingId:t}}function zh(e){return(e.source||[]).concat([`relay@${hl}`])}function vl(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,m=Hh(t),f=n.getClientId();return Object.freeze({type:e,config:m,ts:Date.now(),source:zh(t),clientId:f,userAgent:a(),referrer:gl(o()),location:gl(i())})}function gl(e){return e!==null?$h(e,1024):null}function Gh(e,t,r,n,o){return{...t,meta:vl(e,r,n,o)}}var Wh="*";function Kh(){let e=[];function t({type:f,callback:p}){return e.findIndex(y=>y.type===f&&y.callback===p)}function r(f,p){return f.type==="*"||p===f.type}function n(f){return t(f)<0&&e.push(f),()=>m(f.type,f.callback)}function o(f){e.forEach(p=>{if(r(p,f.meta.type))try{p.callback(f)}catch(y){console.error(y)}})}function i(f){if(f===Wh)e.length=0;else for(let p=e.length-1;p>=0;p--)e[p].type===f&&e.splice(p,1)}function a(f){let p=t(f);p>=0&&e.splice(p,1)}function m(f,p){p?a({type:f,callback:p}):i(f)}return{add:n,call:o,remove:m}}function yl({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...(!!n.mode&&{mode:n.mode}),...(!!n.source&&{source:n.source}),...(!!n.environment&&{environment:n.environment})})}function Yh(e){let t=yl(e);return{get:()=>t,update:r=>{t=yl({...t,...r})}}}var za=Jh();function Jh(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let i of o){let a=i.replace(/^\s+/,"");if(a.lastIndexOf(n,0)===0)return a.substring(n.length,a.length)}return null},setItem(r,n,o){let i=t(window.location.hostname),a=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,m=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${a}${m};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function Xh(){return{getItem(e){return za.getItem(e)||localStorage.getItem(e)},removeItem(e){za.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),za.setItem(e,t,31556952e3)}}}function Zh(){let e=document.referrer;return e===""?null:e}function Ga(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(dl().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>Zh(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>$a(),storage:Xh()}}function eS(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function tS(){return{getItem(){return null},removeItem(){},setItem(){}}}function rS(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:tS()}}function nS(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=rS();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&oS()&&eS()?Ga():n}function oS(){try{return typeof window=="object"}catch{return!1}}function iS(e){return{get:()=>Object.freeze(nS(e))}}function Al(e){let t=Yh(e),r=Kh(),n=iS(t),o=Uh(n);return{emit:(i,a)=>{let m=t.get(),f=n.get(),p=Gh(i,a,m,f,o);return Lh({config:m,environment:f,event:p,listenerManager:r})},getMeta:i=>vl(i,t.get(),n.get(),o),on:(i,a)=>r.add({type:i,callback:a}),off:(i,a)=>r.remove(i,a),updateConfig:i=>t.update(i),version:hl}}d();c();l();u();function bl(){return typeof window<"u"&&typeof document<"u"}var Sn=se(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>yr(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a,m)=>{let f=sS(m);return Al({mode:i?"emit":"disabled",url:o??Vn(e,t),token:r,trackingId:n??null,source:a,environment:f})}),aS={generateUUID:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:()=>{},storage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{}}},sS=e=>{if(!e)return;let t=e();return{...(bl()?Ga():aS),generateUUID:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};d();c();l();u();var vn=class extends ct{getSearchUID(){return this.state.documentSuggestion?.status.lastResponseId??""}},Cl=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new vn(t)})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Pe(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,p=i.configuration.analytics.enabled,y=new ko({enableAnalytics:p,token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:mn(e,n),beforeSendHooks:[gn(e,r),(h,S)=>(e.info({...S,type:h,endpoint:m,token:a},"Analytics request"),S)]},o);return p||y.disable(),y};d();c();l();u();d();c();l();u();function wl(e,t){return{...new vt(t).getBaseMetadata(),actionCause:e,type:e}}function cS(e){return Object.assign(e,{instantlyCallable:!0})}function uS(e,t){let r=i=>cS(le(e,i)),n=r(/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(i,{getState:a,extra:m}){let{analyticsClientMiddleware:f,preprocessRequest:p,logger:y}=m;return yield(yield t({getState:a,analyticsClientMiddleware:f,preprocessRequest:p,logger:y})).log({state:a(),extra:m})});return function(_x1,_x10){return _ref8.apply(this,arguments)}}());return Object.assign(n,{prepare:function(){var _ref9=_asyncToGenerator(function*({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f}){let{description:p,log:y}=yield t({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f});return{description:p,action:r(/*#__PURE__*/function(){var _ref0=_asyncToGenerator(function*(h,{getState:S,extra:g}){return yield y({state:S(),extra:g})});return function(_x12,_x13){return _ref0.apply(this,arguments)}}())}});return function prepare(_x11){return _ref9.apply(this,arguments)}}()}),n}var xl=(e,t,r)=>{function n(...o){let i=o.length===1?{...o[0],__legacy__getBuilder:t(o[0].__legacy__getBuilder),analyticsConfigurator:e,providerClass:r}:{prefix:o[0],__legacy__getBuilder:t(o[1]),__legacy__provider:o[2],analyticsConfigurator:e,providerClass:r};return pS(i)}return n},lS=e=>e.configuration.analytics.analyticsMode==="legacy",dS=e=>e.configuration.analytics.analyticsMode==="next",pS=({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:o,analyticsConfigurator:i,providerClass:a})=>(r??(r=m=>new a(m)),uS(e,/*#__PURE__*/function(){var _ref1=_asyncToGenerator(function*({getState:m,analyticsClientMiddleware:f,preprocessRequest:p,logger:y}){let h=[],S={log:function(){var _ref10=_asyncToGenerator(function*({state:x}){for(let F of h)yield F(x)});return function log(_x15){return _ref10.apply(this,arguments)}}()},g=m(),v=i({getState:m,logger:y,analyticsClientMiddleware:f,preprocessRequest:p,provider:r(m)}),R=yield t(v,m());S.description=R?.description,h.push(/*#__PURE__*/function(){var _ref11=_asyncToGenerator(function*(x){lS(x)&&(yield fS(R,r,x,y,v.coveoAnalyticsClient))});return function(_x16){return _ref11.apply(this,arguments)}}());let{emit:P}=Sn(g);return h.push(/*#__PURE__*/function(){var _ref12=_asyncToGenerator(function*(x){if(dS(x)&&o&&n){let F=n(x);yield AS(P,o,F)}});return function(_x17){return _ref12.apply(this,arguments)}}()),S});return function(_x14){return _ref1.apply(this,arguments)}}()));function fS(_x18,_x19,_x20,_x21,_x22){return _fS.apply(this,arguments)}function _fS(){_fS=_asyncToGenerator(function*(e,t,r,n,o){t(()=>r);let i=yield e?.log({searchUID:t(()=>r).getSearchUID()});n.info({client:o,response:i},"Analytics response")});return _fS.apply(this,arguments)}var mS=e=>r=>(n,o)=>Promise.resolve({description:{actionCause:e},log:function(){var _ref13=_asyncToGenerator(function*(i){r(n,o)});return function log(_x23){return _ref13.apply(this,arguments)}}()}),je=xl(e=>cl({...e,provider:e.provider||new vt(e.getState)}),e=>e,vt),YT=xl(Cl,mS("caseAssist"),vn);var Wa=(e,t)=>{let r=t.recommendation?.recommendations.findIndex(({uniqueId:n})=>e.uniqueId===n)||0;return gS(e,r,t)};function gS(e,t,r){let n=e.raw.collection;return{collectionName:typeof n=="string"?n:"default",documentAuthor:SS(e),documentPosition:t+1,documentTitle:e.title,documentUri:e.uri,documentUriHash:e.raw.urihash,documentUrl:e.clickUri,rankingModifier:e.rankingModifier||"",sourceName:vS(e),queryPipeline:r.pipeline||pr()}}var No=e=>(e.raw.permanentid||console.warn("Missing field permanentid on result. This might cause many issues with your Coveo deployment. See https://docs.coveo.com/en/1913 and https://docs.coveo.com/en/1640 for more information.",e),{contentIDKey:"permanentid",contentIDValue:e.raw.permanentid||""}),Rl={urihash:new H,sourcetype:new H,permanentid:new H},El={uniqueId:W,raw:new K({values:Rl}),title:W,uri:W,clickUri:W,rankingModifier:new H({required:!1,emptyAllowed:!0})};function yS(e){return Object.assign({},...Object.keys(Rl).map(t=>({[t]:e[t]})))}function hS(e){return Object.assign({},...Object.keys(El).map(t=>({[t]:e[t]})),{raw:yS(e.raw)})}function SS(e){let t=e.raw.author;return X(t)?"unknown":Array.isArray(t)?t.join(";"):`${t}`}function vS(e){let t=e.raw.source;return X(t)?"unknown":t}var Ka=e=>new Fe(El).validate(hS(e));function AS(_x24,_x25,_x26){return _AS.apply(this,arguments)}function _AS(){_AS=_asyncToGenerator(function*(e,t,r){yield e(t,r)});return _AS.apply(this,arguments)}d();c();l();u();var Il=()=>je("analytics/recommendation/update",e=>e.makeRecommendationInterfaceLoad(),e=>new hn(e)),Pl=()=>({actionCause:"recommendationInterfaceLoad"}),Vo=e=>je({prefix:"analytics/recommendation/open",__legacy__getBuilder:(t,r)=>(Ka(e),t.makeRecommendationOpen(Wa(e,r),No(e))),__legacy__provider:t=>new hn(t),analyticsType:"itemClick",analyticsPayloadBuilder:t=>{let r=Wa(e,t),n=No(e);return{responseId:e.searchUid??"",position:r.documentPosition,itemMetadata:{uniqueFieldName:n.contentIDKey,uniqueFieldValue:n.contentIDValue,title:r.documentTitle,author:r.documentAuthor,url:r.documentUrl}}}});var xr=T("recommendation/set",e=>Q(e,{id:W})),At=le("recommendation/get",/*#__PURE__*/function(){var _ref14=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n}}){let o=t(),i=Date.now(),a=yield bS(o),m=yield n.recommendations(a),f=Date.now()-i;return Oe(m)?r(m.error):{recommendations:m.success.results,analyticsAction:Il(),duration:f,searchUid:m.success.searchUid,splitTestRun:m.success.splitTestRun,pipeline:m.success.pipeline}});return function(_x27,_x28){return _ref14.apply(this,arguments)}}()),bS=/*#__PURE__*/function(){var _ref15=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??pt(e.configuration.organizationId,e.configuration.environment),recommendation:e.recommendation.id,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,locale:e.configuration.search.locale,actionsHistory:e.configuration.analytics.enabled?Le.getInstance().getHistory():[],...(e.advancedSearchQueries&&{aq:e.advancedSearchQueries.aq,cq:e.advancedSearchQueries.cq}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.context&&{context:e.context.contextValues}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.configuration.analytics.enabled&&(yield CS(e,Pl()))),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}),...(e.pagination&&{numberOfResults:e.pagination.numberOfResults})}});return function bS(_x29){return _ref15.apply(this,arguments)}}(),CS=/*#__PURE__*/function(){var _ref16=_asyncToGenerator(function*(e,t){let r=e.configuration.analytics.analyticsMode==="legacy"?void 0:{actionCause:t.actionCause,type:t.actionCause};return yield Mo(e.configuration.analytics,r)});return function CS(_x30,_x31){return _ref16.apply(this,arguments)}}();var Rr=ge(wr(),e=>{e.addCase(xr,(t,r)=>{t.id=r.payload.id}).addCase(At.rejected,(t,r)=>{t.error=r.payload?r.payload:null,t.isLoading=!1}).addCase(At.fulfilled,(t,r)=>{t.error=null,t.recommendations=r.payload.recommendations.map(n=>({...n,searchUid:r.payload.searchUid})),t.duration=r.payload.duration,t.isLoading=!1,t.searchUid=r.payload.searchUid,t.splitTestRun=r.payload.splitTestRun,t.pipeline=r.payload.pipeline}).addCase(At.pending,t=>{t.isLoading=!0}).addCase(fo,(t,r)=>{t.error=r.payload,t.isLoading=!1})});d();c();l();u();var Er=T("searchHub/set",e=>Q(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();var Ir=ge(Cr(),e=>{e.addCase(Er,(t,r)=>r.payload).addCase(qe.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(Je,(t,r)=>r.payload.searchHub||t)});d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();function kl(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var Fl=Ke;function Ql(e,t){if(e===t||!(Fl(e)&&Fl(t)||Array.isArray(e)&&Array.isArray(t)))return t;let r=Object.keys(t),n=Object.keys(e),o=r.length===n.length,i=Array.isArray(t)?[]:{};for(let a of r)i[a]=Ql(e[a],t[a]),o&&(o=e[a]===i[a]);return o?e:i}function Pr(e){let t=0;for(let r in e)t++;return t}var Ol=e=>[].concat(...e);function wS(e){return new RegExp("(^|:)//").test(e)}function xS(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function Qo(e){return e!=null}function RS(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var ES=e=>e.replace(/\/$/,""),IS=e=>e.replace(/^\//,"");function PS(e,t){if(!e)return t;if(!t)return e;if(wS(t))return t;let r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=ES(e),t=IS(t),`${e}${r}${t}`}function kS(e,t,r){return e.has(t)?e.get(t):e.set(t,r).get(t)}var Tl=(...e)=>b(...e),FS=e=>e.status>=200&&e.status<=299,OS=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Dl(e){if(!Ke(e))return e;let t={...e};for(let[r,n]of Object.entries(t))n===void 0&&delete t[r];return t}function Bl({baseUrl:e,prepareHeaders:t=h=>h,fetchFn:r=Tl,paramsSerializer:n,isJsonContentType:o=OS,jsonContentType:i="application/json",jsonReplacer:a,timeout:m,responseHandler:f,validateStatus:p,...y}={}){return typeof b>"u"&&r===Tl&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),(/*#__PURE__*/function(){var _ref17=_asyncToGenerator(function*(S,g,v){let{getState:R,extra:P,endpoint:x,forced:F,type:w}=g,E,{url:M,headers:O=new C(y.headers),params:I=void 0,responseHandler:k=f??"json",validateStatus:D=p??FS,timeout:N=m,...$}=typeof S=="string"?{url:S}:S,U,V=g.signal;N&&(U=new s.AbortController,g.signal.addEventListener("abort",U.abort),V=U.signal);let _={...y,signal:V,...$};O=new C(Dl(O)),_.headers=(yield t(O,{getState:R,arg:S,extra:P,endpoint:x,forced:F,type:w,extraOptions:v}))||O;let B=Z=>typeof Z=="object"&&(Ke(Z)||Array.isArray(Z)||typeof Z.toJSON=="function");if(!_.headers.has("content-type")&&B(_.body)&&_.headers.set("content-type",i),B(_.body)&&o(_.headers)&&(_.body=JSON.stringify(_.body,a)),I){let Z=~M.indexOf("?")?"&":"?",oe=n?n(I):new URLSearchParams(Dl(I));M+=Z+oe}M=PS(e,M);let L=new Request(M,_);E={request:new Request(M,_)};let G,Y=!1,te=U&&setTimeout(()=>{Y=!0,U.abort()},N);try{G=yield r(L)}catch(Z){return{error:{status:Y?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Z)},meta:E}}finally{te&&clearTimeout(te),U?.signal.removeEventListener("abort",U.abort)}let ce=G.clone();E.response=ce;let ee,re="";try{let Z;if(yield Promise.all([h(G,k).then(oe=>ee=oe,oe=>Z=oe),ce.text().then(oe=>re=oe,()=>{})]),Z)throw Z}catch(Z){return{error:{status:"PARSING_ERROR",originalStatus:G.status,data:re,error:String(Z)},meta:E}}return D(G,ee)?{data:ee,meta:E}:{error:{status:G.status,data:ee},meta:E}});return function(_x32,_x33,_x34){return _ref17.apply(this,arguments)}}());function h(_x35,_x36){return _h2.apply(this,arguments)}function _h2(){_h2=_asyncToGenerator(function*(S,g){if(typeof g=="function")return g(S);if(g==="content-type"&&(g=o(S.headers)?"json":"text"),g==="json"){let v=yield S.text();return v.length?JSON.parse(v):null}return S.text()});return _h2.apply(this,arguments)}}var kr=class{constructor(e,t=void 0){this.value=e,this.meta=t}};function TS(){return _TS.apply(this,arguments)}function _TS(){_TS=_asyncToGenerator(function*(e=0,t=5){let r=Math.min(e,t),n=~~((Math.random()+.4)*(300<<r));yield new Promise(o=>setTimeout(i=>o(i),n))});return _TS.apply(this,arguments)}function DS(e,t){throw Object.assign(new kr({error:e,meta:t}),{throwImmediately:!0})}var ql={},qS=(e,t)=>(/*#__PURE__*/function(){var _ref18=_asyncToGenerator(function*(r,n,o){let i=[5,(t||ql).maxRetries,(o||ql).maxRetries].filter(y=>y!==void 0),[a]=i.slice(-1),f={maxRetries:a,backoff:TS,retryCondition:(y,h,{attempt:S})=>S<=a,...t,...o},p=0;for(;;)try{let y=yield e(r,n,o);if(y.error)throw new kr(y);return y}catch(y){if(p++,y.throwImmediately){if(y instanceof kr)return y.value;throw y}if(y instanceof kr&&!f.retryCondition(y.value.error,r,{attempt:p,baseQueryApi:n,extraOptions:o}))return y.value;yield f.backoff(p,f.maxRetries)}});return function(_x37,_x38,_x39){return _ref18.apply(this,arguments)}}()),$l=Object.assign(qS,{fail:DS}),Za=T("__rtkq/focused"),Hl=T("__rtkq/unfocused"),es=T("__rtkq/online"),zl=T("__rtkq/offline");function ts(e){return e.type==="query"}function jS(e){return e.type==="mutation"}function rs(e){return e.type==="infinitequery"}function ns(e,t,r,n,o,i){return MS(e)?e(t,r,n,o).filter(Qo).map(Ya).map(i):Array.isArray(e)?e.map(Ya).map(i):[]}function MS(e){return typeof e=="function"}function Ya(e){return typeof e=="string"?{type:e}:e}function NS(e,t){return e.catch(t)}var Cn=Symbol("forceQueryFn"),Ja=e=>typeof e[Cn]=="function";function _S({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:r,mutationThunk:n,api:o,context:i}){let a=new Map,m=new Map,{unsubscribeQueryResult:f,removeMutationResult:p,updateSubscriptionOptions:y}=o.internalActions;return{buildInitiateQuery:x,buildInitiateInfiniteQuery:F,buildInitiateMutation:w,getRunningQueryThunk:h,getRunningMutationThunk:S,getRunningQueriesThunk:g,getRunningMutationsThunk:v};function h(E,M){return O=>{let I=i.endpointDefinitions[E],k=e({queryArgs:M,endpointDefinition:I,endpointName:E});return a.get(O)?.[k]}}function S(E,M){return O=>m.get(O)?.[M]}function g(){return E=>Object.values(a.get(E)||{}).filter(Qo)}function v(){return E=>Object.values(m.get(E)||{}).filter(Qo)}function R(E){}function P(E,M){let O=(I,{subscribe:k=!0,forceRefetch:D,subscriptionOptions:N,[Cn]:$,...U}={})=>(V,_)=>{let B=e({queryArgs:I,endpointDefinition:M,endpointName:E}),L,z={...U,type:"query",subscribe:k,forceRefetch:D,subscriptionOptions:N,endpointName:E,originalArgs:I,queryCacheKey:B,[Cn]:$};if(ts(M))L=t(z);else{let{direction:ue,initialPageParam:me}=U;L=r({...z,direction:ue,initialPageParam:me})}let G=o.endpoints[E].select(I),Y=V(L),te=G(_());let{requestId:ce,abort:ee}=Y,re=te.requestId!==ce,Z=a.get(V)?.[B],oe=()=>G(_()),ye=Object.assign($?Y.then(oe):re&&!Z?Promise.resolve(te):Promise.all([Z,Y]).then(oe),{arg:I,requestId:ce,subscriptionOptions:N,queryCacheKey:B,abort:ee,unwrap(){return _asyncToGenerator(function*(){let ue=yield ye;if(ue.isError)throw ue.error;return ue.data})()},refetch:()=>V(O(I,{subscribe:!1,forceRefetch:!0})),unsubscribe(){k&&V(f({queryCacheKey:B,requestId:ce}))},updateSubscriptionOptions(ue){ye.subscriptionOptions=ue,V(y({endpointName:E,requestId:ce,queryCacheKey:B,options:ue}))}});if(!Z&&!re&&!$){let ue=kS(a,V,{});ue[B]=ye,ye.then(()=>{delete ue[B],Pr(ue)||a.delete(V)})}return ye};return O}function x(E,M){return P(E,M)}function F(E,M){return P(E,M)}function w(E){return(M,{track:O=!0,fixedCacheKey:I}={})=>(k,D)=>{let N=n({type:"mutation",endpointName:E,originalArgs:M,track:O,fixedCacheKey:I}),$=k(N);let{requestId:U,abort:V,unwrap:_}=$,B=NS($.unwrap().then(Y=>({data:Y})),Y=>({error:Y})),L=()=>{k(p({requestId:U,fixedCacheKey:I}))},z=Object.assign(B,{arg:$.arg,requestId:U,abort:V,unwrap:_,reset:L}),G=m.get(k)||{};return m.set(k,G),G[U]=z,z.then(()=>{delete G[U],Pr(G)||m.delete(k)}),I&&(G[I]=z,z.then(()=>{G[I]===z&&(delete G[I],Pr(G)||m.delete(k))})),z}}}function VS(e){return e}var Lo=(e={})=>({...e,[cn]:!0});function LS({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:o,assertTagType:i,selectors:a}){let m=(k,D,N,$)=>(U,V)=>{let _=r[k],B=n({queryArgs:D,endpointDefinition:_,endpointName:k});if(U(o.internalActions.queryResultPatched({queryCacheKey:B,patches:N})),!$)return;let L=o.endpoints[k].select(D)(V()),z=ns(_.providesTags,L.data,void 0,D,{},i);U(o.internalActions.updateProvidedBy({queryCacheKey:B,providedTags:z}))};function f(k,D,N=0){let $=[D,...k];return N&&$.length>N?$.slice(0,-1):$}function p(k,D,N=0){let $=[...k,D];return N&&$.length>N?$.slice(1):$}let y=(k,D,N,$=!0)=>(U,V)=>{let B=o.endpoints[k].select(D)(V()),L={patches:[],inversePatches:[],undo:()=>U(o.util.patchQueryData(k,D,L.inversePatches,$))};if(B.status==="uninitialized")return L;let z;if("data"in B)if(De(B.data)){let[G,Y,te]=Xn(B.data,N);L.patches.push(...Y),L.inversePatches.push(...te),z=G}else z=N(B.data),L.patches.push({op:"replace",path:[],value:z}),L.inversePatches.push({op:"replace",path:[],value:B.data});return L.patches.length===0||U(o.util.patchQueryData(k,D,L.patches,$)),L},h=(k,D,N)=>$=>$(o.endpoints[k].initiate(D,{subscribe:!1,forceRefetch:!0,[Cn]:()=>({data:N})})),S=(k,D)=>k.query&&k[D]?k[D]:VS,g=/*#__PURE__*/function(){var _ref19=_asyncToGenerator(function*(k,{signal:D,abort:N,rejectWithValue:$,fulfillWithValue:U,dispatch:V,getState:_,extra:B}){let L=r[k.endpointName];try{let z=S(L,"transformResponse"),G={signal:D,abort:N,dispatch:V,getState:_,extra:B,endpoint:k.endpointName,type:k.type,forced:k.type==="query"?v(k,_()):void 0,queryCacheKey:k.type==="query"?k.queryCacheKey:void 0},Y=k.type==="query"?k[Cn]:void 0,te,ce=/*#__PURE__*/function(){var _ref20=_asyncToGenerator(function*(re,Z,oe,ye){if(Z==null&&re.pages.length)return Promise.resolve({data:re});let ue={queryArg:k.originalArgs,pageParam:Z},me=yield ee(ue),he=ye?f:p;return{data:{pages:he(re.pages,me.data,oe),pageParams:he(re.pageParams,Z,oe)}}});return function ce(_x42,_x43,_x44,_x45){return _ref20.apply(this,arguments)}}();function ee(_x46){return _ee.apply(this,arguments)}function _ee(){_ee=_asyncToGenerator(function*(re){let Z,{extraOptions:oe}=L;if(Y?Z=Y():L.query?Z=yield t(L.query(re),G,oe):Z=yield L.queryFn(re,G,oe,ue=>t(ue,G,oe)),typeof process<"u",Z.error)throw new kr(Z.error,Z.meta);let ye=yield z(Z.data,Z.meta,re);return{...Z,data:ye}});return _ee.apply(this,arguments)}if(k.type==="query"&&"infiniteQueryOptions"in L){let{infiniteQueryOptions:re}=L,{maxPages:Z=1/0}=re,oe,ye={pages:[],pageParams:[]},ue=a.selectQueryEntry(_(),k.queryCacheKey)?.data,he=v(k,_())&&!k.direction||!ue?ye:ue;if("direction"in k&&k.direction&&he.pages.length){let ke=k.direction==="backward",dt=(ke?Gl:Xa)(re,he);oe=yield ce(he,dt,Z,ke)}else{let{initialPageParam:ke=re.initialPageParam}=k,_e=ue?.pageParams??[],dt=_e[0]??ke,Kt=_e.length;oe=yield ce(he,dt,Z),Y&&(oe={data:oe.data.pages[0]});for(let Yt=1;Yt<Kt;Yt++){let Qr=Xa(re,oe.data);oe=yield ce(oe.data,Qr,Z)}}te=oe}else te=yield ee(k.originalArgs);return U(te.data,Lo({fulfilledTimeStamp:Date.now(),baseQueryMeta:te.meta}))}catch(z){let G=z;if(G instanceof kr){let Y=S(L,"transformErrorResponse");try{return $(yield Y(G.value,G.meta,k.originalArgs),Lo({baseQueryMeta:G.meta}))}catch(te){G=te}}throw typeof process<"u",console.error(G),G}});return function g(_x40,_x41){return _ref19.apply(this,arguments)}}();function v(k,D){let N=a.selectQueryEntry(D,k.queryCacheKey),$=a.selectConfig(D).refetchOnMountOrArgChange,U=N?.fulfilledTimeStamp,V=k.forceRefetch??(k.subscribe&&$);return V?V===!0||(Number(new Date)-Number(U))/1e3>=V:!1}let R=()=>le(`${e}/executeQuery`,g,{getPendingMeta({arg:D}){let N=r[D.endpointName];return Lo({startedTimeStamp:Date.now(),...(rs(N)?{direction:D.direction}:{})})},condition(D,{getState:N}){let $=N(),U=a.selectQueryEntry($,D.queryCacheKey),V=U?.fulfilledTimeStamp,_=D.originalArgs,B=U?.originalArgs,L=r[D.endpointName],z=D.direction;return Ja(D)?!0:U?.status==="pending"?!1:v(D,$)||ts(L)&&L?.forceRefetch?.({currentArg:_,previousArg:B,endpointState:U,state:$})?!0:!(V&&!z)},dispatchConditionRejection:!0}),P=R(),x=R(),F=le(`${e}/executeMutation`,g,{getPendingMeta(){return Lo({startedTimeStamp:Date.now()})}}),w=k=>"force"in k,E=k=>"ifOlderThan"in k,M=(k,D,N)=>($,U)=>{let V=w(N)&&N.force,_=E(N)&&N.ifOlderThan,B=(z=!0)=>{let G={forceRefetch:z,isPrefetch:!0};return o.endpoints[k].initiate(D,G)},L=o.endpoints[k].select(D)(U());if(V)$(B());else if(_){let z=L?.fulfilledTimeStamp;if(!z){$(B());return}(Number(new Date)-Number(new Date(z)))/1e3>=_&&$(B())}else $(B(!1))};function O(k){return D=>D?.meta?.arg?.endpointName===k}function I(k,D){return{matchPending:ir(ro(k),O(D)),matchFulfilled:ir(ot(k),O(D)),matchRejected:ir(Lt(k),O(D))}}return{queryThunk:P,mutationThunk:F,infiniteQueryThunk:x,prefetch:M,updateQueryData:y,upsertQueryData:h,patchQueryData:m,buildMatchThunkActions:I}}function Xa(e,{pages:t,pageParams:r}){let n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function Gl(e,{pages:t,pageParams:r}){return e.getPreviousPageParam?.(t[0],t,r[0],r)}function Wl(e,t,r,n){return ns(r[e.meta.arg.endpointName][t],ot(e)?e.payload:void 0,ln(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function Uo(e,t,r){let n=e[t];n&&r(n)}function wn(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function jl(e,t,r){let n=e[wn(t)];n&&r(n)}var An={};function US({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:m},assertTagType:f,config:p}){let y=T(`${e}/resetApiState`);function h(O,I,k,D){var N;O[N=I.queryCacheKey]??(O[N]={status:"uninitialized",endpointName:I.endpointName}),Uo(O,I.queryCacheKey,$=>{$.status="pending",$.requestId=k&&$.requestId?$.requestId:D.requestId,I.originalArgs!==void 0&&($.originalArgs=I.originalArgs),$.startedTimeStamp=D.startedTimeStamp;let U=o[D.arg.endpointName];rs(U)&&"direction"in I&&($.direction=I.direction)})}function S(O,I,k,D){Uo(O,I.arg.queryCacheKey,N=>{if(N.requestId!==I.requestId&&!D)return;let{merge:$}=o[I.arg.endpointName];if(N.status="fulfilled",$){if(N.data!==void 0){let{fulfilledTimeStamp:U,arg:V,baseQueryMeta:_,requestId:B}=I,L=nt(N.data,z=>$(z,k,{arg:V.originalArgs,baseQueryMeta:_,fulfilledTimeStamp:U,requestId:B}));N.data=L}else N.data=k;}else N.data=o[I.arg.endpointName].structuralSharing??!0?Ql(Me(N.data)?sa(N.data):N.data,k):k;delete N.error,N.fulfilledTimeStamp=I.fulfilledTimeStamp})}let g=Ut({name:`${e}/queries`,initialState:An,reducers:{removeQueryResult:{reducer(O,{payload:{queryCacheKey:I}}){delete O[I]},prepare:ar()},cacheEntriesUpserted:{reducer(O,I){for(let k of I.payload){let{queryDescription:D,value:N}=k;h(O,D,!0,{arg:D,requestId:I.meta.requestId,startedTimeStamp:I.meta.timestamp}),S(O,{arg:D,requestId:I.meta.requestId,fulfilledTimeStamp:I.meta.timestamp,baseQueryMeta:{}},N,!0)}},prepare:O=>({payload:O.map(D=>{let{endpointName:N,arg:$,value:U}=D,V=o[N];return{queryDescription:{type:"query",endpointName:N,originalArgs:D.arg,queryCacheKey:n({queryArgs:$,endpointDefinition:V,endpointName:N})},value:U}}),meta:{[cn]:!0,requestId:oo(),timestamp:Date.now()}})},queryResultPatched:{reducer(O,{payload:{queryCacheKey:I,patches:k}}){Uo(O,I,D=>{D.data=ua(D.data,k.concat())})},prepare:ar()}},extraReducers(O){O.addCase(t.pending,(I,{meta:k,meta:{arg:D}})=>{let N=Ja(D);h(I,D,N,k)}).addCase(t.fulfilled,(I,{meta:k,payload:D})=>{let N=Ja(k.arg);S(I,k,D,N)}).addCase(t.rejected,(I,{meta:{condition:k,arg:D,requestId:N},error:$,payload:U})=>{Uo(I,D.queryCacheKey,V=>{if(!k){if(V.requestId!==N)return;V.status="rejected",V.error=U??$}})}).addMatcher(m,(I,k)=>{let{queries:D}=a(k);for(let[N,$]of Object.entries(D))($?.status==="fulfilled"||$?.status==="rejected")&&(I[N]=$)})}}),v=Ut({name:`${e}/mutations`,initialState:An,reducers:{removeMutationResult:{reducer(O,{payload:I}){let k=wn(I);k in O&&delete O[k]},prepare:ar()}},extraReducers(O){O.addCase(r.pending,(I,{meta:k,meta:{requestId:D,arg:N,startedTimeStamp:$}})=>{N.track&&(I[wn(k)]={requestId:D,status:"pending",endpointName:N.endpointName,startedTimeStamp:$})}).addCase(r.fulfilled,(I,{payload:k,meta:D})=>{D.arg.track&&jl(I,D,N=>{N.requestId===D.requestId&&(N.status="fulfilled",N.data=k,N.fulfilledTimeStamp=D.fulfilledTimeStamp)})}).addCase(r.rejected,(I,{payload:k,error:D,meta:N})=>{N.arg.track&&jl(I,N,$=>{$.requestId===N.requestId&&($.status="rejected",$.error=k??D)})}).addMatcher(m,(I,k)=>{let{mutations:D}=a(k);for(let[N,$]of Object.entries(D))($?.status==="fulfilled"||$?.status==="rejected")&&N!==$?.requestId&&(I[N]=$)})}}),R=Ut({name:`${e}/invalidation`,initialState:An,reducers:{updateProvidedBy:{reducer(O,I){var N,$;let{queryCacheKey:k,providedTags:D}=I.payload;for(let U of Object.values(O))for(let V of Object.values(U)){let _=V.indexOf(k);_!==-1&&V.splice(_,1)}for(let{type:U,id:V}of D){let _=(N=O[U]??(O[U]={}))[$=V||"__internal_without_id"]??(N[$]=[]);_.includes(k)||_.push(k)}},prepare:ar()}},extraReducers(O){O.addCase(g.actions.removeQueryResult,(I,{payload:{queryCacheKey:k}})=>{for(let D of Object.values(I))for(let N of Object.values(D)){let $=N.indexOf(k);$!==-1&&N.splice($,1)}}).addMatcher(m,(I,k)=>{var N,$;let{provided:D}=a(k);for(let[U,V]of Object.entries(D))for(let[_,B]of Object.entries(V)){let L=(N=I[U]??(I[U]={}))[$=_||"__internal_without_id"]??(N[$]=[]);for(let z of B)L.includes(z)||L.push(z)}}).addMatcher(Ye(ot(t),ln(t)),(I,k)=>{let D=Wl(k,"providesTags",o,f),{queryCacheKey:N}=k.meta.arg;R.caseReducers.updateProvidedBy(I,R.actions.updateProvidedBy({queryCacheKey:N,providedTags:D}))})}}),P=Ut({name:`${e}/subscriptions`,initialState:An,reducers:{updateSubscriptionOptions(O,I){},unsubscribeQueryResult(O,I){},internal_getRTKQSubscriptions(){}}}),x=Ut({name:`${e}/internalSubscriptions`,initialState:An,reducers:{subscriptionsUpdated:{reducer(O,I){return ua(O,I.payload)},prepare:ar()}}}),F=Ut({name:`${e}/config`,initialState:{online:RS(),focused:xS(),middlewareRegistered:!1,...p},reducers:{middlewareRegistered(O,{payload:I}){O.middlewareRegistered=O.middlewareRegistered==="conflict"||i!==I?"conflict":!0}},extraReducers:O=>{O.addCase(es,I=>{I.online=!0}).addCase(zl,I=>{I.online=!1}).addCase(Za,I=>{I.focused=!0}).addCase(Hl,I=>{I.focused=!1}).addMatcher(m,I=>({...I}))}}),w=tr({queries:g.reducer,mutations:v.reducer,provided:R.reducer,subscriptions:x.reducer,config:F.reducer}),E=(O,I)=>w(y.match(I)?void 0:O,I),M={...F.actions,...g.actions,...P.actions,...x.actions,...v.actions,...R.actions,resetApiState:y};return{reducer:E,actions:M}}var bn=Symbol.for("RTKQ/skipToken"),Kl={status:"uninitialized"},Ml=nt(Kl,()=>{}),Nl=nt(Kl,()=>{});function QS({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=w=>Ml,o=w=>Nl;return{buildQuerySelector:S,buildInfiniteQuerySelector:g,buildMutationSelector:v,selectInvalidatedBy:R,selectCachedArgsForQuery:P,selectApiState:a,selectQueries:m,selectMutations:p,selectQueryEntry:f,selectConfig:y};function i(w){return{...w,...kl(w.status)}}function a(w){return w[t]}function m(w){return a(w)?.queries}function f(w,E){return m(w)?.[E]}function p(w){return a(w)?.mutations}function y(w){return a(w)?.config}function h(w,E,M){return O=>{if(O===bn)return r(n,M);let I=e({queryArgs:O,endpointDefinition:E,endpointName:w});return r(D=>f(D,I)??Ml,M)}}function S(w,E){return h(w,E,i)}function g(w,E){let{infiniteQueryOptions:M}=E;function O(I){let k={...I,...kl(I.status)},{isLoading:D,isError:N,direction:$}=k,U=$==="forward",V=$==="backward";return{...k,hasNextPage:x(M,k.data),hasPreviousPage:F(M,k.data),isFetchingNextPage:D&&U,isFetchingPreviousPage:D&&V,isFetchNextPageError:N&&U,isFetchPreviousPageError:N&&V}}return h(w,E,O)}function v(){return w=>{let E;return typeof w=="object"?E=wn(w)??bn:E=w,r(E===bn?o:I=>a(I)?.mutations?.[E]??Nl,i)}}function R(w,E){let M=w[t],O=new Set;for(let I of E.filter(Qo).map(Ya)){let k=M.provided[I.type];if(!k)continue;let D=(I.id!==void 0?k[I.id]:Ol(Object.values(k)))??[];for(let N of D)O.add(N)}return Ol(Array.from(O.values()).map(I=>{let k=M.queries[I];return k?[{queryCacheKey:I,endpointName:k.endpointName,originalArgs:k.originalArgs}]:[]}))}function P(w,E){return Object.values(m(w)).filter(M=>M?.endpointName===E&&M.status!=="uninitialized").map(M=>M.originalArgs)}function x(w,E){return E?Xa(w,E)!=null:!1}function F(w,E){return!E||!w.getPreviousPageParam?!1:Gl(w,E)!=null}}var _l=WeakMap?new WeakMap:void 0,Vl=({endpointName:e,queryArgs:t})=>{let r="",n=_l?.get(t);if(typeof n=="string")r=n;else{let o=JSON.stringify(t,(i,a)=>(a=typeof a=="bigint"?{$bigint:a.toString()}:a,a=Ke(a)?Object.keys(a).sort().reduce((m,f)=>(m[f]=a[f],m),{}):a,a));Ke(t)&&_l?.set(t,o),r=o}return`${e}(${r})`};function BS(...e){return function(r){let n=or(p=>r.extractRehydrationInfo?.(p,{reducerPath:r.reducerPath??"api"})),o={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:n,serializeQueryArgs(p){let y=Vl;if("serializeQueryArgs"in p.endpointDefinition){let h=p.endpointDefinition.serializeQueryArgs;y=S=>{let g=h(S);return typeof g=="string"?g:Vl({...S,queryArgs:g})}}else r.serializeQueryArgs&&(y=r.serializeQueryArgs);return y(p)},tagTypes:[...(r.tagTypes||[])]},i={endpointDefinitions:{},batch(p){p()},apiUid:oo(),extractRehydrationInfo:n,hasRehydrationInfo:or(p=>n(p)!=null)},a={injectEndpoints:f,enhanceEndpoints({addTagTypes:p,endpoints:y}){if(p)for(let h of p)o.tagTypes.includes(h)||o.tagTypes.push(h);if(y)for(let[h,S]of Object.entries(y))typeof S=="function"?S(i.endpointDefinitions[h]):Object.assign(i.endpointDefinitions[h]||{},S);return a}},m=e.map(p=>p.init(a,o,i));function f(p){let y=p.endpoints({query:h=>({...h,type:"query"}),mutation:h=>({...h,type:"mutation"}),infiniteQuery:h=>({...h,type:"infinitequery"})});for(let[h,S]of Object.entries(y)){if(p.overrideExisting!==!0&&h in i.endpointDefinitions){if(p.overrideExisting==="throw")throw new Error(He(39));typeof process<"u";continue}typeof process<"u",i.endpointDefinitions[h]=S;for(let g of m)g.injectEndpoint(h,S)}return a}return a.injectEndpoints({endpoints:r.endpoints})}}function ut(e,...t){return Object.assign(e,...t)}var $S=({api:e,queryThunk:t,internalState:r})=>{let n=`${e.reducerPath}/subscriptions`,o=null,i=null,{updateSubscriptionOptions:a,unsubscribeQueryResult:m}=e.internalActions,f=(g,v)=>{var P,x;if(a.match(v)){let{queryCacheKey:F,requestId:w,options:E}=v.payload;return g?.[F]?.[w]&&(g[F][w]=E),!0}if(m.match(v)){let{queryCacheKey:F,requestId:w}=v.payload;return g[F]&&delete g[F][w],!0}if(e.internalActions.removeQueryResult.match(v))return delete g[v.payload.queryCacheKey],!0;if(t.pending.match(v)){let{meta:{arg:F,requestId:w}}=v,E=g[P=F.queryCacheKey]??(g[P]={});return E[`${w}_running`]={},F.subscribe&&(E[w]=F.subscriptionOptions??E[w]??{}),!0}let R=!1;if(t.fulfilled.match(v)||t.rejected.match(v)){let F=g[v.meta.arg.queryCacheKey]||{},w=`${v.meta.requestId}_running`;R||(R=!!F[w]),delete F[w]}if(t.rejected.match(v)){let{meta:{condition:F,arg:w,requestId:E}}=v;if(F&&w.subscribe){let M=g[x=w.queryCacheKey]??(g[x]={});M[E]=w.subscriptionOptions??M[E]??{},R=!0}}return R},p=()=>r.currentSubscriptions,S={getSubscriptions:p,getSubscriptionCount:g=>{let R=p()[g]??{};return Pr(R)},isRequestSubscribed:(g,v)=>!!p()?.[g]?.[v]};return(g,v)=>{if(o||(o=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(g))return o=r.currentSubscriptions={},i=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(g))return[!1,S];let R=f(r.currentSubscriptions,g),P=!0;if(R){i||(i=setTimeout(()=>{let w=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,E]=Xn(o,()=>w);v.next(e.internalActions.subscriptionsUpdated(E)),o=w,i=null},500));let x=typeof g.type=="string"&&!!g.type.startsWith(n),F=t.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;P=!x&&!F}return[P,!1]}};function HS(e){for(let t in e)return!1;return!0}var zS=2147483647/1e3-1,GS=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:o,selectors:{selectQueryEntry:i,selectConfig:a}})=>{let{removeQueryResult:m,unsubscribeQueryResult:f,cacheEntriesUpserted:p}=t.internalActions,y=Ye(f.match,r.fulfilled,r.rejected,p.match);function h(P){let x=o.currentSubscriptions[P];return!!x&&!HS(x)}let S={},g=(P,x,F)=>{let w=x.getState(),E=a(w);if(y(P)){let M;if(p.match(P))M=P.payload.map(O=>O.queryDescription.queryCacheKey);else{let{queryCacheKey:O}=f.match(P)?P.payload:P.meta.arg;M=[O]}v(M,x,E)}if(t.util.resetApiState.match(P))for(let[M,O]of Object.entries(S))O&&clearTimeout(O),delete S[M];if(n.hasRehydrationInfo(P)){let{queries:M}=n.extractRehydrationInfo(P);v(Object.keys(M),x,E)}};function v(P,x,F){let w=x.getState();for(let E of P){let M=i(w,E);R(E,M?.endpointName,x,F)}}function R(P,x,F,w){let M=n.endpointDefinitions[x]?.keepUnusedDataFor??w.keepUnusedDataFor;if(M===1/0)return;let O=Math.max(0,Math.min(M,zS));if(!h(P)){let I=S[P];I&&clearTimeout(I),S[P]=setTimeout(()=>{h(P)||F.dispatch(m({queryCacheKey:P})),delete S[P]},O*1e3)}}return g},Ll=new Error("Promise never resolved before cacheEntryRemoved."),WS=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:o,internalState:i,selectors:{selectQueryEntry:a,selectApiState:m}})=>{let f=no(n),p=no(o),y=ot(n,o),h={};function S(x,F,w){let E=h[x];E?.valueResolved&&(E.valueResolved({data:F,meta:w}),delete E.valueResolved)}function g(x){let F=h[x];F&&(delete h[x],F.cacheEntryRemoved())}let v=(x,F,w)=>{let E=R(x);function M(O,I,k,D){let N=a(w,I),$=a(F.getState(),I);!N&&$&&P(O,D,I,F,k)}if(n.pending.match(x))M(x.meta.arg.endpointName,E,x.meta.requestId,x.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(x))for(let{queryDescription:O,value:I}of x.payload){let{endpointName:k,originalArgs:D,queryCacheKey:N}=O;M(k,N,x.meta.requestId,D),S(N,I,{})}else if(o.pending.match(x))F.getState()[t].mutations[E]&&P(x.meta.arg.endpointName,x.meta.arg.originalArgs,E,F,x.meta.requestId);else if(y(x))S(E,x.payload,x.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(x)||e.internalActions.removeMutationResult.match(x))g(E);else if(e.util.resetApiState.match(x))for(let O of Object.keys(h))g(O)};function R(x){return f(x)?x.meta.arg.queryCacheKey:p(x)?x.meta.arg.fixedCacheKey??x.meta.requestId:e.internalActions.removeQueryResult.match(x)?x.payload.queryCacheKey:e.internalActions.removeMutationResult.match(x)?wn(x.payload):""}function P(x,F,w,E,M){let O=r.endpointDefinitions[x],I=O?.onCacheEntryAdded;if(!I)return;let k={},D=new Promise(B=>{k.cacheEntryRemoved=B}),N=Promise.race([new Promise(B=>{k.valueResolved=B}),D.then(()=>{throw Ll})]);N.catch(()=>{}),h[w]=k;let $=e.endpoints[x].select(O.type==="query"?F:w),U=E.dispatch((B,L,z)=>z),V={...E,getCacheEntry:()=>$(E.getState()),requestId:M,extra:U,updateCachedData:O.type==="query"?B=>E.dispatch(e.util.updateQueryData(x,F,B)):void 0,cacheDataLoaded:N,cacheEntryRemoved:D},_=I(F,V);Promise.resolve(_).catch(B=>{if(B!==Ll)throw B})}return v},KS=({api:e,context:{apiUid:t},reducerPath:r})=>(n,o)=>{e.util.resetApiState.match(n)&&o.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},YS=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:o,api:i,assertTagType:a,refetchQuery:m,internalState:f})=>{let{removeQueryResult:p}=i.internalActions,y=Ye(ot(n),ln(n)),h=Ye(ot(n,o),Lt(n,o)),S=[],g=(P,x)=>{y(P)?R(Wl(P,"invalidatesTags",r,a),x):h(P)?R([],x):i.util.invalidateTags.match(P)&&R(ns(P.payload,void 0,void 0,void 0,void 0,a),x)};function v(P){let{queries:x,mutations:F}=P;for(let w of[x,F])for(let E in w)if(w[E]?.status==="pending")return!0;return!1}function R(P,x){let F=x.getState(),w=F[e];if(S.push(...P),w.config.invalidationBehavior==="delayed"&&v(w))return;let E=S;if(S=[],E.length===0)return;let M=i.util.selectInvalidatedBy(F,E);t.batch(()=>{let O=Array.from(M.values());for(let{queryCacheKey:I}of O){let k=w.queries[I],D=f.currentSubscriptions[I]??{};k&&(Pr(D)===0?x.dispatch(p({queryCacheKey:I})):k.status!=="uninitialized"&&x.dispatch(m(k)))}})}return g},JS=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:o})=>{let i={},a=(g,v)=>{(r.internalActions.updateSubscriptionOptions.match(g)||r.internalActions.unsubscribeQueryResult.match(g))&&p(g.payload,v),(t.pending.match(g)||t.rejected.match(g)&&g.meta.condition)&&p(g.meta.arg,v),(t.fulfilled.match(g)||t.rejected.match(g)&&!g.meta.condition)&&f(g.meta.arg,v),r.util.resetApiState.match(g)&&h()};function m(g,v){let P=v.getState()[e].queries[g],x=o.currentSubscriptions[g];if(!(!P||P.status==="uninitialized"))return x}function f({queryCacheKey:g},v){let R=v.getState()[e],P=R.queries[g],x=o.currentSubscriptions[g];if(!P||P.status==="uninitialized")return;let{lowestPollingInterval:F,skipPollingIfUnfocused:w}=S(x);if(!Number.isFinite(F))return;let E=i[g];E?.timeout&&(clearTimeout(E.timeout),E.timeout=void 0);let M=Date.now()+F;i[g]={nextPollTimestamp:M,pollingInterval:F,timeout:setTimeout(()=>{(R.config.focused||!w)&&v.dispatch(n(P)),f({queryCacheKey:g},v)},F)}}function p({queryCacheKey:g},v){let P=v.getState()[e].queries[g],x=o.currentSubscriptions[g];if(!P||P.status==="uninitialized")return;let{lowestPollingInterval:F}=S(x);if(!Number.isFinite(F)){y(g);return}let w=i[g],E=Date.now()+F;(!w||E<w.nextPollTimestamp)&&f({queryCacheKey:g},v)}function y(g){let v=i[g];v?.timeout&&clearTimeout(v.timeout),delete i[g]}function h(){for(let g of Object.keys(i))y(g)}function S(g={}){let v=!1,R=Number.POSITIVE_INFINITY;for(let P in g)g[P].pollingInterval&&(R=Math.min(g[P].pollingInterval,R),v=g[P].skipPollingIfUnfocused||v);return{lowestPollingInterval:R,skipPollingIfUnfocused:v}}return a},XS=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let o=ro(r,n),i=Lt(r,n),a=ot(r,n),m={};return(p,y)=>{if(o(p)){let{requestId:h,arg:{endpointName:S,originalArgs:g}}=p.meta,v=t.endpointDefinitions[S],R=v?.onQueryStarted;if(R){let P={},x=new Promise((M,O)=>{P.resolve=M,P.reject=O});x.catch(()=>{}),m[h]=P;let F=e.endpoints[S].select(v.type==="query"?g:h),w=y.dispatch((M,O,I)=>I),E={...y,getCacheEntry:()=>F(y.getState()),requestId:h,extra:w,updateCachedData:v.type==="query"?M=>y.dispatch(e.util.updateQueryData(S,g,M)):void 0,queryFulfilled:x};R(g,E)}}else if(a(p)){let{requestId:h,baseQueryMeta:S}=p.meta;m[h]?.resolve({data:p.payload,meta:S}),delete m[h]}else if(i(p)){let{requestId:h,rejectedWithValue:S,baseQueryMeta:g}=p.meta;m[h]?.reject({error:p.payload??p.error,isUnhandledError:!S,meta:g}),delete m[h]}}},ZS=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:o})=>{let{removeQueryResult:i}=r.internalActions,a=(f,p)=>{Za.match(f)&&m(p,"refetchOnFocus"),es.match(f)&&m(p,"refetchOnReconnect")};function m(f,p){let y=f.getState()[e],h=y.queries,S=o.currentSubscriptions;t.batch(()=>{for(let g of Object.keys(S)){let v=h[g],R=S[g];if(!R||!v)continue;(Object.values(R).some(x=>x[p]===!0)||Object.values(R).every(x=>x[p]===void 0)&&y.config[p])&&(Pr(R)===0?f.dispatch(i({queryCacheKey:g})):v.status!=="uninitialized"&&f.dispatch(n(v)))}})}return a};function ev(e){let{reducerPath:t,queryThunk:r,api:n,context:o}=e,{apiUid:i}=o,a={invalidateTags:T(`${t}/invalidateTags`)},m=h=>h.type.startsWith(`${t}/`),f=[KS,GS,YS,JS,WS,XS];return{middleware:h=>{let S=!1,v={...e,internalState:{currentSubscriptions:{}},refetchQuery:y,isThisApiSliceAction:m},R=f.map(F=>F(v)),P=$S(v),x=ZS(v);return F=>w=>{if(!zn(w))return F(w);S||(S=!0,h.dispatch(n.internalActions.middlewareRegistered(i)));let E={...h,next:F},M=h.getState(),[O,I]=P(w,E,M),k;if(O?k=F(w):k=I,h.getState()[t]&&(x(w,E,M),m(w)||o.hasRehydrationInfo(w)))for(let D of R)D(w,E,M);return k}},actions:a};function y(h){return e.api.endpoints[h.endpointName].initiate(h.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Ul=Symbol(),tv=({createSelector:e=se}={})=>({name:Ul,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:m,refetchOnFocus:f,refetchOnReconnect:p,invalidationBehavior:y},h){Jc();let S=ee=>(typeof process<"u",ee);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:es,onOffline:zl,onFocus:Za,onFocusLost:Hl},util:{}});let g=QS({serializeQueryArgs:i,reducerPath:o,createSelector:e}),{selectInvalidatedBy:v,selectCachedArgsForQuery:R,buildQuerySelector:P,buildInfiniteQuerySelector:x,buildMutationSelector:F}=g;ut(t.util,{selectInvalidatedBy:v,selectCachedArgsForQuery:R});let{queryThunk:w,infiniteQueryThunk:E,mutationThunk:M,patchQueryData:O,updateQueryData:I,upsertQueryData:k,prefetch:D,buildMatchThunkActions:N}=LS({baseQuery:r,reducerPath:o,context:h,api:t,serializeQueryArgs:i,assertTagType:S,selectors:g}),{reducer:$,actions:U}=US({context:h,queryThunk:w,infiniteQueryThunk:E,mutationThunk:M,serializeQueryArgs:i,reducerPath:o,assertTagType:S,config:{refetchOnFocus:f,refetchOnReconnect:p,refetchOnMountOrArgChange:m,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:y}});ut(t.util,{patchQueryData:O,updateQueryData:I,upsertQueryData:k,prefetch:D,resetApiState:U.resetApiState,upsertQueryEntries:U.cacheEntriesUpserted}),ut(t.internalActions,U);let{middleware:V,actions:_}=ev({reducerPath:o,context:h,queryThunk:w,mutationThunk:M,infiniteQueryThunk:E,api:t,assertTagType:S,selectors:g});ut(t.util,_),ut(t,{reducer:$,middleware:V});let{buildInitiateQuery:B,buildInitiateInfiniteQuery:L,buildInitiateMutation:z,getRunningMutationThunk:G,getRunningMutationsThunk:Y,getRunningQueriesThunk:te,getRunningQueryThunk:ce}=_S({queryThunk:w,mutationThunk:M,infiniteQueryThunk:E,api:t,serializeQueryArgs:i,context:h});return ut(t.util,{getRunningMutationThunk:G,getRunningMutationsThunk:Y,getRunningQueryThunk:ce,getRunningQueriesThunk:te}),{name:Ul,injectEndpoint(ee,re){var ye;let oe=(ye=t.endpoints)[ee]??(ye[ee]={});ts(re)&&ut(oe,{name:ee,select:P(ee,re),initiate:B(ee,re)},N(w,ee)),jS(re)&&ut(oe,{name:ee,select:F(),initiate:z(ee)},N(M,ee)),rs(re)&&ut(oe,{name:ee,select:x(ee,re),initiate:L(ee,re)},N(w,ee))}}}}),Yl=BS(tv());d();c();l();u();var Bo=se(e=>e.query,e=>e),Jl=se(e=>e.query?.enableQuerySyntax,e=>e);var R0=se(e=>Bo(e)?.q,e=>e.search.requestId,e=>e.generatedAnswer.cannotAnswer,e=>e.configuration.analytics.analyticsMode,e=>e.search.searchAction?.actionCause,(e,t,r,n,o)=>({q:e,requestId:t,cannotAnswer:r,analyticsMode:n,actionCause:o})),rv=se(e=>e.generatedAnswer?.answerApiQueryParams,e=>e??bn);d();c();l();u();d();c();l();u();var $o=e=>je({prefix:"analytics/generatedAnswer/streamEnd",__legacy__getBuilder:(t,r)=>{let n=br(r),o=e?!r.generatedAnswer?.answer||!r.generatedAnswer?.answer.length:void 0;return n?t.makeGeneratedAnswerStreamEnd({generativeQuestionAnsweringId:n,answerGenerated:e,answerTextIsEmpty:o}):null},analyticsType:"Rga.AnswerReceived",analyticsPayloadBuilder:t=>({answerId:br(t)??"",answerGenerated:e??!1})});d();c();l();u();d();c();l();u();var Xl=se(e=>e.advancedSearchQueries,e=>{if(!e)return{};let{aq:t,cq:r,dq:n,lq:o}=e;return{...(t&&{aq:t}),...(r&&{cq:r}),...(n&&{dq:n}),...(o&&{lq:o})}});d();c();l();u();var Ho=(e,t,r)=>({analytics:{clientId:t.clientId,clientTimestamp:new Date().toISOString(),documentReferrer:t.referrer,documentLocation:t.location,originContext:e.originContext,...(r&&{actionCause:r.actionCause}),...(r&&{customData:r.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.deviceId&&{deviceId:e.deviceId}),...(e.trackingId&&{trackingId:e.trackingId}),capture:t.capture??t.clientId!=="",source:yr(e)}});d();c();l();u();var Zl=se(e=>e.context,e=>e);d();c();l();u();var ed=se(e=>e.pipeline,e=>e);d();c();l();u();d();c();l();u();var xn=Be(zo(),1),ad=Be(td(),1);d();c();l();u();var Go=Be(zo(),1),nd=Be(rd(),1);Go.default.extend(nd.default);var od="YYYY/MM/DD@HH:mm:ss",nv="1401-01-01";function Fr(e,t){let r=(0,Go.default)(e,t);return!r.isValid()&&!t?(0,Go.default)(e,od):r}function Wo(e){return e.format(od)}function id(e,t){let r=Fr(e,t);if(!r.isValid()){let n=". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information.",o=` with the format "${t}"`;throw new Error(`Could not parse the provided date "${e}"${t?o:n}`)}ls(r)}function ls(e){if(e.isBefore(nv))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}xn.default.extend(ad.default);var sd=["past","now","next"],cd=["minute","hour","day","week","month","quarter","year"],ov=e=>{let t=e==="now";return{amount:new J({required:!t,min:1}),unit:new H({required:!t,constrainTo:cd}),period:new H({required:!0,constrainTo:sd})}};function ds(e){if(typeof e=="string"&&!bt(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?fd(e):e;new Fe(ov(t.period)).validate(t);let r=ld(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);ls(r)}function ud(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function ld(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return(0,xn.default)().subtract(r,n);case"next":return(0,xn.default)().add(r,n);case"now":return(0,xn.default)()}}function Rn(e){return Wo(ld(fd(e)))}function dd(e){return e.toLocaleLowerCase().split("-")}function bt(e){let[t,r,n]=dd(e);if(t==="now")return!0;if(!sd.includes(t)||!cd.includes(n))return!1;let o=parseInt(r);return!(Number.isNaN(o)||o<=0)}function pd(e){return!!e&&typeof e=="object"&&"period"in e}function fd(e){let[t,r,n]=dd(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r):void 0,unit:n||void 0}}d();c();l();u();function md(e){return e.type==="dateRange"}function gd(e){return`start${e}`}function yd(e){return`end${e}`}var ps=()=>({dateFacetValueMap:{}});function iv(e,t,r){let n=e.start,o=e.end;return bt(n)&&(n=Rn(n),r.dateFacetValueMap[t][gd(n)]=e.start),bt(o)&&(o=Rn(o),r.dateFacetValueMap[t][yd(o)]=e.end),{...e,start:n,end:o}}function fs(e,t){if(md(e)){let{facetId:r,currentValues:n}=e;return t.dateFacetValueMap[r]={},{...e,currentValues:n.map(o=>iv(o,r,t))}}return e}function Ct(e){let t=ps();return{request:{...e,facets:e.facets?.map(n=>fs(n,t))},mappings:t}}function av(e,t,r){return{...e,start:r.dateFacetValueMap[t][gd(e.start)]||e.start,end:r.dateFacetValueMap[t][yd(e.end)]||e.end}}function sv(e,t){return e.facetId in t.dateFacetValueMap}function cv(e,t){return sv(e,t)?{...e,values:e.values.map(r=>av(r,e.facetId,t))}:e}function Ko(e,t){return"success"in e?{success:{...e.success,facets:e.success.facets?.map(n=>cv(n,t))}}:e}d();c();l();u();d();c();l();u();d();c();l();u();function wt(e){return Object.values(e).map(t=>t.request)}function ms(e,t){let r={};e.forEach(i=>{r[i.facetId]=i});let n=[];t.forEach(i=>{i in r&&(n.push(r[i]),delete r[i])});let o=Object.values(r);return[...n,...o]}function hd(e){return wt(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}var gs={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function uv(e){return wt(e).map(t=>{let r=gs[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function lv(e){return[...uv(e.facetSet??{}),...hd(e.numericFacetSet??{}),...hd(e.dateFacetSet??{}),...wt(e.categoryFacetSet??{})]}function dv(e){return lv(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function Yo(e){return ms(dv(e),e.facetOrder??[])}d();c();l();u();d();c();l();u();var xt=/*#__PURE__*/function(){var _ref21=_asyncToGenerator(function*(e,t){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??pt(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,...(e.configuration.analytics.enabled&&{actionsHistory:Le.getInstance().getHistory()}),...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&(yield Mo(e.configuration.analytics,t))),...(e.excerptLength&&!X(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})}});return function xt(_x47,_x48){return _ref21.apply(this,arguments)}}();d();c();l();u();var Or=(e,t,r)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??pt(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:t.referrer,timezone:e.configuration.search.timezone,...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&Ho(e.configuration.analytics,t,r)),...(e.excerptLength&&!X(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})});d();c();l();u();var Sd=se(e=>e.staticFilterSet,e=>Object.values(e||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o}));var Rt=/*#__PURE__*/function(){var _ref22=_asyncToGenerator(function*(e,t,r){let n=hs(e),o=pv(e),i=fv(e),a=e.configuration.analytics.analyticsMode==="legacy"?yield xt(e,r):Or(e,t,r);return Ct({...a,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(n&&{cq:n}),...(o.length&&{facets:o}),...(e.pagination&&{numberOfResults:ys(e),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:i}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function Rt(_x49,_x50,_x51){return _ref22.apply(this,arguments)}}();function ys(e){return e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0}function pv(e){return ms(gv(e),e.facetOrder??[])}function fv(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(mv).filter(r=>r.currentValues.length>0):void 0}function mv(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function gv(e){return yv(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function yv(e){return[...hv(e.facetSet??{}),...vd(e.numericFacetSet??{}),...vd(e.dateFacetSet??{}),...wt(e.categoryFacetSet??{})]}function hv(e){return wt(e).map(t=>{let r=gs[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function vd(e){return wt(e).map(t=>{let r=t.currentValues,n=r.some(({state:i})=>i!=="idle"),o=r.some(i=>i.previousState);return t.generateAutomaticRanges&&!n&&!o?{...t,currentValues:[]}:t})}function hs(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=Sd(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}d();c();l();u();d();c();l();u();var En=(e,t)=>{let r=e;return X(r[t])?X(e.raw[t])?null:e.raw[t]:r[t]},Sv=e=>t=>e.every(r=>!X(En(t,r))),vv=e=>t=>e.every(r=>X(En(t,r))),Av=(e,t)=>r=>{let n=Ad(e,r);return t.some(o=>n.some(i=>`${i}`.toLowerCase()===o.toLowerCase()))},bv=(e,t)=>r=>{let n=Ad(e,r);return t.every(o=>n.every(i=>`${i}`.toLowerCase()!==o.toLowerCase()))},Ad=(e,t)=>{let r=En(t,e);return hc(r)?r:[r]},bd={getResultProperty:En,fieldsMustBeDefined:Sv,fieldsMustNotBeDefined:vv,fieldMustMatch:Av,fieldMustNotMatch:bv};var Cd=se(e=>e.search,e=>e?.searchAction?.actionCause||"");d();c();l();u();var wd=se(e=>e.searchHub,e=>e);d();c();l();u();var Ss=se(e=>e,e=>{if(!e)return"";for(let t in e)if(e[t].isActive)return e[t].id;return""}),dM=se(e=>e,e=>{let t=Ss(e);return t&&e?e[t].expression:""});d();c();l();u();var xd=se(e=>e.configuration.search.locale,e=>e),Rd=se(e=>e.configuration.search.timezone,e=>e);d();c();l();u();var Ed=e=>{if(!(!e.dictionaryFieldContext||!Object.keys(e.dictionaryFieldContext.contextValues).length))return e.dictionaryFieldContext.contextValues};d();c();l();u();var Id=se(e=>e.excerptLength?.length,e=>e);d();c();l();u();var Pd=e=>{let{freezeFacetOrder:t}=e.facetOptions??{};return t!==void 0?{freezeFacetOrder:t}:void 0};d();c();l();u();var kd=e=>{if(e.folding)return{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}};d();c();l();u();var Fd=se(e=>e.sortCriteria,e=>e);var Od=/*#__PURE__*/function(){var _ref23=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:Pe(e.configuration.organizationId,e.configuration.environment),streamId:e.search.extendedResults?.generativeQuestionAnsweringId}});return function Od(_x52){return _ref23.apply(this,arguments)}}(),Td=(e,t)=>{let r=Bo(e)?.q,{aq:n,cq:o,dq:i,lq:a}=xv(e),m=Zl(e),f=Ho(e.configuration.analytics,t,{actionCause:Cd(e)}),p=wd(e),y=ed(e),h=ol(e)??[],S=Cv(e),g=Ss(e.tabSet)||"default",v=xd(e),R=Rd(e),P=t.referrer||"",x=Pd(e),F=Fd(e),w=wv(e),E=Id(e),M=kd(e),O=Ed(e);return{q:r,...(n&&{aq:n}),...(o&&{cq:o}),...(i&&{dq:i}),...(a&&{lq:a}),...(e.query&&{enableQuerySyntax:Jl(e)}),...(m?.contextValues&&{context:m.contextValues}),pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:h}},...(p?.length&&{searchHub:p}),...(y?.length&&{pipeline:y}),...(S.length&&{facets:S}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(e.pagination&&{numberOfResults:ys(e),firstResult:e.pagination.firstResult}),tab:g,locale:v,timezone:R,...(e.debug!==void 0&&{debug:e.debug}),referrer:P,...w,...(M??{}),...(E&&{excerptLength:E}),...(O&&{dictionaryFieldContext:O}),sortCriteria:F,...(x&&{facetOptions:x}),...f,...(e.insightCaseContext?.caseContext&&{caseContext:e.insightCaseContext?.caseContext})}},Cv=e=>Yo(e)?.map(t=>fs(t,ps())).sort((t,r)=>t.facetId>r.facetId?1:r.facetId>t.facetId?-1:0),wv=e=>({actionsHistory:e.configuration.analytics.enabled?Le.getInstance().getHistory():[]}),xv=e=>{let t=Xl(e),r=hs(e);return{...t,...(r&&{cq:r})}};d();c();l();u();var Dd=["text/plain","text/markdown"];var Tr=new H({required:!0}),jd=new H,Dr=new ne({required:!0}),Rv={id:Tr,title:Tr,uri:Tr,permanentid:Tr,clickUri:jd},Md=new H({required:!0,constrainTo:Dd}),DN=T("generatedAnswer/setIsVisible",e=>Q(e,Dr)),Nd=T("generatedAnswer/setAnswerId",e=>Q(e,W)),qN=T("generatedAnswer/setAnswerGenerationMode",e=>Q(e,new H({constrainTo:["automatic","manual"],required:!1,default:"automatic"}))),jN=T("generatedAnswer/setIsEnabled",e=>Q(e,Dr)),As=T("generatedAnswer/updateMessage",e=>Q(e,{textDelta:Tr})),bs=T("generatedAnswer/updateCitations",e=>Q(e,{citations:new ie({required:!0,each:new K({values:Rv})})})),Ev=T("generatedAnswer/updateError",e=>Q(e,{message:jd,code:new J({min:0})})),Iv=T("generatedAnswer/resetAnswer"),MN=T("generatedAnswer/like"),NN=T("generatedAnswer/dislike"),_N=T("generatedAnswer/feedbackModal/open"),VN=T("generatedAnswer/expand"),LN=T("generatedAnswer/collapse"),UN=T("generatedAnswer/setId",e=>Q(e,{id:new H({required:!0})})),QN=T("generatedAnswer/feedbackModal/close"),BN=T("generatedAnswer/sendFeedback"),vs=T("generatedAnswer/setIsLoading",e=>Q(e,Dr)),qd=T("generatedAnswer/setIsStreaming",e=>Q(e,Dr)),Cs=T("generatedAnswer/setAnswerContentFormat",e=>Q(e,Md)),$N=T("generatedAnswer/updateResponseFormat",e=>Q(e,{contentFormat:new ie({each:Md,default:["text/plain"]})})),HN=T("knowledge/updateAnswerConfigurationId",e=>Q(e,Tr)),zN=T("generatedAnswer/registerFieldsToIncludeInCitations",e=>Q(e,io)),Pv=T("generatedAnswer/setIsAnswerGenerated",e=>Q(e,Dr)),ws=T("generatedAnswer/setCannotAnswer",e=>Q(e,Dr)),kv=T("generatedAnswer/setAnswerApiQueryParams",e=>Q(e,new K({}))),GN=le("generatedAnswer/streamAnswer",/*#__PURE__*/function(){var _ref24=_asyncToGenerator(function*(e,t){let r=t.getState(),{dispatch:n,extra:o,getState:i}=t,{search:a}=i(),{queryExecuted:m}=a,{setAbortControllerRef:f}=e,p=yield Od(r),y=(g,v)=>{switch(g){case"genqa.headerMessageType":{let R=JSON.parse(v);n(Cs(R.contentFormat));break}case"genqa.messageType":n(As(JSON.parse(v)));break;case"genqa.citationsType":n(bs(JSON.parse(v)));break;case"genqa.endOfStreamType":{let R=JSON.parse(v).answerGenerated,P=m.length!==0&&!R;n(ws(P)),n(qd(!1)),n(Pv(R)),n($o(R));break}default:r.debug&&o.logger.warn(`Unknown payloadType: "${g}"`)}};n(vs(!0));let h=g=>g.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,S=o.streamingClient?.streamGeneratedAnswer(p,{write:g=>{h(p)&&(n(vs(!1)),g.payload&&g.payloadType&&y(g.payloadType,g.payload))},abort:g=>{h(p)&&n(Ev(g))},close:()=>{h(p)&&n(qd(!1))},resetAnswer:()=>{h(p)&&n(Iv())}});S?f(S):n(vs(!1))});return function(_x53,_x54){return _ref24.apply(this,arguments)}}()),WN=le("generatedAnswer/generateAnswer",/*#__PURE__*/function(){var _ref25=_asyncToGenerator(function*(e,{getState:t,dispatch:r,extra:{navigatorContext:n,logger:o}}){let i=t();if(i.generatedAnswer.answerConfigurationId){let a=Td(i,n);r(kv(a)),yield r(_d(a))}else o.warn("[WARNING] Missing answerConfigurationId in engine configuration. The generateAnswer action requires an answer configuration ID to use CRGA with the Answer API.")});return function(_x55,_x56){return _ref25.apply(this,arguments)}}());d();c();l();u();d();c();l();u();function Ld(_x57,_x58){return _Ld.apply(this,arguments)}function _Ld(){_Ld=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _Ld.apply(this,arguments)}function Ud(e){let t,r,n,o=!1;return function(a){t===void 0?(t=a,r=0,n=-1):t=Ov(t,a);let m=t.length,f=0;for(;r<m;){o&&(t[r]===10&&(f=++r),o=!1);let p=-1;for(;r<m&&p===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-f);break;case 13:o=!0,p=r;break;case 10:p=r;break}if(p===-1)break;e(t.subarray(f,p),n),f=r,n=-1}f===m?t=void 0:f!==0&&(t=t.subarray(f),r-=f)}}function Qd(e,t,r){let n=Vd(),o=new TextDecoder;return function(a,m){if(a.length===0)r?.(n),n=Vd();else if(m>0){let f=o.decode(a.subarray(0,m)),p=m+(a[m+1]===32?2:1),y=o.decode(a.subarray(p));switch(f){case"data":n.data=n.data?`${n.data}
|
|
31
|
-
${y}`:y;break;case"event":n.event=y;break;case"id":e(n.id=y);break;case"retry":Fv(y,n,t);break}}}}function Fv(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function Ov(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function Vd(){return{data:"",event:"",id:"",retry:void 0}}var xs="text/event-stream",Tv=1e3,Bd="last-event-id";function $d(){return typeof window<"u"}function Hd(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:i,onerror:a,openWhenHidden:m,fetch:f,...p}){return new Promise((y,h)=>{let S={...r};S.accept||(S.accept=xs);let g;function v(){g?.abort(),document.hidden||E()}!m&&$d()&&document.addEventListener("visibilitychange",v);let R=Tv,P;function x(){$d()&&document.removeEventListener("visibilitychange",v),clearTimeout(P),g?.abort()}t?.addEventListener("abort",()=>{x(),y()});let F=f??b,w=n??Dv;function E(){return _E.apply(this,arguments)}function _E(){_E=_asyncToGenerator(function*(){g=s.AbortController?new s.AbortController:null;try{let M=yield F(e,{...p,headers:S,signal:g?.signal});yield w(M),yield Ld(M.body,Ud(Qd(O=>{O?S[Bd]=O:delete S[Bd]},O=>{R=O},o))),i?.(),x(),y()}catch(M){if(!g?.signal?.aborted)try{let O=a?.(M)??R;clearTimeout(P),P=setTimeout(E,O)}catch(O){x(),h(O)}}});return _E.apply(this,arguments)}E()})}function Dv(e){let t=e.headers.get("content-type");if(!t?.startsWith(xs))throw new Error(`Expected content-type to be ${xs}, Actual: ${t}`)}d();c();l();u();var qv=/*#__PURE__*/function(){var _ref26=_asyncToGenerator(function*(e,t,r){let n=t.getState(),{accessToken:o,environment:i,organizationId:a}=n.configuration,m=n.generatedAnswer.answerConfigurationId,f={...e,headers:{...(e?.headers||{}),Authorization:`Bearer ${o}`}};try{let p=Pe(a,i);return{data:Bl({baseUrl:`${p}/rest/organizations/${a}/answer/v1/configs/${m}`,fetchFn:function(){var _ref27=_asyncToGenerator(function*(h){if(h instanceof String)throw new Error("The provided 'request' must be a Request object.");let S=h.url,g={};return["method","headers","mode","credentials","cache","redirect","referrer","referrerPolicy","integrity","keepalive","signal"].forEach(v=>{g[v]=h[v]}),g.duplex="half",g.body=yield h.text(),b(S,g)});return function fetchFn(_x62){return _ref27.apply(this,arguments)}}()})(f,{...t,signal:null},r)}}catch(p){return{error:p}}});return function qv(_x59,_x60,_x61){return _ref26.apply(this,arguments)}}(),zd=Yl({reducerPath:"answer",baseQuery:$l(qv,{maxRetries:3}),endpoints:()=>({})});var jv=(e,t)=>{let{contentFormat:r}=t;e.contentFormat=r,e.isStreaming=!0,e.isLoading=!1},Mv=(e,t)=>{e.answer===void 0?e.answer=t.textDelta:typeof t.textDelta=="string"&&(e.answer=e.answer.concat(t.textDelta))},Nv=(e,t)=>{e.citations=t.citations},_v=(e,t)=>{e.generated=t.answerGenerated,e.isStreaming=!1},Vv=(e,t)=>{let r=t.errorMessage||"Unknown error occurred";e.error={message:r,code:t.code},e.isStreaming=!1,e.isLoading=!1,console.error(`Generated answer error: ${r} (code: ${t.code})`)},Lv=(e,t,r)=>{let n=JSON.parse(e.data);n.finishReason==="ERROR"&&n.errorMessage&&Vv(t,n);let o=n.payload.length?JSON.parse(n.payload):{};switch(n.payloadType){case"genqa.headerMessageType":o.contentFormat&&(jv(t,o),r(Cs(o.contentFormat)));break;case"genqa.messageType":o.textDelta&&(Mv(t,o),r(As({textDelta:o.textDelta})));break;case"genqa.citationsType":o.citations&&(Nv(t,o),r(bs({citations:o.citations})));break;case"genqa.endOfStreamType":_v(t,o),r($o(o.answerGenerated??!1));break}},Uv=(e,t,r,n)=>{if(!e||!t||!r)throw new Error("Missing required parameters for answer endpoint");let o=`/rest/organizations/${t}`,i=n?`insight/v1/configs/${n}/answer`:"answer/v1/configs";return`${e}${o}/${i}/${r}/generate`},Rs=zd.injectEndpoints({overrideExisting:!0,endpoints:e=>({getAnswer:e.query({queryFn:()=>({data:{contentFormat:void 0,answer:void 0,citations:void 0,error:void 0,generated:!1,isStreaming:!0,isLoading:!0}}),serializeQueryArgs:({endpointName:t,queryArgs:r})=>{let{analytics:n,...o}=r;return`${t}(${JSON.stringify(o)})`},onCacheEntryAdded(_x63,_x64){return _asyncToGenerator(function*(t,{getState:r,cacheDataLoaded:n,updateCachedData:o,dispatch:i}){yield n;let{configuration:a,generatedAnswer:m,insightConfiguration:f}=r(),{organizationId:p,environment:y,accessToken:h}=a,S=Pe(p,y),g=Uv(S,p,m.answerConfigurationId,f?.insightId);yield Hd(g,{method:"POST",body:JSON.stringify(t),headers:{Authorization:`Bearer ${h}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch:b,onopen:function(){var _ref28=_asyncToGenerator(function*(v){let R=v.headers.get("x-answer-id");R&&o(P=>{P.answerId=R,i(Nd(R))})});return function onopen(_x65){return _ref28.apply(this,arguments)}}(),onmessage:v=>{o(R=>{Lv(v,R,i)})},onerror:v=>{throw v},onclose:()=>{o(v=>{i(ws(!v.generated))})}})}).apply(this,arguments)}})})}),_d=e=>Rs.endpoints.getAnswer.initiate(e);d();c();l();u();var Gd=ge(sr,e=>e);d();c();l();u();function Qv(e){let t=e.payload?.analyticsAction;return Wd(e)&&!X(t)}function Wd(e){return"type"in e}var Kd=e=>t=>r=>{let n;Qv(r)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let o=t(r);return Wd(r)&&(r.type==="search/executeSearch/fullfilled"&&n===void 0&&console.error("No analytics action associated with search:",r),r.type==="recommendation/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with recommendation:",r),r.type==="productRecommendations/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with product recommendation:",r)),n!==void 0&&e.dispatch(n),o};d();c();l();u();d();c();l();u();d();c();l();u();var H_=T("tab/register",e=>{let t=new K({values:{id:W,expression:we}});return Q(e,t)}),Jo=T("tab/updateActiveTab",e=>Q(e,W));d();c();l();u();var Xo=Be(zo(),1),Xd=Be(Yd(),1),Zd=Be(Jd(),1);Xo.default.extend(Zd.default);Xo.default.extend(Xd.default);var ep=()=>({organizationId:"",accessToken:"",search:{locale:"en-US",timezone:Xo.default.tz.guess(),authenticationProviders:[]},analytics:{enabled:!0,originContext:"Search",originLevel2:"default",originLevel3:"default",anonymous:!1,deviceId:"",userDisplayName:"",documentLocation:"",analyticsMode:"next",source:{}},knowledge:{answerConfigurationId:""},environment:"prod"});d();c();l();u();var Bv=/(^|; )Coveo-Pendragon=([^;]*)/;function Fs(){return typeof window>"u"?!1:Bv.exec(document.cookie)?.pop()||null}var tp=ge(ep(),e=>e.addCase(yt,(t,r)=>{$v(t,r.payload)}).addCase(Je,(t,r)=>{Hv(t,r.payload)}).addCase(cr,(t,r)=>{zv(t,r.payload)}).addCase(ur,t=>{t.analytics.enabled=!1}).addCase(lr,t=>{t.analytics.enabled=!0}).addCase(ao,(t,r)=>{t.analytics.originLevel2=r.payload.originLevel2}).addCase(so,(t,r)=>{t.analytics.originLevel3=r.payload.originLevel3}).addCase(Jo,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(Ru,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(ht,(t,r)=>{X(r.payload.tab)||(t.analytics.originLevel2=r.payload.tab)}));function $v(e,t){X(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",X(t.organizationId)||(e.organizationId=t.organizationId)}function Hv(e,t){X(t.proxyBaseUrl)||(e.search.apiBaseUrl=t.proxyBaseUrl),X(t.locale)||(e.search.locale=t.locale),X(t.timezone)||(e.search.timezone=t.timezone),X(t.authenticationProviders)||(e.search.authenticationProviders=t.authenticationProviders)}function zv(e,t){X(t.enabled)||(e.analytics.enabled=t.enabled),X(t.originContext)||(e.analytics.originContext=t.originContext),X(t.originLevel2)||(e.analytics.originLevel2=t.originLevel2),X(t.originLevel3)||(e.analytics.originLevel3=t.originLevel3),X(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),X(t.trackingId)||(e.analytics.trackingId=t.trackingId),X(t.analyticsMode)||(e.analytics.analyticsMode=t.analyticsMode),X(t.source)||(e.analytics.source=t.source);try{let r=Fs();r&&(e.analytics.analyticsMode="next",e.analytics.trackingId=r)}catch{}X(t.runtimeEnvironment)||(e.analytics.runtimeEnvironment=t.runtimeEnvironment),X(t.anonymous)||(e.analytics.anonymous=t.anonymous),X(t.deviceId)||(e.analytics.deviceId=t.deviceId),X(t.userDisplayName)||(e.analytics.userDisplayName=t.userDisplayName),X(t.documentLocation)||(e.analytics.documentLocation=t.documentLocation)}var ze=tp;d();c();l();u();function Gv(e){return e.instantlyCallable}var rp=()=>e=>t=>e(Gv(t)?t():t);d();c();l();u();var np=e=>()=>t=>r=>{let n=r;if(!n.error)return t(r);let o=n.error,i=[n.payload?.errorCode,n.payload?.message].filter(Boolean).join(" - ");if(n.payload?.ignored||e.error(i||o.stack||o.message||o.name||"Error",`Action dispatch error ${n.type}`,r),n.error.name!=="SchemaValidationError")return t(r)},op=e=>t=>r=>n=>(e.debug({action:n,nextState:t.getState()},`Action dispatched: ${n.type}`),r(n));d();c();l();u();var Os=(e,t)=>{let{referrer:r,userAgent:n,location:o,clientId:i}=e.getMeta("");return{...(t?t():{}),referrer:r,userAgent:n,location:o,clientId:i}};d();c();l();u();function ip(e,t){let r={...e},n,o=i=>(a,m)=>{let f=i(a,m);return n?n(f,m):f};return{get combinedReducer(){let i=vc(Object.entries(t).filter(([a])=>!(a in r)).map(([a,m])=>[a,()=>m]));return o(tr({...i,...r}))},containsAll(i){return Object.keys(i).every(m=>m in r)},add(i){Object.keys(i).filter(a=>!(a in r)).forEach(a=>{r[a]=i[a]})},addCrossReducer(i){n=i}}}d();c();l();u();d();c();l();u();function Wv(e){if(!e||!Kv(e))return null;try{let r=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=atob(r),o=decodeURIComponent(n.split("").map(i=>`%${`00${i.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));return JSON.parse(o)}catch{return null}}function ap(e,t=60){if(!e)return!1;let r=Wv(e);if(!r||typeof r.exp!="number")return!1;let n=Math.floor(Date.now()/1e3);return r.exp<=n+t}function Kv(e){return e?/^[A-Za-z0-9_-]{2,}(?:\.[A-Za-z0-9_-]{2,}){2}$/.test(e):!1}function cp(e,t){let r=0,n=null,o=Nn(()=>{r=0},500),i=/*#__PURE__*/function(){var _ref29=_asyncToGenerator(function*(f,p=!1){let y=!n;y&&t&&(n=_asyncToGenerator(function*(){return p&&Jv(t),yield t()})().finally(()=>{n=null}));let h=yield n;return y&&h&&f.dispatch(yt({accessToken:h})),h});return function i(_x66){return _ref29.apply(this,arguments)}}(),a=/*#__PURE__*/function(){var _ref31=_asyncToGenerator(function*(f){let p=f.getState(),y=Xv(p);if(!(!y||!ap(y))){e.debug("Access token is expired or about to expire, attempting renewal.");try{(yield i(f))?e.debug("Access token was renewed."):e.warn("Access token renewal returned an empty token. Please check the #renewAccessToken function.")}catch(h){e.warn(h,"Access token renewal failed. A retry will occur if necessary.")}}});return function a(_x67){return _ref31.apply(this,arguments)}}(),m=/*#__PURE__*/function(){var _ref32=_asyncToGenerator(function*(f,p,y){if(r>=5)return e.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),sp(f,p.error),p;r++,o(),yield i(f,!0),f.dispatch(y)});return function m(_x68,_x69,_x70){return _ref32.apply(this,arguments)}}();return f=>p=>(/*#__PURE__*/function(){var _ref33=_asyncToGenerator(function*(y){let h=typeof y=="function",S=typeof t=="function";if(!h)return p(y);S&&(yield a(f));let g=yield p(y);return Yv(g)?S?yield m(f,g,y):(e.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),sp(f,g.error),g):g});return function(_x71){return _ref33.apply(this,arguments)}}())}function Yv(e){return typeof e=="object"&&e!==null&&"error"in e&&e.error?.name===new er().name}function sp(e,t){e.dispatch(fo({status:401,statusCode:401,message:t.message,type:t.name}))}function Jv(_x72){return _Jv.apply(this,arguments)}function _Jv(){_Jv=_asyncToGenerator(function*(e){try{return yield e()}catch{return""}});return _Jv.apply(this,arguments)}function Xv(e){return e.configuration.accessToken}d();c();l();u();function up({reducer:e,preloadedState:t,middlewares:r=[],thunkExtraArguments:n,name:o}){return uu({reducer:e,preloadedState:t,devTools:{stateSanitizer:i=>i.history?{...i,history:"<<OMIT>>"}:i,name:o,shouldHotReload:!1},middleware:i=>i({thunk:{extraArgument:n}}).prepend(...r).concat(op(n.logger))})}function Zv(e,t){let{analytics:r}=e,{analyticsClientMiddleware:n,...o}=r??{},i={...o,...(r?.proxyBaseUrl&&{apiBaseUrl:r.proxyBaseUrl,nexApiBaseUrl:r.proxyBaseUrl})};return i.analyticsMode!=="next"&&Sc()?(t.info("Analytics disabled since doNotTrack is active."),{...i,enabled:!1}):i}function lp(e,t){let r={...e.reducers,configuration:ze,version:Gd},n=eA({...e,reducers:r},t,ze),{accessToken:o,environment:i,organizationId:a}=e.configuration;n.dispatch(yt({accessToken:o,environment:i,organizationId:a}));let m=Zv(e.configuration,n.logger);return m&&n.dispatch(cr(m)),n}function eA(e,t,r){let{reducers:n,navigatorContextProvider:o}=e,i=ip({...n,configurationReducer:r},e.preloadedState??{});e.crossReducer&&i.addCrossReducer(e.crossReducer);let a=t.logger,m={...t,get relay(){return Sn(p.state,o)},get navigatorContext(){return Os(this.relay,o)}},f=tA(e,m,i),p={addReducers(y){i.containsAll(y)||(i.add(y),f.replaceReducer(i.combinedReducer))},dispatch:f.dispatch,subscribe:f.subscribe,enableAnalytics(){f.dispatch(lr())},disableAnalytics(){f.dispatch(ur())},get state(){return f.getState()},get relay(){return Sn(this.state,o)},get navigatorContext(){return Os(this.relay,o)},logger:a,store:f};return p}function tA(e,t,r){let{preloadedState:n,configuration:o}=e,i=o.name||"coveo-headless",a=rA(e,t.logger);return up({preloadedState:n,reducer:r.combinedReducer,middlewares:a,thunkExtraArguments:t,name:i})}function rA(e,t){let{renewAccessToken:r}=e.configuration,n=cp(t,r);return[rp,n,np(t),Kd].concat(Rs.middleware,e.middlewares||[])}d();c();l();u();var vp=Be(Sp(),1);function Ap(e){return(0,vp.pino)({name:"@coveo/headless",level:e?.level||"warn",formatters:{log:e?.logFormatter}})}d();c();l();u();function bp(e,t){let r=AA(e),n=Ve,o=bA(e);return{analyticsClientMiddleware:r,validatePayload:n,preprocessRequest:o,logger:t}}function AA(e){let{analytics:t}=e,r=(n,o)=>o;return t?.analyticsClientMiddleware||r}function bA(e){return e.preprocessRequest||Ln}d();c();l();u();d();c();l();u();var Cp={organizationId:W,accessToken:W,name:new H({required:!1,emptyAllowed:!1}),analytics:new K({options:{required:!1},values:{enabled:new ne({required:!1}),originContext:new H({required:!1}),originLevel2:new H({required:!1}),originLevel3:new H({required:!1}),analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),proxyBaseUrl:new H({required:!1,url:!0}),trackingId:new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/})}}),environment:new H({required:!1,default:"prod",constrainTo:["prod","hipaa","stg","dev"]})};function wp(){return{organizationId:"searchuisamples",accessToken:"xx564559b1-0045-48e1-953c-3addd1ee4457"}}var xp=new Fe({...Cp,pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:Ce,locale:Ce,timezone:Ce});function Ns(){return{...wp(),searchHub:"default"}}var CA={debug:po,pipeline:fr,searchHub:Ir,recommendation:Rr};function Rp(e){let t=Ap(e.loggerOptions);wA(e.configuration,t);let r=xA(e.configuration,t),n={...bp(e.configuration,t),apiClient:r},o={...e,reducers:CA},i=lp(o,n),{pipeline:a,searchHub:m,timezone:f,locale:p,proxyBaseUrl:y}=e.configuration;return i.dispatch(Je({timezone:f,locale:p,proxyBaseUrl:y})),X(a)||i.dispatch(dr(a)),X(m)||i.dispatch(Er(m)),{...i,get state(){return i.state}}}function wA(e,t){try{xp.validate(e)}catch(r){throw t.error(r,"Recommendation engine configuration error"),r}}function xA(e,t){return new Bn({logger:t,preprocessRequest:e.preprocessRequest||Ln,postprocessSearchResponseMiddleware:e.preprocessSearchResponseMiddleware||Mc,postprocessFacetSearchResponseMiddleware:Nc,postprocessQuerySuggestResponseMiddleware:_c})}d();c();l();u();d();c();l();u();d();c();l();u();var RA=new ie({each:W,required:!0}),Ep=(e,t)=>(Q(e,W),jn(t)?Q(t,W):Q(t,RA),{payload:{contextKey:e,contextValue:t}}),zt=T("context/set",e=>{for(let[t,r]of Object.entries(e))Ep(t,r);return{payload:e}}),Gt=T("context/add",e=>Ep(e.contextKey,e.contextValue)),Wt=T("context/remove",e=>Q(e,W));d();c();l();u();d();c();l();u();function ti(){return{contextValues:{}}}var ri=ge(ti(),e=>{e.addCase(zt,(t,r)=>{t.contextValues=r.payload}).addCase(Gt,(t,r)=>{t.contextValues[r.payload.contextKey]=r.payload.contextValue}).addCase(Wt,(t,r)=>{delete t.contextValues[r.payload]}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.context.contextValues)})});d();c();l();u();function It(e){let t,r=new Map,n=()=>r.size===0,o=i=>{try{let a=JSON.stringify(i),m=t!==a;return t=a,m}catch(a){return console.warn("Could not detect if state has changed, check the controller \"get state method\"",a),!0}};return{subscribe(i){i();let a=Symbol(),m;return n()&&(t=JSON.stringify(this.state),m=e.subscribe(()=>{o(this.state)&&r.forEach(f=>f())})),r.set(a,i),()=>{r.delete(a),n()&&m?.()}},get state(){return{}}}}d();c();l();u();var EA=["caseId","caseNumber"],IA={caseId:"caseContext",caseNumber:"caseContext"},Pn=class extends Error{constructor(t){super(`The key "${t}" is reserved for internal use. Use ${IA[t]} to set this value.}`)}};function _s(e){return EA.includes(e)}var PA=new Fe({values:new K({options:{required:!1}})});function Ip(e,t={}){if(!OA(e))throw Ge;let r=It(e),{dispatch:n}=e,o=()=>e.state,i=vu(e,PA,t.initialState,"buildContext");return i.values&&n(zt(i.values)),{...r,get state(){return{values:o().context.contextValues}},set(a){n(zt(a))},...(o().configuration.analytics.analyticsMode==="legacy"?kA(n):FA(n))}}var kA=e=>({add(t,r){e(Gt({contextKey:t,contextValue:r}))},remove(t){e(Wt(t))}}),FA=e=>({add(t,r){if(_s(t))throw new Pn(t);e(Gt({contextKey:t,contextValue:r}))},remove(t){if(_s(t))throw new Pn(t);e(Wt(t))}});function OA(e){return e.addReducers({context:ri}),!0}function Pp(e,t){return Ip(e,t)}d();c();l();u();d();c();l();u();var jr=T("dictionaryFieldContext/set",e=>{let t=new K({options:{required:!0}}),r=Q(e,t).error;if(r)return{payload:e,error:r};let n=Object.values(e),o=new ie({each:we}),i=Q(n,o).error;return i?{payload:e,error:i}:{payload:e}}),Mr=T("dictionaryFieldContext/add",e=>{let t=new K({options:{required:!0},values:{field:we,key:we}});return Q(e,t)}),Nr=T("dictionaryFieldContext/remove",e=>Q(e,we));d();c();l();u();d();c();l();u();function ni(){return{contextValues:{}}}var oi=ge(ni(),e=>{e.addCase(jr,(t,r)=>{t.contextValues=r.payload}).addCase(Mr,(t,r)=>{let{field:n,key:o}=r.payload;t.contextValues[n]=o}).addCase(Nr,(t,r)=>{delete t.contextValues[r.payload]}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.dictionaryFieldContext.contextValues)})});function kp(e){if(!TA(e))throw Ge;let t=It(e),{dispatch:r}=e,n=()=>e.state;return{...t,get state(){return{values:n().dictionaryFieldContext.contextValues}},set(o){r(jr(o))},add(o,i){r(Mr({field:o,key:i}))},remove(o){r(Nr(o))}}}function TA(e){return e.addReducers({dictionaryFieldContext:oi}),!0}d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var ii=T("breadcrumb/deselectAll"),Fp=T("breadcrumb/deselectAllNonBreadcrumbs");d();c();l();u();d();c();l();u();var kn={value:W,numberOfResults:new J({min:0}),state:W};d();c();l();u();var de=W;var MA=new J({min:1,default:8,required:!1}),NA=new J({min:1,max:20,default:5,required:!1}),_A={desiredCount:NA,numberOfValues:MA},Q1=T("automaticFacet/setOptions",e=>Q(e,_A)),B1=T("automaticFacet/deselectAll",e=>Q(e,de)),VA=W,Op=T("automaticFacet/toggleSelectValue",e=>Q(e,{field:VA,selection:new K({values:kn})}));d();c();l();u();d();c();l();u();var LA={state:new fe({required:!0}),numberOfResults:new J({required:!0,min:0}),value:new H({required:!0,emptyAllowed:!0}),path:new ie({required:!0,each:W}),moreValuesAvailable:new ne({required:!1})};function Vs(e){e.children.forEach(t=>{Vs(t)}),Ve({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},LA)}var _r={facetId:de,field:W,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),delimitingCharacter:new H({required:!1,emptyAllowed:!0}),filterFacetCount:new ne({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new fe({required:!1}),basePath:new ie({required:!1,each:W}),filterByBasePath:new ne({required:!1})};var sB=T("categoryFacet/register",e=>Q(e,_r)),Tp=T("categoryFacet/toggleSelectValue",e=>{try{return Ve(e.facetId,W),Vs(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}}),Dp=T("categoryFacet/deselectAll",e=>Q(e,_r.facetId)),cB=T("categoryFacet/updateNumberOfValues",e=>Q(e,{facetId:_r.facetId,numberOfValues:_r.numberOfValues})),uB=T("categoryFacet/updateSortCriterion",e=>Q(e,{facetId:_r.facetId,criterion:new fe})),lB=T("categoryFacet/updateBasePath",e=>Q(e,{facetId:_r.facetId,basePath:new ie({each:W})}));d();c();l();u();d();c();l();u();var Fn={facetId:de,captions:new K({options:{required:!1}}),numberOfValues:new J({required:!1,min:1}),query:new H({required:!1,emptyAllowed:!0})};var UA={path:new ie({required:!0,each:W}),displayValue:we,rawValue:we,count:new J({required:!0,min:0})},qp=T("categoryFacet/selectSearchResult",e=>Q(e,{facetId:de,value:new K({values:UA})})),PB=T("categoryFacetSearch/register",e=>Q(e,Fn));d();c();l();u();var jp={facetId:de,value:new K({values:{displayValue:we,rawValue:we,count:new J({required:!0,min:0})}})},VB=T("facetSearch/register",e=>Q(e,Fn)),LB=T("facetSearch/update",e=>Q(e,Fn)),Mp=T("facetSearch/toggleSelectValue",e=>Q(e,jp)),Np=T("facetSearch/toggleExcludeValue",e=>Q(e,jp));d();c();l();u();d();c();l();u();var GB=new H({regex:/^[a-zA-Z0-9-_]+$/}),WB=new H({required:!0}),KB=new ie({each:new H}),YB=new H,JB=new ne,XB=new ne,ZB=new J({min:0}),QA=new J({min:1}),e$=new ne({required:!0}),BA=new K,$A=new H,HA={captions:BA,numberOfValues:QA,query:$A},t$=new K({values:HA}),_p=new K({options:{required:!1},values:{type:new H({constrainTo:["simple"],emptyAllowed:!1,required:!0}),values:new ie({required:!0,max:25,each:new H({emptyAllowed:!1,required:!0})})}}),r$=new ne,Vp=new ie({min:1,max:25,required:!1,each:new H({emptyAllowed:!1,required:!0})});var zA={facetId:de,field:new H({required:!0,emptyAllowed:!0}),tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),filterFacetCount:new ne({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new fe({required:!1}),resultsMustMatch:new fe({required:!1}),allowedValues:_p,customSort:Vp},m$=T("facet/register",e=>Q(e,zA)),Lp=T("facet/toggleSelectValue",e=>Q(e,{facetId:de,selection:new K({values:kn})})),Up=T("facet/toggleExcludeValue",e=>Q(e,{facetId:de,selection:new K({values:kn})})),ai=T("facet/deselectAll",e=>Q(e,de)),g$=T("facet/updateSortCriterion",e=>Q(e,{facetId:de,criterion:new fe({required:!0})})),y$=T("facet/updateNumberOfValues",e=>Q(e,{facetId:de,numberOfValues:new J({required:!0,min:1})})),h$=T("facet/updateIsFieldExpanded",e=>Q(e,{facetId:de,isFieldExpanded:new ne({required:!0})})),S$=T("facet/updateFreezeCurrentValues",e=>Q(e,{facetId:de,freezeCurrentValues:new ne({required:!0})}));d();c();l();u();d();c();l();u();function Bp(e){let t=Qp(e.start,e),r=Qp(e.end,e),n=e.endInclusive??!1,o=e.state??"idle";return{start:t,end:r,endInclusive:n,state:o}}function Qp(e,t){let{dateFormat:r}=t;return pd(e)?(ds(e),ud(e)):typeof e=="string"&&bt(e)?(ds(e),e):(id(e,r),Wo(Fr(e,r)))}d();c();l();u();var $p=T("rangeFacet/updateSortCriterion",e=>Q(e,{facetId:de,criterion:new fe({required:!0})}));d();c();l();u();var si={state:W,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new ne({required:!0}),numberOfResults:new J({required:!0,min:0})},ci={start:W,end:W,endInclusive:new ne({required:!0}),state:W,numberOfResults:new J({required:!0,min:0})};var GA={start:W,end:W,endInclusive:new ne({required:!0}),state:W},WA={facetId:de,field:W,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),currentValues:new ie({required:!1,each:new K({values:GA})}),generateAutomaticRanges:new ne({required:!0}),filterFacetCount:new ne({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new fe({required:!1}),rangeAlgorithm:new fe({required:!1})};function Hp(e){return bt(e)?Rn(e):e}function zp(e){e.currentValues&&e.currentValues.forEach(t=>{let{start:r,end:n}=Bp(t);if(Fr(Hp(r)).isAfter(Fr(Hp(n))))throw new Error(`The start value is greater than the end value for the date range ${t.start} to ${t.end}`)})}var oH=T("dateFacet/register",e=>{try{return Ve(e,WA),zp(e),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}}),Gp=T("dateFacet/toggleSelectValue",e=>Q(e,{facetId:de,selection:new K({values:ci})})),Wp=T("dateFacet/toggleExcludeValue",e=>Q(e,{facetId:de,selection:new K({values:ci})})),Kp=T("dateFacet/updateFacetValues",e=>{try{return Ve(e,{facetId:de,values:new ie({each:new K({values:ci})})}),zp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}});d();c();l();u();var KA={state:W,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new ne({required:!0})},YA={facetId:de,field:W,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),currentValues:new ie({required:!1,each:new K({values:KA})}),generateAutomaticRanges:new ne({required:!0}),filterFacetCount:new ne({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new fe({required:!1}),rangeAlgorithm:new fe({required:!1})};function Yp(e){e.currentValues&&e.currentValues.forEach(({start:t,end:r})=>{if(t>r)throw new Error(`The start value is greater than the end value for the numeric range ${t} to ${r}`)})}var hH=T("numericFacet/register",e=>{try{return Q(e,YA),Yp(e),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}}),Jp=T("numericFacet/toggleSelectValue",e=>Q(e,{facetId:de,selection:new K({values:si})})),Xp=T("numericFacet/toggleExcludeValue",e=>Q(e,{facetId:de,selection:new K({values:si})})),Zp=T("numericFacet/updateFacetValues",e=>{try{return Ve(e,{facetId:de,values:new ie({each:new K({values:si})})}),Yp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}});d();c();l();u();d();c();l();u();var ef=T("facet/updateFacetAutoSelection",e=>Q(e,{allow:new ne({required:!0})}));d();c();l();u();d();c();l();u();var ui=class extends vt{constructor(r){super(r);this.getState=r}get activeInstantResultQuery(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].q;return null}get activeInstantResultCache(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].cache[o];return null}get results(){return this.activeInstantResultCache?.results}get queryText(){return this.activeInstantResultQuery??Ne().q}get responseTime(){return this.activeInstantResultCache?.duration??We().duration}get numberOfResults(){return this.activeInstantResultCache?.totalCountFiltered??We().response.totalCountFiltered}getSearchUID(){return this.activeInstantResultCache?.searchUid||super.getSearchUID()}};var tf=()=>je("analytics/instantResult/searchboxAsYouType",e=>e.makeSearchboxAsYouType(),e=>new ui(e)),rf=()=>({actionCause:"searchboxAsYouType"});d();c();l();u();var Ls={id:W},JA={...Ls,q:we},YH=T("instantResults/register",e=>Q(e,Ls)),li=T("instantResults/updateQuery",e=>Q(e,JA)),JH=T("instantResults/clearExpired",e=>Q(e,Ls));d();c();l();u();var di=new J({required:!0,min:0}),pi=T("pagination/registerNumberOfResults",e=>Q(e,di)),fi=T("pagination/updateNumberOfResults",e=>Q(e,di)),mi=T("pagination/registerPage",e=>Q(e,di)),Vr=T("pagination/updatePage",e=>Q(e,di)),gi=T("pagination/nextPage"),yi=T("pagination/previousPage");d();c();l();u();var Lr=T("query/updateQuery",e=>Q(e,{q:new H,enableQuerySyntax:new ne}));d();c();l();u();d();c();l();u();d();c();l();u();var Pt=()=>({cq:"",cqWasSet:!1,aq:"",aqWasSet:!1,lq:"",lqWasSet:!1,dq:"",dqWasSet:!1,defaultFilters:{cq:"",aq:"",lq:"",dq:""}});var Us=()=>je("search/logFetchMoreResults",e=>e.makeFetchMoreResults()),kt=e=>je("search/queryError",(t,r)=>t.makeQueryError({query:r.query?.q||Ne().q,aq:r.advancedSearchQueries?.aq||Pt().aq,cq:r.advancedSearchQueries?.cq||Pt().cq,dq:r.advancedSearchQueries?.dq||Pt().dq,errorType:e.type,errorMessage:e.message}));d();c();l();u();d();c();l();u();var jz=T("didYouMean/enable"),Mz=T("didYouMean/disable"),Nz=T("didYouMean/automaticCorrections/disable"),_z=T("didYouMean/automaticCorrections/enable"),hi=T("didYouMean/correction",e=>Q(e,W)),Vz=T("didYouMean/automaticCorrections/mode",e=>Q(e,new H({constrainTo:["next","legacy"],emptyAllowed:!1,required:!0})));d();c();l();u();var Qs=()=>je("analytics/didyoumean/automatic",e=>e.makeDidYouMeanAutomatic());var nf=()=>({actionCause:"didYouMeanAutomatic"});d();c();l();u();d();c();l();u();function of(){return{freezeFacetOrder:!1,facets:{}}}d();c();l();u();function af(){return[]}d();c();l();u();function On(){return{firstResult:0,defaultNumberOfResults:10,numberOfResults:10,totalCountFiltered:0}}d();c();l();u();function sf(){return{}}d();c();l();u();function cf(){return{}}d();c();l();u();function uf(){return{}}function et(e){return{context:e.context||ti(),dictionaryFieldContext:e.dictionaryFieldContext||ni(),facetSet:e.facetSet||qo(),numericFacetSet:e.numericFacetSet||Do(),dateFacetSet:e.dateFacetSet||To(),categoryFacetSet:e.categoryFacetSet||Oo(),automaticFacetSet:e.automaticFacetSet??Fo(),pagination:e.pagination||On(),query:e.query||Ne(),tabSet:e.tabSet||uf(),advancedSearchQueries:e.advancedSearchQueries||Pt(),staticFilterSet:e.staticFilterSet||cf(),querySet:e.querySet||sf(),sortCriteria:e.sortCriteria||jo(),pipeline:e.pipeline||pr(),searchHub:e.searchHub||Cr(),facetOptions:e.facetOptions||of(),facetOrder:e.facetOrder??af(),debug:e.debug??lo()}}d();c();l();u();var tG=new K({values:{undoneQuery:we},options:{required:!0}}),lf=()=>je("analytics/trigger/query",(e,t)=>t.triggers?.queryModification.newQuery?e.makeTriggerQuery():null);d();c();l();u();var Si=T("trigger/query/ignore",e=>Q(e,new H({emptyAllowed:!0,required:!0}))),vi=T("trigger/query/modification",e=>Q(e,new K({values:{originalQuery:Ce,modification:Ce}})));d();c();l();u();var Ft=/*#__PURE__*/function(){var _ref34=_asyncToGenerator(function*(e,t){let r=eb(e),n=Yo(e),o=XA(e),i=yield xt(e,t),a=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return Ct({...i,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(r&&{cq:r}),...(n.length&&{facets:n}),...(e.pagination&&{numberOfResults:a(),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:o}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function Ft(_x73,_x74){return _ref34.apply(this,arguments)}}();function XA(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(ZA).filter(r=>r.currentValues.length>0):void 0}function ZA(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function eb(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=tb(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function tb(e){return Object.values(e.staticFilterSet||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o})}var Ot=class{constructor(t,r=n=>{this.dispatch(Lr({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI(_x75,_x76){var _this10=this;return _asyncToGenerator(function*({mappings:t,request:r},n){let o=Date.now(),i=Ko(yield _this10.extra.apiClient.search(r,n),t),a=Date.now()-o,m=_this10.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}}).apply(this,arguments)}process(t){var _this11=this;return _asyncToGenerator(function*(){return _this11.processQueryErrorOrContinue(t)??(yield _this11.processQueryCorrectionsOrContinue(t))??(yield _this11.processQueryTriggersOrContinue(t))??_this11.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return Oe(t.response)?(this.dispatch(kt(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this12=this;return _asyncToGenerator(function*(){let r=_this12.getState(),n=_this12.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let p=a.length===0&&m&&m.length!==0,y=!X(f)&&!X(f.correctedQuery);if(!p&&!y)return null;let S=p?yield _this12.processLegacyDidYouMeanAutoCorrection(t):_this12.processModernDidYouMeanAutoCorrection(t);return _this12.dispatch(Xe(et(_this12.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this13=this;return _asyncToGenerator(function*(){let r=_this13.getCurrentQuery(),n=_this13.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this13.automaticallyRetryQueryWithCorrection(o);return Oe(i.response)?(_this13.dispatch(kt(i.response.error)),_this13.rejectWithValue(i.response.error)):(_this13.logOriginalAnalyticsQueryBeforeAutoCorrection(t),_this13.dispatch(Xe(et(_this13.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r,analyticsAction:Qs()})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o,analyticsAction:Qs()}}logOriginalAnalyticsQueryBeforeAutoCorrection(t){let r=this.getState(),n=this.getSuccessResponse(t);this.analyticsAction?.()(this.dispatch,()=>this.getStateAfterResponse(t.queryExecuted,t.duration,r,n),this.extra)}processQueryTriggersOrContinue(t){var _this14=this;return _asyncToGenerator(function*(){let r=_this14.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this14.getState().triggers?.queryModification.queryToIgnore===n)return _this14.dispatch(Si("")),null;_this14.analyticsAction&&(yield _this14.dispatch(_this14.analyticsAction));let i=_this14.getCurrentQuery(),a=yield _this14.automaticallyRetryQueryWithTriggerModification(n);return Oe(a.response)?(_this14.dispatch(kt(a.response.error)),_this14.rejectWithValue(a.response.error)):(_this14.dispatch(Xe(et(_this14.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i,analyticsAction:lf()})})()}getStateAfterResponse(t,r,n,o){return{...n,query:{q:t,enableQuerySyntax:n.query?.enableQuerySyntax??Ne().enableQuerySyntax},search:{...We(),duration:r,response:o,results:o.results}}}processSuccessResponse(t){return this.dispatch(Xe(et(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery(),analyticsAction:this.analyticsAction}}getSuccessResponse(t){return $n(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this15=this;return _asyncToGenerator(function*(){_this15.onUpdateQueryForCorrection(t);let r=yield _this15.fetchFromAPI(yield Ft(_this15.getState()),{origin:"mainSearch"});return _this15.dispatch(hi(t)),r})()}automaticallyRetryQueryWithTriggerModification(t){var _this16=this;return _asyncToGenerator(function*(){return _this16.dispatch(vi({newQuery:t,originalQuery:_this16.getCurrentQuery()})),_this16.onUpdateQueryForCorrection(t),yield _this16.fetchFromAPI(yield Ft(_this16.getState()),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get analyticsAction(){return this.config.analyticsAction}get rejectWithValue(){return this.config.rejectWithValue}};var eW=le("search/executeSearch",/*#__PURE__*/function(){var _ref35=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Ai(r,t,e)});return function(_x77,_x78){return _ref35.apply(this,arguments)}}()),tW=le("search/fetchPage",/*#__PURE__*/function(){var _ref36=_asyncToGenerator(function*(e,t){let r=t.getState();return yield $s(r,t,e)});return function(_x79,_x80){return _ref36.apply(this,arguments)}}()),rW=le("search/fetchMoreResults",/*#__PURE__*/function(){var _ref37=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Hs(t,r)});return function(_x81,_x82){return _ref37.apply(this,arguments)}}()),nW=le("search/fetchFacetValues",/*#__PURE__*/function(){var _ref38=_asyncToGenerator(function*(e,t){let r=t.getState();return yield ib(t,e,r)});return function(_x83,_x84){return _ref38.apply(this,arguments)}}()),oW=le("search/fetchInstantResults",/*#__PURE__*/function(){var _ref39=_asyncToGenerator(function*(e,t){return Bs(e,t)});return function(_x85,_x86){return _ref39.apply(this,arguments)}}()),rb=/*#__PURE__*/function(){var _ref40=_asyncToGenerator(function*(e,t){let r=yield Ft(e,t);return r.request={...r.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},r});return function rb(_x87,_x88){return _ref40.apply(this,arguments)}}(),nb=/*#__PURE__*/function(){var _ref41=_asyncToGenerator(function*(e,t,r){let n=yield xt(e);return Ct({...n,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:r,q:t})});return function nb(_x89,_x90,_x91){return _ref41.apply(this,arguments)}}(),ob=/*#__PURE__*/function(){var _ref42=_asyncToGenerator(function*(e,t){let r=yield Ft(e,t);return r.request.numberOfResults=0,r});return function ob(_x92,_x93){return _ref42.apply(this,arguments)}}(),df=e=>{e.configuration.analytics.enabled&&Le.getInstance().addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})};function Bs(_x94,_x95){return _Bs.apply(this,arguments)}function _Bs(){_Bs=_asyncToGenerator(function*(e,t){Q(e,{id:W,q:W,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:r,maxResultsPerQuery:n}=e,o=t.getState(),i=new Ot({...t,analyticsAction:tf()},p=>{t.dispatch(li({q:p,id:e.id}))}),a=yield nb(o,r,n),m=yield i.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),f=yield i.process(m);return"response"in f?{results:f.response.results,searchUid:f.response.searchUid,analyticsAction:f.analyticsAction,totalCountFiltered:f.response.totalCountFiltered,duration:f.duration}:f});return _Bs.apply(this,arguments)}function $s(_x96,_x97,_x98){return _$s.apply(this,arguments)}function _$s(){_$s=_asyncToGenerator(function*(e,t,r){df(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Ot({...t,analyticsAction:r}),f=yield Ft(e,a),p=yield m.fetchFromAPI(f,{origin:"mainSearch"});return yield m.process(p)});return _$s.apply(this,arguments)}function Hs(_x99,_x100){return _Hs.apply(this,arguments)}function _Hs(){_Hs=_asyncToGenerator(function*(e,t){let{analyticsClientMiddleware:r,preprocessRequest:n,logger:o}=e.extra,{description:i}=yield Us().prepare({getState:()=>e.getState(),analyticsClientMiddleware:r,preprocessRequest:n,logger:o}),a=new Ot({...e,analyticsAction:Us()}),m=yield rb(t,i),f=yield a.fetchFromAPI(m,{origin:"mainSearch"});return yield a.process(f)});return _Hs.apply(this,arguments)}function ib(_x101,_x102,_x103){return _ib.apply(this,arguments)}function _ib(){_ib=_asyncToGenerator(function*(e,t,r){let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=e.extra,{description:a}=yield t.prepare({getState:()=>e.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Ot({...e,analyticsAction:t}),f=yield ob(r,a),p=yield m.fetchFromAPI(f,{origin:"facetValues"});return yield m.process(p)});return _ib.apply(this,arguments)}function Ai(_x104,_x105,_x106){return _Ai.apply(this,arguments)}function _Ai(){_Ai=_asyncToGenerator(function*(e,t,r){df(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=yield Ft(e,a),f=new Ot({...t,analyticsAction:r}),p=yield f.fetchFromAPI(m,{origin:"mainSearch"});return yield f.process(p)});return _Ai.apply(this,arguments)}d();c();l();u();var Tt=class{constructor(t,r=n=>{this.dispatch(Lr({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI(_x107,_x108){var _this17=this;return _asyncToGenerator(function*({mappings:t,request:r},n){let o=Date.now(),i=Ko(yield _this17.extra.apiClient.search(r,n),t),a=Date.now()-o,m=_this17.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}}).apply(this,arguments)}process(t){var _this18=this;return _asyncToGenerator(function*(){return _this18.processQueryErrorOrContinue(t)??(yield _this18.processQueryCorrectionsOrContinue(t))??(yield _this18.processQueryTriggersOrContinue(t))??_this18.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return Oe(t.response)?(this.dispatch(kt(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this19=this;return _asyncToGenerator(function*(){let r=_this19.getState(),n=_this19.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let p=a.length===0&&m&&m.length!==0,y=!X(f)&&!X(f.correctedQuery);if(!p&&!y)return null;let S=p?yield _this19.processLegacyDidYouMeanAutoCorrection(t):_this19.processModernDidYouMeanAutoCorrection(t);return _this19.dispatch(Xe(et(_this19.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this20=this;return _asyncToGenerator(function*(){let r=_this20.getCurrentQuery(),n=_this20.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this20.automaticallyRetryQueryWithCorrection(o);return Oe(i.response)?(_this20.dispatch(kt(i.response.error)),_this20.rejectWithValue(i.response.error)):(_this20.dispatch(Xe(et(_this20.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o}}processQueryTriggersOrContinue(t){var _this21=this;return _asyncToGenerator(function*(){let r=_this21.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this21.getState().triggers?.queryModification.queryToIgnore===n)return _this21.dispatch(Si("")),null;let i=_this21.getCurrentQuery(),a=yield _this21.automaticallyRetryQueryWithTriggerModification(n);return Oe(a.response)?(_this21.dispatch(kt(a.response.error)),_this21.rejectWithValue(a.response.error)):(_this21.dispatch(Xe(et(_this21.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i})})()}processSuccessResponse(t){return this.dispatch(Xe(et(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery()}}getSuccessResponse(t){return $n(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this22=this;return _asyncToGenerator(function*(){_this22.onUpdateQueryForCorrection(t);let r=_this22.getState(),{actionCause:n}=nf(),o=yield _this22.fetchFromAPI(yield Rt(r,_this22.extra.navigatorContext,{actionCause:n}),{origin:"mainSearch"});return _this22.dispatch(hi(t)),o})()}automaticallyRetryQueryWithTriggerModification(t){var _this23=this;return _asyncToGenerator(function*(){return _this23.dispatch(vi({newQuery:t,originalQuery:_this23.getCurrentQuery()})),_this23.onUpdateQueryForCorrection(t),yield _this23.fetchFromAPI(yield Rt(_this23.getState(),_this23.extra.navigatorContext),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}};var BW=le("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;Q(e,{q:new H,enableQuerySyntax:new ne,clearFilters:new ne}),e.clearFilters&&(r(ii()),r(Fp())),r(ef({allow:!0})),r(Lr({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Vr(1))}),$W=T("search/updateSearchAction"),pf=le("search/executeSearch",/*#__PURE__*/function(){var _ref43=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ai(r,t,e.legacy);ff(r);let n=e.next?mf(e.next):void 0,o=yield Rt(r,t.extra.navigatorContext,n),i=new Tt({...t,analyticsAction:n??{}}),a=yield i.fetchFromAPI(o,{origin:"mainSearch"});return yield i.process(a)});return function(_x109,_x110){return _ref43.apply(this,arguments)}}()),HW=le("search/fetchPage",/*#__PURE__*/function(){var _ref44=_asyncToGenerator(function*(e,t){let r=t.getState();if(ff(r),r.configuration.analytics.analyticsMode==="legacy"||!e.next)return $s(r,t,e.legacy);let n=new Tt({...t,analyticsAction:e.next}),o=yield Rt(r,t.extra.navigatorContext,e.next),i=yield n.fetchFromAPI(o,{origin:"mainSearch"});return yield n.process(i)});return function(_x111,_x112){return _ref44.apply(this,arguments)}}()),zW=le("search/fetchMoreResults",/*#__PURE__*/function(){var _ref45=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Hs(t,r);let n=wl("browseResults",t.getState),o=new Tt({...t,analyticsAction:n}),i=yield ab(r,t.extra.navigatorContext,n),a=yield o.fetchFromAPI(i,{origin:"mainSearch"});return yield o.process(a)});return function(_x113,_x114){return _ref45.apply(this,arguments)}}()),GW=le("search/fetchFacetValues",/*#__PURE__*/function(){var _ref46=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ai(r,t,e.legacy);let n=new Tt({...t,analyticsAction:{}}),o=yield cb(r,t.extra.navigatorContext),i=yield n.fetchFromAPI(o,{origin:"facetValues"});return yield n.process(i)});return function(_x115,_x116){return _ref46.apply(this,arguments)}}()),WW=le("search/fetchInstantResults",/*#__PURE__*/function(){var _ref47=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Bs(e,t);Q(e,{id:W,q:W,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:n,maxResultsPerQuery:o}=e,i=mf(rf()),a=yield sb(r,t.extra.navigatorContext,n,o,i),m=new Tt({...t,analyticsAction:i},y=>{t.dispatch(li({q:y,id:e.id}))}),f=yield m.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),p=yield m.process(f);return"response"in p?{results:p.response.results,searchUid:p.response.searchUid,totalCountFiltered:p.response.totalCountFiltered,duration:p.duration}:p});return function(_x117,_x118){return _ref47.apply(this,arguments)}}()),ab=/*#__PURE__*/function(){var _ref48=_asyncToGenerator(function*(e,t,r){let n=yield Rt(e,t,r);return n.request={...n.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},n});return function ab(_x119,_x120,_x121){return _ref48.apply(this,arguments)}}(),sb=/*#__PURE__*/function(){var _ref49=_asyncToGenerator(function*(e,t,r,n,o){let i=Or(e,t,o);return Ct({...i,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:n,q:r})});return function sb(_x122,_x123,_x124,_x125,_x126){return _ref49.apply(this,arguments)}}(),cb=/*#__PURE__*/function(){var _ref50=_asyncToGenerator(function*(e,t,r){let n=yield Rt(e,t,r);return n.request.numberOfResults=0,n});return function cb(_x127,_x128,_x129){return _ref50.apply(this,arguments)}}(),ff=e=>{e.configuration.analytics.enabled&&Le.getInstance().addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})},mf=e=>({actionCause:e.actionCause,type:e.actionCause});var gf=ge(On(),e=>{e.addCase(pi,(t,r)=>{let n=zs(t),o=r.payload;t.defaultNumberOfResults=t.numberOfResults=o,t.firstResult=Tn(n,o)}).addCase(fi,(t,r)=>{t.numberOfResults=r.payload,t.firstResult=0}).addCase(Jo,t=>{t.firstResult=0}).addCase(mi,(t,r)=>{let n=r.payload;t.firstResult=Tn(n,t.numberOfResults)}).addCase(Vr,(t,r)=>{let n=r.payload;t.firstResult=Tn(n,t.numberOfResults)}).addCase(yi,t=>{let r=zs(t),n=Math.max(r-1,1);t.firstResult=Tn(n,t.numberOfResults)}).addCase(gi,t=>{let r=zs(t),n=lb(t),o=Math.min(r+1,n);t.firstResult=Tn(o,t.numberOfResults)}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.numberOfResults=r.payload.pagination.numberOfResults,t.firstResult=r.payload.pagination.firstResult)}).addCase(ht,(t,r)=>{t.firstResult=r.payload.firstResult??t.firstResult,t.numberOfResults=r.payload.numberOfResults??t.defaultNumberOfResults}).addCase(pf.fulfilled,(t,r)=>{let{response:n}=r.payload;t.totalCountFiltered=n.totalCountFiltered}).addCase(ai,t=>{Ie(t)}).addCase(Wp,t=>{Ie(t)}).addCase(Up,t=>{Ie(t)}).addCase(Xp,t=>{Ie(t)}).addCase(Np,t=>{Ie(t)}).addCase(Lp,t=>{Ie(t)}).addCase(Dp,t=>{Ie(t)}).addCase(Tp,t=>{Ie(t)}).addCase(qp,t=>{Ie(t)}).addCase(Gp,t=>{Ie(t)}).addCase(Jp,t=>{Ie(t)}).addCase(ii,t=>{Ie(t)}).addCase(Kp,t=>{Ie(t)}).addCase(Zp,t=>{Ie(t)}).addCase(Mp,t=>{Ie(t)}).addCase(Op,t=>{Ie(t)})});function Ie(e){e.firstResult=On().firstResult}function zs(e){let{firstResult:t,numberOfResults:r}=e;return db(t,r)}function lb(e){let{totalCountFiltered:t,numberOfResults:r}=e;return pb(t,r)}function Tn(e,t){return(e-1)*t}function db(e,t){return Math.round(e/t)+1}function pb(e,t){let r=Math.min(e,5e3);return Math.ceil(r/t)}function Gs(e){return e.addReducers({pagination:gf}),{nextPage:gi,previousPage:yi,registerNumberOfResults:pi,registerPage:mi,updateNumberOfResults:fi,updatePage:Vr}}var fb=new Fe({id:new H({emptyAllowed:!0,required:!1,default:""}),numberOfRecommendations:new J({min:0})});function yf(e,t={}){if(!mb(e))throw Ge;let r=It(e),{dispatch:n}=e,o=()=>e.state,i=Au(e,fb,t.options,"buildRecommendationList");return i.id!==""&&n(xr({id:i.id})),i.numberOfRecommendations&&n(Gs(e).updateNumberOfResults(i.numberOfRecommendations)),{...r,refresh(){n(At())},get state(){let a=o();return{recommendations:a.recommendation.recommendations,error:a.recommendation.error,isLoading:a.recommendation.isLoading,searchResponseId:a.recommendation.searchUid}}}}function mb(e){return e.addReducers({recommendation:Rr,configuration:ze}),!0}d();c();l();u();d();c();l();u();function hf(e,t,r){if(!gb(e))throw Ge;let n=1e3,o={selectionDelay:n,debounceWait:n,...t.options},i;return{select:Nn(r,o.debounceWait,{isImmediate:!0}),beginDelayedSelect(){i=setTimeout(r,o.selectionDelay)},cancelPendingSelect(){i&&clearTimeout(i)}}}function gb(e){return e.addReducers({configuration:ze}),!0}function Sf(e,t){let r=!1,n=()=>{r||(r=!0,e.dispatch(Vo(t.options.result)))};return hf(e,t,()=>{n()})}d();c();l();u();d();c();l();u();d();c();l();u();var Dt=()=>new H({required:!1,emptyAllowed:!0}),bi=T("advancedSearchQueries/update",e=>Q(e,{aq:Dt(),cq:Dt(),lq:Dt(),dq:Dt()})),Ci=T("advancedSearchQueries/register",e=>Q(e,{aq:Dt(),cq:Dt(),lq:Dt(),dq:Dt()}));var vf=ge(Pt(),e=>{e.addCase(bi,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;ve(n)||(t.aq=n,t.aqWasSet=!0),ve(o)||(t.cq=o,t.cqWasSet=!0),ve(i)||(t.lq=i,t.lqWasSet=!0),ve(a)||(t.dq=a,t.dqWasSet=!0)}).addCase(Ci,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;ve(n)||(t.defaultFilters.aq=n,t.aqWasSet||(t.aq=n)),ve(o)||(t.defaultFilters.cq=o,t.cqWasSet||(t.cq=o)),ve(i)||(t.defaultFilters.lq=i,t.lqWasSet||(t.lq=i)),ve(a)||(t.defaultFilters.dq=a,t.dqWasSet||(t.dq=a))}).addCase(qe.fulfilled,(t,r)=>r.payload?.advancedSearchQueries??t).addCase(ht,(t,r)=>{let{aq:n,cq:o}=r.payload;ve(n)||(t.aq=n,t.aqWasSet=!0),ve(o)||(t.cq=o,t.cqWasSet=!0)})});function yb(e){return e.addReducers({advancedSearchQueries:vf}),{updateAdvancedSearchQueries:bi,registerAdvancedSearchQueries:Ci}}d();c();l();u();function hb(e){return e.addReducers({configuration:ze}),{disableAnalytics:ur,enableAnalytics:lr,setOriginLevel2:ao,setOriginLevel3:so,updateAnalyticsConfiguration:cr,updateBasicConfiguration:yt}}d();c();l();u();function Sb(e){return e.addReducers({configuration:ze,pipeline:fr,searchHub:Ir}),{updateSearchConfiguration:Je}}d();c();l();u();function vb(e){return e.addReducers({context:ri}),{addContext:Gt,removeContext:Wt,setContext:zt}}d();c();l();u();function Ab(e){return e.addReducers({debug:po}),{disableDebug:uo,enableDebug:co}}d();c();l();u();function bb(e){return e.addReducers({dictionaryFieldContext:oi}),{addContext:Mr,removeContext:Nr,setContext:jr}}d();c();l();u();d();c();l();u();d();c();l();u();var Cb={collectionField:new H({emptyAllowed:!1,required:!1}),parentField:new H({emptyAllowed:!1,required:!1}),childField:new H({emptyAllowed:!1,required:!1}),numberOfFoldedResults:new J({min:0,required:!1})},Af=T("folding/register",e=>Q(e,Cb)),hY=le("folding/loadCollection",/*#__PURE__*/function(){var _ref51=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}}){let i=t(),a=i.configuration.analytics.analyticsMode==="legacy"?yield xt(i):Or(i,o),m=yield n.search({...a,q:wb(i),enableQuerySyntax:!0,cq:`@${i.folding.fields.collection}="${e}"`,filterField:i.folding.fields.collection,childField:i.folding.fields.parent,parentField:i.folding.fields.child,filterFieldRange:100},{origin:"foldingCollection"});return Oe(m)?r(m.error):{collectionId:e,results:m.success.results,searchUid:m.success.searchUid,rootResult:i.folding.collections[e].result}});return function(_x130,_x131){return _ref51.apply(this,arguments)}}());function wb(e){return e.query.q===""?"":e.query.enableQuerySyntax?`${e.query.q} OR @uri`:`( <@- ${e.query.q} -@> ) OR @uri`}d();c();l();u();var bf=()=>({enabled:!1,fields:{collection:"foldingcollection",parent:"foldingparent",child:"foldingchild"},filterFieldRange:2,collections:{}});d();c();l();u();var Ur=T("fields/registerFieldsToInclude",e=>Q(e,io)),wi=T("fields/fetchall/enable"),xi=T("fields/fetchall/disable"),Ri=le("fields/fetchDescription",/*#__PURE__*/function(){var _ref52=_asyncToGenerator(function*(e,{extra:t,getState:r,rejectWithValue:n}){let o=r(),{accessToken:i,environment:a,organizationId:m}=o.configuration,{apiBaseUrl:f}=o.configuration.search,p=yield t.apiClient.fieldDescriptions({accessToken:i,organizationId:m,url:f??pt(m,a)});return Oe(p)?n(p.error):p.success.fields});return function(_x132,_x133){return _ref52.apply(this,arguments)}}());d();c();l();u();var Ei=["author","language","urihash","objecttype","collection","source","permanentid"],Ws=[...Ei,"date","filetype","parents"],Cf=[...Ws,"ec_price","ec_name","ec_description","ec_brand","ec_category","ec_item_group_id","ec_shortdesc","ec_thumbnails","ec_images","ec_promo_price","ec_in_stock","ec_rating"],wf=()=>({fieldsToInclude:Ei,fetchAllFields:!1,fieldsDescription:[]});var Ii=ge(wf(),e=>e.addCase(Ur,(t,r)=>{t.fieldsToInclude=[...new Set(t.fieldsToInclude.concat(r.payload))]}).addCase(wi,t=>{t.fetchAllFields=!0}).addCase(xi,t=>{t.fetchAllFields=!1}).addCase(Ri.fulfilled,(t,{payload:r})=>{t.fieldsDescription=r}).addCase(Af,(t,{payload:r})=>{let n=bf().fields;t.fieldsToInclude.push(r.collectionField??n.collection,r.parentField??n.parent,r.childField??n.child)}));function xb(e){return e.addReducers({fields:Ii}),{registerFieldsToInclude:Ur,enableFetchAllFields:wi,disableFetchAllFields:xi,fetchFieldsDescription:Ri}}d();c();l();u();function Rb(e){return e.addReducers({pipeline:fr}),{setPipeline:dr}}d();c();l();u();function Eb(e){return e.addReducers({recommendation:Rr}),{getRecommendations:At,setRecommendationId:xr}}d();c();l();u();function Ib(e){return e.addReducers({}),{logRecommendationOpen:Vo}}d();c();l();u();d();c();l();u();var Pb=new Fe({content:new fe({required:!0}),conditions:new fe({required:!0}),priority:new J({required:!1,default:0,min:0}),fields:new ie({required:!1,each:W})});function xf(){let e=[],t=r=>{let n=Pb.validate(r);if(!r.conditions.every(i=>i instanceof Function))throw new Wr("Each template condition should be a function that takes a Result or Product as an argument and returns a boolean");return n};return{registerTemplates(...r){r.forEach(n=>{let o={...t(n),fields:n.fields||[]};e.push(o)}),e.sort((n,o)=>o.priority-n.priority)},selectTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.content:null},selectLinkTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.linkContent:null}}}function Rf(e){if(!kb(e))throw Ge;let{registerTemplates:t,selectTemplate:r,selectLinkTemplate:n}=xf();return{registerTemplates:(...o)=>{t(...o);let i=[];o.forEach(a=>{a.fields&&i.push(...a.fields)}),e.dispatch(Ur(i))},selectTemplate:r,selectLinkTemplate:n}}function kb(e){return e.addReducers({fields:Ii}),!0}d();c();l();u();function Fb(e){return e.addReducers({searchHub:Ir}),{setSearchHub:Er}}/**
|
|
30
|
+
`;function Qh(){return typeof navigator<"u"&&navigator.product=="ReactNative"}var Bh=["1",1,"yes",!0];function Lo(){let e=[];return Ma()&&e.push(window.doNotTrack),Wa()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(t=>Bh.indexOf(t)!==-1)}var cl="v15",ul={default:"https://analytics.cloud.coveo.com/rest/ua",production:"https://analytics.cloud.coveo.com/rest/ua",hipaa:"https://analyticshipaa.cloud.coveo.com/rest/ua"};function $h(e=ul.default,t=cl,r=!1){if(e=e.replace(/\/$/,""),r)return`${e}/${t}`;let n=e.endsWith("/rest")||e.endsWith("/rest/ua");return`${e}${n?"":"/rest"}/${t}`}var Hh="38824e1f-37f5-42d3-8372-a4b8fa9df946",rt=class{get defaultOptions(){return{endpoint:ul.default,isCustomEndpoint:!1,token:"",version:cl,beforeSendHooks:[],afterSendHooks:[]}}get version(){return ol}constructor(t){if(this.acceptedLinkReferrers=[],!t)throw new Error("You have to pass options to this constructor");this.options=Object.assign(Object.assign({},this.defaultOptions),t),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[Dy,Fy].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};let r={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};Lo()?this.runtime=new Vo:this.runtime=this.options.runtimeEnvironment||this.initRuntime(r),this.addEventTypeMapping(X.view,{newEventType:X.view,addClientIdParameter:!0}),this.addEventTypeMapping(X.click,{newEventType:X.click,addClientIdParameter:!0}),this.addEventTypeMapping(X.custom,{newEventType:X.custom,addClientIdParameter:!0}),this.addEventTypeMapping(X.search,{newEventType:X.search,addClientIdParameter:!0})}initRuntime(t){return Ma()&&Fr()?new za(t,()=>{let r=[...this.bufferedRequests];return this.bufferedRequests=[],r}):(Qh()&&console.warn(Uh),new Ga(t))}get storage(){return this.runtime.storage}determineVisitorId(){return D(this,void 0,void 0,function*(){try{return Ma()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||Jt()}catch(t){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),Jt()}})}getCurrentVisitorId(){return D(this,void 0,void 0,function*(){if(!this.visitorId){let t=yield this.determineVisitorId();yield this.setCurrentVisitorId(t)}return this.visitorId})}setCurrentVisitorId(t){return D(this,void 0,void 0,function*(){this.visitorId=t,yield this.storage.setItem("visitorId",t)})}setClientId(t,r){return D(this,void 0,void 0,function*(){if(Mo(t))this.setCurrentVisitorId(t.toLowerCase());else{if(!r)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(Hu(t,Hu(r,Hh)))}})}getParameters(t,...r){return D(this,void 0,void 0,function*(){return yield this.resolveParameters(t,...r)})}getPayload(t,...r){return D(this,void 0,void 0,function*(){let n=yield this.resolveParameters(t,...r);return yield this.resolvePayloadForParameters(t,n)})}get currentVisitorId(){return typeof(this.visitorId||this.storage.getItem("visitorId"))!="string"&&this.setCurrentVisitorId(Jt()),this.visitorId}set currentVisitorId(t){this.visitorId=t,this.storage.setItem("visitorId",t)}extractClientIdFromLink(t){if(Lo())return null;try{let r=new URL(t).searchParams.get(bt.cvo_cid);if(r==null)return null;let n=bt.fromString(r);return!n||!Fr()||!n.validate(document.referrer,this.acceptedLinkReferrers)?null:n.clientId}catch{}return null}resolveParameters(t,...r){return D(this,void 0,void 0,function*(){let{variableLengthArgumentsNames:n=[],addVisitorIdParameter:o=!1,usesMeasurementProtocol:i=!1,addClientIdParameter:a=!1}=this.eventTypeMapping[t]||{};return yield[y=>n.length>0?this.parseVariableArgumentsPayload(n,y):y[0],y=>D(this,void 0,void 0,function*(){return Object.assign(Object.assign({},y),{visitorId:o?yield this.getCurrentVisitorId():""})}),y=>D(this,void 0,void 0,function*(){return a?Object.assign(Object.assign({},y),{clientId:yield this.getCurrentVisitorId()}):y}),y=>i?this.ensureAnonymousUserWhenUsingApiKey(y):y,y=>this.beforeSendHooks.reduce((b,R)=>D(this,void 0,void 0,function*(){let F=yield b;return yield R(t,F)}),y)].reduce((y,b)=>D(this,void 0,void 0,function*(){let R=yield y;return yield b(R)}),Promise.resolve(r))})}resolvePayloadForParameters(t,r){return D(this,void 0,void 0,function*(){let{usesMeasurementProtocol:n=!1}=this.eventTypeMapping[t]||{};return yield[h=>this.setTrackingIdIfTrackingIdNotPresent(h),h=>this.removeEmptyPayloadValues(h,t),h=>this.validateParams(h,t),h=>n?Oh(h):h,h=>n?this.removeUnknownParameters(h):h,h=>n?this.processCustomParameters(h):this.mapCustomParametersToCustomData(h)].reduce((h,S)=>D(this,void 0,void 0,function*(){let y=yield h;return yield S(y)}),Promise.resolve(r))})}makeEvent(t,...r){return D(this,void 0,void 0,function*(){let{newEventType:n=t}=this.eventTypeMapping[t]||{},o=yield this.resolveParameters(t,...r),i=yield this.resolvePayloadForParameters(t,o);return{eventType:n,payload:i,log:a=>D(this,void 0,void 0,function*(){return this.bufferedRequests.push({eventType:n,payload:Object.assign(Object.assign({},i),a)}),yield Promise.all(this.afterSendHooks.map(m=>m(t,Object.assign(Object.assign({},o),a)))),yield this.deferExecution(),yield this.sendFromBuffer()})}})}sendEvent(t,...r){return D(this,void 0,void 0,function*(){return(yield this.makeEvent(t,...r)).log({})})}deferExecution(){return new Promise(t=>setTimeout(t,0))}sendFromBuffer(){return D(this,void 0,void 0,function*(){let t=this.bufferedRequests.shift();if(t){let{eventType:r,payload:n}=t;return this.runtime.getClientDependingOnEventType(r).sendEvent(r,n)}})}clear(){this.storage.removeItem("visitorId"),new qo().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(t){return D(this,void 0,void 0,function*(){return this.makeEvent(X.search,t)})}sendSearchEvent(t){return D(this,void 0,void 0,function*(){var{searchQueryUid:r}=t,n=lt(t,["searchQueryUid"]);return(yield this.makeSearchEvent(n)).log({searchQueryUid:r})})}makeClickEvent(t){return D(this,void 0,void 0,function*(){return this.makeEvent(X.click,t)})}sendClickEvent(t){return D(this,void 0,void 0,function*(){var{searchQueryUid:r}=t,n=lt(t,["searchQueryUid"]);return(yield this.makeClickEvent(n)).log({searchQueryUid:r})})}makeCustomEvent(t){return D(this,void 0,void 0,function*(){return this.makeEvent(X.custom,t)})}sendCustomEvent(t){return D(this,void 0,void 0,function*(){var{lastSearchQueryUid:r}=t,n=lt(t,["lastSearchQueryUid"]);return(yield this.makeCustomEvent(n)).log({lastSearchQueryUid:r})})}makeViewEvent(t){return D(this,void 0,void 0,function*(){return this.makeEvent(X.view,t)})}sendViewEvent(t){return D(this,void 0,void 0,function*(){return(yield this.makeViewEvent(t)).log({})})}getVisit(){return D(this,void 0,void 0,function*(){let r=yield(yield v(`${this.baseUrl}/analytics/visit`)).json();return this.visitorId=r.visitorId,r})}getHealth(){return D(this,void 0,void 0,function*(){return yield(yield v(`${this.baseUrl}/analytics/monitoring/health`)).json()})}registerBeforeSendEventHook(t){this.beforeSendHooks.push(t)}registerAfterSendEventHook(t){this.afterSendHooks.push(t)}addEventTypeMapping(t,r){this.eventTypeMapping[t]=r}setAcceptedLinkReferrers(t){if(Array.isArray(t)&&t.every(r=>typeof r=="string"))this.acceptedLinkReferrers=t;else throw Error("Parameter should be an array of domain strings")}parseVariableArgumentsPayload(t,r){let n={};for(let o=0,i=r.length;o<i;o++){let a=r[o];if(typeof a=="string")n[t[o]]=a;else if(typeof a=="object")return Object.assign(Object.assign({},n),a)}return n}isKeyAllowedEmpty(t,r){return({[X.search]:["queryText"]}[t]||[]).indexOf(r)!==-1}removeEmptyPayloadValues(t,r){let n=o=>typeof o<"u"&&o!==null&&o!=="";return Object.keys(t).filter(o=>this.isKeyAllowedEmpty(r,o)||n(t[o])).reduce((o,i)=>Object.assign(Object.assign({},o),{[i]:t[i]}),{})}removeUnknownParameters(t){return Object.keys(t).filter(n=>{if(Mh(n))return!0;console.log(n,"is not processed by coveoua")}).reduce((n,o)=>Object.assign(Object.assign({},n),{[o]:t[o]}),{})}processCustomParameters(t){let{custom:r}=t,n=lt(t,["custom"]),o={};r&&Do(r)&&(o=this.lowercaseKeys(r));let i=Nh(n);return Object.assign(Object.assign({},o),i)}mapCustomParametersToCustomData(t){let{custom:r}=t,n=lt(t,["custom"]);if(r&&Do(r)){let o=this.lowercaseKeys(r);return Object.assign(Object.assign({},n),{customData:Object.assign(Object.assign({},o),t.customData)})}else return t}lowercaseKeys(t){let r=Object.keys(t),n={};return r.forEach(o=>{n[o.toLowerCase()]=t[o]}),n}validateParams(t,r){let{anonymizeIp:n}=t,o=lt(t,["anonymizeIp"]);return n!==void 0&&["0","false","undefined","null","{}","[]",""].indexOf(`${n}`.toLowerCase())==-1&&(o.anonymizeIp=1),(r==X.view||r==X.click||r==X.search||r==X.custom)&&(o.originLevel3=this.limit(o.originLevel3,1024)),r==X.view&&(o.location=this.limit(o.location,1024)),(r=="pageview"||r=="event")&&(o.referrer=this.limit(o.referrer,2048),o.location=this.limit(o.location,2048),o.page=this.limit(o.page,2048)),o}ensureAnonymousUserWhenUsingApiKey(t){let{userId:r}=t,n=lt(t,["userId"]);return Lh(this.options.token)&&!r?(n.userId="anonymous",n):t}setTrackingIdIfTrackingIdNotPresent(t){let{trackingId:r}=t,n=lt(t,["trackingId"]);return r?t:(n.hasOwnProperty("custom")&&Do(n.custom)&&(n.custom.hasOwnProperty("context_website")||n.custom.hasOwnProperty("siteName"))&&(n.trackingId=n.custom.context_website||n.custom.siteName),n.hasOwnProperty("customData")&&Do(n.customData)&&(n.customData.hasOwnProperty("context_website")||n.customData.hasOwnProperty("siteName"))&&(n.trackingId=n.customData.context_website||n.customData.siteName),n)}limit(t,r){return typeof t=="string"?Wy(t,r):t}get baseUrl(){return $h(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}},dt;(function(e){e.contextChanged="contextChanged",e.expandToFullUI="expandToFullUI",e.openUserActions="openUserActions",e.showPrecedingSessions="showPrecedingSessions",e.showFollowingSessions="showFollowingSessions",e.clickViewedDocument="clickViewedDocument",e.clickPageView="clickPageView",e.createArticle="createArticle"})(dt||(dt={}));var q;(function(e){e.interfaceLoad="interfaceLoad",e.interfaceChange="interfaceChange",e.didyoumeanAutomatic="didyoumeanAutomatic",e.didyoumeanClick="didyoumeanClick",e.resultsSort="resultsSort",e.searchboxSubmit="searchboxSubmit",e.searchboxClear="searchboxClear",e.searchboxAsYouType="searchboxAsYouType",e.breadcrumbFacet="breadcrumbFacet",e.breadcrumbResetAll="breadcrumbResetAll",e.documentQuickview="documentQuickview",e.documentOpen="documentOpen",e.omniboxAnalytics="omniboxAnalytics",e.omniboxFromLink="omniboxFromLink",e.searchFromLink="searchFromLink",e.triggerNotify="notify",e.triggerExecute="execute",e.triggerQuery="query",e.undoTriggerQuery="undoQuery",e.triggerRedirect="redirect",e.pagerResize="pagerResize",e.pagerNumber="pagerNumber",e.pagerNext="pagerNext",e.pagerPrevious="pagerPrevious",e.pagerScrolling="pagerScrolling",e.staticFilterClearAll="staticFilterClearAll",e.staticFilterSelect="staticFilterSelect",e.staticFilterDeselect="staticFilterDeselect",e.facetClearAll="facetClearAll",e.facetSearch="facetSearch",e.facetSelect="facetSelect",e.facetSelectAll="facetSelectAll",e.facetDeselect="facetDeselect",e.facetExclude="facetExclude",e.facetUnexclude="facetUnexclude",e.facetUpdateSort="facetUpdateSort",e.facetShowMore="showMoreFacetResults",e.facetShowLess="showLessFacetResults",e.queryError="query",e.queryErrorBack="errorBack",e.queryErrorClear="errorClearQuery",e.queryErrorRetry="errorRetry",e.recommendation="recommendation",e.recommendationInterfaceLoad="recommendationInterfaceLoad",e.recommendationOpen="recommendationOpen",e.likeSmartSnippet="likeSmartSnippet",e.dislikeSmartSnippet="dislikeSmartSnippet",e.expandSmartSnippet="expandSmartSnippet",e.collapseSmartSnippet="collapseSmartSnippet",e.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",e.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",e.sendSmartSnippetReason="sendSmartSnippetReason",e.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",e.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",e.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",e.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",e.openSmartSnippetSource="openSmartSnippetSource",e.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",e.openSmartSnippetInlineLink="openSmartSnippetInlineLink",e.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",e.recentQueryClick="recentQueriesClick",e.clearRecentQueries="clearRecentQueries",e.recentResultClick="recentResultClick",e.clearRecentResults="clearRecentResults",e.noResultsBack="noResultsBack",e.showMoreFoldedResults="showMoreFoldedResults",e.showLessFoldedResults="showLessFoldedResults",e.copyToClipboard="copyToClipboard",e.caseSendEmail="Case.SendEmail",e.feedItemTextPost="FeedItem.TextPost",e.caseAttach="caseAttach",e.caseDetach="caseDetach",e.retryGeneratedAnswer="retryGeneratedAnswer",e.likeGeneratedAnswer="likeGeneratedAnswer",e.dislikeGeneratedAnswer="dislikeGeneratedAnswer",e.openGeneratedAnswerSource="openGeneratedAnswerSource",e.generatedAnswerStreamEnd="generatedAnswerStreamEnd",e.generatedAnswerSourceHover="generatedAnswerSourceHover",e.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",e.generatedAnswerHideAnswers="generatedAnswerHideAnswers",e.generatedAnswerShowAnswers="generatedAnswerShowAnswers",e.generatedAnswerExpand="generatedAnswerExpand",e.generatedAnswerCollapse="generatedAnswerCollapse",e.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",e.rephraseGeneratedAnswer="rephraseGeneratedAnswer",e.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2",e.generatedAnswerCitationClick="generatedAnswerCitationClick"})(q||(q={}));var Xu={[q.triggerNotify]:"queryPipelineTriggers",[q.triggerExecute]:"queryPipelineTriggers",[q.triggerQuery]:"queryPipelineTriggers",[q.triggerRedirect]:"queryPipelineTriggers",[q.queryErrorBack]:"errors",[q.queryErrorClear]:"errors",[q.queryErrorRetry]:"errors",[q.pagerNext]:"getMoreResults",[q.pagerPrevious]:"getMoreResults",[q.pagerNumber]:"getMoreResults",[q.pagerResize]:"getMoreResults",[q.pagerScrolling]:"getMoreResults",[q.facetSearch]:"facet",[q.facetShowLess]:"facet",[q.facetShowMore]:"facet",[q.recommendation]:"recommendation",[q.likeSmartSnippet]:"smartSnippet",[q.dislikeSmartSnippet]:"smartSnippet",[q.expandSmartSnippet]:"smartSnippet",[q.collapseSmartSnippet]:"smartSnippet",[q.openSmartSnippetFeedbackModal]:"smartSnippet",[q.closeSmartSnippetFeedbackModal]:"smartSnippet",[q.sendSmartSnippetReason]:"smartSnippet",[q.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[q.clearRecentQueries]:"recentQueries",[q.recentResultClick]:"recentlyClickedDocuments",[q.clearRecentResults]:"recentlyClickedDocuments",[q.showLessFoldedResults]:"folding",[q.caseDetach]:"case",[q.likeGeneratedAnswer]:"generatedAnswer",[q.dislikeGeneratedAnswer]:"generatedAnswer",[q.openGeneratedAnswerSource]:"generatedAnswer",[q.generatedAnswerStreamEnd]:"generatedAnswer",[q.generatedAnswerSourceHover]:"generatedAnswer",[q.generatedAnswerCopyToClipboard]:"generatedAnswer",[q.generatedAnswerHideAnswers]:"generatedAnswer",[q.generatedAnswerShowAnswers]:"generatedAnswer",[q.generatedAnswerExpand]:"generatedAnswer",[q.generatedAnswerCollapse]:"generatedAnswer",[q.generatedAnswerFeedbackSubmit]:"generatedAnswer",[q.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[dt.expandToFullUI]:"interface",[dt.openUserActions]:"User Actions",[dt.showPrecedingSessions]:"User Actions",[dt.showFollowingSessions]:"User Actions",[dt.clickViewedDocument]:"User Actions",[dt.clickPageView]:"User Actions",[dt.createArticle]:"createArticle"},Or=class{constructor(){this.runtime=new Vo,this.currentVisitorId=""}getPayload(){return Promise.resolve()}getParameters(){return Promise.resolve()}makeEvent(t){return Promise.resolve({eventType:t,payload:null,log:()=>Promise.resolve()})}sendEvent(){return Promise.resolve()}makeSearchEvent(){return this.makeEvent(X.search)}sendSearchEvent(){return Promise.resolve()}makeClickEvent(){return this.makeEvent(X.click)}sendClickEvent(){return Promise.resolve()}makeCustomEvent(){return this.makeEvent(X.custom)}sendCustomEvent(){return Promise.resolve()}makeViewEvent(){return this.makeEvent(X.view)}sendViewEvent(){return Promise.resolve()}getVisit(){return Promise.resolve({id:"",visitorId:""})}getHealth(){return Promise.resolve({status:""})}registerBeforeSendEventHook(){}registerAfterSendEventHook(){}addEventTypeMapping(){}get version(){return ol}};function zh(e){let t="";return e.filter(r=>{let n=r!==t;return t=r,n})}function Gh(e){return e.map(t=>t.replace(/;/g,""))}function ll(e){let r=e.join(";");return r.length<=256?r:ll(e.slice(1))}var Zu=e=>{let t=Gh(e),r=zh(t);return ll(r)};function el(e){let t=typeof e.partialQueries=="string"?e.partialQueries:Zu(e.partialQueries),r=typeof e.suggestions=="string"?e.suggestions:Zu(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}var Uo=class{constructor(t,r){this.opts=t,this.provider=r;let n=t.enableAnalytics===!1||Lo();this.coveoAnalyticsClient=n?new Or:new rt(t)}disable(){this.coveoAnalyticsClient=new Or}enable(){this.coveoAnalyticsClient=new rt(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(q.interfaceLoad)}logInterfaceLoad(){return D(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(q.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return D(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(q.recommendation)}logRecommendation(){return D(this,void 0,void 0,function*(){return(yield this.makeRecommendation()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationOpen(t,r){return this.makeClickEvent(q.recommendationOpen,t,r)}logRecommendationOpen(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeRecommendationOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterClearAll(t){return this.makeSearchEvent(q.staticFilterClearAll,t)}logStaticFilterClearAll(t){return D(this,void 0,void 0,function*(){return(yield this.makeStaticFilterClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterSelect(t){return this.makeSearchEvent(q.staticFilterSelect,t)}logStaticFilterSelect(t){return D(this,void 0,void 0,function*(){return(yield this.makeStaticFilterSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterDeselect(t){return this.makeSearchEvent(q.staticFilterDeselect,t)}logStaticFilterDeselect(t){return D(this,void 0,void 0,function*(){return(yield this.makeStaticFilterDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFetchMoreResults(){return this.makeCustomEvent(q.pagerScrolling,{type:"getMoreResults"})}logFetchMoreResults(){return D(this,void 0,void 0,function*(){return(yield this.makeFetchMoreResults()).log({searchUID:this.provider.getSearchUID()})})}makeInterfaceChange(t){return this.makeSearchEvent(q.interfaceChange,t)}logInterfaceChange(t){return D(this,void 0,void 0,function*(){return(yield this.makeInterfaceChange(t)).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanAutomatic(){return this.makeSearchEvent(q.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return D(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(q.didyoumeanClick)}logDidYouMeanClick(){return D(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(t){return this.makeSearchEvent(q.resultsSort,t)}logResultsSort(t){return D(this,void 0,void 0,function*(){return(yield this.makeResultsSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxSubmit(){return this.makeSearchEvent(q.searchboxSubmit)}logSearchboxSubmit(){return D(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(q.searchboxClear)}logSearchboxClear(){return D(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(q.searchboxAsYouType)}logSearchboxAsYouType(){return D(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(t){return this.makeSearchEvent(q.breadcrumbFacet,t)}logBreadcrumbFacet(t){return D(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbFacet(t)).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbResetAll(){return this.makeSearchEvent(q.breadcrumbResetAll)}logBreadcrumbResetAll(){return D(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbResetAll()).log({searchUID:this.provider.getSearchUID()})})}makeDocumentQuickview(t,r){return this.makeClickEvent(q.documentQuickview,t,r)}logDocumentQuickview(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeDocumentQuickview(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeDocumentOpen(t,r){return this.makeClickEvent(q.documentOpen,t,r)}logDocumentOpen(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeDocumentOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxAnalytics(t){return this.makeSearchEvent(q.omniboxAnalytics,el(t))}logOmniboxAnalytics(t){return D(this,void 0,void 0,function*(){return(yield this.makeOmniboxAnalytics(t)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxFromLink(t){return this.makeSearchEvent(q.omniboxFromLink,el(t))}logOmniboxFromLink(t){return D(this,void 0,void 0,function*(){return(yield this.makeOmniboxFromLink(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchFromLink(){return this.makeSearchEvent(q.searchFromLink)}logSearchFromLink(){return D(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(t){return this.makeCustomEvent(q.triggerNotify,t)}logTriggerNotify(t){return D(this,void 0,void 0,function*(){return(yield this.makeTriggerNotify(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerExecute(t){return this.makeCustomEvent(q.triggerExecute,t)}logTriggerExecute(t){return D(this,void 0,void 0,function*(){return(yield this.makeTriggerExecute(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerQuery(){return this.makeCustomEvent(q.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")}logTriggerQuery(){return D(this,void 0,void 0,function*(){return(yield this.makeTriggerQuery()).log({searchUID:this.provider.getSearchUID()})})}makeUndoTriggerQuery(t){return this.makeSearchEvent(q.undoTriggerQuery,t)}logUndoTriggerQuery(t){return D(this,void 0,void 0,function*(){return(yield this.makeUndoTriggerQuery(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerRedirect(t){return this.makeCustomEvent(q.triggerRedirect,Object.assign(Object.assign({},t),{query:this.provider.getSearchEventRequestPayload().queryText}))}logTriggerRedirect(t){return D(this,void 0,void 0,function*(){return(yield this.makeTriggerRedirect(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerResize(t){return this.makeCustomEvent(q.pagerResize,t)}logPagerResize(t){return D(this,void 0,void 0,function*(){return(yield this.makePagerResize(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNumber(t){return this.makeCustomEvent(q.pagerNumber,t)}logPagerNumber(t){return D(this,void 0,void 0,function*(){return(yield this.makePagerNumber(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNext(t){return this.makeCustomEvent(q.pagerNext,t)}logPagerNext(t){return D(this,void 0,void 0,function*(){return(yield this.makePagerNext(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerPrevious(t){return this.makeCustomEvent(q.pagerPrevious,t)}logPagerPrevious(t){return D(this,void 0,void 0,function*(){return(yield this.makePagerPrevious(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerScrolling(){return this.makeCustomEvent(q.pagerScrolling)}logPagerScrolling(){return D(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(t){return this.makeSearchEvent(q.facetClearAll,t)}logFacetClearAll(t){return D(this,void 0,void 0,function*(){return(yield this.makeFacetClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSearch(t){return this.makeSearchEvent(q.facetSearch,t)}logFacetSearch(t){return D(this,void 0,void 0,function*(){return(yield this.makeFacetSearch(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelect(t){return this.makeSearchEvent(q.facetSelect,t)}logFacetSelect(t){return D(this,void 0,void 0,function*(){return(yield this.makeFacetSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetDeselect(t){return this.makeSearchEvent(q.facetDeselect,t)}logFacetDeselect(t){return D(this,void 0,void 0,function*(){return(yield this.makeFacetDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetExclude(t){return this.makeSearchEvent(q.facetExclude,t)}logFacetExclude(t){return D(this,void 0,void 0,function*(){return(yield this.makeFacetExclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUnexclude(t){return this.makeSearchEvent(q.facetUnexclude,t)}logFacetUnexclude(t){return D(this,void 0,void 0,function*(){return(yield this.makeFacetUnexclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelectAll(t){return this.makeSearchEvent(q.facetSelectAll,t)}logFacetSelectAll(t){return D(this,void 0,void 0,function*(){return(yield this.makeFacetSelectAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUpdateSort(t){return this.makeSearchEvent(q.facetUpdateSort,t)}logFacetUpdateSort(t){return D(this,void 0,void 0,function*(){return(yield this.makeFacetUpdateSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowMore(t){return this.makeCustomEvent(q.facetShowMore,t)}logFacetShowMore(t){return D(this,void 0,void 0,function*(){return(yield this.makeFacetShowMore(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowLess(t){return this.makeCustomEvent(q.facetShowLess,t)}logFacetShowLess(t){return D(this,void 0,void 0,function*(){return(yield this.makeFacetShowLess(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryError(t){return this.makeCustomEvent(q.queryError,t)}logQueryError(t){return D(this,void 0,void 0,function*(){return(yield this.makeQueryError(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorBack(){return D(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(q.queryErrorBack);return{description:t.description,log:()=>D(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(q.queryErrorBack)})}})}logQueryErrorBack(){return D(this,void 0,void 0,function*(){return(yield this.makeQueryErrorBack()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorRetry(){return D(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(q.queryErrorRetry);return{description:t.description,log:()=>D(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(q.queryErrorRetry)})}})}logQueryErrorRetry(){return D(this,void 0,void 0,function*(){return(yield this.makeQueryErrorRetry()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorClear(){return D(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(q.queryErrorClear);return{description:t.description,log:()=>D(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(q.queryErrorClear)})}})}logQueryErrorClear(){return D(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(q.likeSmartSnippet)}logLikeSmartSnippet(){return D(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(q.dislikeSmartSnippet)}logDislikeSmartSnippet(){return D(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(q.expandSmartSnippet)}logExpandSmartSnippet(){return D(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(q.collapseSmartSnippet)}logCollapseSmartSnippet(){return D(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(q.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return D(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(q.closeSmartSnippetFeedbackModal)}logCloseSmartSnippetFeedbackModal(){return D(this,void 0,void 0,function*(){return(yield this.makeCloseSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeSmartSnippetFeedbackReason(t,r){return this.makeCustomEvent(q.sendSmartSnippetReason,{reason:t,details:r})}logSmartSnippetFeedbackReason(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeSmartSnippetFeedbackReason(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippetSuggestion(t){return this.makeCustomEvent(q.expandSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logExpandSmartSnippetSuggestion(t){return D(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippetSuggestion(t){return this.makeCustomEvent(q.collapseSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logCollapseSmartSnippetSuggestion(t){return D(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreSmartSnippetSuggestion(t){return this.makeCustomEvent(q.showMoreSmartSnippetSuggestion,t)}logShowMoreSmartSnippetSuggestion(t){return D(this,void 0,void 0,function*(){return(yield this.makeShowMoreSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessSmartSnippetSuggestion(t){return this.makeCustomEvent(q.showLessSmartSnippetSuggestion,t)}logShowLessSmartSnippetSuggestion(t){return D(this,void 0,void 0,function*(){return(yield this.makeShowLessSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSource(t,r){return this.makeClickEvent(q.openSmartSnippetSource,t,r)}logOpenSmartSnippetSource(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionSource(t,r){return this.makeClickEvent(q.openSmartSnippetSuggestionSource,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}makeCopyToClipboard(t,r){return this.makeClickEvent(q.copyToClipboard,t,r)}logCopyToClipboard(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeCopyToClipboard(t,r)).log({searchUID:this.provider.getSearchUID()})})}logOpenSmartSnippetSuggestionSource(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetInlineLink(t,r){return this.makeClickEvent(q.openSmartSnippetInlineLink,t,{contentIDKey:r.contentIDKey,contentIDValue:r.contentIDValue},r)}logOpenSmartSnippetInlineLink(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionInlineLink(t,r){return this.makeClickEvent(q.openSmartSnippetSuggestionInlineLink,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logOpenSmartSnippetSuggestionInlineLink(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeRecentQueryClick(){return this.makeSearchEvent(q.recentQueryClick)}logRecentQueryClick(){return D(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(q.clearRecentQueries)}logClearRecentQueries(){return D(this,void 0,void 0,function*(){return(yield this.makeClearRecentQueries()).log({searchUID:this.provider.getSearchUID()})})}makeRecentResultClick(t,r){return this.makeCustomEvent(q.recentResultClick,{info:t,identifier:r})}logRecentResultClick(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeRecentResultClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentResults(){return this.makeCustomEvent(q.clearRecentResults)}logClearRecentResults(){return D(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(q.noResultsBack)}logNoResultsBack(){return D(this,void 0,void 0,function*(){return(yield this.makeNoResultsBack()).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreFoldedResults(t,r){return this.makeClickEvent(q.showMoreFoldedResults,t,r)}logShowMoreFoldedResults(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeShowMoreFoldedResults(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessFoldedResults(){return this.makeCustomEvent(q.showLessFoldedResults)}logShowLessFoldedResults(){return D(this,void 0,void 0,function*(){return(yield this.makeShowLessFoldedResults()).log({searchUID:this.provider.getSearchUID()})})}makeEventDescription(t,r){var n;return{actionCause:r,customData:(n=t.payload)===null||n===void 0?void 0:n.customData}}makeCustomEvent(t,r){return D(this,arguments,void 0,function*(n,o,i=Xu[n]){this.coveoAnalyticsClient.getParameters;let a=Object.assign(Object.assign({},this.provider.getBaseMetadata()),o),m=Object.assign(Object.assign({},yield this.getBaseEventRequest(a)),{eventType:i,eventValue:n}),f=yield this.coveoAnalyticsClient.makeCustomEvent(m);return{description:this.makeEventDescription(f,n),log:({searchUID:s})=>f.log({lastSearchQueryUid:s})}})}logCustomEvent(t,r){return D(this,arguments,void 0,function*(n,o,i=Xu[n]){return(yield this.makeCustomEvent(n,o,i)).log({searchUID:this.provider.getSearchUID()})})}makeCustomEventWithType(t,r,n){return D(this,void 0,void 0,function*(){let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),n),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:r,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEventWithType(t,r,n){return D(this,void 0,void 0,function*(){return(yield this.makeCustomEventWithType(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}logSearchEvent(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeSearchEvent(t,r){return D(this,void 0,void 0,function*(){let n=yield this.getBaseSearchEventRequest(t,r),o=yield this.coveoAnalyticsClient.makeSearchEvent(n);return{description:this.makeEventDescription(o,t),log:({searchUID:i})=>o.log({searchQueryUid:i})}})}makeClickEvent(t,r,n,o){return D(this,void 0,void 0,function*(){let i=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{queryPipeline:this.provider.getPipeline(),actionCause:t}),a=yield this.coveoAnalyticsClient.makeClickEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({searchQueryUid:m})}})}logClickEvent(t,r,n,o){return D(this,void 0,void 0,function*(){return(yield this.makeClickEvent(t,r,n,o)).log({searchUID:this.provider.getSearchUID()})})}getBaseSearchEventRequest(t,r){return D(this,void 0,void 0,function*(){var n,o;return Object.assign(Object.assign(Object.assign({},yield this.getBaseEventRequest(Object.assign(Object.assign({},r),(o=(n=this.provider).getGeneratedAnswerMetadata)===null||o===void 0?void 0:o.call(n)))),this.provider.getSearchEventRequestPayload()),{queryPipeline:this.provider.getPipeline(),actionCause:t})})}getBaseEventRequest(t){return D(this,void 0,void 0,function*(){let r=Object.assign(Object.assign({},this.provider.getBaseMetadata()),t);return Object.assign(Object.assign(Object.assign({},this.getOrigins()),this.getSplitTestRun()),{customData:r,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous(),clientId:yield this.getClientId()})})}getOrigins(){var t,r;return{originContext:(r=(t=this.provider).getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}}getClientId(){return this.coveoAnalyticsClient instanceof rt?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getSplitTestRun(){let t=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",r=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return Object.assign(Object.assign({},t&&{splitTestRunName:t}),r&&{splitTestRunVersion:r})}makeLikeGeneratedAnswer(t){return this.makeCustomEvent(q.likeGeneratedAnswer,t)}logLikeGeneratedAnswer(t){return D(this,void 0,void 0,function*(){return(yield this.makeLikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeDislikeGeneratedAnswer(t){return this.makeCustomEvent(q.dislikeGeneratedAnswer,t)}logDislikeGeneratedAnswer(t){return D(this,void 0,void 0,function*(){return(yield this.makeDislikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenGeneratedAnswerSource(t){return this.makeCustomEvent(q.openGeneratedAnswerSource,t)}logOpenGeneratedAnswerSource(t){return D(this,void 0,void 0,function*(){return(yield this.makeOpenGeneratedAnswerSource(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCitationClick(t,r){return this.makeClickEvent(q.generatedAnswerCitationClick,Object.assign(Object.assign({},t),{documentPosition:1}),{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logGeneratedAnswerCitationClick(t,r){return D(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCitationClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerSourceHover(t){return this.makeCustomEvent(q.generatedAnswerSourceHover,t)}logGeneratedAnswerSourceHover(t){return D(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerSourceHover(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCopyToClipboard(t){return this.makeCustomEvent(q.generatedAnswerCopyToClipboard,t)}logGeneratedAnswerCopyToClipboard(t){return D(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCopyToClipboard(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerHideAnswers(t){return this.makeCustomEvent(q.generatedAnswerHideAnswers,t)}logGeneratedAnswerHideAnswers(t){return D(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerHideAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerShowAnswers(t){return this.makeCustomEvent(q.generatedAnswerShowAnswers,t)}logGeneratedAnswerShowAnswers(t){return D(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerShowAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerExpand(t){return this.makeCustomEvent(q.generatedAnswerExpand,t)}logGeneratedAnswerExpand(t){return D(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerExpand(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCollapse(t){return this.makeCustomEvent(q.generatedAnswerCollapse,t)}logGeneratedAnswerCollapse(t){return D(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCollapse(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmit(t){return this.makeCustomEvent(q.generatedAnswerFeedbackSubmit,t)}logGeneratedAnswerFeedbackSubmit(t){return D(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmit(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmitV2(t){return this.makeCustomEvent(q.generatedAnswerFeedbackSubmitV2,t)}logGeneratedAnswerFeedbackSubmitV2(t){return D(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmitV2(t)).log({searchUID:this.provider.getSearchUID()})})}makeRephraseGeneratedAnswer(t){return this.makeSearchEvent(q.rephraseGeneratedAnswer,t)}logRephraseGeneratedAnswer(t){return D(this,void 0,void 0,function*(){return(yield this.makeRephraseGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeRetryGeneratedAnswer(){return this.makeSearchEvent(q.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return D(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(t){return this.makeCustomEvent(q.generatedAnswerStreamEnd,t)}logGeneratedAnswerStreamEnd(t){return D(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(t)).log({searchUID:this.provider.getSearchUID()})})}},Qo=Object.assign({},wn),tl=Object.keys(Qo).map(e=>Qo[e]),Pr=class extends _a{constructor({client:t,uuidGenerator:r=Jt}){super({client:t,uuidGenerator:r}),this.ticket={}}getApi(t){let r=super.getApi(t);if(r!==null)return r;switch(t){case"setTicket":return this.setTicket;default:return null}}addHooks(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()}setTicket(t){this.ticket=t}clearPluginData(){this.ticket={}}addHooksForSVCEvents(){this.client.registerBeforeSendEventHook((t,...[r])=>tl.indexOf(t)!==-1?this.addSVCDataToPayload(t,r):r),this.client.registerAfterSendEventHook((t,...[r])=>(tl.indexOf(t)!==-1&&this.updateLocationInformation(t,r),r))}addHooksForPageView(){this.client.addEventTypeMapping(Qo.pageview,{newEventType:X.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addHooksForEvent(){this.client.addEventTypeMapping(Qo.event,{newEventType:X.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addSVCDataToPayload(t,r){var n;let o=Object.assign(Object.assign(Object.assign(Object.assign({},this.getLocationInformation(t,r)),this.getDefaultContextInformation(t)),this.action?{svcAction:this.action}:{}),Object.keys((n=this.actionData)!==null&&n!==void 0?n:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),Object.assign(Object.assign(Object.assign({},i),o),r)}getTicketPayload(){return Zy(this.ticket)}};Pr.Id="svc";var Bo;(function(e){e.click="click",e.flowStart="flowStart"})(Bo||(Bo={}));var $e;(function(e){e.enterInterface="ticket_create_start",e.fieldUpdate="ticket_field_update",e.fieldSuggestionClick="ticket_classification_click",e.documentSuggestionClick="documentSuggestionClick",e.documentSuggestionQuickview="documentSuggestionQuickview",e.suggestionRate="suggestion_rate",e.nextCaseStep="ticket_next_stage",e.caseCancelled="ticket_cancel",e.caseSolved="ticket_cancel",e.caseCreated="ticket_create"})($e||($e={}));var $o;(function(e){e.quit="Quit",e.solved="Solved"})($o||($o={}));var Ho=class{constructor(t,r){var n;this.options=t,this.provider=r;let o=((n=t.enableAnalytics)!==null&&n!==void 0?n:!0)&&!Lo();this.coveoAnalyticsClient=o?new rt(t):new Or,this.svc=new Pr({client:this.coveoAnalyticsClient})}disable(){this.coveoAnalyticsClient=new Or,this.svc=new Pr({client:this.coveoAnalyticsClient})}enable(){this.coveoAnalyticsClient=new rt(this.options),this.svc=new Pr({client:this.coveoAnalyticsClient})}logEnterInterface(t){return this.svc.setAction($e.enterInterface),this.svc.setTicket(t.ticket),this.sendFlowStartEvent()}logUpdateCaseField(t){return this.svc.setAction($e.fieldUpdate,{fieldName:t.fieldName}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectFieldSuggestion(t){return this.svc.setAction($e.fieldSuggestionClick,t.suggestion),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectDocumentSuggestion(t){return this.logClickEvent($e.documentSuggestionClick,t.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:t.suggestion.permanentId})}logQuickviewDocumentSuggestion(t){return this.logClickEvent($e.documentSuggestionQuickview,t.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:t.suggestion.permanentId})}logRateDocumentSuggestion(t){return this.svc.setAction($e.suggestionRate,Object.assign({rate:t.rating},t.suggestion)),this.svc.setTicket(t.ticket),this.sendClickEvent()}logMoveToNextCaseStep(t){return this.svc.setAction($e.nextCaseStep,{stage:t?.stage}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCancelled(t){return this.svc.setAction($e.caseCancelled,{reason:$o.quit}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseSolved(t){return this.svc.setAction($e.caseSolved,{reason:$o.solved}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCreated(t){return this.svc.setAction($e.caseCreated),this.svc.setTicket(t.ticket),this.sendClickEvent()}sendFlowStartEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",Bo.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}sendClickEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",Bo.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}getBaseEventRequest(t){return D(this,void 0,void 0,function*(){var r,n;let o=Object.assign({},t);return Object.assign(Object.assign({},this.getOrigins()),{customData:o,language:(r=this.provider)===null||r===void 0?void 0:r.getLanguage(),anonymous:(n=this.provider)===null||n===void 0?void 0:n.getIsAnonymous(),clientId:yield this.getClientId()})})}getClientId(){return this.coveoAnalyticsClient instanceof rt?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getOrigins(){var t,r,n,o,i;return{originContext:(r=(t=this.provider)===null||t===void 0?void 0:t.getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:(n=this.provider)===null||n===void 0?void 0:n.getOriginLevel1(),originLevel2:(o=this.provider)===null||o===void 0?void 0:o.getOriginLevel2(),originLevel3:(i=this.provider)===null||i===void 0?void 0:i.getOriginLevel3()}}logClickEvent(t,r,n,o){return D(this,void 0,void 0,function*(){var i,a;let m=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{searchQueryUid:(a=(i=this.provider)===null||i===void 0?void 0:i.getSearchUID())!==null&&a!==void 0?a:"",actionCause:t});return this.coveoAnalyticsClient.sendClickEvent(m)})}};var dl=e=>new rt(e).getCurrentVisitorId(),En=(e,t)=>typeof t=="function"?(...r)=>{let n=cn(r[0]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics preprocessRequest. Returning original request."),n}}:void 0,In=(e,t)=>(...r)=>{let n=cn(r[1]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics hook. Returning original request."),n}};p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();function zo(){return{desiredCount:5,numberOfValues:8,set:{}}}p();u();d();l();p();u();d();l();p();u();d();l();function pl(e){let{activeValue:t,ancestryMap:r}=Wh(e);return t?Yh(t,r):[]}function Wh(e){let t=[...e],r=new Map;for(;t.length>0;){let n=t.shift();if(n.state==="selected")return{activeValue:n,ancestryMap:r};if(r)for(let o of n.children)r.set(o,n);t.unshift(...n.children)}return{}}function Yh(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}var Kh=(e,t)=>e.categoryFacetSet[t]?.request;var Ja=(e,t)=>{let r=Kh(e,t);return pl(r?.currentValues??[])};p();u();d();l();function Go(){return{}}p();u();d();l();function Wo(){return{}}p();u();d();l();function Yo(){return{}}p();u();d();l();function Ko(){return{}}function Xa(e){return{facetSet:e.facetSet??Ko(),categoryFacetSet:e.categoryFacetSet??Go(),dateFacetSet:e.dateFacetSet??Wo(),numericFacetSet:e.numericFacetSet??Yo(),automaticFacetSet:e.automaticFacetSet??zo()}}var Za=e=>{let t=[];return Zh(e).forEach((r,n)=>{let o=sS(e,r.facetId),i=iS(r,n+1);if(Xh(r)){if(!!!Ja(e,r.facetId).length)return;t.push({...i,...nS(e,r.facetId),facetType:o,state:"selected"});return}r.currentValues.forEach((a,m)=>{if(a.state==="idle")return;let f=fl(a,m+1,o),s=Jh(r)?ml(a):tS(a);t.push({...i,...f,...s})})}),eS(e).forEach((r,n)=>{let o=oS(r,n+1);r.values.forEach((i,a)=>{if(i.state==="idle")return;let m=fl(i,a+1,"specific"),f=ml(i);t.push({...o,...m,...f})})}),t},Jh=e=>e.type==="specific",Xh=e=>e.type==="hierarchical",Zh=e=>[...Object.values(e.facetSet),...Object.values(e.categoryFacetSet),...Object.values(e.dateFacetSet),...Object.values(e.numericFacetSet)].map(t=>t.request),eS=e=>[...Object.values(e.automaticFacetSet.set)].map(t=>t.response),fl=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),tS=e=>({displayValue:`${e.start}..${e.end}`,value:`${e.start}..${e.end}`,start:e.start,end:e.end,endInclusive:e.endInclusive}),ml=e=>({displayValue:e.value,value:e.value}),rS=(e,t)=>Ja(e,t).map(n=>n.value).join(";"),nS=(e,t)=>{let n=rS(e,t);return{value:n,valuePosition:1,displayValue:n}},oS=(e,t)=>({title:gl(e.field,e.field),field:e.field,id:e.field,facetPosition:t}),iS=(e,t)=>({title:gl(e.field,e.facetId),field:e.field,id:e.facetId,facetPosition:t}),gl=(e,t)=>`${e}_${t}`,aS=(e,t)=>e.facetSet[t]?.request||e.categoryFacetSet[t]?.request||e.dateFacetSet[t]?.request||e.numericFacetSet[t]?.request||e.automaticFacetSet.set[t]?.response,sS=(e,t)=>{let r=aS(e,t);return r?r.type:"specific"};p();u();d();l();var Xt=e=>{if(cS(e))return e.generatedAnswer?.answerId;if(uS(e))return e.search?.response?.extendedResults?.generativeQuestionAnsweringId},cS=e=>"answer"in e&&"generatedAnswer"in e&&!H(e.generatedAnswer?.answerConfigurationId),uS=e=>"search"in e&&e.search!==void 0&&typeof e.search=="object",yl=e=>e.generatedAnswer?.fieldsToIncludeInCitations,lS=de(e=>e.generatedAnswer?.citations,(e,t)=>t,(e,t)=>e?.find(r=>r.id===t));p();u();d();l();var je=()=>({q:"",enableQuerySyntax:!1});p();u();d();l();p();u();d();l();var hl=(r=>(r.Ascending="ascending",r.Descending="descending",r))(hl||{}),Sl=(i=>(i.Relevancy="relevancy",i.QRE="qre",i.Date="date",i.Field="field",i.NoSort="nosort",i))(Sl||{}),es=e=>{if(Fc(e))return e.map(t=>es(t)).join(",");switch(e.by){case"relevancy":case"qre":case"nosort":return e.by;case"date":return`date ${e.order}`;case"field":return`@${e.field} ${e.order}`;default:return""}},vl=()=>({by:"relevancy"});var Vk=new Q({values:{by:new ea({enum:Sl,required:!0}),order:new ea({enum:hl}),field:new V}});function Jo(){return es(vl())}p();u();d();l();p();u();d();l();var Tr=()=>"default";var dS=e=>{let t=e.configuration.search.locale.split("-")[0];return!t||t.length!==2?"en":t},pt=class{constructor(t){this.getState=t;oe(this,"state");this.state=t()}getLanguage(){return dS(this.state)}getBaseMetadata(){let{context:t,configuration:r}=this.state,n=t?.contextValues||{},o={};for(let[i,a]of Object.entries(n)){let m=`context_${i}`;o[m]=a}return r.analytics.analyticsMode==="legacy"&&(o.coveoHeadlessVersion=Sr),o}getOriginContext(){return this.state.configuration.analytics.originContext}getOriginLevel1(){return this.state.searchHub||Tr()}getOriginLevel2(){return this.state.configuration.analytics.originLevel2}getOriginLevel3(){return this.state.configuration.analytics.originLevel3}getIsAnonymous(){return this.state.configuration.analytics.anonymous}};var Fn=class Fn extends pt{constructor(){super(...arguments);oe(this,"getFacetRequest",r=>this.state.facetSet?.[r]?.request||this.state.categoryFacetSet?.[r]?.request||this.state.dateFacetSet?.[r]?.request||this.state.numericFacetSet?.[r]?.request||this.state.automaticFacetSet?.set[r]?.response)}getFacetState(){return Za(Xa(this.getState()))}getPipeline(){return this.state.pipeline||this.state.search?.response.pipeline||Fn.fallbackPipelineName}getSearchEventRequestPayload(){return{queryText:this.queryText,responseTime:this.responseTime,results:this.resultURIs,numberOfResults:this.numberOfResults}}getSearchUID(){let r=this.getState();return r.search?.searchResponseId||r.search?.response.searchUid||Je().response.searchUid}getSplitTestRunName(){return this.state.search?.response.splitTestRun}getSplitTestRunVersion(){let r=!!this.getSplitTestRunName(),n=this.state.search?.response.pipeline||this.state.pipeline||Fn.fallbackPipelineName;return r?n:void 0}getBaseMetadata(){let r=this.getState(),n=super.getBaseMetadata(),o=Xt(r);return o&&(n.generativeQuestionAnsweringId=o),n}getFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetValue:n,facetTitle:`${i}_${r}`}}getFacetClearAllMetadata(r){let o=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:o,facetTitle:`${o}_${r}`}}getFacetUpdateSortMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,criteria:n,facetTitle:`${i}_${r}`}}getRangeBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetRangeEnd:n.end,facetRangeEndInclusive:n.endInclusive,facetRangeStart:n.start,facetTitle:`${i}_${r}`}}getResultSortMetadata(){return{...this.getBaseMetadata(),resultsSortBy:this.state.sortCriteria??Jo()}}getStaticFilterToggleMetadata(r,n){return{...this.getBaseMetadata(),staticFilterId:r,staticFilterValue:n}}getStaticFilterClearAllMetadata(r){return{...this.getBaseMetadata(),staticFilterId:r}}getUndoTriggerQueryMetadata(r){return{...this.getBaseMetadata(),undoneQuery:r}}getCategoryBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),categoryFacetId:r,categoryFacetField:i,categoryFacetPath:n,categoryFacetTitle:`${i}_${r}`}}getOmniboxAnalyticsMetadata(r,n){let o=this.state.querySuggest?.[r],i=o.completions.map(s=>s.expression),a=o.partialQueries.length-1,m=o.partialQueries[a]||"",f=o.responseId;return{...this.getBaseMetadata(),suggestionRanking:i.indexOf(n),partialQuery:m,partialQueries:o.partialQueries.length>0?o.partialQueries:"",suggestions:i.length>0?i:"",querySuggestResponseId:f}}getInterfaceChangeMetadata(){return{...this.getBaseMetadata(),interfaceChangeTo:this.state.configuration.analytics.originLevel2}}getOmniboxFromLinkMetadata(r){return{...this.getBaseMetadata(),...r}}getGeneratedAnswerMetadata(){let r=this.getState(),n={};return r.generatedAnswer?.isVisible!==void 0&&(n.showGeneratedAnswer=r.generatedAnswer.isVisible),n}get resultURIs(){return this.results?.map(r=>({documentUri:r.uri,documentUriHash:r.raw.urihash}))}get results(){return this.state.search?.response.results}get queryText(){return this.state.query?.q||je().q}get responseTime(){return this.state.search?.duration||Je().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||Je().response.totalCountFiltered}};oe(Fn,"fallbackPipelineName","default");var wt=Fn,Al=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Ie(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,s=i.configuration.analytics.enabled,g=new Uo({token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:En(e,n),beforeSendHooks:[In(e,r),(h,S)=>(e.info({...S,type:h,endpoint:m,token:a},"Analytics request"),S)]},o);return s||g.disable(),g},ts=()=>{let t=Be.getInstance().getHistory().reverse().find(r=>r.name==="PageView"&&r.value);return t?t.value:""};var Xo=/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(e,t){let r=e.analyticsMode==="next";return{analytics:{clientId:yield dl(e),clientTimestamp:new Date().toISOString(),documentReferrer:e.originLevel3,originContext:e.originContext,...(t&&{actionCause:t.actionCause,customData:t.customData}),...(t&&!r&&{customData:t.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.documentLocation&&{documentLocation:e.documentLocation}),...(e.deviceId&&{deviceId:e.deviceId}),...(ts()&&{pageId:ts()}),...(r&&e.trackingId&&{trackingId:e.trackingId}),capture:r,...(r&&{source:Ir(e)})}}});return function Xo(_x0,_x1){return _ref8.apply(this,arguments)}}();p();u();d();l();p();u();d();l();p();u();d();l();var Dr=()=>({duration:0,error:null,isLoading:!1,id:"Recommendation",recommendations:[],searchUid:"",splitTestRun:"",pipeline:""});var Pn=class extends pt{getPipeline(){return this.state.pipeline||this.state.recommendation?.pipeline||"default"}getSearchEventRequestPayload(){return{queryText:je().q,responseTime:this.responseTime,results:this.mapResultsToAnalyticsDocument(),numberOfResults:this.numberOfResults}}getSearchUID(){return this.getState().recommendation?.searchUid||Dr().searchUid}getSplitTestRunName(){return this.state.recommendation?.splitTestRun}getSplitTestRunVersion(){let t=!!this.getSplitTestRunName(),r=this.state.recommendation?.pipeline||this.state.pipeline||"default";return t?r:void 0}get responseTime(){return this.state.recommendation?.duration||Dr().duration}mapResultsToAnalyticsDocument(){return this.state.recommendation?.recommendations.map(t=>({documentUri:t.uri,documentUriHash:t.raw.urihash}))}get numberOfResults(){return this.state.recommendation?.recommendations.length||Dr().recommendations.length}};p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();var Cl=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function pS(e){return typeof e=="string"&&Cl.test(e)}var rs=pS;p();u();d();l();var Ce=[];for(let e=0;e<256;++e)Ce.push((e+256).toString(16).slice(1));function bl(e,t=0){return(Ce[e[t+0]]+Ce[e[t+1]]+Ce[e[t+2]]+Ce[e[t+3]]+"-"+Ce[e[t+4]]+Ce[e[t+5]]+"-"+Ce[e[t+6]]+Ce[e[t+7]]+"-"+Ce[e[t+8]]+Ce[e[t+9]]+"-"+Ce[e[t+10]]+Ce[e[t+11]]+Ce[e[t+12]]+Ce[e[t+13]]+Ce[e[t+14]]+Ce[e[t+15]]).toLowerCase()}p();u();d();l();var ns,fS=new Uint8Array(16);function os(){if(!ns){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ns=crypto.getRandomValues.bind(crypto)}return ns(fS)}p();u();d();l();p();u();d();l();var mS=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),is={randomUUID:mS};function gS(e,t,r){if(is.randomUUID&&!t&&!e)return is.randomUUID();e=e||{};let n=e.random??e.rng?.()??os();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return bl(n)}var as=gS;p();u();d();l();function wl(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function yS({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:i,mode:a}=e;a!=="disabled"&&(n.call(r),t.send(o,i,r))}var xl="visitorId";function hS(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(xl),o=n&&rs(n)?n:t.generateUUID();return r.setItem(xl,o),o}}}var Pl="1.2.7",ss=128,kl=192,Rl=224,El=240,SS=248;function vS(e){return(e&SS)===El?4:(e&El)===Rl?3:(e&Rl)===kl?2:1}function AS(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&ss)!=ss)break;if(r-=3,(n&kl)!=ss){t-r>=vS(n)*3&&(r=t);break}}return e.substring(0,r)}function CS(e){let{trackingId:t}=e;return{trackingId:t}}function bS(e){return(e.source||[]).concat([`relay@${Pl}`])}function Ol(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,m=CS(t),f=n.getClientId();return Object.freeze({type:e,config:m,ts:Date.now(),source:bS(t),clientId:f,userAgent:a(),referrer:Il(o()),location:Il(i())})}function Il(e){return e!==null?AS(e,1024):null}function wS(e,t,r,n,o){return{...t,meta:Ol(e,r,n,o)}}var xS="*";function RS(){let e=[];function t({type:f,callback:s}){return e.findIndex(g=>g.type===f&&g.callback===s)}function r(f,s){return f.type==="*"||s===f.type}function n(f){return t(f)<0&&e.push(f),()=>m(f.type,f.callback)}function o(f){e.forEach(s=>{if(r(s,f.meta.type))try{s.callback(f)}catch(g){console.error(g)}})}function i(f){if(f===xS)e.length=0;else for(let s=e.length-1;s>=0;s--)e[s].type===f&&e.splice(s,1)}function a(f){let s=t(f);s>=0&&e.splice(s,1)}function m(f,s){s?a({type:f,callback:s}):i(f)}return{add:n,call:o,remove:m}}function Fl({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...(!!n.mode&&{mode:n.mode}),...(!!n.source&&{source:n.source}),...(!!n.environment&&{environment:n.environment})})}function ES(e){let t=Fl(e);return{get:()=>t,update:r=>{t=Fl({...t,...r})}}}var cs=IS();function IS(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let i of o){let a=i.replace(/^\s+/,"");if(a.lastIndexOf(n,0)===0)return a.substring(n.length,a.length)}return null},setItem(r,n,o){let i=t(window.location.hostname),a=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,m=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${a}${m};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function FS(){return{getItem(e){return cs.getItem(e)||localStorage.getItem(e)},removeItem(e){cs.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),cs.setItem(e,t,31556952e3)}}}function PS(){let e=document.referrer;return e===""?null:e}function us(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(wl().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>PS(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>as(),storage:FS()}}function kS(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function OS(){return{getItem(){return null},removeItem(){},setItem(){}}}function TS(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:OS()}}function DS(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=TS();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&qS()&&kS()?us():n}function qS(){try{return typeof window=="object"}catch{return!1}}function MS(e){return{get:()=>Object.freeze(DS(e))}}function Tl(e){let t=ES(e),r=RS(),n=MS(t),o=hS(n);return{emit:(i,a)=>{let m=t.get(),f=n.get(),s=wS(i,a,m,f,o);return yS({config:m,environment:f,event:s,listenerManager:r})},getMeta:i=>Ol(i,t.get(),n.get(),o),on:(i,a)=>r.add({type:i,callback:a}),off:(i,a)=>r.remove(i,a),updateConfig:i=>t.update(i),version:Pl}}p();u();d();l();function Dl(){return typeof window<"u"&&typeof document<"u"}var kn=de(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Ir(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a,m)=>{let f=jS(m);return Tl({mode:i?"emit":"disabled",url:o??to(e,t),token:r,trackingId:n??null,source:a,environment:f})}),NS={generateUUID:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:()=>{},storage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{}}},jS=e=>{if(!e)return;let t=e();return{...(Dl()?us():NS),generateUUID:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};p();u();d();l();var On=class extends pt{getSearchUID(){return this.state.documentSuggestion?.status.lastResponseId??""}},ql=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new On(t)})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Ie(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,s=i.configuration.analytics.enabled,g=new Ho({enableAnalytics:s,token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:En(e,n),beforeSendHooks:[In(e,r),(h,S)=>(e.info({...S,type:h,endpoint:m,token:a},"Analytics request"),S)]},o);return s||g.disable(),g};p();u();d();l();p();u();d();l();function Ml(e,t){return{...new wt(t).getBaseMetadata(),actionCause:e,type:e}}function _S(e){return Object.assign(e,{instantlyCallable:!0})}function VS(e,t){let r=i=>_S(re(e,i)),n=r(/*#__PURE__*/function(){var _ref9=_asyncToGenerator(function*(i,{getState:a,extra:m}){let{analyticsClientMiddleware:f,preprocessRequest:s,logger:g}=m;return yield(yield t({getState:a,analyticsClientMiddleware:f,preprocessRequest:s,logger:g})).log({state:a(),extra:m})});return function(_x10,_x11){return _ref9.apply(this,arguments)}}());return Object.assign(n,{prepare:function(){var _ref0=_asyncToGenerator(function*({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f}){let{description:s,log:g}=yield t({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f});return{description:s,action:r(/*#__PURE__*/function(){var _ref1=_asyncToGenerator(function*(h,{getState:S,extra:y}){return yield g({state:S(),extra:y})});return function(_x13,_x14){return _ref1.apply(this,arguments)}}())}});return function prepare(_x12){return _ref0.apply(this,arguments)}}()}),n}var Nl=(e,t,r)=>{function n(...o){let i=o.length===1?{...o[0],__legacy__getBuilder:t(o[0].__legacy__getBuilder),analyticsConfigurator:e,providerClass:r}:{prefix:o[0],__legacy__getBuilder:t(o[1]),__legacy__provider:o[2],analyticsConfigurator:e,providerClass:r};return QS(i)}return n},LS=e=>e.configuration.analytics.analyticsMode==="legacy",US=e=>e.configuration.analytics.analyticsMode==="next",QS=({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:o,analyticsConfigurator:i,providerClass:a})=>(r??(r=m=>new a(m)),VS(e,/*#__PURE__*/function(){var _ref10=_asyncToGenerator(function*({getState:m,analyticsClientMiddleware:f,preprocessRequest:s,logger:g}){let h=[],S={log:function(){var _ref11=_asyncToGenerator(function*({state:x}){for(let I of h)yield I(x)});return function log(_x16){return _ref11.apply(this,arguments)}}()},y=m(),b=i({getState:m,logger:g,analyticsClientMiddleware:f,preprocessRequest:s,provider:r(m)}),R=yield t(b,m());S.description=R?.description,h.push(/*#__PURE__*/function(){var _ref12=_asyncToGenerator(function*(x){LS(x)&&(yield BS(R,r,x,g,b.coveoAnalyticsClient))});return function(_x17){return _ref12.apply(this,arguments)}}());let{emit:F}=kn(y);return h.push(/*#__PURE__*/function(){var _ref13=_asyncToGenerator(function*(x){if(US(x)&&o&&n){let I=n(x);yield KS(F,o,I)}});return function(_x18){return _ref13.apply(this,arguments)}}()),S});return function(_x15){return _ref10.apply(this,arguments)}}()));function BS(_x19,_x20,_x21,_x22,_x23){return _BS.apply(this,arguments)}function _BS(){_BS=_asyncToGenerator(function*(e,t,r,n,o){t(()=>r);let i=yield e?.log({searchUID:t(()=>r).getSearchUID()});n.info({client:o,response:i},"Analytics response")});return _BS.apply(this,arguments)}var $S=e=>r=>(n,o)=>Promise.resolve({description:{actionCause:e},log:function(){var _ref14=_asyncToGenerator(function*(i){r(n,o)});return function log(_x24){return _ref14.apply(this,arguments)}}()}),Fe=Nl(e=>Al({...e,provider:e.provider||new wt(e.getState)}),e=>e,wt),YD=Nl(ql,$S("caseAssist"),On);var ls=(e,t)=>{let r=t.recommendation?.recommendations.findIndex(({uniqueId:n})=>e.uniqueId===n)||0;return HS(e,r,t)};function HS(e,t,r){let n=e.raw.collection;return{collectionName:typeof n=="string"?n:"default",documentAuthor:WS(e),documentPosition:t+1,documentTitle:e.title,documentUri:e.uri,documentUriHash:e.raw.urihash,documentUrl:e.clickUri,rankingModifier:e.rankingModifier||"",sourceName:YS(e),queryPipeline:r.pipeline||wr()}}var Zo=e=>(e.raw.permanentid||console.warn("Missing field permanentid on result. This might cause many issues with your Coveo deployment. See https://docs.coveo.com/en/1913 and https://docs.coveo.com/en/1640 for more information.",e),{contentIDKey:"permanentid",contentIDValue:e.raw.permanentid||""}),jl={urihash:new V,sourcetype:new V,permanentid:new V},_l={uniqueId:U,raw:new Q({values:jl}),title:U,uri:U,clickUri:U,rankingModifier:new V({required:!1,emptyAllowed:!0})};function zS(e){return Object.assign({},...Object.keys(jl).map(t=>({[t]:e[t]})))}function GS(e){return Object.assign({},...Object.keys(_l).map(t=>({[t]:e[t]})),{raw:zS(e.raw)})}function WS(e){let t=e.raw.author;return H(t)?"unknown":Array.isArray(t)?t.join(";"):`${t}`}function YS(e){let t=e.raw.source;return H(t)?"unknown":t}var ds=e=>new ke(_l).validate(GS(e));function KS(_x25,_x26,_x27){return _KS.apply(this,arguments)}function _KS(){_KS=_asyncToGenerator(function*(e,t,r){yield e(t,r)});return _KS.apply(this,arguments)}p();u();d();l();var Vl=()=>Fe("analytics/recommendation/update",e=>e.makeRecommendationInterfaceLoad(),e=>new Pn(e)),Ll=()=>({actionCause:"recommendationInterfaceLoad"}),ti=e=>Fe({prefix:"analytics/recommendation/open",__legacy__getBuilder:(t,r)=>(ds(e),t.makeRecommendationOpen(ls(e,r),Zo(e))),__legacy__provider:t=>new Pn(t),analyticsType:"itemClick",analyticsPayloadBuilder:t=>{let r=ls(e,t),n=Zo(e);return{responseId:e.searchUid??"",position:r.documentPosition,itemMetadata:{uniqueFieldName:n.contentIDKey,uniqueFieldValue:n.contentIDValue,title:r.documentTitle,author:r.documentAuthor,url:r.documentUrl}}}});var qr=T("recommendation/set",e=>N(e,{id:U})),xt=re("recommendation/get",/*#__PURE__*/function(){var _ref15=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n}}){let o=t(),i=Date.now(),a=yield JS(o),m=yield n.recommendations(a),f=Date.now()-i;return Oe(m)?r(m.error):{recommendations:m.success.results,analyticsAction:Vl(),duration:f,searchUid:m.success.searchUid,splitTestRun:m.success.splitTestRun,pipeline:m.success.pipeline}});return function(_x28,_x29){return _ref15.apply(this,arguments)}}()),JS=/*#__PURE__*/function(){var _ref16=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??yt(e.configuration.organizationId,e.configuration.environment),recommendation:e.recommendation.id,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,locale:e.configuration.search.locale,actionsHistory:e.configuration.analytics.enabled?Be.getInstance().getHistory():[],...(e.advancedSearchQueries&&{aq:e.advancedSearchQueries.aq,cq:e.advancedSearchQueries.cq}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.context&&{context:e.context.contextValues}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.configuration.analytics.enabled&&(yield XS(e,Ll()))),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}),...(e.pagination&&{numberOfResults:e.pagination.numberOfResults})}});return function JS(_x30){return _ref16.apply(this,arguments)}}(),XS=/*#__PURE__*/function(){var _ref17=_asyncToGenerator(function*(e,t){let r=e.configuration.analytics.analyticsMode==="legacy"?void 0:{actionCause:t.actionCause,type:t.actionCause};return yield Xo(e.configuration.analytics,r)});return function XS(_x31,_x32){return _ref17.apply(this,arguments)}}();var Mr=le(Dr(),e=>{e.addCase(qr,(t,r)=>{t.id=r.payload.id}).addCase(xt.rejected,(t,r)=>{t.error=r.payload?r.payload:null,t.isLoading=!1}).addCase(xt.fulfilled,(t,r)=>{t.error=null,t.recommendations=r.payload.recommendations.map(n=>({...n,searchUid:r.payload.searchUid})),t.duration=r.payload.duration,t.isLoading=!1,t.searchUid=r.payload.searchUid,t.splitTestRun=r.payload.splitTestRun,t.pipeline=r.payload.pipeline}).addCase(xt.pending,t=>{t.isLoading=!0}).addCase(Po,(t,r)=>{t.error=r.payload,t.isLoading=!1})});p();u();d();l();var Nr=T("searchHub/set",e=>N(e,new V({required:!0,emptyAllowed:!0})));p();u();d();l();var jr=le(Tr(),e=>{e.addCase(Nr,(t,r)=>r.payload).addCase(qe.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(et,(t,r)=>r.payload.searchHub||t)});p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();function Ul(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var Ql=Xe;function ed(e,t){if(e===t||!(Ql(e)&&Ql(t)||Array.isArray(e)&&Array.isArray(t)))return t;let r=Object.keys(t),n=Object.keys(e),o=r.length===n.length,i=Array.isArray(t)?[]:{};for(let a of r)i[a]=ed(e[a],t[a]),o&&(o=e[a]===i[a]);return o?e:i}function _r(e){let t=0;for(let r in e)t++;return t}var Bl=e=>[].concat(...e);function ZS(e){return new RegExp("(^|:)//").test(e)}function ev(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function oi(e){return e!=null}function tv(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var rv=e=>e.replace(/\/$/,""),nv=e=>e.replace(/^\//,"");function ov(e,t){if(!e)return t;if(!t)return e;if(ZS(t))return t;let r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=rv(e),t=nv(t),`${e}${r}${t}`}function iv(e,t,r){return e.has(t)?e.get(t):e.set(t,r).get(t)}var $l=(...e)=>v(...e),av=e=>e.status>=200&&e.status<=299,sv=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Hl(e){if(!Xe(e))return e;let t={...e};for(let[r,n]of Object.entries(t))n===void 0&&delete t[r];return t}function td({baseUrl:e,prepareHeaders:t=h=>h,fetchFn:r=$l,paramsSerializer:n,isJsonContentType:o=sv,jsonContentType:i="application/json",jsonReplacer:a,timeout:m,responseHandler:f,validateStatus:s,...g}={}){return typeof v>"u"&&r===$l&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),(/*#__PURE__*/function(){var _ref18=_asyncToGenerator(function*(S,y,b){let{getState:R,extra:F,endpoint:x,forced:I,type:w}=y,E,{url:M,headers:k=new C(g.headers),params:P=void 0,responseHandler:O=f??"json",validateStatus:j=s??av,timeout:_=m,...L}=typeof S=="string"?{url:S}:S,B,z=y.signal;_&&(B=new c.AbortController,y.signal.addEventListener("abort",B.abort),z=B.signal);let W={...g,signal:z,...L};k=new C(Hl(k)),W.headers=(yield t(k,{getState:R,arg:S,extra:F,endpoint:x,forced:I,type:w,extraOptions:b}))||k;let G=ee=>typeof ee=="object"&&(Xe(ee)||Array.isArray(ee)||typeof ee.toJSON=="function");if(!W.headers.has("content-type")&&G(W.body)&&W.headers.set("content-type",i),G(W.body)&&o(W.headers)&&(W.body=JSON.stringify(W.body,a)),P){let ee=~M.indexOf("?")?"&":"?",ie=n?n(P):new URLSearchParams(Hl(P));M+=ee+ie}M=ov(e,M);let Y=new Request(M,W);E={request:new Request(M,W)};let Z,fe=!1,we=B&&setTimeout(()=>{fe=!0,B.abort()},_);try{Z=yield r(Y)}catch(ee){return{error:{status:fe?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(ee)},meta:E}}finally{we&&clearTimeout(we),B?.signal.removeEventListener("abort",B.abort)}let Me=Z.clone();E.response=Me;let ue,se="";try{let ee;if(yield Promise.all([h(Z,O).then(ie=>ue=ie,ie=>ee=ie),Me.text().then(ie=>se=ie,()=>{})]),ee)throw ee}catch(ee){return{error:{status:"PARSING_ERROR",originalStatus:Z.status,data:se,error:String(ee)},meta:E}}return j(Z,ue)?{data:ue,meta:E}:{error:{status:Z.status,data:ue},meta:E}});return function(_x33,_x34,_x35){return _ref18.apply(this,arguments)}}());function h(_x36,_x37){return _h2.apply(this,arguments)}function _h2(){_h2=_asyncToGenerator(function*(S,y){if(typeof y=="function")return y(S);if(y==="content-type"&&(y=o(S.headers)?"json":"text"),y==="json"){let b=yield S.text();return b.length?JSON.parse(b):null}return S.text()});return _h2.apply(this,arguments)}}var Vr=class{constructor(e,t=void 0){this.value=e,this.meta=t}};function cv(){return _cv.apply(this,arguments)}function _cv(){_cv=_asyncToGenerator(function*(e=0,t=5){let r=Math.min(e,t),n=~~((Math.random()+.4)*(300<<r));yield new Promise(o=>setTimeout(i=>o(i),n))});return _cv.apply(this,arguments)}function uv(e,t){throw Object.assign(new Vr({error:e,meta:t}),{throwImmediately:!0})}var zl={},lv=(e,t)=>(/*#__PURE__*/function(){var _ref19=_asyncToGenerator(function*(r,n,o){let i=[5,(t||zl).maxRetries,(o||zl).maxRetries].filter(g=>g!==void 0),[a]=i.slice(-1),f={maxRetries:a,backoff:cv,retryCondition:(g,h,{attempt:S})=>S<=a,...t,...o},s=0;for(;;)try{let g=yield e(r,n,o);if(g.error)throw new Vr(g);return g}catch(g){if(s++,g.throwImmediately){if(g instanceof Vr)return g.value;throw g}if(g instanceof Vr&&!f.retryCondition(g.value.error,r,{attempt:s,baseQueryApi:n,extraOptions:o}))return g.value;yield f.backoff(s,f.maxRetries)}});return function(_x38,_x39,_x40){return _ref19.apply(this,arguments)}}()),rd=Object.assign(lv,{fail:uv}),gs=T("__rtkq/focused"),nd=T("__rtkq/unfocused"),ys=T("__rtkq/online"),od=T("__rtkq/offline");function hs(e){return e.type==="query"}function dv(e){return e.type==="mutation"}function Ss(e){return e.type==="infinitequery"}function vs(e,t,r,n,o,i){return pv(e)?e(t,r,n,o).filter(oi).map(ps).map(i):Array.isArray(e)?e.map(ps).map(i):[]}function pv(e){return typeof e=="function"}function ps(e){return typeof e=="string"?{type:e}:e}function fv(e,t){return e.catch(t)}var qn=Symbol("forceQueryFn"),fs=e=>typeof e[qn]=="function";function mv({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:r,mutationThunk:n,api:o,context:i}){let a=new Map,m=new Map,{unsubscribeQueryResult:f,removeMutationResult:s,updateSubscriptionOptions:g}=o.internalActions;return{buildInitiateQuery:x,buildInitiateInfiniteQuery:I,buildInitiateMutation:w,getRunningQueryThunk:h,getRunningMutationThunk:S,getRunningQueriesThunk:y,getRunningMutationsThunk:b};function h(E,M){return k=>{let P=i.endpointDefinitions[E],O=e({queryArgs:M,endpointDefinition:P,endpointName:E});return a.get(k)?.[O]}}function S(E,M){return k=>m.get(k)?.[M]}function y(){return E=>Object.values(a.get(E)||{}).filter(oi)}function b(){return E=>Object.values(m.get(E)||{}).filter(oi)}function R(E){}function F(E,M){let k=(P,{subscribe:O=!0,forceRefetch:j,subscriptionOptions:_,[qn]:L,...B}={})=>(z,W)=>{let G=e({queryArgs:P,endpointDefinition:M,endpointName:E}),Y,te={...B,type:"query",subscribe:O,forceRefetch:j,subscriptionOptions:_,endpointName:E,originalArgs:P,queryCacheKey:G,[qn]:L};if(hs(M))Y=t(te);else{let{direction:pe,initialPageParam:en}=B;Y=r({...te,direction:pe,initialPageParam:en})}let Z=o.endpoints[E].select(P),fe=z(Y),we=Z(W());let{requestId:Me,abort:ue}=fe,se=we.requestId!==Me,ee=a.get(z)?.[G],ie=()=>Z(W()),Pe=Object.assign(L?fe.then(ie):se&&!ee?Promise.resolve(we):Promise.all([ee,fe]).then(ie),{arg:P,requestId:Me,subscriptionOptions:_,queryCacheKey:G,abort:ue,unwrap(){return _asyncToGenerator(function*(){let pe=yield Pe;if(pe.isError)throw pe.error;return pe.data})()},refetch:()=>z(k(P,{subscribe:!1,forceRefetch:!0})),unsubscribe(){O&&z(f({queryCacheKey:G,requestId:Me}))},updateSubscriptionOptions(pe){Pe.subscriptionOptions=pe,z(g({endpointName:E,requestId:Me,queryCacheKey:G,options:pe}))}});if(!ee&&!se&&!L){let pe=iv(a,z,{});pe[G]=Pe,Pe.then(()=>{delete pe[G],_r(pe)||a.delete(z)})}return Pe};return k}function x(E,M){return F(E,M)}function I(E,M){return F(E,M)}function w(E){return(M,{track:k=!0,fixedCacheKey:P}={})=>(O,j)=>{let _=n({type:"mutation",endpointName:E,originalArgs:M,track:k,fixedCacheKey:P}),L=O(_);let{requestId:B,abort:z,unwrap:W}=L,G=fv(L.unwrap().then(fe=>({data:fe})),fe=>({error:fe})),Y=()=>{O(s({requestId:B,fixedCacheKey:P}))},te=Object.assign(G,{arg:L.arg,requestId:B,abort:z,unwrap:W,reset:Y}),Z=m.get(O)||{};return m.set(O,Z),Z[B]=te,te.then(()=>{delete Z[B],_r(Z)||m.delete(O)}),P&&(Z[P]=te,te.then(()=>{Z[P]===te&&(delete Z[P],_r(Z)||m.delete(O))})),te}}}function gv(e){return e}var ri=(e={})=>({...e,[An]:!0});function yv({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:o,assertTagType:i,selectors:a}){let m=(O,j,_,L)=>(B,z)=>{let W=r[O],G=n({queryArgs:j,endpointDefinition:W,endpointName:O});if(B(o.internalActions.queryResultPatched({queryCacheKey:G,patches:_})),!L)return;let Y=o.endpoints[O].select(j)(z()),te=vs(W.providesTags,Y.data,void 0,j,{},i);B(o.internalActions.updateProvidedBy({queryCacheKey:G,providedTags:te}))};function f(O,j,_=0){let L=[j,...O];return _&&L.length>_?L.slice(0,-1):L}function s(O,j,_=0){let L=[...O,j];return _&&L.length>_?L.slice(1):L}let g=(O,j,_,L=!0)=>(B,z)=>{let G=o.endpoints[O].select(j)(z()),Y={patches:[],inversePatches:[],undo:()=>B(o.util.patchQueryData(O,j,Y.inversePatches,L))};if(G.status==="uninitialized")return Y;let te;if("data"in G)if(De(G.data)){let[Z,fe,we]=go(G.data,_);Y.patches.push(...fe),Y.inversePatches.push(...we),te=Z}else te=_(G.data),Y.patches.push({op:"replace",path:[],value:te}),Y.inversePatches.push({op:"replace",path:[],value:G.data});return Y.patches.length===0||B(o.util.patchQueryData(O,j,Y.patches,L)),Y},h=(O,j,_)=>L=>L(o.endpoints[O].initiate(j,{subscribe:!1,forceRefetch:!0,[qn]:()=>({data:_})})),S=(O,j)=>O.query&&O[j]?O[j]:gv,y=/*#__PURE__*/function(){var _ref20=_asyncToGenerator(function*(O,{signal:j,abort:_,rejectWithValue:L,fulfillWithValue:B,dispatch:z,getState:W,extra:G}){let Y=r[O.endpointName];try{let te=S(Y,"transformResponse"),Z={signal:j,abort:_,dispatch:z,getState:W,extra:G,endpoint:O.endpointName,type:O.type,forced:O.type==="query"?b(O,W()):void 0,queryCacheKey:O.type==="query"?O.queryCacheKey:void 0},fe=O.type==="query"?O[qn]:void 0,we,Me=/*#__PURE__*/function(){var _ref21=_asyncToGenerator(function*(se,ee,ie,Pe){if(ee==null&&se.pages.length)return Promise.resolve({data:se});let pe={queryArg:O.originalArgs,pageParam:ee},en=yield ue(pe),gt=Pe?f:s;return{data:{pages:gt(se.pages,en.data,ie),pageParams:gt(se.pageParams,ee,ie)}}});return function Me(_x43,_x44,_x45,_x46){return _ref21.apply(this,arguments)}}();function ue(_x47){return _ue.apply(this,arguments)}function _ue(){_ue=_asyncToGenerator(function*(se){let ee,{extraOptions:ie}=Y;if(fe?ee=fe():Y.query?ee=yield t(Y.query(se),Z,ie):ee=yield Y.queryFn(se,Z,ie,pe=>t(pe,Z,ie)),typeof process<"u",ee.error)throw new Vr(ee.error,ee.meta);let Pe=yield te(ee.data,ee.meta,se);return{...ee,data:Pe}});return _ue.apply(this,arguments)}if(O.type==="query"&&"infiniteQueryOptions"in Y){let{infiniteQueryOptions:se}=Y,{maxPages:ee=1/0}=se,ie,Pe={pages:[],pageParams:[]},pe=a.selectQueryEntry(W(),O.queryCacheKey)?.data,gt=b(O,W())&&!O.direction||!pe?Pe:pe;if("direction"in O&&O.direction&>.pages.length){let Gn=O.direction==="backward",Hi=(Gn?id:ms)(se,gt);ie=yield Me(gt,Hi,ee,Gn)}else{let{initialPageParam:Gn=se.initialPageParam}=O,$i=pe?.pageParams??[],Hi=$i[0]??Gn,em=$i.length;ie=yield Me(gt,Hi,ee),fe&&(ie={data:ie.data.pages[0]});for(let ac=1;ac<em;ac++){let tm=ms(se,ie.data);ie=yield Me(ie.data,tm,ee)}}we=ie}else we=yield ue(O.originalArgs);return B(we.data,ri({fulfilledTimeStamp:Date.now(),baseQueryMeta:we.meta}))}catch(te){let Z=te;if(Z instanceof Vr){let fe=S(Y,"transformErrorResponse");try{return L(yield fe(Z.value,Z.meta,O.originalArgs),ri({baseQueryMeta:Z.meta}))}catch(we){Z=we}}throw typeof process<"u",console.error(Z),Z}});return function y(_x41,_x42){return _ref20.apply(this,arguments)}}();function b(O,j){let _=a.selectQueryEntry(j,O.queryCacheKey),L=a.selectConfig(j).refetchOnMountOrArgChange,B=_?.fulfilledTimeStamp,z=O.forceRefetch??(O.subscribe&&L);return z?z===!0||(Number(new Date)-Number(B))/1e3>=z:!1}let R=()=>re(`${e}/executeQuery`,y,{getPendingMeta({arg:j}){let _=r[j.endpointName];return ri({startedTimeStamp:Date.now(),...(Ss(_)?{direction:j.direction}:{})})},condition(j,{getState:_}){let L=_(),B=a.selectQueryEntry(L,j.queryCacheKey),z=B?.fulfilledTimeStamp,W=j.originalArgs,G=B?.originalArgs,Y=r[j.endpointName],te=j.direction;return fs(j)?!0:B?.status==="pending"?!1:b(j,L)||hs(Y)&&Y?.forceRefetch?.({currentArg:W,previousArg:G,endpointState:B,state:L})?!0:!(z&&!te)},dispatchConditionRejection:!0}),F=R(),x=R(),I=re(`${e}/executeMutation`,y,{getPendingMeta(){return ri({startedTimeStamp:Date.now()})}}),w=O=>"force"in O,E=O=>"ifOlderThan"in O,M=(O,j,_)=>(L,B)=>{let z=w(_)&&_.force,W=E(_)&&_.ifOlderThan,G=(te=!0)=>{let Z={forceRefetch:te,isPrefetch:!0};return o.endpoints[O].initiate(j,Z)},Y=o.endpoints[O].select(j)(B());if(z)L(G());else if(W){let te=Y?.fulfilledTimeStamp;if(!te){L(G());return}(Number(new Date)-Number(new Date(te)))/1e3>=W&&L(G())}else L(G(!1))};function k(O){return j=>j?.meta?.arg?.endpointName===O}function P(O,j){return{matchPending:yr(vo(O),k(j)),matchFulfilled:yr(ct(O),k(j)),matchRejected:yr(Wt(O),k(j))}}return{queryThunk:F,mutationThunk:I,infiniteQueryThunk:x,prefetch:M,updateQueryData:g,upsertQueryData:h,patchQueryData:m,buildMatchThunkActions:P}}function ms(e,{pages:t,pageParams:r}){let n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function id(e,{pages:t,pageParams:r}){return e.getPreviousPageParam?.(t[0],t,r[0],r)}function ad(e,t,r,n){return vs(r[e.meta.arg.endpointName][t],ct(e)?e.payload:void 0,bn(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function ni(e,t,r){let n=e[t];n&&r(n)}function Mn(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function Gl(e,t,r){let n=e[Mn(t)];n&&r(n)}var Tn={};function hv({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:m},assertTagType:f,config:s}){let g=T(`${e}/resetApiState`);function h(k,P,O,j){var _;k[_=P.queryCacheKey]??(k[_]={status:"uninitialized",endpointName:P.endpointName}),ni(k,P.queryCacheKey,L=>{L.status="pending",L.requestId=O&&L.requestId?L.requestId:j.requestId,P.originalArgs!==void 0&&(L.originalArgs=P.originalArgs),L.startedTimeStamp=j.startedTimeStamp;let B=o[j.arg.endpointName];Ss(B)&&"direction"in P&&(L.direction=P.direction)})}function S(k,P,O,j){ni(k,P.arg.queryCacheKey,_=>{if(_.requestId!==P.requestId&&!j)return;let{merge:L}=o[P.arg.endpointName];if(_.status="fulfilled",L){if(_.data!==void 0){let{fulfilledTimeStamp:B,arg:z,baseQueryMeta:W,requestId:G}=P,Y=st(_.data,te=>L(te,O,{arg:z.originalArgs,baseQueryMeta:W,fulfilledTimeStamp:B,requestId:G}));_.data=Y}else _.data=O;}else _.data=o[P.arg.endpointName].structuralSharing??!0?ed(Ne(_.data)?wa(_.data):_.data,O):O;delete _.error,_.fulfilledTimeStamp=P.fulfilledTimeStamp})}let y=Yt({name:`${e}/queries`,initialState:Tn,reducers:{removeQueryResult:{reducer(k,{payload:{queryCacheKey:P}}){delete k[P]},prepare:hr()},cacheEntriesUpserted:{reducer(k,P){for(let O of P.payload){let{queryDescription:j,value:_}=O;h(k,j,!0,{arg:j,requestId:P.meta.requestId,startedTimeStamp:P.meta.timestamp}),S(k,{arg:j,requestId:P.meta.requestId,fulfilledTimeStamp:P.meta.timestamp,baseQueryMeta:{}},_,!0)}},prepare:k=>({payload:k.map(j=>{let{endpointName:_,arg:L,value:B}=j,z=o[_];return{queryDescription:{type:"query",endpointName:_,originalArgs:j.arg,queryCacheKey:n({queryArgs:L,endpointDefinition:z,endpointName:_})},value:B}}),meta:{[An]:!0,requestId:Co(),timestamp:Date.now()}})},queryResultPatched:{reducer(k,{payload:{queryCacheKey:P,patches:O}}){ni(k,P,j=>{j.data=Ra(j.data,O.concat())})},prepare:hr()}},extraReducers(k){k.addCase(t.pending,(P,{meta:O,meta:{arg:j}})=>{let _=fs(j);h(P,j,_,O)}).addCase(t.fulfilled,(P,{meta:O,payload:j})=>{let _=fs(O.arg);S(P,O,j,_)}).addCase(t.rejected,(P,{meta:{condition:O,arg:j,requestId:_},error:L,payload:B})=>{ni(P,j.queryCacheKey,z=>{if(!O){if(z.requestId!==_)return;z.status="rejected",z.error=B??L}})}).addMatcher(m,(P,O)=>{let{queries:j}=a(O);for(let[_,L]of Object.entries(j))(L?.status==="fulfilled"||L?.status==="rejected")&&(P[_]=L)})}}),b=Yt({name:`${e}/mutations`,initialState:Tn,reducers:{removeMutationResult:{reducer(k,{payload:P}){let O=Mn(P);O in k&&delete k[O]},prepare:hr()}},extraReducers(k){k.addCase(r.pending,(P,{meta:O,meta:{requestId:j,arg:_,startedTimeStamp:L}})=>{_.track&&(P[Mn(O)]={requestId:j,status:"pending",endpointName:_.endpointName,startedTimeStamp:L})}).addCase(r.fulfilled,(P,{payload:O,meta:j})=>{j.arg.track&&Gl(P,j,_=>{_.requestId===j.requestId&&(_.status="fulfilled",_.data=O,_.fulfilledTimeStamp=j.fulfilledTimeStamp)})}).addCase(r.rejected,(P,{payload:O,error:j,meta:_})=>{_.arg.track&&Gl(P,_,L=>{L.requestId===_.requestId&&(L.status="rejected",L.error=O??j)})}).addMatcher(m,(P,O)=>{let{mutations:j}=a(O);for(let[_,L]of Object.entries(j))(L?.status==="fulfilled"||L?.status==="rejected")&&_!==L?.requestId&&(P[_]=L)})}}),R=Yt({name:`${e}/invalidation`,initialState:Tn,reducers:{updateProvidedBy:{reducer(k,P){var _,L;let{queryCacheKey:O,providedTags:j}=P.payload;for(let B of Object.values(k))for(let z of Object.values(B)){let W=z.indexOf(O);W!==-1&&z.splice(W,1)}for(let{type:B,id:z}of j){let W=(_=k[B]??(k[B]={}))[L=z||"__internal_without_id"]??(_[L]=[]);W.includes(O)||W.push(O)}},prepare:hr()}},extraReducers(k){k.addCase(y.actions.removeQueryResult,(P,{payload:{queryCacheKey:O}})=>{for(let j of Object.values(P))for(let _ of Object.values(j)){let L=_.indexOf(O);L!==-1&&_.splice(L,1)}}).addMatcher(m,(P,O)=>{var _,L;let{provided:j}=a(O);for(let[B,z]of Object.entries(j))for(let[W,G]of Object.entries(z)){let Y=(_=P[B]??(P[B]={}))[L=W||"__internal_without_id"]??(_[L]=[]);for(let te of G)Y.includes(te)||Y.push(te)}}).addMatcher(Ze(ct(t),bn(t)),(P,O)=>{let j=ad(O,"providesTags",o,f),{queryCacheKey:_}=O.meta.arg;R.caseReducers.updateProvidedBy(P,R.actions.updateProvidedBy({queryCacheKey:_,providedTags:j}))})}}),F=Yt({name:`${e}/subscriptions`,initialState:Tn,reducers:{updateSubscriptionOptions(k,P){},unsubscribeQueryResult(k,P){},internal_getRTKQSubscriptions(){}}}),x=Yt({name:`${e}/internalSubscriptions`,initialState:Tn,reducers:{subscriptionsUpdated:{reducer(k,P){return Ra(k,P.payload)},prepare:hr()}}}),I=Yt({name:`${e}/config`,initialState:{online:tv(),focused:ev(),middlewareRegistered:!1,...s},reducers:{middlewareRegistered(k,{payload:P}){k.middlewareRegistered=k.middlewareRegistered==="conflict"||i!==P?"conflict":!0}},extraReducers:k=>{k.addCase(ys,P=>{P.online=!0}).addCase(od,P=>{P.online=!1}).addCase(gs,P=>{P.focused=!0}).addCase(nd,P=>{P.focused=!1}).addMatcher(m,P=>({...P}))}}),w=pr({queries:y.reducer,mutations:b.reducer,provided:R.reducer,subscriptions:x.reducer,config:I.reducer}),E=(k,P)=>w(g.match(P)?void 0:k,P),M={...I.actions,...y.actions,...F.actions,...x.actions,...b.actions,...R.actions,resetApiState:g};return{reducer:E,actions:M}}var Dn=Symbol.for("RTKQ/skipToken"),sd={status:"uninitialized"},Wl=st(sd,()=>{}),Yl=st(sd,()=>{});function Sv({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=w=>Wl,o=w=>Yl;return{buildQuerySelector:S,buildInfiniteQuerySelector:y,buildMutationSelector:b,selectInvalidatedBy:R,selectCachedArgsForQuery:F,selectApiState:a,selectQueries:m,selectMutations:s,selectQueryEntry:f,selectConfig:g};function i(w){return{...w,...Ul(w.status)}}function a(w){return w[t]}function m(w){return a(w)?.queries}function f(w,E){return m(w)?.[E]}function s(w){return a(w)?.mutations}function g(w){return a(w)?.config}function h(w,E,M){return k=>{if(k===Dn)return r(n,M);let P=e({queryArgs:k,endpointDefinition:E,endpointName:w});return r(j=>f(j,P)??Wl,M)}}function S(w,E){return h(w,E,i)}function y(w,E){let{infiniteQueryOptions:M}=E;function k(P){let O={...P,...Ul(P.status)},{isLoading:j,isError:_,direction:L}=O,B=L==="forward",z=L==="backward";return{...O,hasNextPage:x(M,O.data),hasPreviousPage:I(M,O.data),isFetchingNextPage:j&&B,isFetchingPreviousPage:j&&z,isFetchNextPageError:_&&B,isFetchPreviousPageError:_&&z}}return h(w,E,k)}function b(){return w=>{let E;return typeof w=="object"?E=Mn(w)??Dn:E=w,r(E===Dn?o:P=>a(P)?.mutations?.[E]??Yl,i)}}function R(w,E){let M=w[t],k=new Set;for(let P of E.filter(oi).map(ps)){let O=M.provided[P.type];if(!O)continue;let j=(P.id!==void 0?O[P.id]:Bl(Object.values(O)))??[];for(let _ of j)k.add(_)}return Bl(Array.from(k.values()).map(P=>{let O=M.queries[P];return O?[{queryCacheKey:P,endpointName:O.endpointName,originalArgs:O.originalArgs}]:[]}))}function F(w,E){return Object.values(m(w)).filter(M=>M?.endpointName===E&&M.status!=="uninitialized").map(M=>M.originalArgs)}function x(w,E){return E?ms(w,E)!=null:!1}function I(w,E){return!E||!w.getPreviousPageParam?!1:id(w,E)!=null}}var Kl=WeakMap?new WeakMap:void 0,Jl=({endpointName:e,queryArgs:t})=>{let r="",n=Kl?.get(t);if(typeof n=="string")r=n;else{let o=JSON.stringify(t,(i,a)=>(a=typeof a=="bigint"?{$bigint:a.toString()}:a,a=Xe(a)?Object.keys(a).sort().reduce((m,f)=>(m[f]=a[f],m),{}):a,a));Xe(t)&&Kl?.set(t,o),r=o}return`${e}(${r})`};function vv(...e){return function(r){let n=gr(s=>r.extractRehydrationInfo?.(s,{reducerPath:r.reducerPath??"api"})),o={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:n,serializeQueryArgs(s){let g=Jl;if("serializeQueryArgs"in s.endpointDefinition){let h=s.endpointDefinition.serializeQueryArgs;g=S=>{let y=h(S);return typeof y=="string"?y:Jl({...S,queryArgs:y})}}else r.serializeQueryArgs&&(g=r.serializeQueryArgs);return g(s)},tagTypes:[...(r.tagTypes||[])]},i={endpointDefinitions:{},batch(s){s()},apiUid:Co(),extractRehydrationInfo:n,hasRehydrationInfo:gr(s=>n(s)!=null)},a={injectEndpoints:f,enhanceEndpoints({addTagTypes:s,endpoints:g}){if(s)for(let h of s)o.tagTypes.includes(h)||o.tagTypes.push(h);if(g)for(let[h,S]of Object.entries(g))typeof S=="function"?S(i.endpointDefinitions[h]):Object.assign(i.endpointDefinitions[h]||{},S);return a}},m=e.map(s=>s.init(a,o,i));function f(s){let g=s.endpoints({query:h=>({...h,type:"query"}),mutation:h=>({...h,type:"mutation"}),infiniteQuery:h=>({...h,type:"infinitequery"})});for(let[h,S]of Object.entries(g)){if(s.overrideExisting!==!0&&h in i.endpointDefinitions){if(s.overrideExisting==="throw")throw new Error(Ge(39));typeof process<"u";continue}typeof process<"u",i.endpointDefinitions[h]=S;for(let y of m)y.injectEndpoint(h,S)}return a}return a.injectEndpoints({endpoints:r.endpoints})}}function ft(e,...t){return Object.assign(e,...t)}var Av=({api:e,queryThunk:t,internalState:r})=>{let n=`${e.reducerPath}/subscriptions`,o=null,i=null,{updateSubscriptionOptions:a,unsubscribeQueryResult:m}=e.internalActions,f=(y,b)=>{var F,x;if(a.match(b)){let{queryCacheKey:I,requestId:w,options:E}=b.payload;return y?.[I]?.[w]&&(y[I][w]=E),!0}if(m.match(b)){let{queryCacheKey:I,requestId:w}=b.payload;return y[I]&&delete y[I][w],!0}if(e.internalActions.removeQueryResult.match(b))return delete y[b.payload.queryCacheKey],!0;if(t.pending.match(b)){let{meta:{arg:I,requestId:w}}=b,E=y[F=I.queryCacheKey]??(y[F]={});return E[`${w}_running`]={},I.subscribe&&(E[w]=I.subscriptionOptions??E[w]??{}),!0}let R=!1;if(t.fulfilled.match(b)||t.rejected.match(b)){let I=y[b.meta.arg.queryCacheKey]||{},w=`${b.meta.requestId}_running`;R||(R=!!I[w]),delete I[w]}if(t.rejected.match(b)){let{meta:{condition:I,arg:w,requestId:E}}=b;if(I&&w.subscribe){let M=y[x=w.queryCacheKey]??(y[x]={});M[E]=w.subscriptionOptions??M[E]??{},R=!0}}return R},s=()=>r.currentSubscriptions,S={getSubscriptions:s,getSubscriptionCount:y=>{let R=s()[y]??{};return _r(R)},isRequestSubscribed:(y,b)=>!!s()?.[y]?.[b]};return(y,b)=>{if(o||(o=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(y))return o=r.currentSubscriptions={},i=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(y))return[!1,S];let R=f(r.currentSubscriptions,y),F=!0;if(R){i||(i=setTimeout(()=>{let w=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,E]=go(o,()=>w);b.next(e.internalActions.subscriptionsUpdated(E)),o=w,i=null},500));let x=typeof y.type=="string"&&!!y.type.startsWith(n),I=t.rejected.match(y)&&y.meta.condition&&!!y.meta.arg.subscribe;F=!x&&!I}return[F,!1]}};function Cv(e){for(let t in e)return!1;return!0}var bv=2147483647/1e3-1,wv=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:o,selectors:{selectQueryEntry:i,selectConfig:a}})=>{let{removeQueryResult:m,unsubscribeQueryResult:f,cacheEntriesUpserted:s}=t.internalActions,g=Ze(f.match,r.fulfilled,r.rejected,s.match);function h(F){let x=o.currentSubscriptions[F];return!!x&&!Cv(x)}let S={},y=(F,x,I)=>{let w=x.getState(),E=a(w);if(g(F)){let M;if(s.match(F))M=F.payload.map(k=>k.queryDescription.queryCacheKey);else{let{queryCacheKey:k}=f.match(F)?F.payload:F.meta.arg;M=[k]}b(M,x,E)}if(t.util.resetApiState.match(F))for(let[M,k]of Object.entries(S))k&&clearTimeout(k),delete S[M];if(n.hasRehydrationInfo(F)){let{queries:M}=n.extractRehydrationInfo(F);b(Object.keys(M),x,E)}};function b(F,x,I){let w=x.getState();for(let E of F){let M=i(w,E);R(E,M?.endpointName,x,I)}}function R(F,x,I,w){let M=n.endpointDefinitions[x]?.keepUnusedDataFor??w.keepUnusedDataFor;if(M===1/0)return;let k=Math.max(0,Math.min(M,bv));if(!h(F)){let P=S[F];P&&clearTimeout(P),S[F]=setTimeout(()=>{h(F)||I.dispatch(m({queryCacheKey:F})),delete S[F]},k*1e3)}}return y},Xl=new Error("Promise never resolved before cacheEntryRemoved."),xv=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:o,internalState:i,selectors:{selectQueryEntry:a,selectApiState:m}})=>{let f=Ao(n),s=Ao(o),g=ct(n,o),h={};function S(x,I,w){let E=h[x];E?.valueResolved&&(E.valueResolved({data:I,meta:w}),delete E.valueResolved)}function y(x){let I=h[x];I&&(delete h[x],I.cacheEntryRemoved())}let b=(x,I,w)=>{let E=R(x);function M(k,P,O,j){let _=a(w,P),L=a(I.getState(),P);!_&&L&&F(k,j,P,I,O)}if(n.pending.match(x))M(x.meta.arg.endpointName,E,x.meta.requestId,x.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(x))for(let{queryDescription:k,value:P}of x.payload){let{endpointName:O,originalArgs:j,queryCacheKey:_}=k;M(O,_,x.meta.requestId,j),S(_,P,{})}else if(o.pending.match(x))I.getState()[t].mutations[E]&&F(x.meta.arg.endpointName,x.meta.arg.originalArgs,E,I,x.meta.requestId);else if(g(x))S(E,x.payload,x.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(x)||e.internalActions.removeMutationResult.match(x))y(E);else if(e.util.resetApiState.match(x))for(let k of Object.keys(h))y(k)};function R(x){return f(x)?x.meta.arg.queryCacheKey:s(x)?x.meta.arg.fixedCacheKey??x.meta.requestId:e.internalActions.removeQueryResult.match(x)?x.payload.queryCacheKey:e.internalActions.removeMutationResult.match(x)?Mn(x.payload):""}function F(x,I,w,E,M){let k=r.endpointDefinitions[x],P=k?.onCacheEntryAdded;if(!P)return;let O={},j=new Promise(G=>{O.cacheEntryRemoved=G}),_=Promise.race([new Promise(G=>{O.valueResolved=G}),j.then(()=>{throw Xl})]);_.catch(()=>{}),h[w]=O;let L=e.endpoints[x].select(k.type==="query"?I:w),B=E.dispatch((G,Y,te)=>te),z={...E,getCacheEntry:()=>L(E.getState()),requestId:M,extra:B,updateCachedData:k.type==="query"?G=>E.dispatch(e.util.updateQueryData(x,I,G)):void 0,cacheDataLoaded:_,cacheEntryRemoved:j},W=P(I,z);Promise.resolve(W).catch(G=>{if(G!==Xl)throw G})}return b},Rv=({api:e,context:{apiUid:t},reducerPath:r})=>(n,o)=>{e.util.resetApiState.match(n)&&o.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},Ev=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:o,api:i,assertTagType:a,refetchQuery:m,internalState:f})=>{let{removeQueryResult:s}=i.internalActions,g=Ze(ct(n),bn(n)),h=Ze(ct(n,o),Wt(n,o)),S=[],y=(F,x)=>{g(F)?R(ad(F,"invalidatesTags",r,a),x):h(F)?R([],x):i.util.invalidateTags.match(F)&&R(vs(F.payload,void 0,void 0,void 0,void 0,a),x)};function b(F){let{queries:x,mutations:I}=F;for(let w of[x,I])for(let E in w)if(w[E]?.status==="pending")return!0;return!1}function R(F,x){let I=x.getState(),w=I[e];if(S.push(...F),w.config.invalidationBehavior==="delayed"&&b(w))return;let E=S;if(S=[],E.length===0)return;let M=i.util.selectInvalidatedBy(I,E);t.batch(()=>{let k=Array.from(M.values());for(let{queryCacheKey:P}of k){let O=w.queries[P],j=f.currentSubscriptions[P]??{};O&&(_r(j)===0?x.dispatch(s({queryCacheKey:P})):O.status!=="uninitialized"&&x.dispatch(m(O)))}})}return y},Iv=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:o})=>{let i={},a=(y,b)=>{(r.internalActions.updateSubscriptionOptions.match(y)||r.internalActions.unsubscribeQueryResult.match(y))&&s(y.payload,b),(t.pending.match(y)||t.rejected.match(y)&&y.meta.condition)&&s(y.meta.arg,b),(t.fulfilled.match(y)||t.rejected.match(y)&&!y.meta.condition)&&f(y.meta.arg,b),r.util.resetApiState.match(y)&&h()};function m(y,b){let F=b.getState()[e].queries[y],x=o.currentSubscriptions[y];if(!(!F||F.status==="uninitialized"))return x}function f({queryCacheKey:y},b){let R=b.getState()[e],F=R.queries[y],x=o.currentSubscriptions[y];if(!F||F.status==="uninitialized")return;let{lowestPollingInterval:I,skipPollingIfUnfocused:w}=S(x);if(!Number.isFinite(I))return;let E=i[y];E?.timeout&&(clearTimeout(E.timeout),E.timeout=void 0);let M=Date.now()+I;i[y]={nextPollTimestamp:M,pollingInterval:I,timeout:setTimeout(()=>{(R.config.focused||!w)&&b.dispatch(n(F)),f({queryCacheKey:y},b)},I)}}function s({queryCacheKey:y},b){let F=b.getState()[e].queries[y],x=o.currentSubscriptions[y];if(!F||F.status==="uninitialized")return;let{lowestPollingInterval:I}=S(x);if(!Number.isFinite(I)){g(y);return}let w=i[y],E=Date.now()+I;(!w||E<w.nextPollTimestamp)&&f({queryCacheKey:y},b)}function g(y){let b=i[y];b?.timeout&&clearTimeout(b.timeout),delete i[y]}function h(){for(let y of Object.keys(i))g(y)}function S(y={}){let b=!1,R=Number.POSITIVE_INFINITY;for(let F in y)y[F].pollingInterval&&(R=Math.min(y[F].pollingInterval,R),b=y[F].skipPollingIfUnfocused||b);return{lowestPollingInterval:R,skipPollingIfUnfocused:b}}return a},Fv=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let o=vo(r,n),i=Wt(r,n),a=ct(r,n),m={};return(s,g)=>{if(o(s)){let{requestId:h,arg:{endpointName:S,originalArgs:y}}=s.meta,b=t.endpointDefinitions[S],R=b?.onQueryStarted;if(R){let F={},x=new Promise((M,k)=>{F.resolve=M,F.reject=k});x.catch(()=>{}),m[h]=F;let I=e.endpoints[S].select(b.type==="query"?y:h),w=g.dispatch((M,k,P)=>P),E={...g,getCacheEntry:()=>I(g.getState()),requestId:h,extra:w,updateCachedData:b.type==="query"?M=>g.dispatch(e.util.updateQueryData(S,y,M)):void 0,queryFulfilled:x};R(y,E)}}else if(a(s)){let{requestId:h,baseQueryMeta:S}=s.meta;m[h]?.resolve({data:s.payload,meta:S}),delete m[h]}else if(i(s)){let{requestId:h,rejectedWithValue:S,baseQueryMeta:y}=s.meta;m[h]?.reject({error:s.payload??s.error,isUnhandledError:!S,meta:y}),delete m[h]}}},Pv=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:o})=>{let{removeQueryResult:i}=r.internalActions,a=(f,s)=>{gs.match(f)&&m(s,"refetchOnFocus"),ys.match(f)&&m(s,"refetchOnReconnect")};function m(f,s){let g=f.getState()[e],h=g.queries,S=o.currentSubscriptions;t.batch(()=>{for(let y of Object.keys(S)){let b=h[y],R=S[y];if(!R||!b)continue;(Object.values(R).some(x=>x[s]===!0)||Object.values(R).every(x=>x[s]===void 0)&&g.config[s])&&(_r(R)===0?f.dispatch(i({queryCacheKey:y})):b.status!=="uninitialized"&&f.dispatch(n(b)))}})}return a};function kv(e){let{reducerPath:t,queryThunk:r,api:n,context:o}=e,{apiUid:i}=o,a={invalidateTags:T(`${t}/invalidateTags`)},m=h=>h.type.startsWith(`${t}/`),f=[Rv,wv,Ev,Iv,xv,Fv];return{middleware:h=>{let S=!1,b={...e,internalState:{currentSubscriptions:{}},refetchQuery:g,isThisApiSliceAction:m},R=f.map(I=>I(b)),F=Av(b),x=Pv(b);return I=>w=>{if(!co(w))return I(w);S||(S=!0,h.dispatch(n.internalActions.middlewareRegistered(i)));let E={...h,next:I},M=h.getState(),[k,P]=F(w,E,M),O;if(k?O=I(w):O=P,h.getState()[t]&&(x(w,E,M),m(w)||o.hasRehydrationInfo(w)))for(let j of R)j(w,E,M);return O}},actions:a};function g(h){return e.api.endpoints[h.endpointName].initiate(h.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Zl=Symbol(),Ov=({createSelector:e=de}={})=>({name:Zl,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:m,refetchOnFocus:f,refetchOnReconnect:s,invalidationBehavior:g},h){uu();let S=ue=>(typeof process<"u",ue);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:ys,onOffline:od,onFocus:gs,onFocusLost:nd},util:{}});let y=Sv({serializeQueryArgs:i,reducerPath:o,createSelector:e}),{selectInvalidatedBy:b,selectCachedArgsForQuery:R,buildQuerySelector:F,buildInfiniteQuerySelector:x,buildMutationSelector:I}=y;ft(t.util,{selectInvalidatedBy:b,selectCachedArgsForQuery:R});let{queryThunk:w,infiniteQueryThunk:E,mutationThunk:M,patchQueryData:k,updateQueryData:P,upsertQueryData:O,prefetch:j,buildMatchThunkActions:_}=yv({baseQuery:r,reducerPath:o,context:h,api:t,serializeQueryArgs:i,assertTagType:S,selectors:y}),{reducer:L,actions:B}=hv({context:h,queryThunk:w,infiniteQueryThunk:E,mutationThunk:M,serializeQueryArgs:i,reducerPath:o,assertTagType:S,config:{refetchOnFocus:f,refetchOnReconnect:s,refetchOnMountOrArgChange:m,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:g}});ft(t.util,{patchQueryData:k,updateQueryData:P,upsertQueryData:O,prefetch:j,resetApiState:B.resetApiState,upsertQueryEntries:B.cacheEntriesUpserted}),ft(t.internalActions,B);let{middleware:z,actions:W}=kv({reducerPath:o,context:h,queryThunk:w,mutationThunk:M,infiniteQueryThunk:E,api:t,assertTagType:S,selectors:y});ft(t.util,W),ft(t,{reducer:L,middleware:z});let{buildInitiateQuery:G,buildInitiateInfiniteQuery:Y,buildInitiateMutation:te,getRunningMutationThunk:Z,getRunningMutationsThunk:fe,getRunningQueriesThunk:we,getRunningQueryThunk:Me}=mv({queryThunk:w,mutationThunk:M,infiniteQueryThunk:E,api:t,serializeQueryArgs:i,context:h});return ft(t.util,{getRunningMutationThunk:Z,getRunningMutationsThunk:fe,getRunningQueryThunk:Me,getRunningQueriesThunk:we}),{name:Zl,injectEndpoint(ue,se){var Pe;let ie=(Pe=t.endpoints)[ue]??(Pe[ue]={});hs(se)&&ft(ie,{name:ue,select:F(ue,se),initiate:G(ue,se)},_(w,ue)),dv(se)&&ft(ie,{name:ue,select:I(),initiate:te(ue)},_(M,ue)),Ss(se)&&ft(ie,{name:ue,select:x(ue,se),initiate:Y(ue,se)},_(w,ue))}}}}),cd=vv(Ov());p();u();d();l();var ii=e=>e.query,ud=e=>e.query?.enableQuerySyntax;var wq=de(e=>ii(e)?.q,e=>e.search.requestId,e=>e.generatedAnswer.cannotAnswer,e=>e.configuration.analytics.analyticsMode,e=>e.search.searchAction?.actionCause,(e,t,r,n,o)=>({q:e,requestId:t,cannotAnswer:r,analyticsMode:n,actionCause:o})),Tv=de(e=>e.generatedAnswer?.answerApiQueryParams,e=>e??Dn);p();u();d();l();p();u();d();l();var ai=e=>Fe({prefix:"analytics/generatedAnswer/streamEnd",__legacy__getBuilder:(t,r)=>{let n=Xt(r),o=e?!r.generatedAnswer?.answer||!r.generatedAnswer?.answer.length:void 0;return n?t.makeGeneratedAnswerStreamEnd({generativeQuestionAnsweringId:n,answerGenerated:e,answerTextIsEmpty:o}):null},analyticsType:"Rga.AnswerReceived",analyticsPayloadBuilder:t=>({answerId:Xt(t)??"",answerGenerated:e??!1})}),si=()=>Fe({prefix:"analytics/generatedAnswer/responseLinked",__legacy__getBuilder:()=>null,analyticsType:"Rga.ResponseLinked",analyticsPayloadBuilder:e=>({answerId:Xt(e)??"",responseId:e.search?.searchResponseId||e.search?.response.searchUid||""})});p();u();d();l();p();u();d();l();var ld=de(e=>e.advancedSearchQueries,e=>{if(!e)return{};let{aq:t,cq:r,dq:n,lq:o}=e;return{...(t&&{aq:t}),...(r&&{cq:r}),...(n&&{dq:n}),...(o&&{lq:o})}});p();u();d();l();var ci=(e,t,r)=>({analytics:{clientId:t.clientId,clientTimestamp:new Date().toISOString(),documentReferrer:t.referrer,documentLocation:t.location,originContext:e.originContext,...(r&&{actionCause:r.actionCause}),...(r&&{customData:r.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.deviceId&&{deviceId:e.deviceId}),...(e.trackingId&&{trackingId:e.trackingId}),capture:t.capture??t.clientId!=="",source:Ir(e)}});p();u();d();l();var dd=e=>e.context;p();u();d();l();var pd=e=>e.pipeline;p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();var fd=60,md=fd*60,gd=md*24,Dv=gd*7,Zt=1e3,Lr=fd*Zt,As=md*Zt,yd=gd*Zt,hd=Dv*Zt,er="millisecond",Rt="second",_e="minute",Et="hour",Ve="day",Ur="week",be="month",tr="quarter",nt="year",It="date",Sd="YYYY-MM-DDTHH:mm:ssZ",Cs="Invalid Date",vd=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Ad=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;p();u();d();l();var bd={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var r=["th","st","nd","rd"],n=t%100;return"["+t+(r[(n-20)%10]||r[n]||r[0])+"]"}};p();u();d();l();var bs=function(t,r,n){var o=String(t);return!o||o.length>=r?t:""+Array(r+1-o.length).join(n)+t},qv=function(t){var r=-t.utcOffset(),n=Math.abs(r),o=Math.floor(n/60),i=n%60;return(r<=0?"+":"-")+bs(o,2,"0")+":"+bs(i,2,"0")},Mv=function e(t,r){if(t.date()<r.date())return-e(r,t);var n=(r.year()-t.year())*12+(r.month()-t.month()),o=t.clone().add(n,be),i=r-o<0,a=t.clone().add(n+(i?-1:1),be);return+(-(n+(r-o)/(i?o-a:a-o))||0)},Nv=function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},jv=function(t){var r={M:be,y:nt,w:Ur,d:Ve,D:It,h:Et,m:_e,s:Rt,ms:er,Q:tr};return r[t]||String(t||"").toLowerCase().replace(/s$/,"")},_v=function(t){return t===void 0},wd={s:bs,z:qv,m:Mv,a:Nv,p:jv,u:_v};var Nn="en",rr={};rr[Nn]=bd;var xd="$isDayjsObject",ws=function(t){return t instanceof li||!!(t&&t[xd])},ui=function e(t,r,n){var o;if(!t)return Nn;if(typeof t=="string"){var i=t.toLowerCase();rr[i]&&(o=i),r&&(rr[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var m=t.name;rr[m]=t,o=m}return!n&&o&&(Nn=o),o||!n&&Nn},me=function(t,r){if(ws(t))return t.clone();var n=typeof r=="object"?r:{};return n.date=t,n.args=arguments,new li(n)},Vv=function(t,r){return me(t,{locale:r.$L,utc:r.$u,x:r.$x,$offset:r.$offset})},ae=wd;ae.l=ui;ae.i=ws;ae.w=Vv;var Lv=function(t){var r=t.date,n=t.utc;if(r===null)return new Date(NaN);if(ae.u(r))return new Date;if(r instanceof Date)return new Date(r);if(typeof r=="string"&&!/Z$/i.test(r)){var o=r.match(vd);if(o){var i=o[2]-1||0,a=(o[7]||"0").substring(0,3);return n?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)}}return new Date(r)},li=function(){function e(r){this.$L=ui(r.locale,null,!0),this.parse(r),this.$x=this.$x||r.x||{},this[xd]=!0}var t=e.prototype;return t.parse=function(n){this.$d=Lv(n),this.init()},t.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},t.$utils=function(){return ae},t.isValid=function(){return this.$d.toString()!==Cs},t.isSame=function(n,o){var i=me(n);return this.startOf(o)<=i&&i<=this.endOf(o)},t.isAfter=function(n,o){return me(n)<this.startOf(o)},t.isBefore=function(n,o){return this.endOf(o)<me(n)},t.$g=function(n,o,i){return ae.u(n)?this[o]:this.set(i,n)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(n,o){var i=this,a=ae.u(o)?!0:o,m=ae.p(n),f=function(x,I){var w=ae.w(i.$u?Date.UTC(i.$y,I,x):new Date(i.$y,I,x),i);return a?w:w.endOf(Ve)},s=function(x,I){var w=[0,0,0,0],E=[23,59,59,999];return ae.w(i.toDate()[x].apply(i.toDate("s"),(a?w:E).slice(I)),i)},g=this.$W,h=this.$M,S=this.$D,y="set"+(this.$u?"UTC":"");switch(m){case nt:return a?f(1,0):f(31,11);case be:return a?f(1,h):f(0,h+1);case Ur:{var b=this.$locale().weekStart||0,R=(g<b?g+7:g)-b;return f(a?S-R:S+(6-R),h)}case Ve:case It:return s(y+"Hours",0);case Et:return s(y+"Minutes",1);case _e:return s(y+"Seconds",2);case Rt:return s(y+"Milliseconds",3);default:return this.clone()}},t.endOf=function(n){return this.startOf(n,!1)},t.$set=function(n,o){var i,a=ae.p(n),m="set"+(this.$u?"UTC":""),f=(i={},i[Ve]=m+"Date",i[It]=m+"Date",i[be]=m+"Month",i[nt]=m+"FullYear",i[Et]=m+"Hours",i[_e]=m+"Minutes",i[Rt]=m+"Seconds",i[er]=m+"Milliseconds",i)[a],s=a===Ve?this.$D+(o-this.$W):o;if(a===be||a===nt){var g=this.clone().set(It,1);g.$d[f](s),g.init(),this.$d=g.set(It,Math.min(this.$D,g.daysInMonth())).$d}else f&&this.$d[f](s);return this.init(),this},t.set=function(n,o){return this.clone().$set(n,o)},t.get=function(n){return this[ae.p(n)]()},t.add=function(n,o){var i=this,a;n=Number(n);var m=ae.p(o),f=function(S){var y=me(i);return ae.w(y.date(y.date()+Math.round(S*n)),i)};if(m===be)return this.set(be,this.$M+n);if(m===nt)return this.set(nt,this.$y+n);if(m===Ve)return f(1);if(m===Ur)return f(7);var s=(a={},a[_e]=Lr,a[Et]=As,a[Rt]=Zt,a)[m]||1,g=this.$d.getTime()+n*s;return ae.w(g,this)},t.subtract=function(n,o){return this.add(n*-1,o)},t.format=function(n){var o=this,i=this.$locale();if(!this.isValid())return i.invalidDate||Cs;var a=n||Sd,m=ae.z(this),f=this.$H,s=this.$m,g=this.$M,h=i.weekdays,S=i.months,y=i.meridiem,b=function(w,E,M,k){return w&&(w[E]||w(o,a))||M[E].slice(0,k)},R=function(w){return ae.s(f%12||12,w,"0")},F=y||function(I,w,E){var M=I<12?"AM":"PM";return E?M.toLowerCase():M},x=function(w){switch(w){case"YY":return String(o.$y).slice(-2);case"YYYY":return ae.s(o.$y,4,"0");case"M":return g+1;case"MM":return ae.s(g+1,2,"0");case"MMM":return b(i.monthsShort,g,S,3);case"MMMM":return b(S,g);case"D":return o.$D;case"DD":return ae.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return b(i.weekdaysMin,o.$W,h,2);case"ddd":return b(i.weekdaysShort,o.$W,h,3);case"dddd":return h[o.$W];case"H":return String(f);case"HH":return ae.s(f,2,"0");case"h":return R(1);case"hh":return R(2);case"a":return F(f,s,!0);case"A":return F(f,s,!1);case"m":return String(s);case"mm":return ae.s(s,2,"0");case"s":return String(o.$s);case"ss":return ae.s(o.$s,2,"0");case"SSS":return ae.s(o.$ms,3,"0");case"Z":return m;default:break}return null};return a.replace(Ad,function(I,w){return w||x(I)||m.replace(":","")})},t.utcOffset=function(){return-Math.round(this.$d.getTimezoneOffset()/15)*15},t.diff=function(n,o,i){var a=this,m=ae.p(o),f=me(n),s=(f.utcOffset()-this.utcOffset())*Lr,g=this-f,h=function(){return ae.m(a,f)},S;switch(m){case nt:S=h()/12;break;case be:S=h();break;case tr:S=h()/3;break;case Ur:S=(g-s)/hd;break;case Ve:S=(g-s)/yd;break;case Et:S=g/As;break;case _e:S=g/Lr;break;case Rt:S=g/Zt;break;default:S=g;break}return i?S:ae.a(S)},t.daysInMonth=function(){return this.endOf(be).$D},t.$locale=function(){return rr[this.$L]},t.locale=function(n,o){if(!n)return this.$L;var i=this.clone(),a=ui(n,o,!0);return a&&(i.$L=a),i},t.clone=function(){return ae.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},e}(),Rd=li.prototype;me.prototype=Rd;[["$ms",er],["$s",Rt],["$m",_e],["$H",Et],["$W",Ve],["$M",be],["$y",nt],["$D",It]].forEach(function(e){Rd[e[1]]=function(t){return this.$g(t,e[0],e[1])}});me.extend=function(e,t){return e.$i||(e(t,li,me),e.$i=!0),me};me.locale=ui;me.isDayjs=ws;me.unix=function(e){return me(e*1e3)};me.en=rr[Nn];me.Ls=rr;me.p={};var Le=me;p();u();d();l();var Ed=function(e,t){var r=t.prototype;r.quarter=function(i){return this.$utils().u(i)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+(i-1)*3)};var n=r.add;r.add=function(i,a){i=Number(i);var m=this.$utils().p(a);return m===tr?this.add(i*3,be):n.bind(this)(i,a)};var o=r.startOf;r.startOf=function(i,a){var m=this.$utils(),f=m.u(a)?!0:a,s=m.p(i);if(s===tr){var g=this.quarter()-1;return f?this.month(g*3).startOf(be).startOf(Ve):this.month(g*3+2).endOf(be).endOf(Ve)}return o.bind(this)(i,a)}};p();u();d();l();p();u();d();l();p();u();d();l();var Uv=function(t){return t.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(r,n,o){return n||o.slice(1)})},Qv={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Id=function(t,r){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(n,o,i){var a=i&&i.toUpperCase();return o||r[i]||Qv[i]||Uv(r[a])})};var Bv=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,Fd=/\d/,jn=/\d\d/,$v=/\d{3}/,Hv=/\d{4}/,We=/\d\d?/,zv=/[+-]?\d+/,Gv=/[+-]\d\d:?(\d\d)?|Z/,_n=/\d*[^-_:/,()\s\d]+/,Ft={},Od=function(t){return t=+t,t+(t>68?1900:2e3)};function Wv(e){if(!e||e==="Z")return 0;var t=e.match(/([+-]|\d\d)/g),r=+(t[1]*60)+(+t[2]||0);return r===0?0:t[0]==="+"?-r:r}var Re=function(t){return function(r){this[t]=+r}},Pd=[Gv,function(e){var t=this.zone||(this.zone={});t.offset=Wv(e)}],xs=function(t){var r=Ft[t];return r&&(r.indexOf?r:r.s.concat(r.f))},kd=function(t,r){var n,o=Ft,i=o.meridiem;if(!i)n=t===(r?"pm":"PM");else for(var a=1;a<=24;a+=1)if(t.indexOf(i(a,0,r))>-1){n=a>12;break}return n},Yv={A:[_n,function(e){this.afternoon=kd(e,!1)}],a:[_n,function(e){this.afternoon=kd(e,!0)}],Q:[Fd,function(e){this.month=(e-1)*3+1}],S:[Fd,function(e){this.milliseconds=+e*100}],SS:[jn,function(e){this.milliseconds=+e*10}],SSS:[$v,function(e){this.milliseconds=+e}],s:[We,Re("seconds")],ss:[We,Re("seconds")],m:[We,Re("minutes")],mm:[We,Re("minutes")],H:[We,Re("hours")],h:[We,Re("hours")],HH:[We,Re("hours")],hh:[We,Re("hours")],D:[We,Re("day")],DD:[jn,Re("day")],Do:[_n,function(e){var t=Ft,r=t.ordinal,n=e.match(/\d+/);if(this.day=n[0],!!r)for(var o=1;o<=31;o+=1)r(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],w:[We,Re("week")],ww:[jn,Re("week")],M:[We,Re("month")],MM:[jn,Re("month")],MMM:[_n,function(e){var t=xs("months"),r=xs("monthsShort"),n=(r||t.map(function(o){return o.slice(0,3)})).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[_n,function(e){var t=xs("months"),r=t.indexOf(e)+1;if(r<1)throw new Error;this.month=r%12||r}],Y:[zv,Re("year")],YY:[jn,function(e){this.year=Od(e)}],YYYY:[Hv,Re("year")],Z:Pd,ZZ:Pd};function Kv(e){var t=e.afternoon;if(t!==void 0){var r=e.hours;t?r<12&&(e.hours+=12):r===12&&(e.hours=0),delete e.afternoon}}function Jv(e){e=Id(e,Ft&&Ft.formats);for(var t=e.match(Bv),r=t.length,n=0;n<r;n+=1){var o=t[n],i=Yv[o],a=i&&i[0],m=i&&i[1];m?t[n]={regex:a,parser:m}:t[n]=o.replace(/^\[|\]$/g,"")}return function(f){for(var s={},g=0,h=0;g<r;g+=1){var S=t[g];if(typeof S=="string")h+=S.length;else{var y=S.regex,b=S.parser,R=f.slice(h),F=y.exec(R),x=F[0];b.call(s,x),f=f.replace(x,"")}}return Kv(s),s}}var Xv=function(t,r,n,o){try{if(["x","X"].indexOf(r)>-1)return new Date((r==="X"?1e3:1)*t);var i=Jv(r),a=i(t),m=a.year,f=a.month,s=a.day,g=a.hours,h=a.minutes,S=a.seconds,y=a.milliseconds,b=a.zone,R=a.week,F=new Date,x=s||(!m&&!f?F.getDate():1),I=m||F.getFullYear(),w=0;m&&!f||(w=f>0?f-1:F.getMonth());var E=g||0,M=h||0,k=S||0,P=y||0;if(b)return new Date(Date.UTC(I,w,x,E,M,k,P+b.offset*60*1e3));if(n)return new Date(Date.UTC(I,w,x,E,M,k,P));var O;return O=new Date(I,w,x,E,M,k,P),R&&(O=o(O).week(R).toDate()),O}catch{return new Date("")}},Td=function(e,t,r){r.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(Od=e.parseTwoDigitYear);var n=t.prototype,o=n.parse;n.parse=function(i){var a=i.date,m=i.utc,f=i.args;this.$u=m;var s=f[1];if(typeof s=="string"){var g=f[2]===!0,h=f[3]===!0,S=g||h,y=f[2];h&&(y=f[2]),Ft=this.$locale(),!g&&y&&(Ft=r.Ls[y]),this.$d=Xv(a,s,m,r),this.init(),y&&y!==!0&&(this.$L=this.locale(y).$L),S&&a!=this.format(s)&&(this.$d=new Date("")),Ft={}}else if(s instanceof Array)for(var b=s.length,R=1;R<=b;R+=1){f[1]=s[R-1];var F=r.apply(this,f);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}R===b&&(this.$d=new Date(""))}else o.call(this,i)}};Le.extend(Td);var Dd="YYYY/MM/DD@HH:mm:ss",Zv="1401-01-01";function Qr(e,t){let r=Le(e,t);return!r.isValid()&&!t?Le(e,Dd):r}function di(e){return e.format(Dd)}function qd(e,t){let r=Qr(e,t);if(!r.isValid()){let n=". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information.",o=` with the format "${t}"`;throw new Error(`Could not parse the provided date "${e}"${t?o:n}`)}Rs(r)}function Rs(e){if(e.isBefore(Zv))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}Le.extend(Ed);var Md=["past","now","next"],Nd=["minute","hour","day","week","month","quarter","year"],eA=e=>{let t=e==="now";return{amount:new $({required:!t,min:1}),unit:new V({required:!t,constrainTo:Nd}),period:new V({required:!0,constrainTo:Md})}};function Es(e){if(typeof e=="string"&&!Pt(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?Ud(e):e;new ke(eA(t.period)).validate(t);let r=_d(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);Rs(r)}function jd(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function _d(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return Le().subtract(r,n);case"next":return Le().add(r,n);case"now":return Le()}}function Vn(e){return di(_d(Ud(e)))}function Vd(e){return e.toLocaleLowerCase().split("-")}function Pt(e){let[t,r,n]=Vd(e);if(t==="now")return!0;if(!Md.includes(t)||!Nd.includes(n))return!1;let o=parseInt(r);return!(Number.isNaN(o)||o<=0)}function Ld(e){return!!e&&typeof e=="object"&&"period"in e}function Ud(e){let[t,r,n]=Vd(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r):void 0,unit:n||void 0}}p();u();d();l();function Qd(e){return e.type==="dateRange"}function Bd(e){return`start${e}`}function $d(e){return`end${e}`}var Is=()=>({dateFacetValueMap:{}});function tA(e,t,r){let n=e.start,o=e.end;return Pt(n)&&(n=Vn(n),r.dateFacetValueMap[t][Bd(n)]=e.start),Pt(o)&&(o=Vn(o),r.dateFacetValueMap[t][$d(o)]=e.end),{...e,start:n,end:o}}function Fs(e,t){if(Qd(e)){let{facetId:r,currentValues:n}=e;return t.dateFacetValueMap[r]={},{...e,currentValues:n.map(o=>tA(o,r,t))}}return e}function kt(e){let t=Is();return{request:{...e,facets:e.facets?.map(n=>Fs(n,t))},mappings:t}}function rA(e,t,r){return{...e,start:r.dateFacetValueMap[t][Bd(e.start)]||e.start,end:r.dateFacetValueMap[t][$d(e.end)]||e.end}}function nA(e,t){return e.facetId in t.dateFacetValueMap}function oA(e,t){return nA(e,t)?{...e,values:e.values.map(r=>rA(r,e.facetId,t))}:e}function pi(e,t){return"success"in e?{success:{...e.success,facets:e.success.facets?.map(n=>oA(n,t))}}:e}p();u();d();l();p();u();d();l();p();u();d();l();function Ot(e){return Object.values(e).map(t=>t.request)}function Ps(e,t){let r={};e.forEach(i=>{r[i.facetId]=i});let n=[];t.forEach(i=>{i in r&&(n.push(r[i]),delete r[i])});let o=Object.values(r);return[...n,...o]}function Hd(e){return Ot(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}var ks={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function iA(e){return Ot(e).map(t=>{let r=ks[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function aA(e){return[...iA(e.facetSet??{}),...Hd(e.numericFacetSet??{}),...Hd(e.dateFacetSet??{}),...Ot(e.categoryFacetSet??{})]}function sA(e){return aA(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function fi(e){return Ps(sA(e),e.facetOrder??[])}p();u();d();l();p();u();d();l();var Tt=/*#__PURE__*/function(){var _ref22=_asyncToGenerator(function*(e,t){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??yt(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,...(e.configuration.analytics.enabled&&{actionsHistory:Be.getInstance().getHistory()}),...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&(yield Xo(e.configuration.analytics,t))),...(e.excerptLength&&!H(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})}});return function Tt(_x48,_x49){return _ref22.apply(this,arguments)}}();p();u();d();l();var Br=(e,t,r)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??yt(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:t.referrer,timezone:e.configuration.search.timezone,...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&ci(e.configuration.analytics,t,r)),...(e.excerptLength&&!H(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})});p();u();d();l();var zd=de(e=>e.staticFilterSet,e=>Object.values(e||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o}));var Dt=/*#__PURE__*/function(){var _ref23=_asyncToGenerator(function*(e,t,r){let n=Ts(e),o=cA(e),i=uA(e),a=e.configuration.analytics.analyticsMode==="legacy"?yield Tt(e,r):Br(e,t,r);return kt({...a,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(n&&{cq:n}),...(o.length&&{facets:o}),...(e.pagination&&{numberOfResults:Os(e),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:i}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function Dt(_x50,_x51,_x52){return _ref23.apply(this,arguments)}}();function Os(e){return e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0}function cA(e){return Ps(dA(e),e.facetOrder??[])}function uA(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(lA).filter(r=>r.currentValues.length>0):void 0}function lA(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function dA(e){return pA(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function pA(e){return[...fA(e.facetSet??{}),...Gd(e.numericFacetSet??{}),...Gd(e.dateFacetSet??{}),...Ot(e.categoryFacetSet??{})]}function fA(e){return Ot(e).map(t=>{let r=ks[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function Gd(e){return Ot(e).map(t=>{let r=t.currentValues,n=r.some(({state:i})=>i!=="idle"),o=r.some(i=>i.previousState);return t.generateAutomaticRanges&&!n&&!o?{...t,currentValues:[]}:t})}function Ts(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=zd(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}p();u();d();l();p();u();d();l();var Ln=(e,t)=>{let r=e;return H(r[t])?H(e.raw[t])?null:e.raw[t]:r[t]},mA=e=>t=>e.every(r=>!H(Ln(t,r))),gA=e=>t=>e.every(r=>H(Ln(t,r))),yA=(e,t)=>r=>{let n=Wd(e,r);return t.some(o=>n.some(i=>`${i}`.toLowerCase()===o.toLowerCase()))},hA=(e,t)=>r=>{let n=Wd(e,r);return t.every(o=>n.every(i=>`${i}`.toLowerCase()!==o.toLowerCase()))},Wd=(e,t)=>{let r=Ln(t,e);return Pc(r)?r:[r]},Yd={getResultProperty:Ln,fieldsMustBeDefined:mA,fieldsMustNotBeDefined:gA,fieldMustMatch:yA,fieldMustNotMatch:hA};var Kd=de(e=>e.search,e=>e?.searchAction?.actionCause||"");p();u();d();l();var Jd=e=>e.searchHub;p();u();d();l();var Ds=de(e=>e,e=>{if(!e)return"";for(let t in e)if(e[t].isActive)return e[t].id;return""}),Nj=de(e=>e,e=>{let t=Ds(e);return t&&e?e[t].expression:""});p();u();d();l();var Xd=e=>e.configuration.search.locale,Zd=e=>e.configuration.search.timezone;p();u();d();l();var ep=e=>{if(!(!e.dictionaryFieldContext||!Object.keys(e.dictionaryFieldContext.contextValues).length))return e.dictionaryFieldContext.contextValues};p();u();d();l();var tp=e=>e.excerptLength?.length;p();u();d();l();var rp=e=>{let{freezeFacetOrder:t}=e.facetOptions??{};return t!==void 0?{freezeFacetOrder:t}:void 0};p();u();d();l();var np=e=>{if(e.folding)return{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}};p();u();d();l();var op=e=>e.sortCriteria;var ip=/*#__PURE__*/function(){var _ref24=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:Ie(e.configuration.organizationId,e.configuration.environment),streamId:e.search.extendedResults?.generativeQuestionAnsweringId}});return function ip(_x53){return _ref24.apply(this,arguments)}}(),ap=(e,t)=>{let r=ii(e)?.q,{aq:n,cq:o,dq:i,lq:a}=AA(e),m=dd(e),f=ci(e.configuration.analytics,t,{actionCause:Kd(e)}),s=Jd(e),g=pd(e),h=yl(e)??[],S=SA(e),y=Ds(e.tabSet)||"default",b=Xd(e),R=Zd(e),F=t.referrer||"",x=rp(e),I=op(e),w=vA(e),E=tp(e),M=np(e),k=ep(e);return{q:r,...(n&&{aq:n}),...(o&&{cq:o}),...(i&&{dq:i}),...(a&&{lq:a}),...(e.query&&{enableQuerySyntax:ud(e)}),...(m?.contextValues&&{context:m.contextValues}),pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:h}},...(s?.length&&{searchHub:s}),...(g?.length&&{pipeline:g}),...(S.length&&{facets:S}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(e.pagination&&{numberOfResults:Os(e),firstResult:e.pagination.firstResult}),tab:y,locale:b,timezone:R,...(e.debug!==void 0&&{debug:e.debug}),referrer:F,...w,...(M??{}),...(E&&{excerptLength:E}),...(k&&{dictionaryFieldContext:k}),sortCriteria:I,...(x&&{facetOptions:x}),...f,...(e.insightCaseContext?.caseContext&&{caseContext:e.insightCaseContext?.caseContext})}},SA=e=>fi(e)?.map(t=>Fs(t,Is())).sort((t,r)=>t.facetId>r.facetId?1:r.facetId>t.facetId?-1:0),vA=e=>({actionsHistory:e.configuration.analytics.enabled?Be.getInstance().getHistory():[]}),AA=e=>{let t=ld(e),r=Ts(e);return{...t,...(r&&{cq:r})}};p();u();d();l();var sp=["text/plain","text/markdown"];var $r=new V({required:!0}),up=new V,Hr=new K({required:!0}),CA={id:$r,title:$r,uri:$r,permanentid:$r,clickUri:up},lp=new V({required:!0,constrainTo:sp}),tV=T("generatedAnswer/setIsVisible",e=>N(e,Hr)),dp=T("generatedAnswer/setAnswerId",e=>N(e,U)),rV=T("generatedAnswer/setAnswerGenerationMode",e=>N(e,new V({constrainTo:["automatic","manual"],required:!1,default:"automatic"}))),nV=T("generatedAnswer/setIsEnabled",e=>N(e,Hr)),Ms=T("generatedAnswer/updateMessage",e=>N(e,{textDelta:$r})),Ns=T("generatedAnswer/updateCitations",e=>N(e,{citations:new J({required:!0,each:new Q({values:CA})})})),bA=T("generatedAnswer/updateError",e=>N(e,{message:up,code:new $({min:0})})),pp=T("generatedAnswer/resetAnswer"),oV=T("generatedAnswer/like"),iV=T("generatedAnswer/dislike"),aV=T("generatedAnswer/feedbackModal/open"),sV=T("generatedAnswer/expand"),cV=T("generatedAnswer/collapse"),uV=T("generatedAnswer/setId",e=>N(e,{id:new V({required:!0})})),lV=T("generatedAnswer/feedbackModal/close"),dV=T("generatedAnswer/sendFeedback"),qs=T("generatedAnswer/setIsLoading",e=>N(e,Hr)),cp=T("generatedAnswer/setIsStreaming",e=>N(e,Hr)),js=T("generatedAnswer/setAnswerContentFormat",e=>N(e,lp)),pV=T("generatedAnswer/updateResponseFormat",e=>N(e,{contentFormat:new J({each:lp,default:["text/plain"]})})),fV=T("knowledge/updateAnswerConfigurationId",e=>N(e,$r)),mV=T("generatedAnswer/registerFieldsToIncludeInCitations",e=>N(e,bo)),wA=T("generatedAnswer/setIsAnswerGenerated",e=>N(e,Hr)),_s=T("generatedAnswer/setCannotAnswer",e=>N(e,Hr)),xA=T("generatedAnswer/setAnswerApiQueryParams",e=>N(e,new Q({}))),gV=re("generatedAnswer/streamAnswer",/*#__PURE__*/function(){var _ref25=_asyncToGenerator(function*(e,t){let r=t.getState(),{dispatch:n,extra:o,getState:i}=t,{search:a}=i(),{queryExecuted:m}=a,{setAbortControllerRef:f}=e,s=yield ip(r),g=(y,b)=>{switch(y){case"genqa.headerMessageType":{let R=JSON.parse(b);n(js(R.contentFormat));break}case"genqa.messageType":n(Ms(JSON.parse(b)));break;case"genqa.citationsType":n(Ns(JSON.parse(b)));break;case"genqa.endOfStreamType":{let R=JSON.parse(b).answerGenerated,F=m.length!==0&&!R;n(_s(F)),n(cp(!1)),n(wA(R)),n(ai(R)),n(si());break}default:r.debug&&o.logger.warn(`Unknown payloadType: "${y}"`)}};n(qs(!0));let h=y=>y.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,S=o.streamingClient?.streamGeneratedAnswer(s,{write:y=>{h(s)&&(n(qs(!1)),y.payload&&y.payloadType&&g(y.payloadType,y.payload))},abort:y=>{h(s)&&n(bA(y))},close:()=>{h(s)&&n(cp(!1))},resetAnswer:()=>{h(s)&&n(pp())}});S?f(S):n(qs(!1))});return function(_x54,_x55){return _ref25.apply(this,arguments)}}()),yV=re("generatedAnswer/generateAnswer",/*#__PURE__*/function(){var _ref26=_asyncToGenerator(function*(e,{getState:t,dispatch:r,extra:{navigatorContext:n,logger:o}}){r(pp());let i=t();if(i.generatedAnswer.answerConfigurationId){let a=ap(i,n);r(xA(a)),yield r(fp(a))}else o.warn("[WARNING] Missing answerConfigurationId in engine configuration. The generateAnswer action requires an answer configuration ID to use CRGA with the Answer API.")});return function(_x56,_x57){return _ref26.apply(this,arguments)}}());p();u();d();l();p();u();d();l();function gp(_x58,_x59){return _gp.apply(this,arguments)}function _gp(){_gp=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _gp.apply(this,arguments)}function yp(e){let t,r,n,o=!1;return function(a){t===void 0?(t=a,r=0,n=-1):t=EA(t,a);let m=t.length,f=0;for(;r<m;){o&&(t[r]===10&&(f=++r),o=!1);let s=-1;for(;r<m&&s===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-f);break;case 13:o=!0,s=r;break;case 10:s=r;break}if(s===-1)break;e(t.subarray(f,s),n),f=r,n=-1}f===m?t=void 0:f!==0&&(t=t.subarray(f),r-=f)}}function hp(e,t,r){let n=mp(),o=new TextDecoder;return function(a,m){if(a.length===0)r?.(n),n=mp();else if(m>0){let f=o.decode(a.subarray(0,m)),s=m+(a[m+1]===32?2:1),g=o.decode(a.subarray(s));switch(f){case"data":n.data=n.data?`${n.data}
|
|
31
|
+
${g}`:g;break;case"event":n.event=g;break;case"id":e(n.id=g);break;case"retry":RA(g,n,t);break}}}}function RA(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function EA(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function mp(){return{data:"",event:"",id:"",retry:void 0}}var Vs="text/event-stream",IA=1e3,Sp="last-event-id";function vp(){return typeof window<"u"}function Ap(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:i,onerror:a,openWhenHidden:m,fetch:f,...s}){return new Promise((g,h)=>{let S={...r};S.accept||(S.accept=Vs);let y;function b(){y?.abort(),document.hidden||E()}!m&&vp()&&document.addEventListener("visibilitychange",b);let R=IA,F;function x(){vp()&&document.removeEventListener("visibilitychange",b),clearTimeout(F),y?.abort()}t?.addEventListener("abort",()=>{x(),g()});let I=f??v,w=n??FA;function E(){return _E.apply(this,arguments)}function _E(){_E=_asyncToGenerator(function*(){y=c.AbortController?new c.AbortController:null;try{let M=yield I(e,{...s,headers:S,signal:y?.signal});yield w(M),yield gp(M.body,yp(hp(k=>{k?S[Sp]=k:delete S[Sp]},k=>{R=k},o))),i?.(),x(),g()}catch(M){if(!y?.signal?.aborted)try{let k=a?.(M)??R;clearTimeout(F),F=setTimeout(E,k)}catch(k){x(),h(k)}}});return _E.apply(this,arguments)}E()})}function FA(e){let t=e.headers.get("content-type");if(!t?.startsWith(Vs))throw new Error(`Expected content-type to be ${Vs}, Actual: ${t}`)}p();u();d();l();var PA=/*#__PURE__*/function(){var _ref27=_asyncToGenerator(function*(e,t,r){let n=t.getState(),{accessToken:o,environment:i,organizationId:a}=n.configuration,m=n.generatedAnswer.answerConfigurationId,f={...e,headers:{...(e?.headers||{}),Authorization:`Bearer ${o}`}};try{let s=Ie(a,i);return{data:td({baseUrl:`${s}/rest/organizations/${a}/answer/v1/configs/${m}`,fetchFn:function(){var _ref28=_asyncToGenerator(function*(h){if(h instanceof String)throw new Error("The provided 'request' must be a Request object.");let S=h.url,y={};return["method","headers","mode","credentials","cache","redirect","referrer","referrerPolicy","integrity","keepalive","signal"].forEach(b=>{y[b]=h[b]}),y.duplex="half",y.body=yield h.text(),v(S,y)});return function fetchFn(_x63){return _ref28.apply(this,arguments)}}()})(f,{...t,signal:null},r)}}catch(s){return{error:s}}});return function PA(_x60,_x61,_x62){return _ref27.apply(this,arguments)}}(),Cp=cd({reducerPath:"answer",baseQuery:rd(PA,{maxRetries:3}),endpoints:()=>({})});var kA=(e,t)=>{let{contentFormat:r}=t;e.contentFormat=r,e.isStreaming=!0,e.isLoading=!1},OA=(e,t)=>{e.answer===void 0?e.answer=t.textDelta:typeof t.textDelta=="string"&&(e.answer=e.answer.concat(t.textDelta))},TA=(e,t)=>{e.citations=t.citations},DA=(e,t)=>{e.generated=t.answerGenerated,e.isStreaming=!1},qA=(e,t)=>{let r=t.errorMessage||"Unknown error occurred";e.error={message:r,code:t.code},e.isStreaming=!1,e.isLoading=!1,console.error(`Generated answer error: ${r} (code: ${t.code})`)},MA=(e,t,r)=>{let n=JSON.parse(e.data);n.finishReason==="ERROR"&&n.errorMessage&&qA(t,n);let o=n.payload.length?JSON.parse(n.payload):{};switch(n.payloadType){case"genqa.headerMessageType":o.contentFormat&&(kA(t,o),r(js(o.contentFormat)));break;case"genqa.messageType":o.textDelta&&(OA(t,o),r(Ms({textDelta:o.textDelta})));break;case"genqa.citationsType":o.citations&&(TA(t,o),r(Ns({citations:o.citations})));break;case"genqa.endOfStreamType":DA(t,o),r(ai(o.answerGenerated??!1)),r(si());break}},NA=(e,t,r,n)=>{if(!e||!t||!r)throw new Error("Missing required parameters for answer endpoint");let o=`/rest/organizations/${t}`,i=n?`insight/v1/configs/${n}/answer`:"answer/v1/configs";return`${e}${o}/${i}/${r}/generate`},Ls=Cp.injectEndpoints({overrideExisting:!0,endpoints:e=>({getAnswer:e.query({queryFn:()=>({data:{contentFormat:void 0,answer:void 0,citations:void 0,error:void 0,generated:!1,isStreaming:!0,isLoading:!0}}),serializeQueryArgs:({endpointName:t,queryArgs:r})=>{let{analytics:n,...o}=r;return`${t}(${JSON.stringify(o)})`},onCacheEntryAdded(_x64,_x65){return _asyncToGenerator(function*(t,{getState:r,cacheDataLoaded:n,updateCachedData:o,dispatch:i}){yield n;let{configuration:a,generatedAnswer:m,insightConfiguration:f}=r(),{organizationId:s,environment:g,accessToken:h}=a,S=Ie(s,g),y=NA(S,s,m.answerConfigurationId,f?.insightId);yield Ap(y,{method:"POST",body:JSON.stringify(t),headers:{Authorization:`Bearer ${h}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch:v,onopen:function(){var _ref29=_asyncToGenerator(function*(b){let R=b.headers.get("x-answer-id");R&&o(F=>{F.answerId=R,i(dp(R))})});return function onopen(_x66){return _ref29.apply(this,arguments)}}(),onmessage:b=>{o(R=>{MA(b,R,i)})},onerror:b=>{throw b},onclose:()=>{o(b=>{i(_s(!b.generated))})}})}).apply(this,arguments)}})})}),fp=e=>Ls.endpoints.getAnswer.initiate(e);p();u();d();l();var bp=le(Sr,e=>e);p();u();d();l();function jA(e){let t=e.payload?.analyticsAction;return wp(e)&&!H(t)}function wp(e){return"type"in e}var xp=e=>t=>r=>{let n;jA(r)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let o=t(r);return wp(r)&&(r.type==="search/executeSearch/fullfilled"&&n===void 0&&console.error("No analytics action associated with search:",r),r.type==="recommendation/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with recommendation:",r),r.type==="productRecommendations/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with product recommendation:",r)),n!==void 0&&e.dispatch(n),o};p();u();d();l();p();u();d();l();p();u();d();l();var fL=T("tab/register",e=>{let t=new Q({values:{id:U,expression:ve}});return N(e,t)}),mi=T("tab/updateActiveTab",e=>N(e,U));p();u();d();l();p();u();d();l();var _A={year:0,month:1,day:2,hour:3,minute:4,second:5},Rp={},VA=function(t,r){r===void 0&&(r={});var n=r.timeZoneName||"short",o=t+"|"+n,i=Rp[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:n}),Rp[o]=i),i},Ep=function(e,t,r){var n,o=function(g,h,S){S===void 0&&(S={});var y=new Date(g),b=VA(h,S);return b.formatToParts(y)},i=function(g,h){for(var S=o(g,h),y=[],b=0;b<S.length;b+=1){var R=S[b],F=R.type,x=R.value,I=_A[F];I>=0&&(y[I]=parseInt(x,10))}var w=y[3],E=w===24?0:w,M=y[0]+"-"+y[1]+"-"+y[2]+" "+E+":"+y[4]+":"+y[5]+":000",k=r.utc(M).valueOf(),P=+g,O=P%1e3;return P-=O,(k-P)/6e4},a=function(g,h,S){var y=g-h*60*1e3,b=i(y,S);if(h===b)return[y,h];y-=(b-h)*60*1e3;var R=i(y,S);return b===R?[y,b]:[g-Math.min(b,R)*60*1e3,Math.max(b,R)]},m=t.prototype;m.tz=function(s,g){s===void 0&&(s=n);var h=this.utcOffset(),S=this.toDate(),y=S.toLocaleString("en-US",{timeZone:s}),b=Math.round((S-new Date(y))/1e3/60),R=-Math.round(S.getTimezoneOffset()/15)*15-b,F=!Number(R),x;if(F)x=this.utcOffset(0,g);else if(x=r(y,{locale:this.$L}).$set(er,this.$ms).utcOffset(R,!0),g){var I=x.utcOffset();x=x.add(h-I,_e)}return x.$x.$timezone=s,x},m.offsetName=function(s){var g=this.$x.$timezone||r.tz.guess(),h=o(this.valueOf(),g,{timeZoneName:s}).find(function(S){return S.type.toLowerCase()==="timezonename"});return h&&h.value};var f=m.startOf;m.startOf=function(s,g){if(!this.$x||!this.$x.$timezone)return f.call(this,s,g);var h=r(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L}),S=f.call(h,s,g);return S.tz(this.$x.$timezone,!0)},r.tz=function(s,g,h){var S=h&&g,y=h||g||n,b=i(+r(),y);if(typeof s!="string")return r(s).tz(y);var R=r.utc(s,S).valueOf(),F=a(R,b,y),x=F[0],I=F[1],w=r(x).utcOffset(I);return w.$x.$timezone=y,w},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(s){n=s}};p();u();d();l();var LA=/[+-]\d\d(?::?\d\d)?/g,UA=/([+-]|\d\d)/g;function QA(e){e===void 0&&(e="");var t=e.match(LA);if(!t)return null;var r=(""+t[0]).match(UA)||["-",0,0],n=r[0],o=r[1],i=r[2],a=+o*60+ +i;return a===0?0:n==="+"?a:-a}var Ip=function(e,t,r){var n=t.prototype;r.utc=function(h){var S={date:h,utc:!0,args:arguments};return new t(S)},n.utc=function(h){var S=r(this.toDate(),{locale:this.$L,utc:!0});return h?S.add(this.utcOffset(),_e):S},n.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var o=n.parse;n.parse=function(h){h.utc&&(this.$u=!0),this.$utils().u(h.$offset)||(this.$offset=h.$offset),o.call(this,h)};var i=n.init;n.init=function(){if(this.$u){var h=this.$d;this.$y=h.getUTCFullYear(),this.$M=h.getUTCMonth(),this.$D=h.getUTCDate(),this.$W=h.getUTCDay(),this.$H=h.getUTCHours(),this.$m=h.getUTCMinutes(),this.$s=h.getUTCSeconds(),this.$ms=h.getUTCMilliseconds()}else i.call(this)};var a=n.utcOffset;n.utcOffset=function(h,S){var y=this.$utils(),b=y.u;if(b(h))return this.$u?0:b(this.$offset)?a.call(this):this.$offset;if(typeof h=="string"&&(h=QA(h),h===null))return this;var R=Math.abs(h)<=16?h*60:h,F=this;if(S)return F.$offset=R,F.$u=h===0,F;if(h!==0){var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();F=this.local().add(R+x,_e),F.$offset=R,F.$x.$localOffset=x}else F=this.utc();return F};var m=n.format,f="YYYY-MM-DDTHH:mm:ss[Z]";n.format=function(h){var S=h||(this.$u?f:"");return m.call(this,S)},n.valueOf=function(){var h=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-h*Lr},n.isUTC=function(){return!!this.$u},n.toISOString=function(){return this.toDate().toISOString()},n.toString=function(){return this.toDate().toUTCString()};var s=n.toDate;n.toDate=function(h){return h==="s"&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():s.call(this)};var g=n.diff;n.diff=function(h,S,y){if(h&&this.$u===h.$u)return g.call(this,h,S,y);var b=this.local(),R=r(h).local();return g.call(b,R,S,y)}};Le.extend(Ip);Le.extend(Ep);var Fp=()=>({organizationId:"",accessToken:"",search:{locale:"en-US",timezone:Le.tz.guess(),authenticationProviders:[]},analytics:{enabled:!0,originContext:"Search",originLevel2:"default",originLevel3:"default",anonymous:!1,deviceId:"",userDisplayName:"",documentLocation:"",analyticsMode:"next",source:{}},knowledge:{answerConfigurationId:""},environment:"prod"});p();u();d();l();var BA=/(^|; )Coveo-Pendragon=([^;]*)/;function Us(){return typeof window>"u"?!1:BA.exec(document.cookie)?.pop()||null}var Pp=le(Fp(),e=>e.addCase(At,(t,r)=>{$A(t,r.payload)}).addCase(et,(t,r)=>{HA(t,r.payload)}).addCase(vr,(t,r)=>{zA(t,r.payload)}).addCase(Ar,t=>{t.analytics.enabled=!1}).addCase(Cr,t=>{t.analytics.enabled=!0}).addCase(wo,(t,r)=>{t.analytics.originLevel2=r.payload.originLevel2}).addCase(xo,(t,r)=>{t.analytics.originLevel3=r.payload.originLevel3}).addCase(mi,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(ju,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(Ct,(t,r)=>{H(r.payload.tab)||(t.analytics.originLevel2=r.payload.tab)}));function $A(e,t){H(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",H(t.organizationId)||(e.organizationId=t.organizationId)}function HA(e,t){H(t.proxyBaseUrl)||(e.search.apiBaseUrl=t.proxyBaseUrl),H(t.locale)||(e.search.locale=t.locale),H(t.timezone)||(e.search.timezone=t.timezone),H(t.authenticationProviders)||(e.search.authenticationProviders=t.authenticationProviders)}function zA(e,t){H(t.enabled)||(e.analytics.enabled=t.enabled),H(t.originContext)||(e.analytics.originContext=t.originContext),H(t.originLevel2)||(e.analytics.originLevel2=t.originLevel2),H(t.originLevel3)||(e.analytics.originLevel3=t.originLevel3),H(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),H(t.trackingId)||(e.analytics.trackingId=t.trackingId),H(t.analyticsMode)||(e.analytics.analyticsMode=t.analyticsMode),H(t.source)||(e.analytics.source=t.source);try{let r=Us();r&&(e.analytics.analyticsMode="next",e.analytics.trackingId=r)}catch{}H(t.runtimeEnvironment)||(e.analytics.runtimeEnvironment=t.runtimeEnvironment),H(t.anonymous)||(e.analytics.anonymous=t.anonymous),H(t.deviceId)||(e.analytics.deviceId=t.deviceId),H(t.userDisplayName)||(e.analytics.userDisplayName=t.userDisplayName),H(t.documentLocation)||(e.analytics.documentLocation=t.documentLocation)}var Ye=Pp;p();u();d();l();function GA(e){return e.instantlyCallable}var kp=()=>e=>t=>e(GA(t)?t():t);p();u();d();l();var Op=e=>()=>t=>r=>{let n=r;if(!n.error)return t(r);let o=n.error;if(n.payload?.ignored||e.error({error:o,action:r},`Action dispatch error ${n.type}`),n.error.name!=="SchemaValidationError")return t(r)},Tp=e=>t=>r=>n=>(e.debug({action:n,nextState:t.getState()},`Action dispatched: ${n.type}`),r(n));p();u();d();l();var Qs=(e,t)=>{let{referrer:r,userAgent:n,location:o,clientId:i}=e.getMeta("");return{...(t?t():{}),referrer:r,userAgent:n,location:o,clientId:i}};p();u();d();l();function Dp(e,t){let r={...e},n,o=i=>(a,m)=>{let f=i(a,m);return n?n(f,m):f};return{get combinedReducer(){let i=Oc(Object.entries(t).filter(([a])=>!(a in r)).map(([a,m])=>[a,()=>m]));return o(pr({...i,...r}))},containsAll(i){return Object.keys(i).every(m=>m in r)},add(i){Object.keys(i).filter(a=>!(a in r)).forEach(a=>{r[a]=i[a]})},addCrossReducer(i){n=i}}}p();u();d();l();p();u();d();l();function WA(e){if(!e||!YA(e))return null;try{let r=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=atob(r),o=decodeURIComponent(n.split("").map(i=>`%${`00${i.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));return JSON.parse(o)}catch{return null}}function qp(e,t=60){if(!e)return!1;let r=WA(e);if(!r||typeof r.exp!="number")return!1;let n=Math.floor(Date.now()/1e3);return r.exp<=n+t}function YA(e){return e?/^[A-Za-z0-9_-]{2,}(?:\.[A-Za-z0-9_-]{2,}){2}$/.test(e):!1}function Np(e,t){let r=0,n=null,o=Zn(()=>{r=0},500),i=/*#__PURE__*/function(){var _ref30=_asyncToGenerator(function*(f,s=!1){let g=!n;g&&t&&(n=_asyncToGenerator(function*(){return s&&JA(t),yield t()})().finally(()=>{n=null}));let h=yield n;return g&&h&&f.dispatch(At({accessToken:h})),h});return function i(_x67){return _ref30.apply(this,arguments)}}(),a=/*#__PURE__*/function(){var _ref32=_asyncToGenerator(function*(f){let s=f.getState(),g=XA(s);if(!(!g||!qp(g))){e.debug("Access token is expired or about to expire, attempting renewal.");try{(yield i(f))?e.debug("Access token was renewed."):e.warn("Access token renewal returned an empty token. Please check the #renewAccessToken function.")}catch(h){e.warn(h,"Access token renewal failed. A retry will occur if necessary.")}}});return function a(_x68){return _ref32.apply(this,arguments)}}(),m=/*#__PURE__*/function(){var _ref33=_asyncToGenerator(function*(f,s,g){if(r>=5)return e.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),Mp(f,s.error),s;r++,o(),yield i(f,!0),f.dispatch(g)});return function m(_x69,_x70,_x71){return _ref33.apply(this,arguments)}}();return f=>s=>(/*#__PURE__*/function(){var _ref34=_asyncToGenerator(function*(g){let h=typeof g=="function",S=typeof t=="function";if(!h)return s(g);S&&(yield a(f));let y=yield s(g);return KA(y)?S?yield m(f,y,g):(e.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),Mp(f,y.error),y):y});return function(_x72){return _ref34.apply(this,arguments)}}())}function KA(e){return typeof e=="object"&&e!==null&&"error"in e&&e.error?.name===new dr().name}function Mp(e,t){e.dispatch(Po({status:401,statusCode:401,message:t.message,type:t.name}))}function JA(_x73){return _JA.apply(this,arguments)}function _JA(){_JA=_asyncToGenerator(function*(e){try{return yield e()}catch{return""}});return _JA.apply(this,arguments)}function XA(e){return e.configuration.accessToken}p();u();d();l();function jp({reducer:e,preloadedState:t,middlewares:r=[],thunkExtraArguments:n,name:o}){return Cu({reducer:e,preloadedState:t,devTools:{stateSanitizer:i=>i.history?{...i,history:"<<OMIT>>"}:i,name:o,shouldHotReload:!1},middleware:i=>i({thunk:{extraArgument:n}}).prepend(...r).concat(Tp(n.logger))})}function ZA(e,t){let{analytics:r}=e,{analyticsClientMiddleware:n,...o}=r??{},i={...o,...(r?.proxyBaseUrl&&{apiBaseUrl:r.proxyBaseUrl,nexApiBaseUrl:r.proxyBaseUrl})};return i.analyticsMode!=="next"&&kc()?(t.info("Analytics disabled since doNotTrack is active."),{...i,enabled:!1}):i}function _p(e,t){let r={...e.reducers,configuration:Ye,version:bp},n=eC({...e,reducers:r},t,Ye),{accessToken:o,environment:i,organizationId:a}=e.configuration;n.dispatch(At({accessToken:o,environment:i,organizationId:a}));let m=ZA(e.configuration,n.logger);return m&&n.dispatch(vr(m)),n}function eC(e,t,r){let{reducers:n,navigatorContextProvider:o}=e,i=Dp({...n,configurationReducer:r},e.preloadedState??{});e.crossReducer&&i.addCrossReducer(e.crossReducer);let a=t.logger,m={...t,get relay(){return kn(s.state,o)},get navigatorContext(){return Qs(this.relay,o)}},f=tC(e,m,i),s={addReducers(g){i.containsAll(g)||(i.add(g),f.replaceReducer(i.combinedReducer))},dispatch:f.dispatch,subscribe:f.subscribe,enableAnalytics(){f.dispatch(Cr())},disableAnalytics(){f.dispatch(Ar())},get state(){return f.getState()},get relay(){return kn(this.state,o)},get navigatorContext(){return Qs(this.relay,o)},logger:a,store:f};return s}function tC(e,t,r){let{preloadedState:n,configuration:o}=e,i=o.name||"coveo-headless",a=rC(e,t.logger);return jp({preloadedState:n,reducer:r.combinedReducer,middlewares:a,thunkExtraArguments:t,name:i})}function rC(e,t){let{renewAccessToken:r}=e.configuration,n=Np(t,r);return[kp,n,Op(t),xp].concat(Ls.middleware,e.middlewares||[])}p();u();d();l();var Gp=Wn(zp(),1);function Wp(e){return(0,Gp.pino)({name:"@coveo/headless",level:e?.level||"warn",formatters:{log:e?.logFormatter}})}p();u();d();l();function Yp(e,t){let r=AC(e),n=Qe,o=CC(e);return{analyticsClientMiddleware:r,validatePayload:n,preprocessRequest:o,logger:t}}function AC(e){let{analytics:t}=e,r=(n,o)=>o;return t?.analyticsClientMiddleware||r}function CC(e){return e.preprocessRequest||ro}p();u();d();l();p();u();d();l();var Kp={organizationId:U,accessToken:U,name:new V({required:!1,emptyAllowed:!1}),analytics:new Q({options:{required:!1},values:{enabled:new K({required:!1}),originContext:new V({required:!1}),originLevel2:new V({required:!1}),originLevel3:new V({required:!1}),analyticsMode:new V({constrainTo:["legacy","next"],required:!1,default:"next"}),proxyBaseUrl:new V({required:!1,url:!0}),trackingId:new V({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/})}}),environment:new V({required:!1,default:"prod",constrainTo:["prod","hipaa","stg","dev"]})};function Jp(){return{organizationId:"searchuisamples",accessToken:"xx564559b1-0045-48e1-953c-3addd1ee4457"}}var Xp=new ke({...Kp,pipeline:new V({required:!1,emptyAllowed:!0}),searchHub:Se,locale:Se,timezone:Se});function Ws(){return{...Jp(),searchHub:"default"}}var bC={debug:Fo,pipeline:xr,searchHub:jr,recommendation:Mr};function Zp(e){let t=Wp(e.loggerOptions);wC(e.configuration,t);let r=xC(e.configuration,t),n={...Yp(e.configuration,t),apiClient:r},o={...e,reducers:bC},i=_p(o,n),{pipeline:a,searchHub:m,timezone:f,locale:s,proxyBaseUrl:g}=e.configuration;return i.dispatch(et({timezone:f,locale:s,proxyBaseUrl:g})),H(a)||i.dispatch(br(a)),H(m)||i.dispatch(Nr(m)),{...i,get state(){return i.state}}}function wC(e,t){try{Xp.validate(e)}catch(r){throw t.error(r,"Recommendation engine configuration error"),r}}function xC(e,t){return new io({logger:t,preprocessRequest:e.preprocessRequest||ro,postprocessSearchResponseMiddleware:e.preprocessSearchResponseMiddleware||Wc,postprocessFacetSearchResponseMiddleware:Yc,postprocessQuerySuggestResponseMiddleware:Kc})}p();u();d();l();p();u();d();l();p();u();d();l();var RC=new J({each:U,required:!0}),ef=(e,t)=>(N(e,U),Jn(t)?N(t,U):N(t,RC),{payload:{contextKey:e,contextValue:t}}),ir=T("context/set",e=>{for(let[t,r]of Object.entries(e))ef(t,r);return{payload:e}}),ar=T("context/add",e=>ef(e.contextKey,e.contextValue)),sr=T("context/remove",e=>N(e,U));p();u();d();l();p();u();d();l();function hi(){return{contextValues:{}}}var Si=le(hi(),e=>{e.addCase(ir,(t,r)=>{t.contextValues=r.payload}).addCase(ar,(t,r)=>{t.contextValues[r.payload.contextKey]=r.payload.contextValue}).addCase(sr,(t,r)=>{delete t.contextValues[r.payload]}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.context.contextValues)})});p();u();d();l();function Mt(e){let t,r=new Map,n=()=>r.size===0,o=i=>{try{let a=JSON.stringify(i),m=t!==a;return t=a,m}catch(a){return console.warn("Could not detect if state has changed, check the controller \"get state method\"",a),!0}};return{subscribe(i){i();let a=Symbol(),m;return n()&&(t=JSON.stringify(this.state),m=e.subscribe(()=>{o(this.state)&&r.forEach(f=>f())})),r.set(a,i),()=>{r.delete(a),n()&&m?.()}},get state(){return{}}}}p();u();d();l();var EC=["caseId","caseNumber"],IC={caseId:"caseContext",caseNumber:"caseContext"},Qn=class extends Error{constructor(t){super(`The key "${t}" is reserved for internal use. Use ${IC[t]} to set this value.}`)}};function Ys(e){return EC.includes(e)}var FC=new ke({values:new Q({options:{required:!1}})});function tf(e,t={}){if(!OC(e))throw Ke;let r=Mt(e),{dispatch:n}=e,o=()=>e.state,i=Ou(e,FC,t.initialState,"buildContext");return i.values&&n(ir(i.values)),{...r,get state(){return{values:o().context.contextValues}},set(a){n(ir(a))},...(o().configuration.analytics.analyticsMode==="legacy"?PC(n):kC(n))}}var PC=e=>({add(t,r){e(ar({contextKey:t,contextValue:r}))},remove(t){e(sr(t))}}),kC=e=>({add(t,r){if(Ys(t))throw new Qn(t);e(ar({contextKey:t,contextValue:r}))},remove(t){if(Ys(t))throw new Qn(t);e(sr(t))}});function OC(e){return e.addReducers({context:Si}),!0}function rf(e,t){return tf(e,t)}p();u();d();l();p();u();d();l();var Gr=T("dictionaryFieldContext/set",e=>{let t=new Q({options:{required:!0}}),r=N(e,t).error;if(r)return{payload:e,error:r};let n=Object.values(e),o=new J({each:ve}),i=N(n,o).error;return i?{payload:e,error:i}:{payload:e}}),Wr=T("dictionaryFieldContext/add",e=>{let t=new Q({options:{required:!0},values:{field:ve,key:ve}});return N(e,t)}),Yr=T("dictionaryFieldContext/remove",e=>N(e,ve));p();u();d();l();p();u();d();l();function vi(){return{contextValues:{}}}var Ai=le(vi(),e=>{e.addCase(Gr,(t,r)=>{t.contextValues=r.payload}).addCase(Wr,(t,r)=>{let{field:n,key:o}=r.payload;t.contextValues[n]=o}).addCase(Yr,(t,r)=>{delete t.contextValues[r.payload]}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.dictionaryFieldContext.contextValues)})});function nf(e){if(!TC(e))throw Ke;let t=Mt(e),{dispatch:r}=e,n=()=>e.state;return{...t,get state(){return{values:n().dictionaryFieldContext.contextValues}},set(o){r(Gr(o))},add(o,i){r(Wr({field:o,key:i}))},remove(o){r(Yr(o))}}}function TC(e){return e.addReducers({dictionaryFieldContext:Ai}),!0}p();u();d();l();p();u();d();l();p();u();d();l();p();u();d();l();var Ci=T("breadcrumb/deselectAll"),of=T("breadcrumb/deselectAllNonBreadcrumbs");p();u();d();l();p();u();d();l();var Bn={value:U,numberOfResults:new $({min:0}),state:U};p();u();d();l();var ne=U;var NC=new $({min:1,default:8,required:!1}),jC=new $({min:1,max:20,default:5,required:!1}),_C={desiredCount:jC,numberOfValues:NC},h$=T("automaticFacet/setOptions",e=>N(e,_C)),S$=T("automaticFacet/deselectAll",e=>N(e,ne)),VC=U,af=T("automaticFacet/toggleSelectValue",e=>N(e,{field:VC,selection:new Q({values:Bn})}));p();u();d();l();p();u();d();l();var LC={state:new ce({required:!0}),numberOfResults:new $({required:!0,min:0}),value:new V({required:!0,emptyAllowed:!0}),path:new J({required:!0,each:U}),moreValuesAvailable:new K({required:!1})};function Ks(e){e.children.forEach(t=>{Ks(t)}),Qe({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},LC)}var Kr={facetId:ne,field:U,tabs:new Q({options:{required:!1},values:{included:new J({each:new V}),excluded:new J({each:new V})}}),activeTab:new V({required:!1}),delimitingCharacter:new V({required:!1,emptyAllowed:!0}),filterFacetCount:new K({required:!1}),injectionDepth:new $({required:!1,min:0}),numberOfValues:new $({required:!1,min:1}),sortCriteria:new ce({required:!1}),basePath:new J({required:!1,each:U}),filterByBasePath:new K({required:!1})};var N$=T("categoryFacet/register",e=>N(e,Kr)),sf=T("categoryFacet/toggleSelectValue",e=>{try{return Qe(e.facetId,U),Ks(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:ut(t)}}}),cf=T("categoryFacet/deselectAll",e=>N(e,Kr.facetId)),j$=T("categoryFacet/updateNumberOfValues",e=>N(e,{facetId:Kr.facetId,numberOfValues:Kr.numberOfValues})),_$=T("categoryFacet/updateSortCriterion",e=>N(e,{facetId:Kr.facetId,criterion:new ce})),V$=T("categoryFacet/updateBasePath",e=>N(e,{facetId:Kr.facetId,basePath:new J({each:U})}));p();u();d();l();p();u();d();l();var $n={facetId:ne,captions:new Q({options:{required:!1}}),numberOfValues:new $({required:!1,min:1}),query:new V({required:!1,emptyAllowed:!0})};var UC={path:new J({required:!0,each:U}),displayValue:ve,rawValue:ve,count:new $({required:!0,min:0})},uf=T("categoryFacet/selectSearchResult",e=>N(e,{facetId:ne,value:new Q({values:UC})})),nH=T("categoryFacetSearch/register",e=>N(e,$n));p();u();d();l();var lf={facetId:ne,value:new Q({values:{displayValue:ve,rawValue:ve,count:new $({required:!0,min:0})}})},mH=T("facetSearch/register",e=>N(e,$n)),gH=T("facetSearch/update",e=>N(e,$n)),df=T("facetSearch/toggleSelectValue",e=>N(e,lf)),pf=T("facetSearch/toggleExcludeValue",e=>N(e,lf));p();u();d();l();p();u();d();l();var bH=new V({regex:/^[a-zA-Z0-9-_]+$/}),wH=new V({required:!0}),xH=new J({each:new V}),RH=new V,EH=new K,IH=new K,FH=new $({min:0}),QC=new $({min:1}),PH=new K({required:!0}),BC=new Q,$C=new V,HC={captions:BC,numberOfValues:QC,query:$C},kH=new Q({values:HC}),ff=new Q({options:{required:!1},values:{type:new V({constrainTo:["simple"],emptyAllowed:!1,required:!0}),values:new J({required:!0,max:25,each:new V({emptyAllowed:!1,required:!0})})}}),OH=new K,mf=new J({min:1,max:25,required:!1,each:new V({emptyAllowed:!1,required:!0})});var zC={facetId:ne,field:new V({required:!0,emptyAllowed:!0}),tabs:new Q({options:{required:!1},values:{included:new J({each:new V}),excluded:new J({each:new V})}}),activeTab:new V({required:!1}),filterFacetCount:new K({required:!1}),injectionDepth:new $({required:!1,min:0}),numberOfValues:new $({required:!1,min:1}),sortCriteria:new ce({required:!1}),resultsMustMatch:new ce({required:!1}),allowedValues:ff,customSort:mf},BH=T("facet/register",e=>N(e,zC)),gf=T("facet/toggleSelectValue",e=>N(e,{facetId:ne,selection:new Q({values:Bn})})),yf=T("facet/toggleExcludeValue",e=>N(e,{facetId:ne,selection:new Q({values:Bn})})),bi=T("facet/deselectAll",e=>N(e,ne)),$H=T("facet/updateSortCriterion",e=>N(e,{facetId:ne,criterion:new ce({required:!0})})),HH=T("facet/updateNumberOfValues",e=>N(e,{facetId:ne,numberOfValues:new $({required:!0,min:1})})),zH=T("facet/updateIsFieldExpanded",e=>N(e,{facetId:ne,isFieldExpanded:new K({required:!0})})),GH=T("facet/updateFreezeCurrentValues",e=>N(e,{facetId:ne,freezeCurrentValues:new K({required:!0})}));p();u();d();l();p();u();d();l();function Sf(e){let t=hf(e.start,e),r=hf(e.end,e),n=e.endInclusive??!1,o=e.state??"idle";return{start:t,end:r,endInclusive:n,state:o}}function hf(e,t){let{dateFormat:r}=t;return Ld(e)?(Es(e),jd(e)):typeof e=="string"&&Pt(e)?(Es(e),e):(qd(e,r),di(Qr(e,r)))}p();u();d();l();var vf=T("rangeFacet/updateSortCriterion",e=>N(e,{facetId:ne,criterion:new ce({required:!0})}));p();u();d();l();var wi={state:U,start:new $({required:!0}),end:new $({required:!0}),endInclusive:new K({required:!0}),numberOfResults:new $({required:!0,min:0})},xi={start:U,end:U,endInclusive:new K({required:!0}),state:U,numberOfResults:new $({required:!0,min:0})};var GC={start:U,end:U,endInclusive:new K({required:!0}),state:U},WC={facetId:ne,field:U,tabs:new Q({options:{required:!1},values:{included:new J({each:new V}),excluded:new J({each:new V})}}),activeTab:new V({required:!1}),currentValues:new J({required:!1,each:new Q({values:GC})}),generateAutomaticRanges:new K({required:!0}),filterFacetCount:new K({required:!1}),injectionDepth:new $({required:!1,min:0}),numberOfValues:new $({required:!1,min:1}),sortCriteria:new ce({required:!1}),rangeAlgorithm:new ce({required:!1})};function Af(e){return Pt(e)?Vn(e):e}function Cf(e){e.currentValues&&e.currentValues.forEach(t=>{let{start:r,end:n}=Sf(t);if(Qr(Af(r)).isAfter(Qr(Af(n))))throw new Error(`The start value is greater than the end value for the date range ${t.start} to ${t.end}`)})}var Dz=T("dateFacet/register",e=>{try{return Qe(e,WC),Cf(e),{payload:e,error:null}}catch(t){return{payload:e,error:ut(t)}}}),bf=T("dateFacet/toggleSelectValue",e=>N(e,{facetId:ne,selection:new Q({values:xi})})),wf=T("dateFacet/toggleExcludeValue",e=>N(e,{facetId:ne,selection:new Q({values:xi})})),xf=T("dateFacet/updateFacetValues",e=>{try{return Qe(e,{facetId:ne,values:new J({each:new Q({values:xi})})}),Cf({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:ut(t)}}});p();u();d();l();var YC={state:U,start:new $({required:!0}),end:new $({required:!0}),endInclusive:new K({required:!0})},KC={facetId:ne,field:U,tabs:new Q({options:{required:!1},values:{included:new J({each:new V}),excluded:new J({each:new V})}}),activeTab:new V({required:!1}),currentValues:new J({required:!1,each:new Q({values:YC})}),generateAutomaticRanges:new K({required:!0}),filterFacetCount:new K({required:!1}),injectionDepth:new $({required:!1,min:0}),numberOfValues:new $({required:!1,min:1}),sortCriteria:new ce({required:!1}),rangeAlgorithm:new ce({required:!1})};function Rf(e){e.currentValues&&e.currentValues.forEach(({start:t,end:r})=>{if(t>r)throw new Error(`The start value is greater than the end value for the numeric range ${t} to ${r}`)})}var zz=T("numericFacet/register",e=>{try{return N(e,KC),Rf(e),{payload:e,error:null}}catch(t){return{payload:e,error:ut(t)}}}),Ef=T("numericFacet/toggleSelectValue",e=>N(e,{facetId:ne,selection:new Q({values:wi})})),If=T("numericFacet/toggleExcludeValue",e=>N(e,{facetId:ne,selection:new Q({values:wi})})),Ff=T("numericFacet/updateFacetValues",e=>{try{return Qe(e,{facetId:ne,values:new J({each:new Q({values:wi})})}),Rf({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:ut(t)}}});p();u();d();l();p();u();d();l();var Pf=T("facet/updateFacetAutoSelection",e=>N(e,{allow:new K({required:!0})}));p();u();d();l();p();u();d();l();var Ri=class extends wt{constructor(r){super(r);this.getState=r}get activeInstantResultQuery(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].q;return null}get activeInstantResultCache(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].cache[o];return null}get results(){return this.activeInstantResultCache?.results}get queryText(){return this.activeInstantResultQuery??je().q}get responseTime(){return this.activeInstantResultCache?.duration??Je().duration}get numberOfResults(){return this.activeInstantResultCache?.totalCountFiltered??Je().response.totalCountFiltered}getSearchUID(){return this.activeInstantResultCache?.searchUid||super.getSearchUID()}};var kf=()=>Fe("analytics/instantResult/searchboxAsYouType",e=>e.makeSearchboxAsYouType(),e=>new Ri(e)),Of=()=>({actionCause:"searchboxAsYouType"});p();u();d();l();var Js={id:U},JC={...Js,q:ve},R2=T("instantResults/register",e=>N(e,Js)),Ei=T("instantResults/updateQuery",e=>N(e,JC)),E2=T("instantResults/clearExpired",e=>N(e,Js));p();u();d();l();var Ii=new $({required:!0,min:0}),Fi=T("pagination/registerNumberOfResults",e=>N(e,Ii)),Pi=T("pagination/updateNumberOfResults",e=>N(e,Ii)),ki=T("pagination/registerPage",e=>N(e,Ii)),Jr=T("pagination/updatePage",e=>N(e,Ii)),Oi=T("pagination/nextPage"),Ti=T("pagination/previousPage");p();u();d();l();var Xr=T("query/updateQuery",e=>N(e,{q:new V,enableQuerySyntax:new K}));p();u();d();l();p();u();d();l();p();u();d();l();var Nt=()=>({cq:"",cqWasSet:!1,aq:"",aqWasSet:!1,lq:"",lqWasSet:!1,dq:"",dqWasSet:!1,defaultFilters:{cq:"",aq:"",lq:"",dq:""}});var Xs=()=>Fe("search/logFetchMoreResults",e=>e.makeFetchMoreResults()),jt=e=>Fe("search/queryError",(t,r)=>t.makeQueryError({query:r.query?.q||je().q,aq:r.advancedSearchQueries?.aq||Nt().aq,cq:r.advancedSearchQueries?.cq||Nt().cq,dq:r.advancedSearchQueries?.dq||Nt().dq,errorType:e.type,errorMessage:e.message}));p();u();d();l();p();u();d();l();var lG=T("didYouMean/enable"),dG=T("didYouMean/disable"),pG=T("didYouMean/automaticCorrections/disable"),fG=T("didYouMean/automaticCorrections/enable"),Di=T("didYouMean/correction",e=>N(e,U)),mG=T("didYouMean/automaticCorrections/mode",e=>N(e,new V({constrainTo:["next","legacy"],emptyAllowed:!1,required:!0})));p();u();d();l();var Zs=()=>Fe("analytics/didyoumean/automatic",e=>e.makeDidYouMeanAutomatic());var Tf=()=>({actionCause:"didYouMeanAutomatic"});p();u();d();l();p();u();d();l();function Df(){return{freezeFacetOrder:!1,facets:{}}}p();u();d();l();function qf(){return[]}p();u();d();l();function Hn(){return{firstResult:0,defaultNumberOfResults:10,numberOfResults:10,totalCountFiltered:0}}p();u();d();l();function Mf(){return{}}p();u();d();l();function Nf(){return{}}p();u();d();l();function jf(){return{}}function ot(e){return{context:e.context||hi(),dictionaryFieldContext:e.dictionaryFieldContext||vi(),facetSet:e.facetSet||Ko(),numericFacetSet:e.numericFacetSet||Yo(),dateFacetSet:e.dateFacetSet||Wo(),categoryFacetSet:e.categoryFacetSet||Go(),automaticFacetSet:e.automaticFacetSet??zo(),pagination:e.pagination||Hn(),query:e.query||je(),tabSet:e.tabSet||jf(),advancedSearchQueries:e.advancedSearchQueries||Nt(),staticFilterSet:e.staticFilterSet||Nf(),querySet:e.querySet||Mf(),sortCriteria:e.sortCriteria||Jo(),pipeline:e.pipeline||wr(),searchHub:e.searchHub||Tr(),facetOptions:e.facetOptions||Df(),facetOrder:e.facetOrder??qf(),debug:e.debug??Io()}}p();u();d();l();var kW=new Q({values:{undoneQuery:ve},options:{required:!0}}),_f=()=>Fe("analytics/trigger/query",(e,t)=>t.triggers?.queryModification.newQuery?e.makeTriggerQuery():null);p();u();d();l();var qi=T("trigger/query/ignore",e=>N(e,new V({emptyAllowed:!0,required:!0}))),Mi=T("trigger/query/modification",e=>N(e,new Q({values:{originalQuery:Se,modification:Se}})));p();u();d();l();var _t=/*#__PURE__*/function(){var _ref35=_asyncToGenerator(function*(e,t){let r=eb(e),n=fi(e),o=XC(e),i=yield Tt(e,t),a=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return kt({...i,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(r&&{cq:r}),...(n.length&&{facets:n}),...(e.pagination&&{numberOfResults:a(),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:o}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function _t(_x74,_x75){return _ref35.apply(this,arguments)}}();function XC(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(ZC).filter(r=>r.currentValues.length>0):void 0}function ZC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function eb(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=tb(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function tb(e){return Object.values(e.staticFilterSet||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o})}var Vt=class{constructor(t,r=n=>{this.dispatch(Xr({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI(_x76,_x77){var _this10=this;return _asyncToGenerator(function*({mappings:t,request:r},n){let o=Date.now(),i=pi(yield _this10.extra.apiClient.search(r,n),t),a=Date.now()-o,m=_this10.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}}).apply(this,arguments)}process(t){var _this11=this;return _asyncToGenerator(function*(){return _this11.processQueryErrorOrContinue(t)??(yield _this11.processQueryCorrectionsOrContinue(t))??(yield _this11.processQueryTriggersOrContinue(t))??_this11.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return Oe(t.response)?(this.dispatch(jt(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this12=this;return _asyncToGenerator(function*(){let r=_this12.getState(),n=_this12.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let s=a.length===0&&m&&m.length!==0,g=!H(f)&&!H(f.correctedQuery);if(!s&&!g)return null;let S=s?yield _this12.processLegacyDidYouMeanAutoCorrection(t):_this12.processModernDidYouMeanAutoCorrection(t);return _this12.dispatch(tt(ot(_this12.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this13=this;return _asyncToGenerator(function*(){let r=_this13.getCurrentQuery(),n=_this13.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this13.automaticallyRetryQueryWithCorrection(o);return Oe(i.response)?(_this13.dispatch(jt(i.response.error)),_this13.rejectWithValue(i.response.error)):(_this13.logOriginalAnalyticsQueryBeforeAutoCorrection(t),_this13.dispatch(tt(ot(_this13.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r,analyticsAction:Zs()})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o,analyticsAction:Zs()}}logOriginalAnalyticsQueryBeforeAutoCorrection(t){let r=this.getState(),n=this.getSuccessResponse(t);this.analyticsAction?.()(this.dispatch,()=>this.getStateAfterResponse(t.queryExecuted,t.duration,r,n),this.extra)}processQueryTriggersOrContinue(t){var _this14=this;return _asyncToGenerator(function*(){let r=_this14.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this14.getState().triggers?.queryModification.queryToIgnore===n)return _this14.dispatch(qi("")),null;_this14.analyticsAction&&(yield _this14.dispatch(_this14.analyticsAction));let i=_this14.getCurrentQuery(),a=yield _this14.automaticallyRetryQueryWithTriggerModification(n);return Oe(a.response)?(_this14.dispatch(jt(a.response.error)),_this14.rejectWithValue(a.response.error)):(_this14.dispatch(tt(ot(_this14.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i,analyticsAction:_f()})})()}getStateAfterResponse(t,r,n,o){return{...n,query:{q:t,enableQuerySyntax:n.query?.enableQuerySyntax??je().enableQuerySyntax},search:{...Je(),duration:r,response:o,results:o.results}}}processSuccessResponse(t){return this.dispatch(tt(ot(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery(),analyticsAction:this.analyticsAction}}getSuccessResponse(t){return ao(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this15=this;return _asyncToGenerator(function*(){_this15.onUpdateQueryForCorrection(t);let r=yield _this15.fetchFromAPI(yield _t(_this15.getState()),{origin:"mainSearch"});return _this15.dispatch(Di(t)),r})()}automaticallyRetryQueryWithTriggerModification(t){var _this16=this;return _asyncToGenerator(function*(){return _this16.dispatch(Mi({newQuery:t,originalQuery:_this16.getCurrentQuery()})),_this16.onUpdateQueryForCorrection(t),yield _this16.fetchFromAPI(yield _t(_this16.getState()),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get analyticsAction(){return this.config.analyticsAction}get rejectWithValue(){return this.config.rejectWithValue}};var PY=re("search/executeSearch",/*#__PURE__*/function(){var _ref36=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Ni(r,t,e)});return function(_x78,_x79){return _ref36.apply(this,arguments)}}()),kY=re("search/fetchPage",/*#__PURE__*/function(){var _ref37=_asyncToGenerator(function*(e,t){let r=t.getState();return yield tc(r,t,e)});return function(_x80,_x81){return _ref37.apply(this,arguments)}}()),OY=re("search/fetchMoreResults",/*#__PURE__*/function(){var _ref38=_asyncToGenerator(function*(e,t){let r=t.getState();return yield rc(t,r)});return function(_x82,_x83){return _ref38.apply(this,arguments)}}()),TY=re("search/fetchFacetValues",/*#__PURE__*/function(){var _ref39=_asyncToGenerator(function*(e,t){let r=t.getState();return yield ib(t,e,r)});return function(_x84,_x85){return _ref39.apply(this,arguments)}}()),DY=re("search/fetchInstantResults",/*#__PURE__*/function(){var _ref40=_asyncToGenerator(function*(e,t){return ec(e,t)});return function(_x86,_x87){return _ref40.apply(this,arguments)}}()),rb=/*#__PURE__*/function(){var _ref41=_asyncToGenerator(function*(e,t){let r=yield _t(e,t);return r.request={...r.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},r});return function rb(_x88,_x89){return _ref41.apply(this,arguments)}}(),nb=/*#__PURE__*/function(){var _ref42=_asyncToGenerator(function*(e,t,r){let n=yield Tt(e);return kt({...n,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:r,q:t})});return function nb(_x90,_x91,_x92){return _ref42.apply(this,arguments)}}(),ob=/*#__PURE__*/function(){var _ref43=_asyncToGenerator(function*(e,t){let r=yield _t(e,t);return r.request.numberOfResults=0,r});return function ob(_x93,_x94){return _ref43.apply(this,arguments)}}(),Vf=e=>{e.configuration.analytics.enabled&&Be.getInstance().addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})};function ec(_x95,_x96){return _ec.apply(this,arguments)}function _ec(){_ec=_asyncToGenerator(function*(e,t){N(e,{id:U,q:U,maxResultsPerQuery:new $({required:!0,min:1}),cacheTimeout:new $});let{q:r,maxResultsPerQuery:n}=e,o=t.getState(),i=new Vt({...t,analyticsAction:kf()},s=>{t.dispatch(Ei({q:s,id:e.id}))}),a=yield nb(o,r,n),m=yield i.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),f=yield i.process(m);return"response"in f?{results:f.response.results,searchUid:f.response.searchUid,analyticsAction:f.analyticsAction,totalCountFiltered:f.response.totalCountFiltered,duration:f.duration}:f});return _ec.apply(this,arguments)}function tc(_x97,_x98,_x99){return _tc.apply(this,arguments)}function _tc(){_tc=_asyncToGenerator(function*(e,t,r){Vf(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Vt({...t,analyticsAction:r}),f=yield _t(e,a),s=yield m.fetchFromAPI(f,{origin:"mainSearch"});return yield m.process(s)});return _tc.apply(this,arguments)}function rc(_x100,_x101){return _rc.apply(this,arguments)}function _rc(){_rc=_asyncToGenerator(function*(e,t){let{analyticsClientMiddleware:r,preprocessRequest:n,logger:o}=e.extra,{description:i}=yield Xs().prepare({getState:()=>e.getState(),analyticsClientMiddleware:r,preprocessRequest:n,logger:o}),a=new Vt({...e,analyticsAction:Xs()}),m=yield rb(t,i),f=yield a.fetchFromAPI(m,{origin:"mainSearch"});return yield a.process(f)});return _rc.apply(this,arguments)}function ib(_x102,_x103,_x104){return _ib.apply(this,arguments)}function _ib(){_ib=_asyncToGenerator(function*(e,t,r){let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=e.extra,{description:a}=yield t.prepare({getState:()=>e.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Vt({...e,analyticsAction:t}),f=yield ob(r,a),s=yield m.fetchFromAPI(f,{origin:"facetValues"});return yield m.process(s)});return _ib.apply(this,arguments)}function Ni(_x105,_x106,_x107){return _Ni.apply(this,arguments)}function _Ni(){_Ni=_asyncToGenerator(function*(e,t,r){Vf(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=yield _t(e,a),f=new Vt({...t,analyticsAction:r}),s=yield f.fetchFromAPI(m,{origin:"mainSearch"});return yield f.process(s)});return _Ni.apply(this,arguments)}p();u();d();l();var Lt=class{constructor(t,r=n=>{this.dispatch(Xr({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI(_x108,_x109){var _this17=this;return _asyncToGenerator(function*({mappings:t,request:r},n){let o=Date.now(),i=pi(yield _this17.extra.apiClient.search(r,n),t),a=Date.now()-o,m=_this17.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}}).apply(this,arguments)}process(t){var _this18=this;return _asyncToGenerator(function*(){return _this18.processQueryErrorOrContinue(t)??(yield _this18.processQueryCorrectionsOrContinue(t))??(yield _this18.processQueryTriggersOrContinue(t))??_this18.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return Oe(t.response)?(this.dispatch(jt(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this19=this;return _asyncToGenerator(function*(){let r=_this19.getState(),n=_this19.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let s=a.length===0&&m&&m.length!==0,g=!H(f)&&!H(f.correctedQuery);if(!s&&!g)return null;let S=s?yield _this19.processLegacyDidYouMeanAutoCorrection(t):_this19.processModernDidYouMeanAutoCorrection(t);return _this19.dispatch(tt(ot(_this19.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this20=this;return _asyncToGenerator(function*(){let r=_this20.getCurrentQuery(),n=_this20.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this20.automaticallyRetryQueryWithCorrection(o);return Oe(i.response)?(_this20.dispatch(jt(i.response.error)),_this20.rejectWithValue(i.response.error)):(_this20.dispatch(tt(ot(_this20.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o}}processQueryTriggersOrContinue(t){var _this21=this;return _asyncToGenerator(function*(){let r=_this21.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this21.getState().triggers?.queryModification.queryToIgnore===n)return _this21.dispatch(qi("")),null;let i=_this21.getCurrentQuery(),a=yield _this21.automaticallyRetryQueryWithTriggerModification(n);return Oe(a.response)?(_this21.dispatch(jt(a.response.error)),_this21.rejectWithValue(a.response.error)):(_this21.dispatch(tt(ot(_this21.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i})})()}processSuccessResponse(t){return this.dispatch(tt(ot(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery()}}getSuccessResponse(t){return ao(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this22=this;return _asyncToGenerator(function*(){_this22.onUpdateQueryForCorrection(t);let r=_this22.getState(),{actionCause:n}=Tf(),o=yield _this22.fetchFromAPI(yield Dt(r,_this22.extra.navigatorContext,{actionCause:n}),{origin:"mainSearch"});return _this22.dispatch(Di(t)),o})()}automaticallyRetryQueryWithTriggerModification(t){var _this23=this;return _asyncToGenerator(function*(){return _this23.dispatch(Mi({newQuery:t,originalQuery:_this23.getCurrentQuery()})),_this23.onUpdateQueryForCorrection(t),yield _this23.fetchFromAPI(yield Dt(_this23.getState(),_this23.extra.navigatorContext),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}};var SK=re("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;N(e,{q:new V,enableQuerySyntax:new K,clearFilters:new K}),e.clearFilters&&(r(Ci()),r(of())),r(Pf({allow:!0})),r(Xr({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Jr(1))}),vK=T("search/updateSearchAction"),Lf=re("search/executeSearch",/*#__PURE__*/function(){var _ref44=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ni(r,t,e.legacy);Uf(r);let n=e.next?Qf(e.next):void 0,o=yield Dt(r,t.extra.navigatorContext,n),i=new Lt({...t,analyticsAction:n??{}}),a=yield i.fetchFromAPI(o,{origin:"mainSearch"});return yield i.process(a)});return function(_x110,_x111){return _ref44.apply(this,arguments)}}()),AK=re("search/fetchPage",/*#__PURE__*/function(){var _ref45=_asyncToGenerator(function*(e,t){let r=t.getState();if(Uf(r),r.configuration.analytics.analyticsMode==="legacy"||!e.next)return tc(r,t,e.legacy);let n=new Lt({...t,analyticsAction:e.next}),o=yield Dt(r,t.extra.navigatorContext,e.next),i=yield n.fetchFromAPI(o,{origin:"mainSearch"});return yield n.process(i)});return function(_x112,_x113){return _ref45.apply(this,arguments)}}()),CK=re("search/fetchMoreResults",/*#__PURE__*/function(){var _ref46=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return rc(t,r);let n=Ml("browseResults",t.getState),o=new Lt({...t,analyticsAction:n}),i=yield ab(r,t.extra.navigatorContext,n),a=yield o.fetchFromAPI(i,{origin:"mainSearch"});return yield o.process(a)});return function(_x114,_x115){return _ref46.apply(this,arguments)}}()),bK=re("search/fetchFacetValues",/*#__PURE__*/function(){var _ref47=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ni(r,t,e.legacy);let n=new Lt({...t,analyticsAction:{}}),o=yield cb(r,t.extra.navigatorContext),i=yield n.fetchFromAPI(o,{origin:"facetValues"});return yield n.process(i)});return function(_x116,_x117){return _ref47.apply(this,arguments)}}()),wK=re("search/fetchInstantResults",/*#__PURE__*/function(){var _ref48=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return ec(e,t);N(e,{id:U,q:U,maxResultsPerQuery:new $({required:!0,min:1}),cacheTimeout:new $});let{q:n,maxResultsPerQuery:o}=e,i=Qf(Of()),a=yield sb(r,t.extra.navigatorContext,n,o,i),m=new Lt({...t,analyticsAction:i},g=>{t.dispatch(Ei({q:g,id:e.id}))}),f=yield m.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),s=yield m.process(f);return"response"in s?{results:s.response.results,searchUid:s.response.searchUid,totalCountFiltered:s.response.totalCountFiltered,duration:s.duration}:s});return function(_x118,_x119){return _ref48.apply(this,arguments)}}()),ab=/*#__PURE__*/function(){var _ref49=_asyncToGenerator(function*(e,t,r){let n=yield Dt(e,t,r);return n.request={...n.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},n});return function ab(_x120,_x121,_x122){return _ref49.apply(this,arguments)}}(),sb=/*#__PURE__*/function(){var _ref50=_asyncToGenerator(function*(e,t,r,n,o){let i=Br(e,t,o);return kt({...i,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:n,q:r})});return function sb(_x123,_x124,_x125,_x126,_x127){return _ref50.apply(this,arguments)}}(),cb=/*#__PURE__*/function(){var _ref51=_asyncToGenerator(function*(e,t,r){let n=yield Dt(e,t,r);return n.request.numberOfResults=0,n});return function cb(_x128,_x129,_x130){return _ref51.apply(this,arguments)}}(),Uf=e=>{e.configuration.analytics.enabled&&Be.getInstance().addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})},Qf=e=>({actionCause:e.actionCause,type:e.actionCause});var Bf=le(Hn(),e=>{e.addCase(Fi,(t,r)=>{let n=nc(t),o=r.payload;t.defaultNumberOfResults=t.numberOfResults=o,t.firstResult=zn(n,o)}).addCase(Pi,(t,r)=>{t.numberOfResults=r.payload,t.firstResult=0}).addCase(mi,t=>{t.firstResult=0}).addCase(ki,(t,r)=>{let n=r.payload;t.firstResult=zn(n,t.numberOfResults)}).addCase(Jr,(t,r)=>{let n=r.payload;t.firstResult=zn(n,t.numberOfResults)}).addCase(Ti,t=>{let r=nc(t),n=Math.max(r-1,1);t.firstResult=zn(n,t.numberOfResults)}).addCase(Oi,t=>{let r=nc(t),n=lb(t),o=Math.min(r+1,n);t.firstResult=zn(o,t.numberOfResults)}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.numberOfResults=r.payload.pagination.numberOfResults,t.firstResult=r.payload.pagination.firstResult)}).addCase(Ct,(t,r)=>{t.firstResult=r.payload.firstResult??t.firstResult,t.numberOfResults=r.payload.numberOfResults??t.defaultNumberOfResults}).addCase(Lf.fulfilled,(t,r)=>{let{response:n}=r.payload;t.totalCountFiltered=n.totalCountFiltered}).addCase(bi,t=>{Ee(t)}).addCase(wf,t=>{Ee(t)}).addCase(yf,t=>{Ee(t)}).addCase(If,t=>{Ee(t)}).addCase(pf,t=>{Ee(t)}).addCase(gf,t=>{Ee(t)}).addCase(cf,t=>{Ee(t)}).addCase(sf,t=>{Ee(t)}).addCase(uf,t=>{Ee(t)}).addCase(bf,t=>{Ee(t)}).addCase(Ef,t=>{Ee(t)}).addCase(Ci,t=>{Ee(t)}).addCase(xf,t=>{Ee(t)}).addCase(Ff,t=>{Ee(t)}).addCase(df,t=>{Ee(t)}).addCase(af,t=>{Ee(t)})});function Ee(e){e.firstResult=Hn().firstResult}function nc(e){let{firstResult:t,numberOfResults:r}=e;return db(t,r)}function lb(e){let{totalCountFiltered:t,numberOfResults:r}=e;return pb(t,r)}function zn(e,t){return(e-1)*t}function db(e,t){return Math.round(e/t)+1}function pb(e,t){let r=Math.min(e,5e3);return Math.ceil(r/t)}function oc(e){return e.addReducers({pagination:Bf}),{nextPage:Oi,previousPage:Ti,registerNumberOfResults:Fi,registerPage:ki,updateNumberOfResults:Pi,updatePage:Jr}}var fb=new ke({id:new V({emptyAllowed:!0,required:!1,default:""}),numberOfRecommendations:new $({min:0})});function $f(e,t={}){if(!mb(e))throw Ke;let r=Mt(e),{dispatch:n}=e,o=()=>e.state,i=Tu(e,fb,t.options,"buildRecommendationList");return i.id!==""&&n(qr({id:i.id})),i.numberOfRecommendations&&n(oc(e).updateNumberOfResults(i.numberOfRecommendations)),{...r,refresh(){n(xt())},get state(){let a=o();return{recommendations:a.recommendation.recommendations,error:a.recommendation.error,isLoading:a.recommendation.isLoading,searchResponseId:a.recommendation.searchUid}}}}function mb(e){return e.addReducers({recommendation:Mr,configuration:Ye}),!0}p();u();d();l();p();u();d();l();function Hf(e,t,r){if(!gb(e))throw Ke;let n=1e3,o={selectionDelay:n,debounceWait:n,...t.options},i;return{select:Zn(r,o.debounceWait,{isImmediate:!0}),beginDelayedSelect(){i=setTimeout(r,o.selectionDelay)},cancelPendingSelect(){i&&clearTimeout(i)}}}function gb(e){return e.addReducers({configuration:Ye}),!0}function zf(e,t){let r=!1,n=()=>{r||(r=!0,e.dispatch(ti(t.options.result)))};return Hf(e,t,()=>{n()})}p();u();d();l();p();u();d();l();p();u();d();l();var Ut=()=>new V({required:!1,emptyAllowed:!0}),ji=T("advancedSearchQueries/update",e=>N(e,{aq:Ut(),cq:Ut(),lq:Ut(),dq:Ut()})),_i=T("advancedSearchQueries/register",e=>N(e,{aq:Ut(),cq:Ut(),lq:Ut(),dq:Ut()}));var Gf=le(Nt(),e=>{e.addCase(ji,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;ge(n)||(t.aq=n,t.aqWasSet=!0),ge(o)||(t.cq=o,t.cqWasSet=!0),ge(i)||(t.lq=i,t.lqWasSet=!0),ge(a)||(t.dq=a,t.dqWasSet=!0)}).addCase(_i,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;ge(n)||(t.defaultFilters.aq=n,t.aqWasSet||(t.aq=n)),ge(o)||(t.defaultFilters.cq=o,t.cqWasSet||(t.cq=o)),ge(i)||(t.defaultFilters.lq=i,t.lqWasSet||(t.lq=i)),ge(a)||(t.defaultFilters.dq=a,t.dqWasSet||(t.dq=a))}).addCase(qe.fulfilled,(t,r)=>r.payload?.advancedSearchQueries??t).addCase(Ct,(t,r)=>{let{aq:n,cq:o}=r.payload;ge(n)||(t.aq=n,t.aqWasSet=!0),ge(o)||(t.cq=o,t.cqWasSet=!0)})});function yb(e){return e.addReducers({advancedSearchQueries:Gf}),{updateAdvancedSearchQueries:ji,registerAdvancedSearchQueries:_i}}p();u();d();l();function hb(e){return e.addReducers({configuration:Ye}),{disableAnalytics:Ar,enableAnalytics:Cr,setOriginLevel2:wo,setOriginLevel3:xo,updateAnalyticsConfiguration:vr,updateBasicConfiguration:At}}p();u();d();l();function Sb(e){return e.addReducers({configuration:Ye,pipeline:xr,searchHub:jr}),{updateSearchConfiguration:et}}p();u();d();l();function vb(e){return e.addReducers({context:Si}),{addContext:ar,removeContext:sr,setContext:ir}}p();u();d();l();function Ab(e){return e.addReducers({debug:Fo}),{disableDebug:Eo,enableDebug:Ro}}p();u();d();l();function Cb(e){return e.addReducers({dictionaryFieldContext:Ai}),{addContext:Wr,removeContext:Yr,setContext:Gr}}p();u();d();l();p();u();d();l();p();u();d();l();var bb={collectionField:new V({emptyAllowed:!1,required:!1}),parentField:new V({emptyAllowed:!1,required:!1}),childField:new V({emptyAllowed:!1,required:!1}),numberOfFoldedResults:new $({min:0,required:!1})},Wf=T("folding/register",e=>N(e,bb)),z4=re("folding/loadCollection",/*#__PURE__*/function(){var _ref52=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}}){let i=t(),a=i.configuration.analytics.analyticsMode==="legacy"?yield Tt(i):Br(i,o),m=yield n.search({...a,q:wb(i),enableQuerySyntax:!0,cq:`@${i.folding.fields.collection}="${e}"`,filterField:i.folding.fields.collection,childField:i.folding.fields.parent,parentField:i.folding.fields.child,filterFieldRange:100},{origin:"foldingCollection"});return Oe(m)?r(m.error):{collectionId:e,results:m.success.results,searchUid:m.success.searchUid,rootResult:i.folding.collections[e].result}});return function(_x131,_x132){return _ref52.apply(this,arguments)}}());function wb(e){return e.query.q===""?"":e.query.enableQuerySyntax?`${e.query.q} OR @uri`:`( <@- ${e.query.q} -@> ) OR @uri`}p();u();d();l();var Yf=()=>({enabled:!1,fields:{collection:"foldingcollection",parent:"foldingparent",child:"foldingchild"},filterFieldRange:2,collections:{}});p();u();d();l();var Zr=T("fields/registerFieldsToInclude",e=>N(e,bo)),Vi=T("fields/fetchall/enable"),Li=T("fields/fetchall/disable"),Ui=re("fields/fetchDescription",/*#__PURE__*/function(){var _ref53=_asyncToGenerator(function*(e,{extra:t,getState:r,rejectWithValue:n}){let o=r(),{accessToken:i,environment:a,organizationId:m}=o.configuration,{apiBaseUrl:f}=o.configuration.search,s=yield t.apiClient.fieldDescriptions({accessToken:i,organizationId:m,url:f??yt(m,a)});return Oe(s)?n(s.error):s.success.fields});return function(_x133,_x134){return _ref53.apply(this,arguments)}}());p();u();d();l();var Qi=["author","language","urihash","objecttype","collection","source","permanentid"],ic=[...Qi,"date","filetype","parents"],Kf=[...ic,"ec_price","ec_name","ec_description","ec_brand","ec_category","ec_item_group_id","ec_shortdesc","ec_thumbnails","ec_images","ec_promo_price","ec_in_stock","ec_rating"],Jf=()=>({fieldsToInclude:Qi,fetchAllFields:!1,fieldsDescription:[]});var Bi=le(Jf(),e=>e.addCase(Zr,(t,r)=>{t.fieldsToInclude=[...new Set(t.fieldsToInclude.concat(r.payload))]}).addCase(Vi,t=>{t.fetchAllFields=!0}).addCase(Li,t=>{t.fetchAllFields=!1}).addCase(Ui.fulfilled,(t,{payload:r})=>{t.fieldsDescription=r}).addCase(Wf,(t,{payload:r})=>{let n=Yf().fields;t.fieldsToInclude.push(r.collectionField??n.collection,r.parentField??n.parent,r.childField??n.child)}));function xb(e){return e.addReducers({fields:Bi}),{registerFieldsToInclude:Zr,enableFetchAllFields:Vi,disableFetchAllFields:Li,fetchFieldsDescription:Ui}}p();u();d();l();function Rb(e){return e.addReducers({pipeline:xr}),{setPipeline:br}}p();u();d();l();function Eb(e){return e.addReducers({recommendation:Mr}),{getRecommendations:xt,setRecommendationId:qr}}p();u();d();l();function Ib(e){return e.addReducers({}),{logRecommendationOpen:ti}}p();u();d();l();p();u();d();l();var Fb=new ke({content:new ce({required:!0}),conditions:new ce({required:!0}),priority:new $({required:!1,default:0,min:0}),fields:new J({required:!1,each:U})});function Xf(){let e=[],t=r=>{let n=Fb.validate(r);if(!r.conditions.every(i=>i instanceof Function))throw new sn("Each template condition should be a function that takes a Result or Product as an argument and returns a boolean");return n};return{registerTemplates(...r){r.forEach(n=>{let o={...t(n),fields:n.fields||[]};e.push(o)}),e.sort((n,o)=>o.priority-n.priority)},selectTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.content:null},selectLinkTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.linkContent:null}}}function Zf(e){if(!Pb(e))throw Ke;let{registerTemplates:t,selectTemplate:r,selectLinkTemplate:n}=Xf();return{registerTemplates:(...o)=>{t(...o);let i=[];o.forEach(a=>{a.fields&&i.push(...a.fields)}),e.dispatch(Zr(i))},selectTemplate:r,selectLinkTemplate:n}}function Pb(e){return e.addReducers({fields:Bi}),!0}p();u();d();l();function kb(e){return e.addReducers({searchHub:jr}),{setSearchHub:Nr}}/**
|
|
32
32
|
* @license
|
|
33
33
|
*
|
|
34
34
|
* Copyright 2025 Coveo Solutions Inc.
|
|
@@ -46,4 +46,4 @@ ${y}`:y;break;case"event":n.event=y;break;case"id":e(n.id=y);break;case"retry":F
|
|
|
46
46
|
* limitations under the License.
|
|
47
47
|
*/if(__exports!=exports)module.exports=exports;return module.exports});
|
|
48
48
|
|
|
49
|
-
window.coveoQuanticVersion = '3.33.
|
|
49
|
+
window.coveoQuanticVersion = '3.33.4';
|