@coveo/quantic 3.27.0-pre.e8e95b2dbe → 3.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +8 -8
  2. package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/base-analytics.d.ts +0 -1
  3. package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/coveo.analytics/history-store.d.ts +1 -5
  4. package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/commerce-api-client.d.ts +2 -1
  5. package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/commerce-api-params.d.ts +5 -4
  6. package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/common/request.d.ts +11 -1
  7. package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/recommendations/recommendations-request.d.ts +11 -1
  8. package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/search/query-suggest/query-suggest-request.d.ts +11 -1
  9. package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/search/query-suggest/query-suggest-response.d.ts +2 -3
  10. package/force-app/main/default/staticresources/coveoheadless/definitions/api/common/trigger.d.ts +0 -3
  11. package/force-app/main/default/staticresources/coveoheadless/definitions/api/generated-answer/generated-answer-client.d.ts +1 -1
  12. package/force-app/main/default/staticresources/coveoheadless/definitions/api/generated-answer/generated-answer-event-payload.d.ts +2 -1
  13. package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api.d.ts +8 -0
  14. package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/tests/stream-answer-api-state-mock.d.ts +119 -1
  15. package/force-app/main/default/staticresources/coveoheadless/definitions/api/platform-client.d.ts +0 -1
  16. package/force-app/main/default/staticresources/coveoheadless/definitions/api/search/fields/fields-response.d.ts +0 -2
  17. package/force-app/main/default/staticresources/coveoheadless/definitions/api/search/search-api-params.d.ts +7 -20
  18. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/case-assist-api-client.d.ts +4 -3
  19. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/case-assist-params.d.ts +3 -2
  20. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-case-classifications/get-case-classifications-request.d.ts +5 -1
  21. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-document-suggestions/get-document-suggestions-request.d.ts +5 -1
  22. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/get-interface/get-interface-config-response.d.ts +2 -2
  23. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/insight-api-client.d.ts +5 -4
  24. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/insight-params.d.ts +0 -1
  25. package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/common.d.ts +9 -12
  26. package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/core-engine.d.ts +4 -4
  27. package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-ssr-engine/types/from-build-result.d.ts +2 -1
  28. package/force-app/main/default/staticresources/coveoheadless/definitions/app/search-engine/jwt-reducer.d.ts +0 -5
  29. package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/build.d.ts +2 -1
  30. package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/common.d.ts +3 -2
  31. package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/fetch-static-state.d.ts +2 -1
  32. package/force-app/main/default/staticresources/coveoheadless/definitions/app/ssr-engine/types/hydrate-static-state.d.ts +2 -1
  33. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/facets/generator/headless-commerce-facet-generator.ssr.d.ts +1 -1
  34. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/facets/headless-core-commerce-facet.d.ts +1 -2
  35. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/field-suggestions/headless-category-field-suggestions.d.ts +0 -1
  36. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-category-filter-suggestions.d.ts +0 -1
  37. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/filter-suggestions/headless-filter-suggestions.d.ts +0 -1
  38. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-view/headless-product-view.ssr.d.ts +2 -1
  39. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/search-box/headless-search-box.d.ts +1 -2
  40. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/standalone-search-box/headless-standalone-search-box.ssr.d.ts +0 -1
  41. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/breadcrumb-manager/headless-core-breadcrumb-manager.d.ts +1 -1
  42. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/headless-context-reserved-keys.d.ts +1 -4
  43. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/headless-core-context.d.ts +0 -1
  44. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/did-you-mean/headless-core-did-you-mean.d.ts +2 -2
  45. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/_common/facet-option-definitions.d.ts +0 -2
  46. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/facet/headless-core-facet.d.ts +3 -3
  47. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/date-facet/headless-date-facet-options.d.ts +0 -2
  48. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/headless-core-range-facet.d.ts +7 -1
  49. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/numeric-facet/headless-core-numeric-facet.d.ts +1 -1
  50. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/numeric-facet/headless-numeric-facet-options.d.ts +0 -2
  51. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/folded-result-list/headless-core-folded-result-list.d.ts +1 -1
  52. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/generated-answer/headless-core-generated-answer.d.ts +0 -2
  53. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/generated-answer/headless-core-interactive-citation.d.ts +2 -1
  54. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/generated-answer/headless-searchapi-generated-answer.d.ts +2 -4
  55. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/search-box/headless-core-search-box-options.d.ts +0 -4
  56. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/search-parameter-manager/headless-core-search-parameter-manager.d.ts +0 -5
  57. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/smart-snippet/headless-core-smart-snippet.d.ts +0 -1
  58. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/smart-snippet-questions-list/headless-core-smart-snippet-questions-list.d.ts +0 -1
  59. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/triggers/headless-core-notify-trigger.d.ts +3 -2
  60. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/automatic-facet/headless-automatic-facet.d.ts +2 -1
  61. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/category-facet/headless-category-facet.d.ts +1 -2
  62. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/facets/category-facet/headless-insight-category-facet.d.ts +0 -2
  63. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/facets/range-facet/numeric-facet/headless-insight-numeric-facet.d.ts +1 -2
  64. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/generated-answer/headless-insight-generated-answer.d.ts +1 -3
  65. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/smart-snippet/headless-insight-smart-snippet-interactive-inline-links.d.ts +4 -3
  66. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/smart-snippet-questions-list/headless-insight-smart-snippet-interactive-questions.d.ts +4 -3
  67. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/smart-snippet-questions-list/headless-insight-smart-snippet-questions-list.d.ts +0 -1
  68. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/instant-results/instant-results-options.d.ts +1 -6
  69. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/knowledge/generated-answer/headless-answerapi-generated-answer.d.ts +2 -2
  70. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/recent-queries-list/headless-recent-queries-list.d.ts +0 -1
  71. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/recent-results-list/headless-recent-results-list.d.ts +0 -1
  72. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/smart-snippet/headless-smart-snippet-interactive-inline-links.d.ts +4 -3
  73. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/smart-snippet-questions-list/headless-smart-snippet-interactive-questions.d.ts +4 -3
  74. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/smart-snippet-questions-list/headless-smart-snippet-questions-list.d.ts +0 -1
  75. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/tab-manager/headless-tab-manager.ssr.d.ts +1 -1
  76. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-notify-trigger.d.ts +1 -2
  77. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-notify-trigger.ssr.d.ts +0 -1
  78. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-redirection-trigger.ssr.d.ts +0 -1
  79. package/force-app/main/default/staticresources/coveoheadless/definitions/features/advanced-search-queries/advanced-search-queries-state.d.ts +3 -2
  80. package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/analytics-actions.d.ts +0 -33
  81. package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/analytics-utils.d.ts +11 -17
  82. package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/legacy-search-action-cause.d.ts +1 -6
  83. package/force-app/main/default/staticresources/coveoheadless/definitions/features/attached-results/attached-results-actions.d.ts +3 -2
  84. package/force-app/main/default/staticresources/coveoheadless/definitions/features/attached-results/attached-results-analytics-actions.d.ts +104 -2
  85. package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-assist-configuration/case-assist-configuration-actions.d.ts +2 -1
  86. package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-field/case-field-actions.d.ts +0 -2
  87. package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-field/case-field-state.d.ts +3 -2
  88. package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-input/case-input-state.d.ts +2 -1
  89. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/facet-search-set/commerce-facet-search-actions.d.ts +0 -3
  90. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/facet-set/facet-set-reducers.d.ts +0 -1
  91. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/facet-set/interfaces/request.d.ts +2 -6
  92. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/facet-set/interfaces/response.d.ts +2 -2
  93. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/numeric-facet/manual-numeric-facet-state.d.ts +2 -1
  94. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/pagination/pagination-actions.d.ts +0 -3
  95. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-selectors.d.ts +0 -1
  96. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-serializer.ssr.d.ts +1 -23
  97. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/product-listing/product-listing-actions.d.ts +0 -4
  98. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/product-templates/product-templates-helpers.d.ts +0 -33
  99. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recent-queries/recent-queries-actions.d.ts +0 -1
  100. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-actions.d.ts +2 -7
  101. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-actions.d.ts +3 -6
  102. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-selectors.d.ts +0 -21
  103. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/standalone-search-box-set/plan-request-builder.d.ts +2 -1
  104. package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/standalone-search-box-set/standalone-search-box-set-actions.d.ts +2 -1
  105. package/force-app/main/default/staticresources/coveoheadless/definitions/features/configuration/configuration-state.d.ts +1 -1
  106. package/force-app/main/default/staticresources/coveoheadless/definitions/features/debug/ranking-info-parser.d.ts +1 -1
  107. package/force-app/main/default/staticresources/coveoheadless/definitions/features/document-suggestion/document-suggestion-state.d.ts +2 -1
  108. package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/category-facet-set/category-facet-validate-payload.d.ts +0 -9
  109. package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-set/facet-set-insight-analytics-actions.d.ts +3 -2
  110. package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-set/facet-set-insight-utils.d.ts +0 -1
  111. package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/generic/facet-reducer-helpers.d.ts +2 -1
  112. package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/date-facet-set/interfaces/response.d.ts +3 -2
  113. package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/generic/interfaces/options.d.ts +0 -1
  114. package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/generic/interfaces/range-facet.d.ts +0 -3
  115. package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/generic/interfaces/request.d.ts +1 -11
  116. package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/generic/range-facet-utils.d.ts +0 -1
  117. package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/numeric-facet-set/interfaces/response.d.ts +3 -2
  118. package/force-app/main/default/staticresources/coveoheadless/definitions/features/folding/folding-analytics-actions.d.ts +0 -1
  119. package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-selectors.d.ts +0 -33
  120. package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-configuration/insight-configuration-actions.d.ts +2 -1
  121. package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-search/insight-search-actions.d.ts +1 -1
  122. package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-user-actions/insight-user-actions-actions.d.ts +0 -1
  123. package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-user-actions/insight-user-actions-preprocessing.d.ts +2 -1
  124. package/force-app/main/default/staticresources/coveoheadless/definitions/features/instant-results/instant-results-actions.d.ts +0 -3
  125. package/force-app/main/default/staticresources/coveoheadless/definitions/features/query-suggest/query-suggest-actions.d.ts +0 -6
  126. package/force-app/main/default/staticresources/coveoheadless/definitions/features/result/result-insight-analytics-actions.d.ts +52 -1
  127. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-actions-thunk-processor.d.ts +1 -1
  128. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-actions.d.ts +0 -82
  129. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-request.d.ts +8 -1
  130. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-actions-thunk-processor.d.ts +3 -3
  131. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-actions.d.ts +0 -65
  132. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-request.d.ts +8 -1
  133. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-parameters/search-parameter-actions.d.ts +0 -4
  134. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-parameters/search-parameter-serializer.d.ts +0 -2
  135. package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort/sort.d.ts +0 -3
  136. package/force-app/main/default/staticresources/coveoheadless/definitions/features/standalone-search-box-set/standalone-search-box-set-actions.d.ts +2 -1
  137. package/force-app/main/default/staticresources/coveoheadless/definitions/features/templates/templates-manager.d.ts +0 -7
  138. package/force-app/main/default/staticresources/coveoheadless/definitions/index.d.ts +2 -0
  139. package/force-app/main/default/staticresources/coveoheadless/definitions/insight.index.d.ts +1 -1
  140. package/force-app/main/default/staticresources/coveoheadless/definitions/state/insight-app-state.d.ts +2 -1
  141. package/force-app/main/default/staticresources/coveoheadless/definitions/state/state-sections.d.ts +0 -7
  142. package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-commerce-api-request.d.ts +1 -2
  143. package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-engine-v2.d.ts +0 -8
  144. package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-search-request.d.ts +8 -1
  145. package/force-app/main/default/staticresources/coveoheadless/definitions/utils/fetch-event-source/fetch.d.ts +2 -2
  146. package/force-app/main/default/staticresources/coveoheadless/definitions/utils/url-utils.d.ts +2 -1
  147. package/force-app/main/default/staticresources/coveoheadless/definitions/utils/utils.d.ts +0 -1
  148. package/force-app/main/default/staticresources/coveoheadless/headless.js +10 -10
  149. package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +9 -9
  150. package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +7 -7
  151. package/package.json +6 -7
  152. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/sub-controller/headless-sub-controller.ssr.d.ts +0 -7
  153. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-listing/utils/load-product-listing-reducers.d.ts +0 -3
  154. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/search/utils/load-search-reducers.d.ts +0 -3
  155. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/example-deleteme-headless-case-context.d.ts +0 -32
  156. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/headless-core-internal-context.d.ts +0 -31
  157. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/headless-strict-context-factory.d.ts +0 -13
  158. package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/generic/interfaces/response.d.ts +0 -6
  159. package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort/sort-actions-loader.d.ts +0 -35
  160. package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort/sort-actions.d.ts +0 -3
  161. package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort/sort-slice.d.ts +0 -3
  162. package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort/sort-state.d.ts +0 -3
  163. package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-insight-api-client.d.ts +0 -2
  164. package/force-app/main/default/staticresources/coveoheadless/definitions/utils/fetch-event-source/index.d.ts +0 -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 uf=Object.create;var $r=Object.defineProperty;var lf=Object.getOwnPropertyDescriptor;var df=Object.getOwnPropertyNames;var pf=Object.getPrototypeOf,ff=Object.prototype.hasOwnProperty;var mf=(e,t,r)=>t in e?$r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Hr=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ys=(e,t)=>{for(var r in t)$r(e,r,{get:t[r],enumerable:!0})},Js=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of df(t))!ff.call(e,o)&&o!==r&&$r(e,o,{get:()=>t[o],enumerable:!(n=lf(t,o))||n.enumerable});return e};var Qe=(e,t,r)=>(r=e!=null?uf(pf(e)):{},Js(t||!e||!e.__esModule?$r(r,"default",{value:e,enumerable:!0}):r,e)),gf=e=>Js($r({},"__esModule",{value:!0}),e);var de=(e,t,r)=>mf(e,typeof t!="symbol"?t+"":t,r);var C,c=Hr(()=>{"use strict";C=typeof globalThis<"u"?globalThis:window});function qn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qn=function(t){return typeof t}:qn=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qn(e)}function Sf(){"navigator"in this||(this.navigator={}),typeof this.navigator.sendBeacon!="function"&&(this.navigator.sendBeacon=vf.bind(this))}function vf(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","*/*"),yf(t)?(o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),o.responseType="text"):hf(t)&&t.type&&o.setRequestHeader("Content-Type",t.type);try{o.send(t)}catch{return!1}return!0}var yf,hf,u=Hr(()=>{"use strict";yf=function(t){return typeof t=="string"},hf=function(t){return t instanceof Blob};Sf.call((typeof window>"u"?"undefined":qn(window))==="object"?window:{})});var ji=Se(zr=>{"use strict";d();c();l();u();Object.defineProperty(zr,"__esModule",{value:!0});function Xs(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 Cf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bf(e,t,r){return t=er(t),wf(e,rc()?Reflect.construct(t,r||[],er(e).constructor):t.apply(e,r))}function Di(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zs(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,If(n.key),n)}}function qi(e,t,r){return t&&Zs(e.prototype,t),r&&Zs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ec(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Pf(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 ki(){return ki=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=xf(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},ki.apply(null,arguments)}function er(e){return er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},er(e)}function Af(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 rc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rc=function(){return!!e})()}function wf(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 Cf(e)}function Oi(e,t){return Oi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Oi(e,t)}function xf(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=er(e))!==null;);return e}function Rf(e,t,r,n){var o=ki(er(1&n?e.prototype:e),t,r);return 2&n&&typeof o=="function"?function(i){return o.apply(r,i)}:o}function Ef(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 If(e){var t=Ef(e,"string");return typeof t=="symbol"?t:t+""}function Pf(e,t){if(e){if(typeof e=="string")return Xs(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)?Xs(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function Tf(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 Ff(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 tc=function(){function e(){Di(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return qi(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}}}])}(),Mi=function(e){function t(){var r;return Di(this,t),r=bf(this,t),r.listeners||tc.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 Af(t,e),qi(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)),Rf(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 Mn;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 Mn;function i(){o.abort(this.reason),a()}function a(){var y=ec(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=ec(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}}])}(tc),Mn=function(){function e(){Di(this,e),Object.defineProperty(this,"signal",{value:new Mi,writable:!0,configurable:!0})}return qi(e,[{key:"abort",value:function(r){var n=Ff(r),o=Tf(n);this.signal.reason=n,this.signal.dispatchEvent(o)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(Mn.prototype[Symbol.toStringTag]="AbortController",Mi.prototype[Symbol.toStringTag]="AbortSignal");function kf(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 Of(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(!kf({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,T){v.addEventListener("abort",function(){return T(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}}zr.AbortController=Mn;zr.AbortSignal=Mi;zr.abortableFetch=Of});var nc,s,b,l=Hr(()=>{"use strict";nc=Qe(ji(),1),s=Qe(ji(),1),{fetch:b}=(0,nc.abortableFetch)({fetch})});function Wr(e){if(Bf.test(e)||e.trim()==="")throw new TypeError("Invalid character in header field name");return e.trim().toLowerCase()}function Ni(e){return e.replace(Qf,"")}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||!$f(r))return!1}return!0}function $f(e){return![127,32,"(",")","<",">","@",",",";",":","\\","\"","/","[","]","?","=","{","}"].includes(e)}function ic(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 Df,lc,qf,dc,Mf,jf,Nf,_f,Vf,Lf,Uf,Bf,oc,Qf,tr,_i,ac,sc,cc,uc,A,fc=Hr(()=>{"use strict";d();c();l();u();Df=Object.create,lc=Object.defineProperty,qf=Object.getOwnPropertyDescriptor,dc=Object.getOwnPropertyNames,Mf=Object.getPrototypeOf,jf=Object.prototype.hasOwnProperty,Nf=(e,t)=>function(){return t||(0,e[dc(e)[0]])((t={exports:{}}).exports,t),t.exports},_f=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of dc(t))!jf.call(e,o)&&o!==r&&lc(e,o,{get:()=>t[o],enumerable:!(n=qf(t,o))||n.enumerable});return e},Vf=(e,t,r)=>(r=e!=null?Df(Mf(e)):{},_f(t||!e||!e.__esModule?lc(r,"default",{value:e,enumerable:!0}):r,e)),Lf=Nf({"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("="),T=x.shift().trimLeft().toLowerCase(),w=x.join("=");T==="expires"?R.expires=new Date(w):T==="max-age"?R.maxAge=parseInt(w,10):T==="secure"?R.secure=!0:T==="httponly"?R.httpOnly=!0:T==="samesite"?R.sameSite=w:R[T]=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}}),Uf=Vf(Lf()),Bf=/[^a-z0-9\-#$%&'*+.^_`|~]/i;oc=[`
19
- `,"\r","\t"," "],Qf=new RegExp(`(^[${oc.join("")}]|$[${oc.join("")}])`,"g");tr=Symbol("normalizedHeaders"),_i=Symbol("rawHeaderNames"),ac=", ",A=class pc{constructor(t){this[sc]={},this[cc]=new Map,this[uc]="Headers",["Headers","HeadersPolyfill"].includes(t?.constructor.name)||t instanceof pc||typeof C.Headers<"u"&&t instanceof C.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(ac):n)}):t&&Object.getOwnPropertyNames(t).forEach(r=>{let n=t[r];this.append(r,Array.isArray(n)?n.join(ac):n)})}[(sc=tr,cc=_i,uc=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[tr]).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[tr].hasOwnProperty(Wr(t))}get(t){if(!Gr(t))throw TypeError(`Invalid header name "${t}"`);return this[tr][Wr(t)]??null}set(t,r){if(!Gr(t)||!ic(r))return;let n=Wr(t),o=Ni(r);this[tr][n]=Ni(o),this[_i].set(n,t)}append(t,r){if(!Gr(t)||!ic(r))return;let n=Wr(t),o=Ni(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=Wr(t);delete this[tr][r],this[_i].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,Uf.splitCookiesString)(t)}}});var d=Hr(()=>{"use strict";fc()});var bc=Se(Jr=>{"use strict";d();c();l();u();var _n=Jr&&Jr.__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(Jr,"__esModule",{value:!0});var Zf={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function em(e){var t=_n(_n({},Zf),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Jr.getSanitizedOptions=em});var Ac=Se(Bi=>{"use strict";d();c();l();u();Object.defineProperty(Bi,"__esModule",{value:!0});function tm(e){var t=Math.random()*e;return Math.round(t)}Bi.fullJitter=tm});var wc=Se(Qi=>{"use strict";d();c();l();u();Object.defineProperty(Qi,"__esModule",{value:!0});function rm(e){return e}Qi.noJitter=rm});var xc=Se($i=>{"use strict";d();c();l();u();Object.defineProperty($i,"__esModule",{value:!0});var nm=Ac(),om=wc();function im(e){switch(e.jitter){case"full":return nm.fullJitter;case"none":default:return om.noJitter}}$i.JitterFactory=im});var zi=Se(Hi=>{"use strict";d();c();l();u();Object.defineProperty(Hi,"__esModule",{value:!0});var am=xc(),sm=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=am.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}();Hi.Delay=sm});var Rc=Se(nt=>{"use strict";d();c();l();u();var cm=nt&&nt.__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)}}(),um=nt&&nt.__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())})},lm=nt&&nt.__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(nt,"__esModule",{value:!0});var dm=zi(),pm=function(e){cm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return um(this,void 0,void 0,function(){return lm(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}(dm.Delay);nt.SkipFirstDelay=pm});var Ec=Se(Xr=>{"use strict";d();c();l();u();var fm=Xr&&Xr.__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(Xr,"__esModule",{value:!0});var mm=zi(),gm=function(e){fm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(mm.Delay);Xr.AlwaysDelay=gm});var Ic=Se(Wi=>{"use strict";d();c();l();u();Object.defineProperty(Wi,"__esModule",{value:!0});var ym=Rc(),hm=Ec();function Sm(e,t){var r=vm(e);return r.setAttemptNumber(t),r}Wi.DelayFactory=Sm;function vm(e){return e.delayFirstAttempt?new hm.AlwaysDelay(e):new ym.SkipFirstDelay(e)}});var Pc=Se(_t=>{"use strict";d();c();l();u();var Gi=_t&&_t.__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())})},Ki=_t&&_t.__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(_t,"__esModule",{value:!0});var Cm=bc(),bm=Ic();function Am(e,t){return t===void 0&&(t={}),Gi(this,void 0,void 0,function(){var r,n;return Ki(this,function(o){switch(o.label){case 0:return r=Cm.getSanitizedOptions(t),n=new wm(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}_t.backOff=Am;var wm=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 Ki(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 Ki(this,function(r){switch(r.label){case 0:return t=bm.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Lo=Se((rs,ns)=>{"use strict";d();c();l();u();(function(e,t){typeof rs=="object"&&typeof ns<"u"?ns.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs=t()})(rs,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 Q=String(U);return!Q||Q.length>=V?U:""+Array(V+1-Q.length).join(_)+U},T={s:x,z:function(U){var V=-U.utcOffset(),_=Math.abs(V),Q=Math.floor(_/60),L=_%60;return(V<=0?"+":"-")+x(Q,2,"0")+":"+x(L,2,"0")},m:function U(V,_){if(V.date()<_.date())return-U(_,V);var Q=12*(_.year()-V.year())+(_.month()-V.month()),L=V.clone().add(Q,p),z=_-L<0,W=V.clone().add(Q+(z?-1:1),p);return+(-(Q+(_-L)/(z?L-W:W-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 j="$isDayjsObject",k=function(U){return U instanceof N||!(!U||!U[j])},I=function U(V,_,Q){var L;if(!V)return w;if(typeof V=="string"){var z=V.toLowerCase();E[z]&&(L=z),_&&(E[z]=_,L=z);var W=V.split("-");if(!L&&W.length>1)return U(W[0])}else{var Y=V.name;E[Y]=V,L=Y}return!Q&&L&&(w=L),L||!Q&&w},F=function(U,V){if(k(U))return U.clone();var _=typeof V=="object"?V:{};return _.date=U,_.args=arguments,new N(_)},O=T;O.l=I,O.i=k,O.w=function(U,V){return F(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[j]=!0}var V=U.prototype;return V.parse=function(_){this.$d=function(Q){var L=Q.date,z=Q.utc;if(L===null)return new Date(NaN);if(O.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var W=L.match(v);if(W){var Y=W[2]-1||0,re=(W[7]||"0").substring(0,3);return z?new Date(Date.UTC(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,re)):new Date(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,re)}}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 O},V.isValid=function(){return this.$d.toString()!==g},V.isSame=function(_,Q){var L=F(_);return this.startOf(Q)<=L&&L<=this.endOf(Q)},V.isAfter=function(_,Q){return F(_)<this.startOf(Q)},V.isBefore=function(_,Q){return this.endOf(Q)<F(_)},V.$g=function(_,Q,L){return O.u(_)?this[Q]:this.set(L,_)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(_,Q){var L=this,z=!!O.u(Q)||Q,W=O.p(_),Y=function(ce,me){var he=O.w(L.$u?Date.UTC(L.$y,me,ce):new Date(L.$y,me,ce),L);return z?he:he.endOf(m)},re=function(ce,me){return O.w(L.toDate()[ce].apply(L.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(me)),L)},se=this.$W,ee=this.$M,ne=this.$D,Z="set"+(this.$u?"UTC":"");switch(W){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=(se<oe?se+7:se)-oe;return Y(z?ne-ye:ne+(6-ye),ee);case m:case S:return re(Z+"Hours",0);case a:return re(Z+"Minutes",1);case i:return re(Z+"Seconds",2);case o:return re(Z+"Milliseconds",3);default:return this.clone()}},V.endOf=function(_){return this.startOf(_,!1)},V.$set=function(_,Q){var L,z=O.p(_),W="set"+(this.$u?"UTC":""),Y=(L={},L[m]=W+"Date",L[S]=W+"Date",L[p]=W+"Month",L[h]=W+"FullYear",L[a]=W+"Hours",L[i]=W+"Minutes",L[o]=W+"Seconds",L[n]=W+"Milliseconds",L)[z],re=z===m?this.$D+(Q-this.$W):Q;if(z===p||z===h){var se=this.clone().set(S,1);se.$d[Y](re),se.init(),this.$d=se.set(S,Math.min(this.$D,se.daysInMonth())).$d}else Y&&this.$d[Y](re);return this.init(),this},V.set=function(_,Q){return this.clone().$set(_,Q)},V.get=function(_){return this[O.p(_)]()},V.add=function(_,Q){var L,z=this;_=Number(_);var W=O.p(Q),Y=function(ee){var ne=F(z);return O.w(ne.date(ne.date()+Math.round(ee*_)),z)};if(W===p)return this.set(p,this.$M+_);if(W===h)return this.set(h,this.$y+_);if(W===m)return Y(1);if(W===f)return Y(7);var re=(L={},L[i]=t,L[a]=r,L[o]=e,L)[W]||1,se=this.$d.getTime()+_*re;return O.w(se,this)},V.subtract=function(_,Q){return this.add(-1*_,Q)},V.format=function(_){var Q=this,L=this.$locale();if(!this.isValid())return L.invalidDate||g;var z=_||"YYYY-MM-DDTHH:mm:ssZ",W=O.z(this),Y=this.$H,re=this.$m,se=this.$M,ee=L.weekdays,ne=L.months,Z=L.meridiem,oe=function(me,he,Te,Ve){return me&&(me[he]||me(Q,z))||Te[he].slice(0,Ve)},ye=function(me){return O.s(Y%12||12,me,"0")},ce=Z||function(me,he,Te){var Ve=me<12?"AM":"PM";return Te?Ve.toLowerCase():Ve};return z.replace(R,function(me,he){return he||function(Te){switch(Te){case"YY":return String(Q.$y).slice(-2);case"YYYY":return O.s(Q.$y,4,"0");case"M":return se+1;case"MM":return O.s(se+1,2,"0");case"MMM":return oe(L.monthsShort,se,ne,3);case"MMMM":return oe(ne,se);case"D":return Q.$D;case"DD":return O.s(Q.$D,2,"0");case"d":return String(Q.$W);case"dd":return oe(L.weekdaysMin,Q.$W,ee,2);case"ddd":return oe(L.weekdaysShort,Q.$W,ee,3);case"dddd":return ee[Q.$W];case"H":return String(Y);case"HH":return O.s(Y,2,"0");case"h":return ye(1);case"hh":return ye(2);case"a":return ce(Y,re,!0);case"A":return ce(Y,re,!1);case"m":return String(re);case"mm":return O.s(re,2,"0");case"s":return String(Q.$s);case"ss":return O.s(Q.$s,2,"0");case"SSS":return O.s(Q.$ms,3,"0");case"Z":return W}return null}(me)||W.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(_,Q,L){var z,W=this,Y=O.p(Q),re=F(_),se=(re.utcOffset()-this.utcOffset())*t,ee=this-re,ne=function(){return O.m(W,re)};switch(Y){case h:z=ne()/12;break;case p:z=ne();break;case y:z=ne()/3;break;case f:z=(ee-se)/6048e5;break;case m:z=(ee-se)/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:O.a(z)},V.daysInMonth=function(){return this.endOf(p).$D},V.$locale=function(){return E[this.$L]},V.locale=function(_,Q){if(!_)return this.$L;var L=this.clone(),z=I(_,Q,!0);return z&&(L.$L=z),L},V.clone=function(){return O.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 F.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])}}),F.extend=function(U,V){return U.$i||(U(V,N,F),U.$i=!0),F},F.locale=I,F.isDayjs=k,F.unix=function(U){return F(1e3*U)},F.en=E[w],F.Ls=E,F.p={},F})});var Ml=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 C<"u"?C:e||self).dayjs_plugin_quarterOfYear=t()})(os,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 jl=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 C<"u"?C:e||self).dayjs_plugin_customParseFormat=t()})(as,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 T=1;T<=24;T+=1)if(v.indexOf(x(T,0,R))>-1){P=T>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(F,O,N){var $=N&&N.toUpperCase();return O||P[N]||e[N]||P[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(U,V,_){return V||_.slice(1)})})).match(t),T=x.length,w=0;w<T;w+=1){var E=x[w],j=S[E],k=j&&j[0],I=j&&j[1];x[w]=I?{regex:k,parser:I}:E.replace(/^\[|\]$/g,"")}return function(F){for(var O={},N=0,$=0;N<T;N+=1){var U=x[N];if(typeof U=="string")$+=U.length;else{var V=U.regex,_=U.parser,Q=F.slice($),L=V.exec(Q)[0];_.call(O,L),F=F.replace(L,"")}}return function(z){var W=z.afternoon;if(W!==void 0){var Y=z.hours;W?Y<12&&(z.hours+=12):Y===12&&(z.hours=0),delete z.afternoon}}(O),O}}return function(v,R,P){P.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(m=v.parseTwoDigitYear);var x=R.prototype,T=x.parse;x.parse=function(w){var E=w.date,j=w.utc,k=w.args;this.$u=j;var I=k[1];if(typeof I=="string"){var F=k[2]===!0,O=k[3]===!0,N=F||O,$=k[2];O&&($=k[2]),a=this.$locale(),!F&&$&&(a=P.Ls[$]),this.$d=function(Q,L,z,W){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*Q);var Y=g(L)(Q),re=Y.year,se=Y.month,ee=Y.day,ne=Y.hours,Z=Y.minutes,oe=Y.seconds,ye=Y.milliseconds,ce=Y.zone,me=Y.week,he=new Date,Te=ee||(re||se?1:he.getDate()),Ve=re||he.getFullYear(),ft=0;re&&!se||(ft=se>0?se-1:he.getMonth());var Xt,Zt=ne||0,Qr=Z||0,Ti=oe||0,Fi=ye||0;return ce?new Date(Date.UTC(Ve,ft,Te,Zt,Qr,Ti,Fi+60*ce.offset*1e3)):z?new Date(Date.UTC(Ve,ft,Te,Zt,Qr,Ti,Fi)):(Xt=new Date(Ve,ft,Te,Zt,Qr,Ti,Fi),me&&(Xt=W(Xt).week(me).toDate()),Xt)}catch{return new Date("")}}(E,I,j,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){k[1]=I[V-1];var _=P.apply(this,k);if(_.isValid()){this.$d=_.$d,this.$L=_.$L,this.init();break}V===U&&(this.$d=new Date(""))}else T.call(this,w)}}})});var jd=Se((Is,Ps)=>{"use strict";d();c();l();u();(function(e,t){typeof Is=="object"&&typeof Ps<"u"?Ps.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_timezone=t()})(Is,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",T=R+"|"+x,w=t[T];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[T]=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,T=e[P];T>=0&&(g[T]=parseInt(x,10))}var w=g[3],E=w===24?0:w,j=g[0]+"-"+g[1]+"-"+g[2]+" "+E+":"+g[4]+":"+g[5]+":000",k=+y;return(o.utc(j).valueOf()-(k-=k%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 T=S.utcOffset();S=S.add(g-T,"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,j,k){var I=E-60*j*1e3,F=m(I,k);if(j===F)return[I,j];var O=m(I-=60*(F-j)*1e3,k);return F===O?[I,F]:[E-60*Math.min(F,O)*1e3,Math.max(F,O)]}(o.utc(y,g).valueOf(),R,v),x=P[0],T=P[1],w=o(x).utcOffset(T);return w.$x.$timezone=v,w},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(y){i=y}}})});var Nd=Se((Ts,Fs)=>{"use strict";d();c();l();u();(function(e,t){typeof Ts=="object"&&typeof Fs<"u"?Fs.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_utc=t()})(Ts,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 j=(""+E[0]).match(r)||["-",0,0],k=j[0],I=60*+j[1]+ +j[2];return I===0?0:k==="+"?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 T=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(P+T,e)).$offset=P,x.$x.$localOffset=T}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 Yd=Se((X_,Kd)=>{"use strict";d();c();l();u();function Pv(e){try{return JSON.stringify(e)}catch{return"\"[Circular]\""}}Kd.exports=Tv;function Tv(e,t,r){var n=r&&r.stringify||Pv,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 rp=Se((nV,ei)=>{"use strict";d();c();l();u();var Jd=Yd();ei.exports=pt;var Pn=$v().console||{},Fv={mapHttpRequest:Zo,mapHttpResponse:Zo,wrapRequestSerializer:Os,wrapResponseSerializer:Os,wrapErrorSerializer:Os,req:Zo,res:Zo,err:Zd,errWithCause:Zd};function Et(e,t){return e==="silent"?1/0:t.levels.values[e]}var Ms=Symbol("pino.logFuncs"),Ds=Symbol("pino.hierarchy"),kv={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function Xd(e,t){let r={logger:t,parent:e[Ds]};t[Ds]=r}function Ov(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:Pn[o]||Pn[kv[o]||"log"]||Mr}),e[Ms]=n}function Dv(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function pt(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||Pn;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=Dv(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=Mr),Ov(p,m,r),Xd({},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:Uv(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Mr};p.levels=qv(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=Mr,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,Gt(this,y,p,"error"),Gt(this,y,p,"fatal"),Gt(this,y,p,"warn"),Gt(this,y,p,"info"),Gt(this,y,p,"debug"),Gt(this,y,p,"trace"),a.forEach(P=>{Gt(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 T=x.serializers;if(o&&T){var w=Object.assign({},n,T),E=e.browser.serialize===!0?Object.keys(w):o;delete P.serializers,js([P],E,w,this._stdErrSerialize)}function j(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)))}j.prototype=this;let k=new j(this);return Xd(this,k),k.child=function(...I){return v.call(this,R,...I)},k.level=x.level||this.level,R.onChild(k),k}return p}function qv(e){let t=e.customLevels||{},r=Object.assign({},pt.levels.values,t),n=Object.assign({},pt.levels.labels,Mv(t));return{values:r,labels:n}}function Mv(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}pt.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"}};pt.stdSerializers=Fv;pt.stdTimeFunctions=Object.assign({},{nullTime:ep,epochTime:tp,unixTime:Bv,isoTime:Qv});function jv(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 Gt(e,t,r,n){if(Object.defineProperty(e,n,{value:Et(e.level,r)>Et(n,r)?Mr:r[Ms][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===Mr){if(!t.transmit)return;let i=t.transmit.level||e.level,a=Et(i,r);if(Et(n,r)<a)return}e[n]=_v(e,t,r,n);let o=jv(e);o.length!==0&&(e[n]=Nv(o,e[n]))}function Nv(e,t){return function(){return t.apply(this,[...e,...arguments])}}function _v(e,t,r,n){return function(o){return function(){let a=t.timestamp(),m=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Pn?Pn:this;for(var p=0;p<m.length;p++)m[p]=arguments[p];var y=!1;if(t.serialize&&(js(m,this._serialize,this.serializers,this._stdErrSerialize),y=!0),t.asObject||t.formatters?o.call(f,...Vv(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;Lv(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[Ms][n])}function Vv(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?Jd(m.shift(),m):void 0}else typeof f=="string"&&(f=Jd(m.shift(),m));return f!==void 0&&(p[o.messageKey]=f),[a(p)]}}function js(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=pt.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 Lv(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||js(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 Zd(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 Uv(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?ep:tp}function Zo(){return{}}function Os(e){return e}function Mr(){}function ep(){return!1}function tp(){return Date.now()}function Bv(){return Math.round(Date.now()/1e3)}function Qv(){return new Date(Date.now()).toISOString()}function $v(){function e(t){return typeof t<"u"&&t}try{return typeof C<"u"?C:(Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),C)}catch{return e(self)||e(window)||e(this)||{}}}ei.exports.default=pt;ei.exports.pino=pt});var ub={};Ys(ub,{DefaultFieldsToInclude:()=>Ks,EcommerceDefaultFieldsToInclude:()=>of,HighlightUtils:()=>Ui,MinimumFieldsToInclude:()=>Ii,ResultTemplatesHelpers:()=>Xl,buildContext:()=>pp,buildController:()=>It,buildDictionaryFieldContext:()=>fp,buildInteractiveResult:()=>ef,buildRecommendationEngine:()=>up,buildRecommendationList:()=>Xp,buildResultTemplatesManager:()=>cf,getAnalyticsNextApiBaseUrl:()=>Vn,getOrganizationEndpoint:()=>Pe,getSampleRecommendationEngineConfiguration:()=>Ns,loadAdvancedSearchQueryActions:()=>GC,loadClickAnalyticsActions:()=>ib,loadConfigurationActions:()=>KC,loadContextActions:()=>JC,loadDebugActions:()=>XC,loadDictionaryFieldContextActions:()=>ZC,loadFieldActions:()=>rb,loadPaginationActions:()=>Gs,loadPipelineActions:()=>nb,loadRecommendationActions:()=>ob,loadSearchConfigurationActions:()=>YC,loadSearchHubActions:()=>cb});module.exports=gf(ub);d();c();l();u();var Ui={};Ys(Ui,{escapeHtml:()=>rr,getHighlightedSuggestion:()=>Xf,highlightString:()=>Jf});d();c();l();u();d();c();l();u();function Hf(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 uf=Object.create;var Qr=Object.defineProperty;var lf=Object.getOwnPropertyDescriptor;var df=Object.getOwnPropertyNames;var pf=Object.getPrototypeOf,ff=Object.prototype.hasOwnProperty;var mf=(e,t,r)=>t in e?Qr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var $r=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gs=(e,t)=>{for(var r in t)Qr(e,r,{get:t[r],enumerable:!0})},Ks=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of df(t))!ff.call(e,o)&&o!==r&&Qr(e,o,{get:()=>t[o],enumerable:!(n=lf(t,o))||n.enumerable});return e};var Qe=(e,t,r)=>(r=e!=null?uf(pf(e)):{},Ks(t||!e||!e.__esModule?Qr(r,"default",{value:e,enumerable:!0}):r,e)),gf=e=>Ks(Qr({},"__esModule",{value:!0}),e);var le=(e,t,r)=>mf(e,typeof t!="symbol"?t+"":t,r);var C,c=$r(()=>{"use strict";C=typeof globalThis<"u"?globalThis:window});function On(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?On=function(t){return typeof t}:On=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},On(e)}function Sf(){"navigator"in this||(this.navigator={}),typeof this.navigator.sendBeacon!="function"&&(this.navigator.sendBeacon=vf.bind(this))}function vf(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","*/*"),yf(t)?(o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),o.responseType="text"):hf(t)&&t.type&&o.setRequestHeader("Content-Type",t.type);try{o.send(t)}catch{return!1}return!0}var yf,hf,u=$r(()=>{"use strict";yf=function(t){return typeof t=="string"},hf=function(t){return t instanceof Blob};Sf.call((typeof window>"u"?"undefined":On(window))==="object"?window:{})});var Di=Se(Hr=>{"use strict";d();c();l();u();Object.defineProperty(Hr,"__esModule",{value:!0});function Ys(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 Cf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bf(e,t,r){return t=Xt(t),wf(e,ec()?Reflect.construct(t,r||[],Xt(e).constructor):t.apply(e,r))}function Fi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Js(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,If(n.key),n)}}function ki(e,t,r){return t&&Js(e.prototype,t),r&&Js(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xs(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Pf(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 Pi(){return Pi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=xf(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Pi.apply(null,arguments)}function Xt(e){return Xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xt(e)}function Af(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&&Ti(e,t)}function ec(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ec=function(){return!!e})()}function wf(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 Cf(e)}function Ti(e,t){return Ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Ti(e,t)}function xf(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Xt(e))!==null;);return e}function Rf(e,t,r,n){var o=Pi(Xt(1&n?e.prototype:e),t,r);return 2&n&&typeof o=="function"?function(i){return o.apply(r,i)}:o}function Ef(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 If(e){var t=Ef(e,"string");return typeof t=="symbol"?t:t+""}function Pf(e,t){if(e){if(typeof e=="string")return Ys(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)?Ys(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function Tf(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 Ff(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 Zs=function(){function e(){Fi(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return ki(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}}}])}(),Oi=function(e){function t(){var r;return Fi(this,t),r=bf(this,t),r.listeners||Zs.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 Af(t,e),ki(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)),Rf(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 Dn;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 Dn;function i(){o.abort(this.reason),a()}function a(){var y=Xs(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=Xs(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}}])}(Zs),Dn=function(){function e(){Fi(this,e),Object.defineProperty(this,"signal",{value:new Oi,writable:!0,configurable:!0})}return ki(e,[{key:"abort",value:function(r){var n=Ff(r),o=Tf(n);this.signal.reason=n,this.signal.dispatchEvent(o)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(Dn.prototype[Symbol.toStringTag]="AbortController",Oi.prototype[Symbol.toStringTag]="AbortSignal");function kf(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 Of(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(!kf({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,T){v.addEventListener("abort",function(){return T(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=Dn;Hr.AbortSignal=Oi;Hr.abortableFetch=Of});var tc,s,b,l=$r(()=>{"use strict";tc=Qe(Di(),1),s=Qe(Di(),1),{fetch:b}=(0,tc.abortableFetch)({fetch})});function zr(e){if(Bf.test(e)||e.trim()==="")throw new TypeError("Invalid character in header field name");return e.trim().toLowerCase()}function qi(e){return e.replace(Qf,"")}function Wr(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||!$f(r))return!1}return!0}function $f(e){return![127,32,"(",")","<",">","@",",",";",":","\\","\"","/","[","]","?","=","{","}"].includes(e)}function nc(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 Df,cc,qf,uc,Mf,jf,Nf,_f,Vf,Lf,Uf,Bf,rc,Qf,Zt,Mi,oc,ic,ac,sc,A,dc=$r(()=>{"use strict";d();c();l();u();Df=Object.create,cc=Object.defineProperty,qf=Object.getOwnPropertyDescriptor,uc=Object.getOwnPropertyNames,Mf=Object.getPrototypeOf,jf=Object.prototype.hasOwnProperty,Nf=(e,t)=>function(){return t||(0,e[uc(e)[0]])((t={exports:{}}).exports,t),t.exports},_f=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of uc(t))!jf.call(e,o)&&o!==r&&cc(e,o,{get:()=>t[o],enumerable:!(n=qf(t,o))||n.enumerable});return e},Vf=(e,t,r)=>(r=e!=null?Df(Mf(e)):{},_f(t||!e||!e.__esModule?cc(r,"default",{value:e,enumerable:!0}):r,e)),Lf=Nf({"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("="),T=x.shift().trimLeft().toLowerCase(),w=x.join("=");T==="expires"?R.expires=new Date(w):T==="max-age"?R.maxAge=parseInt(w,10):T==="secure"?R.secure=!0:T==="httponly"?R.httpOnly=!0:T==="samesite"?R.sameSite=w:R[T]=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}}),Uf=Vf(Lf()),Bf=/[^a-z0-9\-#$%&'*+.^_`|~]/i;rc=[`
19
+ `,"\r","\t"," "],Qf=new RegExp(`(^[${rc.join("")}]|$[${rc.join("")}])`,"g");Zt=Symbol("normalizedHeaders"),Mi=Symbol("rawHeaderNames"),oc=", ",A=class lc{constructor(t){this[ic]={},this[ac]=new Map,this[sc]="Headers",["Headers","HeadersPolyfill"].includes(t?.constructor.name)||t instanceof lc||typeof C.Headers<"u"&&t instanceof C.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(oc):n)}):t&&Object.getOwnPropertyNames(t).forEach(r=>{let n=t[r];this.append(r,Array.isArray(n)?n.join(oc):n)})}[(ic=Zt,ac=Mi,sc=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[Zt]).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(!Wr(t))throw new TypeError(`Invalid header name "${t}"`);return this[Zt].hasOwnProperty(zr(t))}get(t){if(!Wr(t))throw TypeError(`Invalid header name "${t}"`);return this[Zt][zr(t)]??null}set(t,r){if(!Wr(t)||!nc(r))return;let n=zr(t),o=qi(r);this[Zt][n]=qi(o),this[Mi].set(n,t)}append(t,r){if(!Wr(t)||!nc(r))return;let n=zr(t),o=qi(r),i=this.has(n)?`${this.get(n)}, ${o}`:o;this.set(t,i)}delete(t){if(!Wr(t)||!this.has(t))return;let r=zr(t);delete this[Zt][r],this[Mi].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,Uf.splitCookiesString)(t)}}});var d=$r(()=>{"use strict";dc()});var vc=Se(Yr=>{"use strict";d();c();l();u();var jn=Yr&&Yr.__assign||function(){return jn=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},jn.apply(this,arguments)};Object.defineProperty(Yr,"__esModule",{value:!0});var Zf={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function em(e){var t=jn(jn({},Zf),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Yr.getSanitizedOptions=em});var Cc=Se(Vi=>{"use strict";d();c();l();u();Object.defineProperty(Vi,"__esModule",{value:!0});function tm(e){var t=Math.random()*e;return Math.round(t)}Vi.fullJitter=tm});var bc=Se(Li=>{"use strict";d();c();l();u();Object.defineProperty(Li,"__esModule",{value:!0});function rm(e){return e}Li.noJitter=rm});var Ac=Se(Ui=>{"use strict";d();c();l();u();Object.defineProperty(Ui,"__esModule",{value:!0});var nm=Cc(),om=bc();function im(e){switch(e.jitter){case"full":return nm.fullJitter;case"none":default:return om.noJitter}}Ui.JitterFactory=im});var Qi=Se(Bi=>{"use strict";d();c();l();u();Object.defineProperty(Bi,"__esModule",{value:!0});var am=Ac(),sm=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=am.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}();Bi.Delay=sm});var wc=Se(nt=>{"use strict";d();c();l();u();var cm=nt&&nt.__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)}}(),um=nt&&nt.__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())})},lm=nt&&nt.__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(nt,"__esModule",{value:!0});var dm=Qi(),pm=function(e){cm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return um(this,void 0,void 0,function(){return lm(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}(dm.Delay);nt.SkipFirstDelay=pm});var xc=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 mm=Qi(),gm=function(e){fm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(mm.Delay);Jr.AlwaysDelay=gm});var Rc=Se($i=>{"use strict";d();c();l();u();Object.defineProperty($i,"__esModule",{value:!0});var ym=wc(),hm=xc();function Sm(e,t){var r=vm(e);return r.setAttemptNumber(t),r}$i.DelayFactory=Sm;function vm(e){return e.delayFirstAttempt?new hm.AlwaysDelay(e):new ym.SkipFirstDelay(e)}});var Ec=Se(jt=>{"use strict";d();c();l();u();var Hi=jt&&jt.__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())})},zi=jt&&jt.__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(jt,"__esModule",{value:!0});var Cm=vc(),bm=Rc();function Am(e,t){return t===void 0&&(t={}),Hi(this,void 0,void 0,function(){var r,n;return zi(this,function(o){switch(o.label){case 0:return r=Cm.getSanitizedOptions(t),n=new wm(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}jt.backOff=Am;var wm=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Hi(this,void 0,void 0,function(){var t,r;return zi(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 Hi(this,void 0,void 0,function(){var t;return zi(this,function(r){switch(r.label){case 0:return t=bm.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var _o=Se((es,ts)=>{"use strict";d();c();l();u();(function(e,t){typeof es=="object"&&typeof ts<"u"?ts.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs=t()})(es,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 Q=String(U);return!Q||Q.length>=V?U:""+Array(V+1-Q.length).join(_)+U},T={s:x,z:function(U){var V=-U.utcOffset(),_=Math.abs(V),Q=Math.floor(_/60),L=_%60;return(V<=0?"+":"-")+x(Q,2,"0")+":"+x(L,2,"0")},m:function U(V,_){if(V.date()<_.date())return-U(_,V);var Q=12*(_.year()-V.year())+(_.month()-V.month()),L=V.clone().add(Q,p),z=_-L<0,W=V.clone().add(Q+(z?-1:1),p);return+(-(Q+(_-L)/(z?L-W:W-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 j="$isDayjsObject",k=function(U){return U instanceof N||!(!U||!U[j])},I=function U(V,_,Q){var L;if(!V)return w;if(typeof V=="string"){var z=V.toLowerCase();E[z]&&(L=z),_&&(E[z]=_,L=z);var W=V.split("-");if(!L&&W.length>1)return U(W[0])}else{var Y=V.name;E[Y]=V,L=Y}return!Q&&L&&(w=L),L||!Q&&w},F=function(U,V){if(k(U))return U.clone();var _=typeof V=="object"?V:{};return _.date=U,_.args=arguments,new N(_)},O=T;O.l=I,O.i=k,O.w=function(U,V){return F(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[j]=!0}var V=U.prototype;return V.parse=function(_){this.$d=function(Q){var L=Q.date,z=Q.utc;if(L===null)return new Date(NaN);if(O.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var W=L.match(v);if(W){var Y=W[2]-1||0,te=(W[7]||"0").substring(0,3);return z?new Date(Date.UTC(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,te)):new Date(W[1],Y,W[3]||1,W[4]||0,W[5]||0,W[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 O},V.isValid=function(){return this.$d.toString()!==g},V.isSame=function(_,Q){var L=F(_);return this.startOf(Q)<=L&&L<=this.endOf(Q)},V.isAfter=function(_,Q){return F(_)<this.startOf(Q)},V.isBefore=function(_,Q){return this.endOf(Q)<F(_)},V.$g=function(_,Q,L){return O.u(_)?this[Q]:this.set(L,_)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(_,Q){var L=this,z=!!O.u(Q)||Q,W=O.p(_),Y=function(ce,me){var he=O.w(L.$u?Date.UTC(L.$y,me,ce):new Date(L.$y,me,ce),L);return z?he:he.endOf(m)},te=function(ce,me){return O.w(L.toDate()[ce].apply(L.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(me)),L)},se=this.$W,ee=this.$M,re=this.$D,Z="set"+(this.$u?"UTC":"");switch(W){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=(se<oe?se+7:se)-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(_,Q){var L,z=O.p(_),W="set"+(this.$u?"UTC":""),Y=(L={},L[m]=W+"Date",L[S]=W+"Date",L[p]=W+"Month",L[h]=W+"FullYear",L[a]=W+"Hours",L[i]=W+"Minutes",L[o]=W+"Seconds",L[n]=W+"Milliseconds",L)[z],te=z===m?this.$D+(Q-this.$W):Q;if(z===p||z===h){var se=this.clone().set(S,1);se.$d[Y](te),se.init(),this.$d=se.set(S,Math.min(this.$D,se.daysInMonth())).$d}else Y&&this.$d[Y](te);return this.init(),this},V.set=function(_,Q){return this.clone().$set(_,Q)},V.get=function(_){return this[O.p(_)]()},V.add=function(_,Q){var L,z=this;_=Number(_);var W=O.p(Q),Y=function(ee){var re=F(z);return O.w(re.date(re.date()+Math.round(ee*_)),z)};if(W===p)return this.set(p,this.$M+_);if(W===h)return this.set(h,this.$y+_);if(W===m)return Y(1);if(W===f)return Y(7);var te=(L={},L[i]=t,L[a]=r,L[o]=e,L)[W]||1,se=this.$d.getTime()+_*te;return O.w(se,this)},V.subtract=function(_,Q){return this.add(-1*_,Q)},V.format=function(_){var Q=this,L=this.$locale();if(!this.isValid())return L.invalidDate||g;var z=_||"YYYY-MM-DDTHH:mm:ssZ",W=O.z(this),Y=this.$H,te=this.$m,se=this.$M,ee=L.weekdays,re=L.months,Z=L.meridiem,oe=function(me,he,Te,Ve){return me&&(me[he]||me(Q,z))||Te[he].slice(0,Ve)},ye=function(me){return O.s(Y%12||12,me,"0")},ce=Z||function(me,he,Te){var Ve=me<12?"AM":"PM";return Te?Ve.toLowerCase():Ve};return z.replace(R,function(me,he){return he||function(Te){switch(Te){case"YY":return String(Q.$y).slice(-2);case"YYYY":return O.s(Q.$y,4,"0");case"M":return se+1;case"MM":return O.s(se+1,2,"0");case"MMM":return oe(L.monthsShort,se,re,3);case"MMMM":return oe(re,se);case"D":return Q.$D;case"DD":return O.s(Q.$D,2,"0");case"d":return String(Q.$W);case"dd":return oe(L.weekdaysMin,Q.$W,ee,2);case"ddd":return oe(L.weekdaysShort,Q.$W,ee,3);case"dddd":return ee[Q.$W];case"H":return String(Y);case"HH":return O.s(Y,2,"0");case"h":return ye(1);case"hh":return ye(2);case"a":return ce(Y,te,!0);case"A":return ce(Y,te,!1);case"m":return String(te);case"mm":return O.s(te,2,"0");case"s":return String(Q.$s);case"ss":return O.s(Q.$s,2,"0");case"SSS":return O.s(Q.$ms,3,"0");case"Z":return W}return null}(me)||W.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(_,Q,L){var z,W=this,Y=O.p(Q),te=F(_),se=(te.utcOffset()-this.utcOffset())*t,ee=this-te,re=function(){return O.m(W,te)};switch(Y){case h:z=re()/12;break;case p:z=re();break;case y:z=re()/3;break;case f:z=(ee-se)/6048e5;break;case m:z=(ee-se)/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:O.a(z)},V.daysInMonth=function(){return this.endOf(p).$D},V.$locale=function(){return E[this.$L]},V.locale=function(_,Q){if(!_)return this.$L;var L=this.clone(),z=I(_,Q,!0);return z&&(L.$L=z),L},V.clone=function(){return O.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 F.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])}}),F.extend=function(U,V){return U.$i||(U(V,N,F),U.$i=!0),F},F.locale=I,F.isDayjs=k,F.unix=function(U){return F(1e3*U)},F.en=E[w],F.Ls=E,F.p={},F})});var Dl=Se((rs,ns)=>{"use strict";d();c();l();u();(function(e,t){typeof rs=="object"&&typeof ns<"u"?ns.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_quarterOfYear=t()})(rs,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 ql=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 C<"u"?C:e||self).dayjs_plugin_customParseFormat=t()})(os,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 T=1;T<=24;T+=1)if(v.indexOf(x(T,0,R))>-1){P=T>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(F,O,N){var $=N&&N.toUpperCase();return O||P[N]||e[N]||P[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(U,V,_){return V||_.slice(1)})})).match(t),T=x.length,w=0;w<T;w+=1){var E=x[w],j=S[E],k=j&&j[0],I=j&&j[1];x[w]=I?{regex:k,parser:I}:E.replace(/^\[|\]$/g,"")}return function(F){for(var O={},N=0,$=0;N<T;N+=1){var U=x[N];if(typeof U=="string")$+=U.length;else{var V=U.regex,_=U.parser,Q=F.slice($),L=V.exec(Q)[0];_.call(O,L),F=F.replace(L,"")}}return function(z){var W=z.afternoon;if(W!==void 0){var Y=z.hours;W?Y<12&&(z.hours+=12):Y===12&&(z.hours=0),delete z.afternoon}}(O),O}}return function(v,R,P){P.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(m=v.parseTwoDigitYear);var x=R.prototype,T=x.parse;x.parse=function(w){var E=w.date,j=w.utc,k=w.args;this.$u=j;var I=k[1];if(typeof I=="string"){var F=k[2]===!0,O=k[3]===!0,N=F||O,$=k[2];O&&($=k[2]),a=this.$locale(),!F&&$&&(a=P.Ls[$]),this.$d=function(Q,L,z,W){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*Q);var Y=g(L)(Q),te=Y.year,se=Y.month,ee=Y.day,re=Y.hours,Z=Y.minutes,oe=Y.seconds,ye=Y.milliseconds,ce=Y.zone,me=Y.week,he=new Date,Te=ee||(te||se?1:he.getDate()),Ve=te||he.getFullYear(),ft=0;te&&!se||(ft=se>0?se-1:he.getMonth());var Yt,Jt=re||0,Br=Z||0,Ei=oe||0,Ii=ye||0;return ce?new Date(Date.UTC(Ve,ft,Te,Jt,Br,Ei,Ii+60*ce.offset*1e3)):z?new Date(Date.UTC(Ve,ft,Te,Jt,Br,Ei,Ii)):(Yt=new Date(Ve,ft,Te,Jt,Br,Ei,Ii),me&&(Yt=W(Yt).week(me).toDate()),Yt)}catch{return new Date("")}}(E,I,j,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){k[1]=I[V-1];var _=P.apply(this,k);if(_.isValid()){this.$d=_.$d,this.$L=_.$L,this.init();break}V===U&&(this.$d=new Date(""))}else T.call(this,w)}}})});var qd=Se((Rs,Es)=>{"use strict";d();c();l();u();(function(e,t){typeof Rs=="object"&&typeof Es<"u"?Es.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_timezone=t()})(Rs,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",T=R+"|"+x,w=t[T];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[T]=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,T=e[P];T>=0&&(g[T]=parseInt(x,10))}var w=g[3],E=w===24?0:w,j=g[0]+"-"+g[1]+"-"+g[2]+" "+E+":"+g[4]+":"+g[5]+":000",k=+y;return(o.utc(j).valueOf()-(k-=k%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 T=S.utcOffset();S=S.add(g-T,"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,j,k){var I=E-60*j*1e3,F=m(I,k);if(j===F)return[I,j];var O=m(I-=60*(F-j)*1e3,k);return F===O?[I,F]:[E-60*Math.min(F,O)*1e3,Math.max(F,O)]}(o.utc(y,g).valueOf(),R,v),x=P[0],T=P[1],w=o(x).utcOffset(T);return w.$x.$timezone=v,w},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(y){i=y}}})});var Md=Se((Is,Ps)=>{"use strict";d();c();l();u();(function(e,t){typeof Is=="object"&&typeof Ps<"u"?Ps.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof C<"u"?C:e||self).dayjs_plugin_utc=t()})(Is,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 j=(""+E[0]).match(r)||["-",0,0],k=j[0],I=60*+j[1]+ +j[2];return I===0?0:k==="+"?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 T=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(P+T,e)).$offset=P,x.$x.$localOffset=T}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 Gd=Se((Y_,Wd)=>{"use strict";d();c();l();u();function Pv(e){try{return JSON.stringify(e)}catch{return"\"[Circular]\""}}Wd.exports=Tv;function Tv(e,t,r){var n=r&&r.stringify||Pv,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 ep=Se((tV,Xo)=>{"use strict";d();c();l();u();var Kd=Gd();Xo.exports=pt;var En=$v().console||{},Fv={mapHttpRequest:Jo,mapHttpResponse:Jo,wrapRequestSerializer:Fs,wrapResponseSerializer:Fs,wrapErrorSerializer:Fs,req:Jo,res:Jo,err:Jd,errWithCause:Jd};function Et(e,t){return e==="silent"?1/0:t.levels.values[e]}var Ds=Symbol("pino.logFuncs"),ks=Symbol("pino.hierarchy"),kv={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function Yd(e,t){let r={logger:t,parent:e[ks]};t[ks]=r}function Ov(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:En[o]||En[kv[o]||"log"]||Dr}),e[Ds]=n}function Dv(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function pt(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||En;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=Dv(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=Dr),Ov(p,m,r),Yd({},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:Uv(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Dr};p.levels=qv(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=Dr,p.serializers=n,p._serialize=o,p._stdErrSerialize=i,p.child=function(...R){return v.call(this,y,...R)},t&&(p._logEvent=Os());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,zt(this,y,p,"error"),zt(this,y,p,"fatal"),zt(this,y,p,"warn"),zt(this,y,p,"info"),zt(this,y,p,"debug"),zt(this,y,p,"trace"),a.forEach(P=>{zt(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 T=x.serializers;if(o&&T){var w=Object.assign({},n,T),E=e.browser.serialize===!0?Object.keys(w):o;delete P.serializers,qs([P],E,w,this._stdErrSerialize)}function j(I){this._childLevel=(I._childLevel|0)+1,this.bindings=P,w&&(this.serializers=w,this._serialize=E),t&&(this._logEvent=Os([].concat(I._logEvent.bindings,P)))}j.prototype=this;let k=new j(this);return Yd(this,k),k.child=function(...I){return v.call(this,R,...I)},k.level=x.level||this.level,R.onChild(k),k}return p}function qv(e){let t=e.customLevels||{},r=Object.assign({},pt.levels.values,t),n=Object.assign({},pt.levels.labels,Mv(t));return{values:r,labels:n}}function Mv(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}pt.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"}};pt.stdSerializers=Fv;pt.stdTimeFunctions=Object.assign({},{nullTime:Xd,epochTime:Zd,unixTime:Bv,isoTime:Qv});function jv(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[ks];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function zt(e,t,r,n){if(Object.defineProperty(e,n,{value:Et(e.level,r)>Et(n,r)?Dr:r[Ds][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===Dr){if(!t.transmit)return;let i=t.transmit.level||e.level,a=Et(i,r);if(Et(n,r)<a)return}e[n]=_v(e,t,r,n);let o=jv(e);o.length!==0&&(e[n]=Nv(o,e[n]))}function Nv(e,t){return function(){return t.apply(this,[...e,...arguments])}}function _v(e,t,r,n){return function(o){return function(){let a=t.timestamp(),m=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===En?En:this;for(var p=0;p<m.length;p++)m[p]=arguments[p];var y=!1;if(t.serialize&&(qs(m,this._serialize,this.serializers,this._stdErrSerialize),y=!0),t.asObject||t.formatters?o.call(f,...Vv(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;Lv(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[Ds][n])}function Vv(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?Kd(m.shift(),m):void 0}else typeof f=="string"&&(f=Kd(m.shift(),m));return f!==void 0&&(p[o.messageKey]=f),[a(p)]}}function qs(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=pt.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 Lv(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||qs(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=Os(p)}function Os(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function Jd(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 Uv(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?Xd:Zd}function Jo(){return{}}function Fs(e){return e}function Dr(){}function Xd(){return!1}function Zd(){return Date.now()}function Bv(){return Math.round(Date.now()/1e3)}function Qv(){return new Date(Date.now()).toISOString()}function $v(){function e(t){return typeof t<"u"&&t}try{return typeof C<"u"?C:(Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),C)}catch{return e(self)||e(window)||e(this)||{}}}Xo.exports.default=pt;Xo.exports.pino=pt});var ub={};Gs(ub,{DefaultFieldsToInclude:()=>Ws,EcommerceDefaultFieldsToInclude:()=>of,HighlightUtils:()=>_i,MinimumFieldsToInclude:()=>xi,ResultTemplatesHelpers:()=>Yl,buildContext:()=>lp,buildController:()=>It,buildDictionaryFieldContext:()=>dp,buildInteractiveResult:()=>ef,buildRecommendationEngine:()=>sp,buildRecommendationList:()=>Xp,buildResultTemplatesManager:()=>cf,getAnalyticsNextApiBaseUrl:()=>Nn,getOrganizationEndpoint:()=>Pe,getSampleRecommendationEngineConfiguration:()=>Ms,loadAdvancedSearchQueryActions:()=>GC,loadClickAnalyticsActions:()=>ib,loadConfigurationActions:()=>KC,loadContextActions:()=>JC,loadDebugActions:()=>XC,loadDictionaryFieldContextActions:()=>ZC,loadFieldActions:()=>rb,loadPaginationActions:()=>zs,loadPipelineActions:()=>nb,loadRecommendationActions:()=>ob,loadSearchConfigurationActions:()=>YC,loadSearchHubActions:()=>cb});module.exports=gf(ub);d();c();l();u();var _i={};Gs(_i,{escapeHtml:()=>er,getHighlightedSuggestion:()=>Xf,highlightString:()=>Jf});d();c();l();u();d();c();l();u();function Hf(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 Kr(r)}var Kr=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 Hf(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 zf(e){return e===null}function X(e){return ve(e)||zf(e)}var te=class{constructor(e={}){de(this,"value");this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(Wf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Wf(e){return ve(e)||mc(e)}function mc(e){return typeof e=="boolean"}var J=class{constructor(e={}){de(this,"value");this.config=e,this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(Gf(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 Gf(e){return ve(e)||gc(e)}function gc(e){return typeof e=="number"&&!Number.isNaN(e)}var Kf=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,H=class{constructor(e={}){de(this,"value");de(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&&!(Kf.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={}){de(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(!yc(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 yc(e){return e!==void 0&&typeof e=="object"}var ie=class{constructor(e={}){de(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 mc(e)||jn(e)||gc(e)||yc(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function hc(e){return Array.isArray(e)}var Vi=class{constructor(e){de(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 Sc(e){return Array.isArray(e)}function Nn(e){return e.trim()===""}var Yf=new Set(["1",1,"yes",!0]);function vc(){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=>Yf.has(r))}function Cc(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Yr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Jf(e){if(Nn(e.openingDelimiter)||Nn(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(X(e.content)||Nn(e.content))return e.content;if(e.highlights.length===0)return rr(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+=rr(e.content.slice(n,a)),r+=e.openingDelimiter,r+=rr(e.content.slice(a,m)),r+=e.closingDelimiter,n=m}return n!==t&&(r+=rr(e.content.slice(n))),r}function Xf(e,t){return e=rr(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Li(n,t.notMatchDelimiters):o?Li(o,t.exactMatchDelimiters):i?Li(i,t.correctionDelimiters):r)}function Li(e,t){return t?t.open+e+t.close:e}function rr(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;","\"":"&quot;","'":"&#x27;","`":"&#x60;"},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=Qe(Pc(),1);d();c();l();u();d();c();l();u();var xm="recommendation-internal-options",QA=Symbol.for(xm);var We=new Error("Failed to load reducers."),nr=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Vt=class extends Error{constructor(r,n){super();de(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 Tc(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function Fc(e){return typeof e!="object"||!e?!1:Object.values(e).every(Rm)}function Rm(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function kc(e){return e===429}var $e=class e{static call(t){return _asyncToGenerator(function*(){let r=Em(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(kc(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&&kc(p.status);return y&&n.info("Platform retrying request"),y}});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new nr;case 404:throw new Vt(i,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new Vt(i):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,p=Yr(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 mt(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 Em(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=Im(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(m&&{body:f}),signal:a}}function Im(e,t){return t==="application/x-www-form-urlencoded"?Fc(e)?Tc(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 Ge(){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 gt(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var yt=e=>{let{response:t}=e;return t.body?Pm(e):Tm(t)},Pm=e=>km(e)?Om(e):Fm(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Tm=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Fm(e){return e.body.statusCode!==void 0}function km(e){return e.body.exception!==void 0}var Om=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});d();c();l();u();var ht=class{constructor(){de(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 Zr=class{constructor(t){de(this,"_basePath");de(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 Dc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}d();c();l();u();var ot=(e,t,r,n)=>{let o=new Zr(`${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 qc=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield $e.call({...ot(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:gt(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=Dc(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Dm(a)?{success:a}:{error:yt({response:r,body:a})}});return function qc(_x,_x2){return _ref2.apply(this,arguments)}}();function Dm(e){return typeof e=="string"}d();c();l();u();function qm(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Mm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Bn(e,t){if(t&&e.name==="AbortError")return{error:Mm(e)};if(e instanceof Vt)return{error:qm(e)};throw e}var Qn=class{constructor(t){this.options=t;de(this,"apiCallsQueues",{unknown:new ht,mainSearch:new ht,facetValues:new ht,foldingCollection:new ht,instantResults:new ht})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/plan"),requestParams:gt(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return Bn(r);let n=yield r.json();return Nm(n)?{success:n}:{error:yt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:gt(t),..._this3.options});if(r instanceof Error)return Bn(r);let n=yield r.json(),o={response:r,body:n};return jm(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:yt(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(m=>$e.call({...ot(t,"POST","application/json",""),requestParams:gt(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 Bn(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return Mc(i)?(a.body=jc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:yt(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/facet"),requestParams:gt(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({...ot(t,"POST","application/json",""),requestParams:gt(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(Mc(n)){let o={response:r,body:n};return o.body=jc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:yt({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return qc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return _m(n)?{success:n}:{error:yt({response:r,body:n})}})()}},$n=e=>e.success!==void 0,ke=e=>e.error!==void 0;function Mc(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 jm(e){return e.completions!==void 0}function Nm(e){return e.preprocessingOutput!==void 0}function _m(e){return e.fields!==void 0}d();c();l();u();var Nc=e=>e,_c=e=>e,Vc=e=>e;d();c();l();u();d();c();l();u();d();c();l();u();function Ce(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 Vm=typeof Symbol=="function"&&Symbol.observable||"@@observable",Lc=Vm,Yi=()=>Math.random().toString(36).substring(7).split("").join("."),Lm={INIT:`@@redux/INIT${Yi()}`,REPLACE:`@@redux/REPLACE${Yi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Yi()}`},Hn=Lm;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 Ji(e,t,r){if(typeof e!="function")throw new Error(Ce(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ce(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ce(1));return r(Ji)(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(Ce(3));return o}function h(P){if(typeof P!="function")throw new Error(Ce(4));if(f)throw new Error(Ce(5));let x=!0;p();let T=m++;return a.set(T,P),function(){if(x){if(f)throw new Error(Ce(6));x=!1,p(),a.delete(T),i=null}}}function S(P){if(!Ke(P))throw new Error(Ce(7));if(typeof P.type>"u")throw new Error(Ce(8));if(typeof P.type!="string")throw new Error(Ce(17));if(f)throw new Error(Ce(9));try{f=!0,o=n(o,P)}finally{f=!1}return(i=a).forEach(T=>{T()}),P}function g(P){if(typeof P!="function")throw new Error(Ce(10));n=P,S({type:Hn.REPLACE})}function v(){let P=h;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(Ce(11));function T(){let E=x;E.next&&E.next(y())}return T(),{unsubscribe:P(T)}},[Lc](){return this}}}return S({type:Hn.INIT}),{dispatch:S,subscribe:h,getState:y,replaceReducer:g,[Lc]:v}}function Um(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Hn.INIT})>"u")throw new Error(Ce(12));if(typeof r(void 0,{type:Hn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ce(13))})}function or(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{Um(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(Ce(14))}y[S]=R,p=p||R!==v}return p=p||n.length!==Object.keys(m).length,p?y:m}}function ir(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Uc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(Ce(15))},a={getState:o.getState,dispatch:(f,...p)=>i(f,...p)},m=e.map(f=>f(a));return i=ir(...m)(o.dispatch),{...o,dispatch:i}}}function zn(e){return Ke(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var sa=Symbol.for("immer-nothing"),en=Symbol.for("immer-draftable"),Oe=Symbol.for("immer-state");function be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ut=Object.getPrototypeOf;function je(e){return!!e&&!!e[Oe]}function De(e){return e?zc(e)||Array.isArray(e)||!!e[en]||!!e.constructor?.[en]||an(e)||sn(e):!1}var Bm=Object.prototype.constructor.toString();function zc(e){if(!e||typeof e!="object")return!1;let t=Ut(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)===Bm}function ca(e){return je(e)||be(15,e),e[Oe].base_}function tn(e,t){Bt(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Bt(e){let t=e[Oe];return t?t.type_:Array.isArray(e)?1:an(e)?2:sn(e)?3:0}function rn(e,t){return Bt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Xi(e,t){return Bt(e)===2?e.get(t):e[t]}function Wc(e,t,r){let n=Bt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Qm(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function an(e){return e instanceof Map}function sn(e){return e instanceof Set}function Lt(e){return e.copy_||e.base_}function ta(e,t){if(an(e))return new Map(e);if(sn(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=zc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Oe];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(Ut(e),n)}else{let n=Ut(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function Kn(e,t=!1){return Yn(e)||je(e)||!De(e)||(Bt(e)>1&&(e.set=e.add=e.clear=e.delete=$m),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>Kn(n,!0))),e}function $m(){be(2)}function Yn(e){return Object.isFrozen(e)}var ra={};function Qt(e){let t=ra[e];return t||be(0,e),t}function Hm(e,t){ra[e]||(ra[e]=t)}var nn;function Gc(){return nn}function zm(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Bc(e,t){t&&(Qt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function na(e){oa(e),e.drafts_.forEach(Wm),e.drafts_=null}function oa(e){e===nn&&(nn=e.parent_)}function Qc(e){return nn=zm(nn,e)}function Wm(e){let t=e[Oe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function $c(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Oe].modified_&&(na(t),be(4)),De(e)&&(e=Wn(t,e),t.parent_||Gn(t,e)),t.patches_&&Qt("Patches").generateReplacementPatches_(r[Oe].base_,e,t.patches_,t.inversePatches_)):e=Wn(t,r,[]),na(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sa?e:void 0}function Wn(e,t,r){if(Yn(t))return t;let n=t[Oe];if(!n)return tn(t,(o,i)=>Hc(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Gn(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),tn(i,(m,f)=>Hc(e,n,o,m,f,r,a)),Gn(e,o,!1),r&&e.patches_&&Qt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Hc(e,t,r,n,o,i,a){if(je(o)){let m=i&&t&&t.type_!==3&&!rn(t.assigned_,n)?i.concat(n):void 0,f=Wn(e,o,m);if(Wc(r,n,f),je(f))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(De(o)&&!Yn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Wn(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Gn(e,o)}}function Gn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Kn(t,r)}function Gm(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=ua;r&&(o=[n],i=on);let{revoke:a,proxy:m}=Proxy.revocable(o,i);return n.draft_=m,n.revoke_=a,m}var ua={get(e,t){if(t===Oe)return e;let r=Lt(e);if(!rn(r,t))return Km(e,r,t);let n=r[t];return e.finalized_||!De(n)?n:n===Zi(e.base_,t)?(ea(e),e.copy_[t]=aa(n,e)):n},has(e,t){return t in Lt(e)},ownKeys(e){return Reflect.ownKeys(Lt(e))},set(e,t,r){let n=Kc(Lt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Zi(Lt(e),t),i=o?.[Oe];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Qm(r,o)&&(r!==void 0||rn(e.base_,t)))return!0;ea(e),ia(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 Zi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ea(e),ia(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Lt(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 Ut(e.base_)},setPrototypeOf(){be(12)}},on={};tn(ua,(e,t)=>{on[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});on.deleteProperty=function(e,t){return on.set.call(this,e,t,void 0)};on.set=function(e,t,r){return ua.set.call(this,e[0],t,r,e[0])};function Zi(e,t){let r=e[Oe];return(r?Lt(r):e)[t]}function Km(e,t,r){let n=Kc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Kc(e,t){if(!(t in e))return;let r=Ut(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ut(r)}}function ia(e){e.modified_||(e.modified_=!0,e.parent_&&ia(e.parent_))}function ea(e){e.copy_||(e.copy_=ta(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ym=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=aa(t,void 0),m=!0;try{o=r(a),m=!1}finally{m?na(i):oa(i)}return Bc(i,n),$c(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===sa&&(o=void 0),this.autoFreeze_&&Kn(o,!0),n){let i=[],a=[];Qt("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),je(e)&&(e=Yc(e));let t=Qc(this),r=aa(e,void 0);return r[Oe].isManual_=!0,oa(t),r}finishDraft(e,t){let r=e&&e[Oe];(!r||!r.isManual_)&&be(9);let{scope_:n}=r;return Bc(n,t),$c(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=Qt("Patches").applyPatches_;return je(e)?n(e,t):this.produce(e,o=>n(o,t))}};function aa(e,t){let r=an(e)?Qt("MapSet").proxyMap_(e,t):sn(e)?Qt("MapSet").proxySet_(e,t):Gm(e,t);return(t?t.scope_:Gc()).drafts_.push(r),r}function Yc(e){return je(e)||be(10,e),Jc(e)}function Jc(e){if(!De(e)||Yn(e))return e;let t=e[Oe],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ta(e,t.scope_.immer_.useStrictShallowCopy_)}else r=ta(e,!0);return tn(r,(n,o)=>{Wc(r,n,Jc(o))}),t&&(t.finalized_=!1),r}function Xc(){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,T=S.copy_;T.length<P.length&&([P,T]=[T,P],[v,R]=[R,v]);for(let w=0;w<P.length;w++)if(x[w]&&T[w]!==P[w]){let E=g.concat([w]);v.push({op:t,path:E,value:h(T[w])}),R.push({op:t,path:E,value:h(P[w])})}for(let w=P.length;w<T.length;w++){let E=g.concat([w]);v.push({op:r,path:E,value:h(T[w])})}for(let w=T.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;tn(S.assigned_,(T,w)=>{let E=Xi(P,T),j=Xi(x,T),k=w?rn(P,T)?t:r:n;if(E===j&&k===t)return;let I=g.concat(T);v.push(k===n?{op:k,path:I}:{op:k,path:I,value:j}),R.push(k===r?{op:n,path:I}:k===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,T=0;P.forEach(w=>{if(!x.has(w)){let E=g.concat([T]);v.push({op:n,path:E,value:w}),R.unshift({op:r,path:E,value:w})}T++}),T=0,x.forEach(w=>{if(!P.has(w)){let E=g.concat([T]);v.push({op:r,path:E,value:w}),R.unshift({op:n,path:E,value:w})}T++})}function f(S,g,v,R){v.push({op:t,path:[],value:g===sa?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 j=0;j<R.length-1;j++){let k=Bt(x),I=R[j];typeof I!="string"&&typeof I!="number"&&(I=""+I),(k===0||k===1)&&(I==="__proto__"||I==="constructor")&&be(19),typeof x=="function"&&I==="prototype"&&be(19),x=Xi(x,I),typeof x!="object"&&be(18,R.join("/"))}let T=Bt(x),w=y(v.value),E=R[R.length-1];switch(P){case t:switch(T){case 2:return x.set(E,w);case 3:be(16);default:return x[E]=w}case r:switch(T){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(T){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(an(S))return new Map(Array.from(S.entries()).map(([v,R])=>[v,y(R)]));if(sn(S))return new Set(Array.from(S).map(y));let g=Object.create(Ut(S));for(let v in S)g[v]=y(S[v]);return rn(S,en)&&(g[en]=S[en]),g}function h(S){return je(S)?y(S):S}Hm("Patches",{applyPatches_:p,generatePatches_:o,generateReplacementPatches_:f})}var Ne=new Ym,it=Ne.produce,Jn=Ne.produceWithPatches.bind(Ne),Lx=Ne.setAutoFreeze.bind(Ne),Ux=Ne.setUseStrictShallowCopy.bind(Ne),la=Ne.applyPatches.bind(Ne),Bx=Ne.createDraft.bind(Ne),Qx=Ne.finishDraft.bind(Ne);d();c();l();u();function Jm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Xm(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Zm(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 Zc=e=>Array.isArray(e)?e:[e];function eg(e){let t=Array.isArray(e[0])?e[0]:e;return Zm(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function tg(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var Yx=Symbol();var Jx=Object.getPrototypeOf({});var rg=class{constructor(e){this.value=e}deref(){return this.value}},ng=typeof WeakRef<"u"?WeakRef:rg,og=0,eu=1;function Xn(){return{s:og,v:void 0,o:null,p:null}}function ar(e,t={}){let r=Xn(),{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=Xn(),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=Xn(),v.set(g,m)):m=R}}let p=m,y;if(m.s===eu)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 ng(y):y}return p.s=eu,p.v=y,y}return a.clearCache=()=>{r=Xn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function tu(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()),Jm(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);let y={...r,...f},{memoize:h,memoizeOptions:S=[],argsMemoize:g=ar,argsMemoizeOptions:v=[],devModeChecks:R={}}=y,P=Zc(S),x=Zc(v),T=eg(o),w=h(function(){return i++,p.apply(null,arguments)},...P),E=!0,j=g(function(){a++;let I=tg(T,arguments);return m=w.apply(null,I),m},...x);return Object.assign(j,{resultFunc:p,memoizedResultFunc:w,dependencies:T,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>m,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:h,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var pe=tu(ar),ig=Object.assign((e,t=pe)=>{Xm(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:()=>ig});d();c();l();u();function ru(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var nu=ru(),ou=ru;var ag=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ir:ir.apply(null,arguments)},gR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},sg=e=>e&&typeof e.match=="function";function D(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 uu=class cn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,cn.prototype)}static get[Symbol.species](){return cn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new cn(...t[0].concat(this)):new cn(...t.concat(this))}};function iu(e){return De(e)?it(e,()=>{}):e}function au(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function cg(e){return typeof e=="boolean"}var ug=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new uu;return r&&(cg(r)?a.push(nu):a.push(ou(r.extraArgument))),a},un="RTK_autoBatch",cr=()=>e=>({payload:e,meta:{[un]:!0}}),su=e=>t=>{setTimeout(t,e)},lg=(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),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?.[un],i=!o,i&&(a||(a=!0,f(p))),n.dispatch(y)}finally{o=!0}}})},dg=e=>function(r){let{autoBatch:n=!0}=r??{},o=new uu(e);return n&&o.push(lg(typeof n=="object"?n:void 0)),o};function lu(e){let t=ug(),{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=or(r);else throw new Error(He(1));let f;typeof n=="function"?f=n(t):f=t();let p=ir;o&&(p=ag({trace:!1,...(typeof o=="object"&&o)}));let y=Uc(...f),h=dg(y),S=typeof a=="function"?a(h):h(),g=p(...S);return Ji(m,i,g)}function du(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 pg(e){return typeof e=="function"}function ge(e,t){let[r,n,o]=du(t),i;if(pg(e))i=()=>iu(e());else{let m=iu(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(je(y)){let g=h(y,f);return g===void 0?y:g}else{if(De(y))return it(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 pu=(e,t)=>sg(e)?e.match(t):e(t);function Ye(...e){return t=>e.some(r=>pu(r,t))}function sr(...e){return t=>e.every(r=>pu(r,t))}function eo(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 ln(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function to(...e){return e.length===0?t=>eo(t,["pending"]):ln(e)?Ye(...e.map(t=>t.pending)):to()(e[0])}function $t(...e){return e.length===0?t=>eo(t,["rejected"]):ln(e)?Ye(...e.map(t=>t.rejected)):$t()(e[0])}function dn(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?sr($t(...e),t):ln(e)?sr($t(...e),t):dn()(e[0])}function at(...e){return e.length===0?t=>eo(t,["fulfilled"]):ln(e)?Ye(...e.map(t=>t.fulfilled)):at()(e[0])}function ro(...e){return e.length===0?t=>eo(t,["pending","fulfilled","rejected"]):ln(e)?Ye(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):ro()(e[0])}var fg="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",no=(e=21)=>{let t="",r=e;for(;r--;)t+=fg[Math.random()*64|0];return t},mg=["name","message","stack","code"],da=class{constructor(e,t){de(this,"_type");this.payload=e,this.meta=t}},cu=class{constructor(e,t){de(this,"_type");this.payload=e,this.meta=t}},gg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of mg)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ue=(()=>{function e(t,r,n){let o=D(t+"/fulfilled",(f,p,y,h)=>({payload:f,meta:{...(h||{}),arg:y,requestId:p,requestStatus:"fulfilled"}})),i=D(t+"/pending",(f,p,y)=>({payload:void 0,meta:{...(y||{}),arg:p,requestId:f,requestStatus:"pending"}})),a=D(t+"/rejected",(f,p,y,h,S)=>({payload:h,error:(n&&n.serializeError||gg)(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):no(),g=new s.AbortController,v,R;function P(T){R=T,g.abort()}let x=_asyncToGenerator(function*(){let T;try{let E=n?.condition?.(f,{getState:y,extra:h});if(hg(E)&&(E=yield E),E===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let j=new Promise((k,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}))),T=yield Promise.race([j,Promise.resolve(r(f,{dispatch:p,getState:y,extra:h,requestId:S,signal:g.signal,abort:P,rejectWithValue:(k,I)=>new da(k,I),fulfillWithValue:(k,I)=>new cu(k,I)})).then(k=>{if(k instanceof da)throw k;return k instanceof cu?o(k.payload,S,f,k.meta):o(k,S,f)})])}catch(E){T=E instanceof da?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(T)&&T.meta.condition||p(T),T})();return Object.assign(x,{abort:P,requestId:S,arg:f,unwrap(){return x.then(yg)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:Ye(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function yg(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function hg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var fu=Symbol.for("rtk-slice-createasyncthunk"),CR={[fu]:ue};function Sg(e,t){return`${e}/${t}`}function vg({creators:e}={}){let t=e?.asyncThunk?.[fu];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(bg()):n.reducers)||{},m=Object.keys(a),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(T,w){let E=typeof T=="string"?T:T.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(T,w){return f.sliceMatchers.push({matcher:T,reducer:w}),p},exposeAction(T,w){return f.actionCreators[T]=w,p},exposeCaseReducer(T,w){return f.sliceCaseReducersByName[T]=w,p}};m.forEach(T=>{let w=a[T],E={reducerName:T,type:Sg(o,T),createNotation:typeof n.reducers=="function"};wg(w)?Rg(E,w,p,t):Ag(E,w,p)});function y(){let[T={},w=[],E=void 0]=typeof n.extraReducers=="function"?du(n.extraReducers):[n.extraReducers],j={...T,...f.sliceCaseReducersByType};return ge(n.initialState,k=>{for(let I in j)k.addCase(I,j[I]);for(let I of f.sliceMatchers)k.addMatcher(I.matcher,I.reducer);for(let I of w)k.addMatcher(I.matcher,I.reducer);E&&k.addDefaultCase(E)})}let h=T=>T,S=new Map,g;function v(T,w){return g||(g=y()),g(T,w)}function R(){return g||(g=y()),g.getInitialState()}function P(T,w=!1){function E(k){let I=k[T];return typeof I>"u"&&w&&(I=R()),I}function j(k=h){let I=au(S,w,()=>new WeakMap);return au(I,k,()=>{let F={};for(let[O,N]of Object.entries(n.selectors??{}))F[O]=Cg(N,k,R,w);return F})}return{reducerPath:T,getSelectors:j,get selectors(){return j(E)},selectSlice:E}}let x={name:o,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:R,...P(i),injectInto(T,{reducerPath:w,...E}={}){let j=w??i;return T.inject({reducerPath:j,reducer:v},E),{...x,...P(j,!0)}}};return x}}function Cg(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 Ht=vg();function bg(){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 Ag({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!xg(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?D(e,a):D(e))}function wg(e){return e._reducerDefinitionType==="asyncThunk"}function xg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Rg({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||Zn,pending:m||Zn,rejected:f||Zn,settled:p||Zn})}function Zn(){}var mu="listener",gu="completed",yu="cancelled",bR=`task-${yu}`,AR=`task-${gu}`,wR=`${mu}-${yu}`,xR=`${mu}-${gu}`;var{assign:hu}=Object;var pa="listenerMiddleware";var Eg=hu(D(`${pa}/add`),{withTypes:()=>Eg}),RR=D(`${pa}/removeAll`),Ig=hu(D(`${pa}/remove`),{withTypes:()=>Ig});var ER=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 G=new H({required:!0,emptyAllowed:!1}),Ae=new H({required:!1,emptyAllowed:!1}),we=new H({required:!0,emptyAllowed:!0}),NR=new H({required:!1,emptyAllowed:!0}),oo=new ie({each:G,required:!0}),Su=new H({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),vu=new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),_R=new H({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),st=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Le=(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 Kr(o);return{payload:e}},B=(e,t)=>{try{return Le(e,t)}catch(r){return{payload:e,error:st(r)}}},Cu=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return Au(e,t,r,o,"Controller initialization error")},bu=(e,t,r,n)=>{let o=`Check the options of ${n}`;return Au(e,t,r,o,"Controller initialization error")},Au=(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 ur="3.27.5-pre.e8e95b2dbe",wu=["@coveo/atomic","@coveo/quantic"];var fa=()=>Ae,xu=()=>G,St=D("configuration/updateBasicConfiguration",e=>B(e,{accessToken:Ae,environment:new H({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:Ae})),Je=D("configuration/updateSearchConfiguration",e=>B(e,{proxyBaseUrl:new H({required:!1,url:!0}),pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:Ae,timezone:Ae,locale:Ae,authenticationProviders:new ie({required:!1,each:G})})),Pg={enabled:new te({default:!0}),originContext:fa(),originLevel2:fa(),originLevel3:fa(),proxyBaseUrl:new H({required:!1,url:!0}),runtimeEnvironment:new fe,anonymous:new te({default:!1}),deviceId:Ae,userDisplayName:Ae,documentLocation:Ae,trackingId:vu,analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new K({options:{required:!1},values:wu.reduce((e,t)=>(e[t]=Su,e),{})})},lr=D("configuration/updateAnalyticsConfiguration",e=>B(e,Pg)),dr=D("configuration/analytics/disable"),pr=D("configuration/analytics/enable"),io=D("configuration/analytics/originlevel2",e=>B(e,{originLevel2:xu()})),ao=D("configuration/analytics/originlevel3",e=>B(e,{originLevel3:xu()}));d();c();l();u();d();c();l();u();d();c();l();u();var Ru={q:new H,enableQuerySyntax:new te,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 te,sf:new K,tab:new H,af:new K};var vt=D("searchParameters/restore",e=>B(e,Ru)),Eu=D("searchParameters/restoreTab",e=>B(e,G));d();c();l();u();var so=D("debug/enable"),co=D("debug/disable");d();c();l();u();var uo=()=>!1;var lo=ge(uo(),e=>{e.addCase(so,()=>!0).addCase(co,()=>!1).addCase(vt,(t,r)=>r.payload.debug??t)});d();c();l();u();var fr=D("pipeline/set",e=>B(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();d();c();l();u();var Tg=D("history/undo"),Fg=D("history/redo"),Xe=D("history/snapshot"),WE=ue("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(Tg()),yield t(qe())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),GE=ue("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(Fg()),yield t(qe())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),qe=ue("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 mr=()=>"";var gr=ge(mr(),e=>{e.addCase(fr,(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();d();c();l();u();d();c();l();u();d();c();l();u();var yr=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?ma(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],ma(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 ma(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}d();c();l();u();function kg(){return typeof navigator<"u"}function Iu(){try{return typeof localStorage<"u"}catch{return!1}}function Pu(){try{return typeof sessionStorage<"u"}catch{return!1}}function Tu(){return!!(kg()&&navigator.cookieEnabled)}var Fu=null;function ku(){return Fu||(Iu()?localStorage:Tu()?new ga:Pu()?sessionStorage:new ya)}var hr=class hr{getItem(t){return yr.get(`${hr.prefix}${t}`)}removeItem(t){yr.erase(`${hr.prefix}${t}`)}setItem(t,r,n){yr.set(`${hr.prefix}${t}`,r,n)}};de(hr,"prefix","coveo_");var ga=hr;var ya=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var po="__coveo.analytics.history",Og=20,Dg=1e3*60,qg=75,zt=class zt{constructor(t){de(this,"store");this.store=t||ku()}static getInstance(t){return zt.instance||(zt.instance=new zt(t)),zt.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(po);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){var _this1=this;return _asyncToGenerator(function*(){try{let t=yield _this1.store.getItem(po);return t?JSON.parse(t):[]}catch{return[]}})()}setHistory(t){try{this.store.setItem(po,JSON.stringify(t.slice(0,Og)))}catch{}}clear(){try{this.store.removeItem(po)}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,qg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>Dg:!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))}};de(zt,"instance",null);var ha=zt,Ze=ha;d();c();l();u();d();c();l();u();var Sr=pe(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${ur}`));d();c();l();u();d();c();l();u();function ct(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 Ca(){return typeof window<"u"}function Da(){return typeof navigator<"u"}function vr(){return typeof document<"u"}function ba(){try{return typeof localStorage<"u"}catch{return!1}}function Mg(){try{return typeof sessionStorage<"u"}catch{return!1}}function Hu(){return Da()&&navigator.cookieEnabled}var jg=[ae.click,ae.custom,ae.search,ae.view],Ng=(e,t)=>jg.indexOf(e)!==-1?Object.assign({language:vr()?document.documentElement.lang:"unknown",userAgent:Da()?navigator.userAgent:"unknown"},t):t,fn=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 _g(){return ba()?localStorage:Hu()?new mn:Mg()?sessionStorage:new br}var mn=class e{getItem(t){return fn.get(`${e.prefix}${t}`)}removeItem(t){fn.erase(`${e.prefix}${t}`)}setItem(t,r,n){fn.set(`${e.prefix}${t}`,r,n)}};mn.prefix="coveo_";var Aa=class{constructor(){this.cookieStorage=new mn}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)}},br=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},fo="__coveo.analytics.history",Vg=20,Lg=1e3*60,Ug=75,yo=class{constructor(t){this.store=t||_g()}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(fo);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(fo);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(fo,JSON.stringify(t.slice(0,Vg)))}catch{}}clear(){try{this.store.removeItem(fo)}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,Ug)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Lg:!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 Bg=(e,t)=>q(void 0,void 0,void 0,function*(){return e===ae.view?(yield Qg(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Qg=e=>q(void 0,void 0,void 0,function*(){let t=new yo,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),mo,$g=new Uint8Array(16);function Hg(){if(!mo&&(mo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!mo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mo($g)}var zg=/^(?:[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 ho(e){return typeof e=="string"&&zg.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function zu(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]]).toLowerCase()}function Wg(e){if(!ho(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 Gg(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Kg="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Yg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Jg(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=Gg(o)),typeof i=="string"&&(i=Wg(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 zu(p)}try{n.name=e}catch{}return n.DNS=Kg,n.URL=Yg,n}var Xg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Du={randomUUID:Xg};function Wt(e,t,r){if(Du.randomUUID&&!t&&!e)return Du.randomUUID();e=e||{};let n=e.random||(e.rng||Hg)();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 zu(n)}function Zg(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 Sa(e,t){return e<<t|e>>>32-t}function ey(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]=Sa(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=Sa(f,5)+Zg(v,p,y,h)+S+t[v]+m[g]>>>0;S=h,h=y,y=Sa(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 ty=Jg("v5",80,ey),qu=ty,Wu="2.30.45",Mu=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,pn={pageview:"pageview",event:"event"},So=class{constructor({client:t,uuidGenerator:r=Wt}){this.client=t,this.uuidGenerator=r}},wa=class extends So{constructor({client:t,uuidGenerator:r=Wt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Mu(window.location),this.lastReferrer=vr()?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:vr()?document.title:"",encoding:vr()?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===pn.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===pn.pageview?this.nextPageViewId:this.pageViewId,referrer:t===pn.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===pn.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 Mu(window.location)}},Ct=class e{constructor(t,r){if(!ho(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 ho(i)?new e(i,Number.parseInt(o)*1e3):null}};Ct.cvo_cid="cvo_cid";Ct.expirationTime=120;var xa=class extends So{constructor({client:t,uuidGenerator:r=Wt}){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(Ct.cvo_cid,new Ct(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};xa.Id="link";var Be=Object.keys;function go(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var va=128,Gu=192,ju=224,Nu=240;function ry(e){return(e&248)===Nu?4:(e&Nu)===ju?3:(e&ju)===Gu?2:1}function ny(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&va)!=va)break;if(r-=3,(n&Gu)!=va){t-r>=ry(n)*3&&(r=t);break}}return e.substring(0,r)}var Ra={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"},oy=Be(Ra).map(e=>Ra[e]),iy=[...oy].join("|"),ay=new RegExp(`^(${iy}$)`),sy={svcAction:"svc_action",svcActionData:"svc_action_data"},cy=e=>Be(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Ra[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),uy=e=>ay.test(e),ly=[uy],_u={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Vu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ee={action:"pa",list:"pal",listSource:"pls"},vo={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},dy=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Ea={id:"quoteId",affiliation:"quoteAffiliation"},Ia={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},py={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),vo),purchase:Object.assign(Object.assign({},Ee),vo),quickview:Ee,quote:Object.assign(Object.assign({},Ee),Ea),review:Object.assign(Object.assign({},Ee),Ia)},fy=Be(_u).map(e=>_u[e]),my=Be(Vu).map(e=>Vu[e]),gy=Be(Ee).map(e=>Ee[e]),yy=Be(vo).map(e=>vo[e]),hy=Be(Ia).map(e=>Ia[e]),Sy=Be(Ea).map(e=>Ea[e]),vy=[...fy,"custom"].join("|"),Cy=[...my,"custom"].join("|"),Ku="(pr[0-9]+)",Yu="(il[0-9]+pi[0-9]+)",by=new RegExp(`^${Ku}(${vy})$`),Ay=new RegExp(`^(${Yu}(${Cy}))|(il[0-9]+nm)$`),wy=new RegExp(`^(${gy.join("|")})$`),xy=new RegExp(`^(${yy.join("|")})$`),Ry=new RegExp(`^${Ku}custom$`),Ey=new RegExp(`^${Yu}custom$`),Iy=new RegExp(`^(${[...dy,...hy,...Sy].join("|")})$`),Py=e=>by.test(e),Ty=e=>Ay.test(e),Fy=e=>wy.test(e),ky=e=>xy.test(e),Oy=e=>Iy.test(e),Dy=[Ty,Py,Fy,ky,Oy],qy=[Ry,Ey],My={anonymizeIp:"aip"},jy={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Ny={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},_y=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Vy=Object.assign(Object.assign(Object.assign(Object.assign({},My),jy),Ny),_y.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Pa=Object.assign(Object.assign({},Vy),sy),Ly=e=>{let t=!!e.action&&py[e.action]||{};return Be(e).reduce((r,n)=>{let o=t[n]||Pa[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Uy=Be(Pa).map(e=>Pa[e]),By=e=>Uy.indexOf(e)!==-1,Qy=e=>e==="custom",$y=e=>[...Dy,...ly,By,Qy].some(t=>t(e)),Hy=e=>Be(e).reduce((t,r)=>{let n=zy(r);return n?Object.assign(Object.assign({},t),Wy(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),zy=e=>{let t;return[...qy].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Wy=(e,t)=>Be(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ta=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}},Fa=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()})}},Lu=C.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=ct(f,["url"]),h;try{h=yield Lu(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 Lu(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"})}},ka=class{constructor(t,r){ba()&&Hu()?this.storage=new Aa:ba()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new br),this.client=new Co(t),this.beaconClient=new Ta(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 br,this.client=new Co(t)}getClientDependingOnEventType(t){return this.client}},bo=class{constructor(){this.storage=new br,this.client=new Fa}getClientDependingOnEventType(t){return this.client}},Gy="xx",Ky=e=>e?.startsWith(Gy)||!1,Yy=`
26
+ `;return new Gr(r)}var Gr=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 Hf(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 zf(e){return e===null}function X(e){return ve(e)||zf(e)}var ne=class{constructor(e={}){le(this,"value");this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(Wf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Wf(e){return ve(e)||pc(e)}function pc(e){return typeof e=="boolean"}var J=class{constructor(e={}){le(this,"value");this.config=e,this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(Gf(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 Gf(e){return ve(e)||fc(e)}function fc(e){return typeof e=="number"&&!Number.isNaN(e)}var Kf=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,H=class{constructor(e={}){le(this,"value");le(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(!qn(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&&!(Kf.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 qn(e){return Object.prototype.toString.call(e)==="[object String]"}var K=class{constructor(e={}){le(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(!mc(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 mc(e){return e!==void 0&&typeof e=="object"}var ie=class{constructor(e={}){le(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 pc(e)||qn(e)||fc(e)||mc(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function gc(e){return Array.isArray(e)}var ji=class{constructor(e){le(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 yc(e){return Array.isArray(e)}function Mn(e){return e.trim()===""}var Yf=new Set(["1",1,"yes",!0]);function hc(){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=>Yf.has(r))}function Sc(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 Jf(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 er(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+=er(e.content.slice(n,a)),r+=e.openingDelimiter,r+=er(e.content.slice(a,m)),r+=e.closingDelimiter,n=m}return n!==t&&(r+=er(e.content.slice(n))),r}function Xf(e,t){return e=er(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Ni(n,t.notMatchDelimiters):o?Ni(o,t.exactMatchDelimiters):i?Ni(i,t.correctionDelimiters):r)}function Ni(e,t){return t?t.open+e+t.close:e}function er(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;","\"":"&quot;","'":"&#x27;","`":"&#x60;"},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 Fc=Qe(Ec(),1);d();c();l();u();d();c();l();u();var xm="recommendation-internal-options",QA=Symbol.for(xm);var We=new Error("Failed to load reducers."),tr=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Nt=class extends Error{constructor(r,n){super();le(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 Ic(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function Pc(e){return typeof e!="object"||!e?!1:Object.values(e).every(Rm)}function Rm(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Tc(e){return e===429}var $e=class e{static call(t){return _asyncToGenerator(function*(){let r=Em(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(Tc(f.status))throw f;return f});return function m(){return _ref.apply(this,arguments)}}();try{let f=yield(0,Fc.backOff)(m,{retry:p=>{let y=p&&Tc(p.status);return y&&n.info("Platform retrying request"),y}});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new tr;case 404:throw new Nt(i,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new Nt(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 mt(e,t="prod"){return`${Pe(e,t)}/rest/search/v2`}function Nn(e,t="prod"){return`${Pe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Em(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=Im(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(m&&{body:f}),signal:a}}function Im(e,t){return t==="application/x-www-form-urlencoded"?Pc(e)?Ic(e):"":JSON.stringify(e)}d();c();l();u();d();c();l();u();var _n=e=>e;d();c();l();u();d();c();l();u();function Vn(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function Ge(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Vn(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Vn(),extendedResults:{},searchAction:void 0}}d();c();l();u();function gt(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var yt=e=>{let{response:t}=e;return t.body?Pm(e):Tm(t)},Pm=e=>km(e)?Om(e):Fm(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Tm=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Fm(e){return e.body.statusCode!==void 0}function km(e){return e.body.exception!==void 0}var Om=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});d();c();l();u();var ht=class{constructor(){le(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){le(this,"_basePath");le(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 kc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}d();c();l();u();var ot=(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 Oc=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield $e.call({...ot(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:gt(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=kc(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Dm(a)?{success:a}:{error:yt({response:r,body:a})}});return function Oc(_x,_x2){return _ref2.apply(this,arguments)}}();function Dm(e){return typeof e=="string"}d();c();l();u();function qm(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Mm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Ln(e,t){if(t&&e.name==="AbortError")return{error:Mm(e)};if(e instanceof Nt)return{error:qm(e)};throw e}var Un=class{constructor(t){this.options=t;le(this,"apiCallsQueues",{unknown:new ht,mainSearch:new ht,facetValues:new ht,foldingCollection:new ht,instantResults:new ht})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/plan"),requestParams:gt(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return Ln(r);let n=yield r.json();return Nm(n)?{success:n}:{error:yt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:gt(t),..._this3.options});if(r instanceof Error)return Ln(r);let n=yield r.json(),o={response:r,body:n};return jm(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:yt(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(m=>$e.call({...ot(t,"POST","application/json",""),requestParams:gt(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 Ln(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return Dc(i)?(a.body=qc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:yt(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"POST","application/json","/facet"),requestParams:gt(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({...ot(t,"POST","application/json",""),requestParams:gt(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(Dc(n)){let o={response:r,body:n};return o.body=qc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:yt({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return Oc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield $e.call({...ot(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return _m(n)?{success:n}:{error:yt({response:r,body:n})}})()}},Bn=e=>e.success!==void 0,ke=e=>e.error!==void 0;function Dc(e){return e.results!==void 0}function qc(e){let t=Vn();return X(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function jm(e){return e.completions!==void 0}function Nm(e){return e.preprocessingOutput!==void 0}function _m(e){return e.fields!==void 0}d();c();l();u();var Mc=e=>e,jc=e=>e,Nc=e=>e;d();c();l();u();d();c();l();u();d();c();l();u();function Ce(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 Vm=typeof Symbol=="function"&&Symbol.observable||"@@observable",_c=Vm,Wi=()=>Math.random().toString(36).substring(7).split("").join("."),Lm={INIT:`@@redux/INIT${Wi()}`,REPLACE:`@@redux/REPLACE${Wi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Wi()}`},Qn=Lm;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 Gi(e,t,r){if(typeof e!="function")throw new Error(Ce(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ce(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ce(1));return r(Gi)(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(Ce(3));return o}function h(P){if(typeof P!="function")throw new Error(Ce(4));if(f)throw new Error(Ce(5));let x=!0;p();let T=m++;return a.set(T,P),function(){if(x){if(f)throw new Error(Ce(6));x=!1,p(),a.delete(T),i=null}}}function S(P){if(!Ke(P))throw new Error(Ce(7));if(typeof P.type>"u")throw new Error(Ce(8));if(typeof P.type!="string")throw new Error(Ce(17));if(f)throw new Error(Ce(9));try{f=!0,o=n(o,P)}finally{f=!1}return(i=a).forEach(T=>{T()}),P}function g(P){if(typeof P!="function")throw new Error(Ce(10));n=P,S({type:Qn.REPLACE})}function v(){let P=h;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(Ce(11));function T(){let E=x;E.next&&E.next(y())}return T(),{unsubscribe:P(T)}},[_c](){return this}}}return S({type:Qn.INIT}),{dispatch:S,subscribe:h,getState:y,replaceReducer:g,[_c]:v}}function Um(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Qn.INIT})>"u")throw new Error(Ce(12));if(typeof r(void 0,{type:Qn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ce(13))})}function rr(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{Um(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(Ce(14))}y[S]=R,p=p||R!==v}return p=p||n.length!==Object.keys(m).length,p?y:m}}function nr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Vc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(Ce(15))},a={getState:o.getState,dispatch:(f,...p)=>i(f,...p)},m=e.map(f=>f(a));return i=nr(...m)(o.dispatch),{...o,dispatch:i}}}function $n(e){return Ke(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var oa=Symbol.for("immer-nothing"),Zr=Symbol.for("immer-draftable"),Oe=Symbol.for("immer-state");function be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Vt=Object.getPrototypeOf;function je(e){return!!e&&!!e[Oe]}function De(e){return e?$c(e)||Array.isArray(e)||!!e[Zr]||!!e.constructor?.[Zr]||on(e)||an(e):!1}var Bm=Object.prototype.constructor.toString();function $c(e){if(!e||typeof e!="object")return!1;let t=Vt(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)===Bm}function ia(e){return je(e)||be(15,e),e[Oe].base_}function en(e,t){Lt(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Lt(e){let t=e[Oe];return t?t.type_:Array.isArray(e)?1:on(e)?2:an(e)?3:0}function tn(e,t){return Lt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ki(e,t){return Lt(e)===2?e.get(t):e[t]}function Hc(e,t,r){let n=Lt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Qm(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function on(e){return e instanceof Map}function an(e){return e instanceof Set}function _t(e){return e.copy_||e.base_}function Xi(e,t){if(on(e))return new Map(e);if(an(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=$c(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Oe];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(Vt(e),n)}else{let n=Vt(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function Wn(e,t=!1){return Gn(e)||je(e)||!De(e)||(Lt(e)>1&&(e.set=e.add=e.clear=e.delete=$m),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>Wn(n,!0))),e}function $m(){be(2)}function Gn(e){return Object.isFrozen(e)}var Zi={};function Ut(e){let t=Zi[e];return t||be(0,e),t}function Hm(e,t){Zi[e]||(Zi[e]=t)}var rn;function zc(){return rn}function zm(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Lc(e,t){t&&(Ut("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ea(e){ta(e),e.drafts_.forEach(Wm),e.drafts_=null}function ta(e){e===rn&&(rn=e.parent_)}function Uc(e){return rn=zm(rn,e)}function Wm(e){let t=e[Oe];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[Oe].modified_&&(ea(t),be(4)),De(e)&&(e=Hn(t,e),t.parent_||zn(t,e)),t.patches_&&Ut("Patches").generateReplacementPatches_(r[Oe].base_,e,t.patches_,t.inversePatches_)):e=Hn(t,r,[]),ea(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==oa?e:void 0}function Hn(e,t,r){if(Gn(t))return t;let n=t[Oe];if(!n)return en(t,(o,i)=>Qc(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return zn(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)=>Qc(e,n,o,m,f,r,a)),zn(e,o,!1),r&&e.patches_&&Ut("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Qc(e,t,r,n,o,i,a){if(je(o)){let m=i&&t&&t.type_!==3&&!tn(t.assigned_,n)?i.concat(n):void 0,f=Hn(e,o,m);if(Hc(r,n,f),je(f))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(De(o)&&!Gn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Hn(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&zn(e,o)}}function zn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wn(t,r)}function Gm(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:zc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=aa;r&&(o=[n],i=nn);let{revoke:a,proxy:m}=Proxy.revocable(o,i);return n.draft_=m,n.revoke_=a,m}var aa={get(e,t){if(t===Oe)return e;let r=_t(e);if(!tn(r,t))return Km(e,r,t);let n=r[t];return e.finalized_||!De(n)?n:n===Yi(e.base_,t)?(Ji(e),e.copy_[t]=na(n,e)):n},has(e,t){return t in _t(e)},ownKeys(e){return Reflect.ownKeys(_t(e))},set(e,t,r){let n=Wc(_t(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Yi(_t(e),t),i=o?.[Oe];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Qm(r,o)&&(r!==void 0||tn(e.base_,t)))return!0;Ji(e),ra(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 Yi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ji(e),ra(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(){be(11)},getPrototypeOf(e){return Vt(e.base_)},setPrototypeOf(){be(12)}},nn={};en(aa,(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 aa.set.call(this,e[0],t,r,e[0])};function Yi(e,t){let r=e[Oe];return(r?_t(r):e)[t]}function Km(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=Vt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Vt(r)}}function ra(e){e.modified_||(e.modified_=!0,e.parent_&&ra(e.parent_))}function Ji(e){e.copy_||(e.copy_=Xi(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ym=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=Uc(this),a=na(t,void 0),m=!0;try{o=r(a),m=!1}finally{m?ea(i):ta(i)}return Lc(i,n),Bc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===oa&&(o=void 0),this.autoFreeze_&&Wn(o,!0),n){let i=[],a=[];Ut("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),je(e)&&(e=Gc(e));let t=Uc(this),r=na(e,void 0);return r[Oe].isManual_=!0,ta(t),r}finishDraft(e,t){let r=e&&e[Oe];(!r||!r.isManual_)&&be(9);let{scope_:n}=r;return Lc(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=Ut("Patches").applyPatches_;return je(e)?n(e,t):this.produce(e,o=>n(o,t))}};function na(e,t){let r=on(e)?Ut("MapSet").proxyMap_(e,t):an(e)?Ut("MapSet").proxySet_(e,t):Gm(e,t);return(t?t.scope_:zc()).drafts_.push(r),r}function Gc(e){return je(e)||be(10,e),Kc(e)}function Kc(e){if(!De(e)||Gn(e))return e;let t=e[Oe],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Xi(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Xi(e,!0);return en(r,(n,o)=>{Hc(r,n,Kc(o))}),t&&(t.finalized_=!1),r}function Yc(){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,T=S.copy_;T.length<P.length&&([P,T]=[T,P],[v,R]=[R,v]);for(let w=0;w<P.length;w++)if(x[w]&&T[w]!==P[w]){let E=g.concat([w]);v.push({op:t,path:E,value:h(T[w])}),R.push({op:t,path:E,value:h(P[w])})}for(let w=P.length;w<T.length;w++){let E=g.concat([w]);v.push({op:r,path:E,value:h(T[w])})}for(let w=T.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_,(T,w)=>{let E=Ki(P,T),j=Ki(x,T),k=w?tn(P,T)?t:r:n;if(E===j&&k===t)return;let I=g.concat(T);v.push(k===n?{op:k,path:I}:{op:k,path:I,value:j}),R.push(k===r?{op:n,path:I}:k===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,T=0;P.forEach(w=>{if(!x.has(w)){let E=g.concat([T]);v.push({op:n,path:E,value:w}),R.unshift({op:r,path:E,value:w})}T++}),T=0,x.forEach(w=>{if(!P.has(w)){let E=g.concat([T]);v.push({op:r,path:E,value:w}),R.unshift({op:n,path:E,value:w})}T++})}function f(S,g,v,R){v.push({op:t,path:[],value:g===oa?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 j=0;j<R.length-1;j++){let k=Lt(x),I=R[j];typeof I!="string"&&typeof I!="number"&&(I=""+I),(k===0||k===1)&&(I==="__proto__"||I==="constructor")&&be(19),typeof x=="function"&&I==="prototype"&&be(19),x=Ki(x,I),typeof x!="object"&&be(18,R.join("/"))}let T=Lt(x),w=y(v.value),E=R[R.length-1];switch(P){case t:switch(T){case 2:return x.set(E,w);case 3:be(16);default:return x[E]=w}case r:switch(T){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(T){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(on(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(Vt(S));for(let v in S)g[v]=y(S[v]);return tn(S,Zr)&&(g[Zr]=S[Zr]),g}function h(S){return je(S)?y(S):S}Hm("Patches",{applyPatches_:p,generatePatches_:o,generateReplacementPatches_:f})}var Ne=new Ym,it=Ne.produce,Kn=Ne.produceWithPatches.bind(Ne),Lx=Ne.setAutoFreeze.bind(Ne),Ux=Ne.setUseStrictShallowCopy.bind(Ne),sa=Ne.applyPatches.bind(Ne),Bx=Ne.createDraft.bind(Ne),Qx=Ne.finishDraft.bind(Ne);d();c();l();u();function Jm(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Xm(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Zm(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 Jc=e=>Array.isArray(e)?e:[e];function eg(e){let t=Array.isArray(e[0])?e[0]:e;return Zm(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function tg(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var Yx=Symbol();var Jx=Object.getPrototypeOf({});var rg=class{constructor(e){this.value=e}deref(){return this.value}},ng=typeof WeakRef<"u"?WeakRef:rg,og=0,Xc=1;function Yn(){return{s:og,v:void 0,o:null,p:null}}function or(e,t={}){let r=Yn(),{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=Yn(),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=Yn(),v.set(g,m)):m=R}}let p=m,y;if(m.s===Xc)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 ng(y):y}return p.s=Xc,p.v=y,y}return a.clearCache=()=>{r=Yn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Zc(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()),Jm(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=Jc(S),x=Jc(v),T=eg(o),w=h(function(){return i++,p.apply(null,arguments)},...P),E=!0,j=g(function(){a++;let I=tg(T,arguments);return m=w.apply(null,I),m},...x);return Object.assign(j,{resultFunc:p,memoizedResultFunc:w,dependencies:T,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>m,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:h,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var pe=Zc(or),ig=Object.assign((e,t=pe)=>{Xm(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:()=>ig});d();c();l();u();function eu(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var tu=eu(),ru=eu;var ag=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?nr:nr.apply(null,arguments)},gR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},sg=e=>e&&typeof e.match=="function";function D(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=>$n(n)&&n.type===e,r}var su=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 nu(e){return De(e)?it(e,()=>{}):e}function ou(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function cg(e){return typeof e=="boolean"}var ug=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new su;return r&&(cg(r)?a.push(tu):a.push(ru(r.extraArgument))),a},cn="RTK_autoBatch",ar=()=>e=>({payload:e,meta:{[cn]:!0}}),iu=e=>t=>{setTimeout(t,e)},lg=(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:iu(10):e.type==="callback"?e.queueNotification:iu(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}}})},dg=e=>function(r){let{autoBatch:n=!0}=r??{},o=new su(e);return n&&o.push(lg(typeof n=="object"?n:void 0)),o};function cu(e){let t=ug(),{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=rr(r);else throw new Error(He(1));let f;typeof n=="function"?f=n(t):f=t();let p=nr;o&&(p=ag({trace:!1,...(typeof o=="object"&&o)}));let y=Vc(...f),h=dg(y),S=typeof a=="function"?a(h):h(),g=p(...S);return Gi(m,i,g)}function uu(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 pg(e){return typeof e=="function"}function ge(e,t){let[r,n,o]=uu(t),i;if(pg(e))i=()=>nu(e());else{let m=nu(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(je(y)){let g=h(y,f);return g===void 0?y:g}else{if(De(y))return it(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 lu=(e,t)=>sg(e)?e.match(t):e(t);function Ye(...e){return t=>e.some(r=>lu(r,t))}function ir(...e){return t=>e.every(r=>lu(r,t))}function Xn(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 Zn(...e){return e.length===0?t=>Xn(t,["pending"]):un(e)?Ye(...e.map(t=>t.pending)):Zn()(e[0])}function Bt(...e){return e.length===0?t=>Xn(t,["rejected"]):un(e)?Ye(...e.map(t=>t.rejected)):Bt()(e[0])}function ln(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ir(Bt(...e),t):un(e)?ir(Bt(...e),t):ln()(e[0])}function at(...e){return e.length===0?t=>Xn(t,["fulfilled"]):un(e)?Ye(...e.map(t=>t.fulfilled)):at()(e[0])}function eo(...e){return e.length===0?t=>Xn(t,["pending","fulfilled","rejected"]):un(e)?Ye(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):eo()(e[0])}var fg="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",to=(e=21)=>{let t="",r=e;for(;r--;)t+=fg[Math.random()*64|0];return t},mg=["name","message","stack","code"],ca=class{constructor(e,t){le(this,"_type");this.payload=e,this.meta=t}},au=class{constructor(e,t){le(this,"_type");this.payload=e,this.meta=t}},gg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of mg)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},de=(()=>{function e(t,r,n){let o=D(t+"/fulfilled",(f,p,y,h)=>({payload:f,meta:{...(h||{}),arg:y,requestId:p,requestStatus:"fulfilled"}})),i=D(t+"/pending",(f,p,y)=>({payload:void 0,meta:{...(y||{}),arg:p,requestId:f,requestStatus:"pending"}})),a=D(t+"/rejected",(f,p,y,h,S)=>({payload:h,error:(n&&n.serializeError||gg)(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):to(),g=new s.AbortController,v,R;function P(T){R=T,g.abort()}let x=_asyncToGenerator(function*(){let T;try{let E=n?.condition?.(f,{getState:y,extra:h});if(hg(E)&&(E=yield E),E===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let j=new Promise((k,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}))),T=yield Promise.race([j,Promise.resolve(r(f,{dispatch:p,getState:y,extra:h,requestId:S,signal:g.signal,abort:P,rejectWithValue:(k,I)=>new ca(k,I),fulfillWithValue:(k,I)=>new au(k,I)})).then(k=>{if(k instanceof ca)throw k;return k instanceof au?o(k.payload,S,f,k.meta):o(k,S,f)})])}catch(E){T=E instanceof ca?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(T)&&T.meta.condition||p(T),T})();return Object.assign(x,{abort:P,requestId:S,arg:f,unwrap(){return x.then(yg)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:Ye(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function yg(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function hg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var du=Symbol.for("rtk-slice-createasyncthunk"),CR={[du]:de};function Sg(e,t){return`${e}/${t}`}function vg({creators:e}={}){let t=e?.asyncThunk?.[du];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(bg()):n.reducers)||{},m=Object.keys(a),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(T,w){let E=typeof T=="string"?T:T.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(T,w){return f.sliceMatchers.push({matcher:T,reducer:w}),p},exposeAction(T,w){return f.actionCreators[T]=w,p},exposeCaseReducer(T,w){return f.sliceCaseReducersByName[T]=w,p}};m.forEach(T=>{let w=a[T],E={reducerName:T,type:Sg(o,T),createNotation:typeof n.reducers=="function"};wg(w)?Rg(E,w,p,t):Ag(E,w,p)});function y(){let[T={},w=[],E=void 0]=typeof n.extraReducers=="function"?uu(n.extraReducers):[n.extraReducers],j={...T,...f.sliceCaseReducersByType};return ge(n.initialState,k=>{for(let I in j)k.addCase(I,j[I]);for(let I of f.sliceMatchers)k.addMatcher(I.matcher,I.reducer);for(let I of w)k.addMatcher(I.matcher,I.reducer);E&&k.addDefaultCase(E)})}let h=T=>T,S=new Map,g;function v(T,w){return g||(g=y()),g(T,w)}function R(){return g||(g=y()),g.getInitialState()}function P(T,w=!1){function E(k){let I=k[T];return typeof I>"u"&&w&&(I=R()),I}function j(k=h){let I=ou(S,w,()=>new WeakMap);return ou(I,k,()=>{let F={};for(let[O,N]of Object.entries(n.selectors??{}))F[O]=Cg(N,k,R,w);return F})}return{reducerPath:T,getSelectors:j,get selectors(){return j(E)},selectSlice:E}}let x={name:o,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:R,...P(i),injectInto(T,{reducerPath:w,...E}={}){let j=w??i;return T.inject({reducerPath:j,reducer:v},E),{...x,...P(j,!0)}}};return x}}function Cg(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 Qt=vg();function bg(){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 Ag({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!xg(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?D(e,a):D(e))}function wg(e){return e._reducerDefinitionType==="asyncThunk"}function xg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Rg({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||Jn,pending:m||Jn,rejected:f||Jn,settled:p||Jn})}function Jn(){}var pu="listener",fu="completed",mu="cancelled",bR=`task-${mu}`,AR=`task-${fu}`,wR=`${pu}-${mu}`,xR=`${pu}-${fu}`;var{assign:gu}=Object;var ua="listenerMiddleware";var Eg=gu(D(`${ua}/add`),{withTypes:()=>Eg}),RR=D(`${ua}/removeAll`),Ig=gu(D(`${ua}/remove`),{withTypes:()=>Ig});var ER=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 G=new H({required:!0,emptyAllowed:!1}),Ae=new H({required:!1,emptyAllowed:!1}),we=new H({required:!0,emptyAllowed:!0}),NR=new H({required:!1,emptyAllowed:!0}),ro=new ie({each:G,required:!0}),yu=new H({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),hu=new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),_R=new H({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),st=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Le=(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 Gr(o);return{payload:e}},B=(e,t)=>{try{return Le(e,t)}catch(r){return{payload:e,error:st(r)}}},Su=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return Cu(e,t,r,o,"Controller initialization error")},vu=(e,t,r,n)=>{let o=`Check the options of ${n}`;return Cu(e,t,r,o,"Controller initialization error")},Cu=(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.27.5",bu=["@coveo/atomic","@coveo/quantic"];var la=()=>Ae,Au=()=>G,St=D("configuration/updateBasicConfiguration",e=>B(e,{accessToken:Ae,environment:new H({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:Ae})),Je=D("configuration/updateSearchConfiguration",e=>B(e,{proxyBaseUrl:new H({required:!1,url:!0}),pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:Ae,timezone:Ae,locale:Ae,authenticationProviders:new ie({required:!1,each:G})})),Pg={enabled:new ne({default:!0}),originContext:la(),originLevel2:la(),originLevel3:la(),proxyBaseUrl:new H({required:!1,url:!0}),runtimeEnvironment:new fe,anonymous:new ne({default:!1}),deviceId:Ae,userDisplayName:Ae,documentLocation:Ae,trackingId:hu,analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new K({options:{required:!1},values:bu.reduce((e,t)=>(e[t]=yu,e),{})})},cr=D("configuration/updateAnalyticsConfiguration",e=>B(e,Pg)),ur=D("configuration/analytics/disable"),lr=D("configuration/analytics/enable"),no=D("configuration/analytics/originlevel2",e=>B(e,{originLevel2:Au()})),oo=D("configuration/analytics/originlevel3",e=>B(e,{originLevel3:Au()}));d();c();l();u();d();c();l();u();d();c();l();u();var wu={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 vt=D("searchParameters/restore",e=>B(e,wu)),xu=D("searchParameters/restoreTab",e=>B(e,G));d();c();l();u();var io=D("debug/enable"),ao=D("debug/disable");d();c();l();u();var so=()=>!1;var co=ge(so(),e=>{e.addCase(io,()=>!0).addCase(ao,()=>!1).addCase(vt,(t,r)=>r.payload.debug??t)});d();c();l();u();var dr=D("pipeline/set",e=>B(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();d();c();l();u();var Tg=D("history/undo"),Fg=D("history/redo"),Xe=D("history/snapshot"),WE=de("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(Tg()),yield t(qe())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),GE=de("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(Fg()),yield t(qe())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),qe=de("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();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?da(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],da(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 da(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}d();c();l();u();function kg(){return typeof navigator<"u"}function Ru(){try{return typeof localStorage<"u"}catch{return!1}}function Eu(){try{return typeof sessionStorage<"u"}catch{return!1}}function Iu(){return!!(kg()&&navigator.cookieEnabled)}var Pu=null;function Tu(){return Pu||(Ru()?localStorage:Iu()?new pa:Eu()?sessionStorage:new fa)}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)}};le(gr,"prefix","coveo_");var pa=gr;var fa=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var uo="__coveo.analytics.history",Og=20,Dg=1e3*60,qg=75,$t=class $t{constructor(t){le(this,"store");this.store=t||Tu()}static getInstance(t){return $t.instance||($t.instance=new $t(t)),$t.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(uo);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){var _this1=this;return _asyncToGenerator(function*(){try{let t=yield _this1.store.getItem(uo);return t?JSON.parse(t):[]}catch{return[]}})()}setHistory(t){try{this.store.setItem(uo,JSON.stringify(t.slice(0,Og)))}catch{}}clear(){try{this.store.removeItem(uo)}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,qg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>Dg:!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))}};le($t,"instance",null);var ma=$t,Ze=ma;d();c();l();u();d();c();l();u();var yr=pe(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 ct(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 ha(){return typeof window<"u"}function Fa(){return typeof navigator<"u"}function hr(){return typeof document<"u"}function Sa(){try{return typeof localStorage<"u"}catch{return!1}}function Mg(){try{return typeof sessionStorage<"u"}catch{return!1}}function Qu(){return Fa()&&navigator.cookieEnabled}var jg=[ae.click,ae.custom,ae.search,ae.view],Ng=(e,t)=>jg.indexOf(e)!==-1?Object.assign({language:hr()?document.documentElement.lang:"unknown",userAgent:Fa()?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?Fu(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],Fu(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 Fu(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function _g(){return Sa()?localStorage:Qu()?new fn:Mg()?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 va=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){}},lo="__coveo.analytics.history",Vg=20,Lg=1e3*60,Ug=75,mo=class{constructor(t){this.store=t||_g()}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(lo);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(lo);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(lo,JSON.stringify(t.slice(0,Vg)))}catch{}}clear(){try{this.store.removeItem(lo)}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,Ug)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Lg:!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 Bg=(e,t)=>q(void 0,void 0,void 0,function*(){return e===ae.view?(yield Qg(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Qg=e=>q(void 0,void 0,void 0,function*(){let t=new mo,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),po,$g=new Uint8Array(16);function Hg(){if(!po&&(po=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!po))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return po($g)}var zg=/^(?:[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 go(e){return typeof e=="string"&&zg.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function $u(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]]).toLowerCase()}function Wg(e){if(!go(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 Gg(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Kg="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Yg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Jg(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=Gg(o)),typeof i=="string"&&(i=Wg(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 $u(p)}try{n.name=e}catch{}return n.DNS=Kg,n.URL=Yg,n}var Xg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ku={randomUUID:Xg};function Ht(e,t,r){if(ku.randomUUID&&!t&&!e)return ku.randomUUID();e=e||{};let n=e.random||(e.rng||Hg)();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 $u(n)}function Zg(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 ga(e,t){return e<<t|e>>>32-t}function ey(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]=ga(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=ga(f,5)+Zg(v,p,y,h)+S+t[v]+m[g]>>>0;S=h,h=y,y=ga(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 ty=Jg("v5",80,ey),Ou=ty,Hu="2.30.45",Du=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,dn={pageview:"pageview",event:"event"},yo=class{constructor({client:t,uuidGenerator:r=Ht}){this.client=t,this.uuidGenerator=r}},Ca=class extends yo{constructor({client:t,uuidGenerator:r=Ht}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Du(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 Du(window.location)}},Ct=class e{constructor(t,r){if(!go(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 go(i)?new e(i,Number.parseInt(o)*1e3):null}};Ct.cvo_cid="cvo_cid";Ct.expirationTime=120;var ba=class extends yo{constructor({client:t,uuidGenerator:r=Ht}){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(Ct.cvo_cid,new Ct(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};ba.Id="link";var Be=Object.keys;function fo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ya=128,zu=192,qu=224,Mu=240;function ry(e){return(e&248)===Mu?4:(e&Mu)===qu?3:(e&qu)===zu?2:1}function ny(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&ya)!=ya)break;if(r-=3,(n&zu)!=ya){t-r>=ry(n)*3&&(r=t);break}}return e.substring(0,r)}var Aa={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"},oy=Be(Aa).map(e=>Aa[e]),iy=[...oy].join("|"),ay=new RegExp(`^(${iy}$)`),sy={svcAction:"svc_action",svcActionData:"svc_action_data"},cy=e=>Be(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Aa[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),uy=e=>ay.test(e),ly=[uy],ju={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Nu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ee={action:"pa",list:"pal",listSource:"pls"},ho={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},dy=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],wa={id:"quoteId",affiliation:"quoteAffiliation"},xa={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},py={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),ho),purchase:Object.assign(Object.assign({},Ee),ho),quickview:Ee,quote:Object.assign(Object.assign({},Ee),wa),review:Object.assign(Object.assign({},Ee),xa)},fy=Be(ju).map(e=>ju[e]),my=Be(Nu).map(e=>Nu[e]),gy=Be(Ee).map(e=>Ee[e]),yy=Be(ho).map(e=>ho[e]),hy=Be(xa).map(e=>xa[e]),Sy=Be(wa).map(e=>wa[e]),vy=[...fy,"custom"].join("|"),Cy=[...my,"custom"].join("|"),Wu="(pr[0-9]+)",Gu="(il[0-9]+pi[0-9]+)",by=new RegExp(`^${Wu}(${vy})$`),Ay=new RegExp(`^(${Gu}(${Cy}))|(il[0-9]+nm)$`),wy=new RegExp(`^(${gy.join("|")})$`),xy=new RegExp(`^(${yy.join("|")})$`),Ry=new RegExp(`^${Wu}custom$`),Ey=new RegExp(`^${Gu}custom$`),Iy=new RegExp(`^(${[...dy,...hy,...Sy].join("|")})$`),Py=e=>by.test(e),Ty=e=>Ay.test(e),Fy=e=>wy.test(e),ky=e=>xy.test(e),Oy=e=>Iy.test(e),Dy=[Ty,Py,Fy,ky,Oy],qy=[Ry,Ey],My={anonymizeIp:"aip"},jy={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Ny={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},_y=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Vy=Object.assign(Object.assign(Object.assign(Object.assign({},My),jy),Ny),_y.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Ra=Object.assign(Object.assign({},Vy),sy),Ly=e=>{let t=!!e.action&&py[e.action]||{};return Be(e).reduce((r,n)=>{let o=t[n]||Ra[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Uy=Be(Ra).map(e=>Ra[e]),By=e=>Uy.indexOf(e)!==-1,Qy=e=>e==="custom",$y=e=>[...Dy,...ly,By,Qy].some(t=>t(e)),Hy=e=>Be(e).reduce((t,r)=>{let n=zy(r);return n?Object.assign(Object.assign({},t),Wy(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),zy=e=>{let t;return[...qy].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Wy=(e,t)=>Be(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ea=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}},Ia=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()})}},_u=C.fetch,So=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=ct(f,["url"]),h;try{h=yield _u(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 _u(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"})}},Pa=class{constructor(t,r){Sa()&&Qu()?this.storage=new va:Sa()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new vr),this.client=new So(t),this.beaconClient=new Ea(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}},Ta=class{constructor(t,r){this.storage=r||new vr,this.client=new So(t)}getClientDependingOnEventType(t){return this.client}},vo=class{constructor(){this.storage=new vr,this.client=new Ia}getClientDependingOnEventType(t){return this.client}},Gy="xx",Ky=e=>e?.startsWith(Gy)||!1,Yy=`
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 Jy(){return typeof navigator<"u"&&navigator.product=="ReactNative"}var Xy=["1",1,"yes",!0];function Ao(){let e=[];return Ca()&&e.push(window.doNotTrack),Da()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(t=>Xy.indexOf(t)!==-1)}var Ju="v15",Xu={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 Zy(e=Xu.default,t=Ju,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 eh="38824e1f-37f5-42d3-8372-a4b8fa9df946",et=class{get defaultOptions(){return{endpoint:Xu.default,isCustomEndpoint:!1,token:"",version:Ju,beforeSendHooks:[],afterSendHooks:[]}}get version(){return Wu}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=[Bg,Ng].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};Ao()?this.runtime=new bo: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 Ca()&&vr()?new ka(t,()=>{let r=[...this.bufferedRequests];return this.bufferedRequests=[],r}):(Jy()&&console.warn(Yy),new Oa(t))}get storage(){return this.runtime.storage}determineVisitorId(){return q(this,void 0,void 0,function*(){try{return Ca()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||Wt()}catch(t){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),Wt()}})}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(ho(t))this.setCurrentVisitorId(t.toLowerCase());else{if(!r)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(qu(t,qu(r,eh)))}})}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(Wt()),this.visitorId}set currentVisitorId(t){this.visitorId=t,this.storage.setItem("visitorId",t)}extractClientIdFromLink(t){if(Ao())return null;try{let r=new URL(t).searchParams.get(Ct.cvo_cid);if(r==null)return null;let n=Ct.fromString(r);return!n||!vr()||!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?Ly(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 yo().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.search,t)})}sendSearchEvent(t){var{searchQueryUid:r}=t,n=ct(t,["searchQueryUid"]);return q(this,void 0,void 0,function*(){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){var{searchQueryUid:r}=t,n=ct(t,["searchQueryUid"]);return q(this,void 0,void 0,function*(){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){var{lastSearchQueryUid:r}=t,n=ct(t,["lastSearchQueryUid"]);return q(this,void 0,void 0,function*(){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($y(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=ct(t,["custom"]),o={};r&&go(r)&&(o=this.lowercaseKeys(r));let i=Hy(n);return Object.assign(Object.assign({},o),i)}mapCustomParametersToCustomData(t){let{custom:r}=t,n=ct(t,["custom"]);if(r&&go(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=ct(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=ct(t,["userId"]);return Ky(this.options.token)&&!r?(n.userId="anonymous",n):t}setTrackingIdIfTrackingIdNotPresent(t){let{trackingId:r}=t,n=ct(t,["trackingId"]);return r?t:(n.hasOwnProperty("custom")&&go(n.custom)&&(n.custom.hasOwnProperty("context_website")||n.custom.hasOwnProperty("siteName"))&&(n.trackingId=n.custom.context_website||n.custom.siteName),n.hasOwnProperty("customData")&&go(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"?ny(t,r):t}get baseUrl(){return Zy(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}},ut;(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"})(ut||(ut={}));var M;(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"})(M||(M={}));var Uu={[M.triggerNotify]:"queryPipelineTriggers",[M.triggerExecute]:"queryPipelineTriggers",[M.triggerQuery]:"queryPipelineTriggers",[M.triggerRedirect]:"queryPipelineTriggers",[M.queryError]:"errors",[M.queryErrorBack]:"errors",[M.queryErrorClear]:"errors",[M.queryErrorRetry]:"errors",[M.pagerNext]:"getMoreResults",[M.pagerPrevious]:"getMoreResults",[M.pagerNumber]:"getMoreResults",[M.pagerResize]:"getMoreResults",[M.pagerScrolling]:"getMoreResults",[M.facetSearch]:"facet",[M.facetShowLess]:"facet",[M.facetShowMore]:"facet",[M.recommendation]:"recommendation",[M.likeSmartSnippet]:"smartSnippet",[M.dislikeSmartSnippet]:"smartSnippet",[M.expandSmartSnippet]:"smartSnippet",[M.collapseSmartSnippet]:"smartSnippet",[M.openSmartSnippetFeedbackModal]:"smartSnippet",[M.closeSmartSnippetFeedbackModal]:"smartSnippet",[M.sendSmartSnippetReason]:"smartSnippet",[M.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[M.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[M.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[M.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[M.clearRecentQueries]:"recentQueries",[M.recentResultClick]:"recentlyClickedDocuments",[M.clearRecentResults]:"recentlyClickedDocuments",[M.showLessFoldedResults]:"folding",[M.caseDetach]:"case",[M.likeGeneratedAnswer]:"generatedAnswer",[M.dislikeGeneratedAnswer]:"generatedAnswer",[M.openGeneratedAnswerSource]:"generatedAnswer",[M.generatedAnswerStreamEnd]:"generatedAnswer",[M.generatedAnswerSourceHover]:"generatedAnswer",[M.generatedAnswerCopyToClipboard]:"generatedAnswer",[M.generatedAnswerHideAnswers]:"generatedAnswer",[M.generatedAnswerShowAnswers]:"generatedAnswer",[M.generatedAnswerExpand]:"generatedAnswer",[M.generatedAnswerCollapse]:"generatedAnswer",[M.generatedAnswerFeedbackSubmit]:"generatedAnswer",[M.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[ut.expandToFullUI]:"interface",[ut.openUserActions]:"User Actions",[ut.showPrecedingSessions]:"User Actions",[ut.showFollowingSessions]:"User Actions",[ut.clickViewedDocument]:"User Actions",[ut.clickPageView]:"User Actions",[ut.createArticle]:"createArticle"},Ar=class{constructor(){this.runtime=new bo,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 Wu}};function th(e){let t="";return e.filter(r=>{let n=r!==t;return t=r,n})}function rh(e){return e.map(t=>t.replace(/;/g,""))}function Zu(e){let r=e.join(";");return r.length<=256?r:Zu(e.slice(1))}var Bu=e=>{let t=rh(e),r=th(t);return Zu(r)};function Qu(e){let t=typeof e.partialQueries=="string"?e.partialQueries:Bu(e.partialQueries),r=typeof e.suggestions=="string"?e.suggestions:Bu(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}var wo=class{constructor(t,r){this.opts=t,this.provider=r;let n=t.enableAnalytics===!1||Ao();this.coveoAnalyticsClient=n?new Ar:new et(t)}disable(){this.coveoAnalyticsClient=new Ar}enable(){this.coveoAnalyticsClient=new et(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(M.interfaceLoad)}logInterfaceLoad(){return q(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(M.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return q(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return q(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(M.didyoumeanClick)}logDidYouMeanClick(){return q(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(t){return this.makeSearchEvent(M.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(M.searchboxSubmit)}logSearchboxSubmit(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(M.searchboxClear)}logSearchboxClear(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(M.searchboxAsYouType)}logSearchboxAsYouType(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(t){return this.makeSearchEvent(M.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(M.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(M.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(M.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(M.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(M.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(M.searchFromLink)}logSearchFromLink(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(t){return this.makeCustomEvent(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.pagerScrolling)}logPagerScrolling(){return q(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(t){return this.makeSearchEvent(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.queryErrorBack);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(M.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(M.queryErrorRetry);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(M.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(M.queryErrorClear);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(M.queryErrorClear)})}})}logQueryErrorClear(){return q(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(M.likeSmartSnippet)}logLikeSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(M.dislikeSmartSnippet)}logDislikeSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(M.expandSmartSnippet)}logExpandSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(M.collapseSmartSnippet)}logCollapseSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(M.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.openSmartSnippetSuggestionSource,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}makeCopyToClipboard(t,r){return this.makeClickEvent(M.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(M.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(M.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(M.recentQueryClick)}logRecentQueryClick(){return q(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(M.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(M.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(M.clearRecentResults)}logClearRecentResults(){return q(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(M.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(M.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(M.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,n=Uu[t]){return q(this,void 0,void 0,function*(){this.coveoAnalyticsClient.getParameters;let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),r),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:n,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEvent(t,r,n=Uu[t]){return q(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(t,r,n)).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){var n,o;return q(this,void 0,void 0,function*(){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 et?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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return q(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(t){return this.makeCustomEvent(M.generatedAnswerStreamEnd,t)}logGeneratedAnswerStreamEnd(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(t)).log({searchUID:this.provider.getSearchUID()})})}},xo=Object.assign({},pn),$u=Object.keys(xo).map(e=>xo[e]),Cr=class extends wa{constructor({client:t,uuidGenerator:r=Wt}){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])=>$u.indexOf(t)!==-1?this.addSVCDataToPayload(t,r):r),this.client.registerAfterSendEventHook((t,...[r])=>($u.indexOf(t)!==-1&&this.updateLocationInformation(t,r),r))}addHooksForPageView(){this.client.addEventTypeMapping(xo.pageview,{newEventType:ae.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addHooksForEvent(){this.client.addEventTypeMapping(xo.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 cy(this.ticket)}};Cr.Id="svc";var Ro;(function(e){e.click="click",e.flowStart="flowStart"})(Ro||(Ro={}));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 Eo;(function(e){e.quit="Quit",e.solved="Solved"})(Eo||(Eo={}));var Io=class{constructor(t,r){var n;this.options=t,this.provider=r;let o=((n=t.enableAnalytics)!==null&&n!==void 0?n:!0)&&!Ao();this.coveoAnalyticsClient=o?new et(t):new Ar,this.svc=new Cr({client:this.coveoAnalyticsClient})}disable(){this.coveoAnalyticsClient=new Ar,this.svc=new Cr({client:this.coveoAnalyticsClient})}enable(){this.coveoAnalyticsClient=new et(this.options),this.svc=new Cr({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:Eo.quit}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseSolved(t){return this.svc.setAction(Ue.caseSolved,{reason:Eo.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",Ro.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}sendClickEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",Ro.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}getBaseEventRequest(t){var r,n;return q(this,void 0,void 0,function*(){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 et?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){var i,a;return q(this,void 0,void 0,function*(){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 el=e=>new et(e).getCurrentVisitorId(),gn=(e,t)=>typeof t=="function"?(...r)=>{let n=Yr(r[0]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics preprocessRequest. Returning original request."),n}}:void 0,yn=(e,t)=>(...r)=>{let n=Yr(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 Po(){return{desiredCount:5,numberOfValues:8,set:{}}}d();c();l();u();d();c();l();u();d();c();l();u();function tl(e){let{activeValue:t,ancestryMap:r}=nh(e);return t?oh(t,r):[]}function nh(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 oh(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}var ih=(e,t)=>e.categoryFacetSet[t]?.request;var ja=(e,t)=>{let r=ih(e,t);return tl(r?.currentValues??[])};d();c();l();u();function To(){return{}}d();c();l();u();function Fo(){return{}}d();c();l();u();function ko(){return{}}d();c();l();u();function Oo(){return{}}function Na(e){return{facetSet:e.facetSet??Oo(),categoryFacetSet:e.categoryFacetSet??To(),dateFacetSet:e.dateFacetSet??Fo(),numericFacetSet:e.numericFacetSet??ko(),automaticFacetSet:e.automaticFacetSet??Po()}}var _a=e=>{let t=[];return ch(e).forEach((r,n)=>{let o=yh(e,r.facetId),i=mh(r,n+1);if(sh(r)){if(!!!ja(e,r.facetId).length)return;t.push({...i,...ph(e,r.facetId),facetType:o,state:"selected"});return}r.currentValues.forEach((a,m)=>{if(a.state==="idle")return;let f=rl(a,m+1,o),p=ah(r)?nl(a):lh(a);t.push({...i,...f,...p})})}),uh(e).forEach((r,n)=>{let o=fh(r,n+1);r.values.forEach((i,a)=>{if(i.state==="idle")return;let m=rl(i,a+1,"specific"),f=nl(i);t.push({...o,...m,...f})})}),t},ah=e=>e.type==="specific",sh=e=>e.type==="hierarchical",ch=e=>[...Object.values(e.facetSet),...Object.values(e.categoryFacetSet),...Object.values(e.dateFacetSet),...Object.values(e.numericFacetSet)].map(t=>t.request),uh=e=>[...Object.values(e.automaticFacetSet.set)].map(t=>t.response),rl=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),lh=e=>({displayValue:`${e.start}..${e.end}`,value:`${e.start}..${e.end}`,start:e.start,end:e.end,endInclusive:e.endInclusive}),nl=e=>({displayValue:e.value,value:e.value}),dh=(e,t)=>ja(e,t).map(n=>n.value).join(";"),ph=(e,t)=>{let n=dh(e,t);return{value:n,valuePosition:1,displayValue:n}},fh=(e,t)=>({title:ol(e.field,e.field),field:e.field,id:e.field,facetPosition:t}),mh=(e,t)=>({title:ol(e.field,e.facetId),field:e.field,id:e.facetId,facetPosition:t}),ol=(e,t)=>`${e}_${t}`,gh=(e,t)=>e.facetSet[t]?.request||e.categoryFacetSet[t]?.request||e.dateFacetSet[t]?.request||e.numericFacetSet[t]?.request||e.automaticFacetSet.set[t]?.response,yh=(e,t)=>{let r=gh(e,t);return r?r.type:"specific"};d();c();l();u();var _e=()=>({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||{}),Va=e=>{if(hc(e))return e.map(t=>Va(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 hT=new K({values:{by:new Vi({enum:al,required:!0}),order:new Vi({enum:il}),field:new H}});function Do(){return Va(sl())}d();c();l();u();d();c();l();u();var wr=()=>"default";var hh=e=>{let t=e.configuration.search.locale.split("-")[0];return!t||t.length!==2?"en":t},lt=class{constructor(t){this.getState=t;de(this,"state");this.state=t()}getLanguage(){return hh(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=ur),o}getOriginContext(){return this.state.configuration.analytics.originContext}getOriginLevel1(){return this.state.searchHub||wr()}getOriginLevel2(){return this.state.configuration.analytics.originLevel2}getOriginLevel3(){return this.state.configuration.analytics.originLevel3}getIsAnonymous(){return this.state.configuration.analytics.anonymous}};var hn=class hn extends lt{constructor(){super(...arguments);de(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 _a(Na(this.getState()))}getPipeline(){return this.state.pipeline||this.state.search?.response.pipeline||hn.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||Ge().response.searchUid}getSplitTestRunName(){return this.state.search?.response.splitTestRun}getSplitTestRunVersion(){let r=!!this.getSplitTestRunName(),n=this.state.search?.response.pipeline||this.state.pipeline||hn.fallbackPipelineName;return r?n:void 0}getBaseMetadata(){let r=this.getState(),n=super.getBaseMetadata(),o=r.search?.response?.extendedResults?.generativeQuestionAnsweringId;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??Do()}}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||_e().q}get responseTime(){return this.state.search?.duration||Ge().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||Ge().response.totalCountFiltered}};de(hn,"fallbackPipelineName","default");var bt=hn,cl=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new bt(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 wo({token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:gn(e,n),beforeSendHooks:[yn(e,r),(h,S)=>(e.info({...S,type:h,endpoint:m,token:a},"Analytics request"),S)]},o);return p||y.disable(),y},La=()=>{let t=Ze.getInstance().getHistory().reverse().find(r=>r.name==="PageView"&&r.value);return t?t.value:""};var qo=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(e,t){let r=e.analyticsMode==="next";return{analytics:{clientId:yield el(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}),...(La()&&{pageId:La()}),...(r&&e.trackingId&&{trackingId:e.trackingId}),capture:r,...(r&&{source:Sr(e)})}}});return function qo(_x9,_x0){return _ref7.apply(this,arguments)}}();d();c();l();u();d();c();l();u();d();c();l();u();var xr=()=>({duration:0,error:null,isLoading:!1,id:"Recommendation",recommendations:[],searchUid:"",splitTestRun:"",pipeline:""});var Sn=class extends lt{getPipeline(){return this.state.pipeline||this.state.recommendation?.pipeline||"default"}getSearchEventRequestPayload(){return{queryText:_e().q,responseTime:this.responseTime,results:this.mapResultsToAnalyticsDocument(),numberOfResults:this.numberOfResults}}getSearchUID(){return this.getState().recommendation?.searchUid||xr().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||xr().duration}mapResultsToAnalyticsDocument(){return this.state.recommendation?.recommendations.map(t=>({documentUri:t.uri,documentUriHash:t.raw.urihash}))}get numberOfResults(){return this.state.recommendation?.recommendations.length||xr().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 Sh(e){return typeof e=="string"&&ul.test(e)}var Ua=Sh;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 Ba,vh=new Uint8Array(16);function Qa(){if(!Ba){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ba=crypto.getRandomValues.bind(crypto)}return Ba(vh)}d();c();l();u();d();c();l();u();var Ch=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$a={randomUUID:Ch};function bh(e,t,r){if($a.randomUUID&&!t&&!e)return $a.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 Ha=bh;d();c();l();u();function dl(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function Ah({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 wh(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(pl),o=n&&Ua(n)?n:t.generateUUID();return r.setItem(pl,o),o}}}var ml="1.2.5";function xh(e){let{trackingId:t}=e;return{trackingId:t}}function Rh(e){return(e.source||[]).concat([`relay@${ml}`])}function gl(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,m=xh(t),f=n.getClientId();return Object.freeze({type:e,config:m,ts:Date.now(),source:Rh(t),clientId:f,userAgent:a(),referrer:o(),location:i()})}function Eh(e,t,r,n,o){return{...t,meta:gl(e,r,n,o)}}var Ih="*";function Ph(){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===Ih)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 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 Th(e){let t=fl(e);return{get:()=>t,update:r=>{t=fl({...t,...r})}}}var za=Fh();function Fh(){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 kh(){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 Oh(){let e=document.referrer;return e===""?null:yl(e)}function yl(e){return e.slice(0,1024)}function Dh(){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:()=>Oh(),getLocation:()=>yl(window.location.href),getUserAgent:()=>navigator.userAgent,generateUUID:()=>Ha(),storage:kh()}}function qh(){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 Mh(){return{getItem(){return null},removeItem(){},setItem(){}}}function jh(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:Mh()}}function Nh(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=jh();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&_h()&&qh()?Dh():n}function _h(){try{return typeof window=="object"}catch{return!1}}function Vh(e){return{get:()=>Object.freeze(Nh(e))}}function hl(e){let t=Th(e),r=Ph(),n=Vh(t),o=wh(n);return{emit:(i,a)=>{let m=t.get(),f=n.get(),p=Eh(i,a,m,f,o);return Ah({config:m,environment:f,event:p,listenerManager:r})},getMeta:i=>gl(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:ml}}var Rr=pe(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Sr(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a)=>hl({mode:i?"emit":"disabled",url:o??Vn(e,t),token:r,trackingId:n??null,source:a}));d();c();l();u();var vn=class extends lt{getSearchUID(){return this.state.documentSuggestion?.status.lastResponseId??""}},Sl=({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 Io({enableAnalytics:p,token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:gn(e,n),beforeSendHooks:[yn(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 vl(e,t){return{...new bt(t).getBaseMetadata(),actionCause:e,type:e}}function Lh(e){return Object.assign(e,{instantlyCallable:!0})}function Uh(e,t){let r=i=>Lh(ue(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 Cl=(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 $h(i)}return n},Bh=e=>e.configuration.analytics.analyticsMode==="legacy",Qh=e=>e.configuration.analytics.analyticsMode==="next",$h=({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:o,analyticsConfigurator:i,providerClass:a})=>(r??(r=m=>new a(m)),Uh(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 T of h)yield T(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){Bh(x)&&(yield Hh(R,r,x,y,v.coveoAnalyticsClient))});return function(_x16){return _ref11.apply(this,arguments)}}());let{emit:P}=Rr(g);return h.push(/*#__PURE__*/function(){var _ref12=_asyncToGenerator(function*(x){if(Qh(x)&&o&&n){let T=n(x);yield Xh(P,o,T)}});return function(_x17){return _ref12.apply(this,arguments)}}()),S});return function(_x14){return _ref1.apply(this,arguments)}}()));function Hh(_x18,_x19,_x20,_x21,_x22){return _Hh.apply(this,arguments)}function _Hh(){_Hh=_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 _Hh.apply(this,arguments)}var zh=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)}}()}),Me=Cl(cl,e=>e,bt),vO=Cl(Sl,zh("caseAssist"),vn);var Wa=(e,t)=>{let r=t.recommendation?.recommendations.findIndex(({uniqueId:n})=>e.uniqueId===n)||0;return Wh(e,r,t)};function Wh(e,t,r){let n=e.raw.collection;return{collectionName:typeof n=="string"?n:"default",documentAuthor:Yh(e),documentPosition:t+1,documentTitle:e.title,documentUri:e.uri,documentUriHash:e.raw.urihash,documentUrl:e.clickUri,rankingModifier:e.rankingModifier||"",sourceName:Jh(e),queryPipeline:r.pipeline||mr()}}var Mo=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||""}),bl={urihash:new H,sourcetype:new H,permanentid:new H},Al={uniqueId:G,raw:new K({values:bl}),title:G,uri:G,clickUri:G,rankingModifier:new H({required:!1,emptyAllowed:!0})};function Gh(e){return Object.assign({},...Object.keys(bl).map(t=>({[t]:e[t]})))}function Kh(e){return Object.assign({},...Object.keys(Al).map(t=>({[t]:e[t]})),{raw:Gh(e.raw)})}function Yh(e){let t=e.raw.author;return X(t)?"unknown":Array.isArray(t)?t.join(";"):`${t}`}function Jh(e){let t=e.raw.source;return X(t)?"unknown":t}var Ga=e=>new Fe(Al).validate(Kh(e));function Xh(_x24,_x25,_x26){return _Xh.apply(this,arguments)}function _Xh(){_Xh=_asyncToGenerator(function*(e,t,r){yield e(t,r)});return _Xh.apply(this,arguments)}d();c();l();u();var wl=()=>Me("analytics/recommendation/update",e=>e.makeRecommendationInterfaceLoad(),e=>new Sn(e)),xl=()=>({actionCause:"recommendationInterfaceLoad"}),No=e=>Me({prefix:"analytics/recommendation/open",__legacy__getBuilder:(t,r)=>(Ga(e),t.makeRecommendationOpen(Wa(e,r),Mo(e))),__legacy__provider:t=>new Sn(t),analyticsType:"itemClick",analyticsPayloadBuilder:t=>{let r=Wa(e,t),n=Mo(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 Er=D("recommendation/set",e=>B(e,{id:G})),At=ue("recommendation/get",/*#__PURE__*/function(){var _ref14=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n}}){let o=t(),i=Date.now(),a=yield Zh(o),m=yield n.recommendations(a),f=Date.now()-i;return ke(m)?r(m.error):{recommendations:m.success.results,analyticsAction:wl(),duration:f,searchUid:m.success.searchUid,splitTestRun:m.success.splitTestRun,pipeline:m.success.pipeline}});return function(_x27,_x28){return _ref14.apply(this,arguments)}}()),Zh=/*#__PURE__*/function(){var _ref15=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??mt(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?Ze.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 eS(e,xl()))),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}),...(e.pagination&&{numberOfResults:e.pagination.numberOfResults})}});return function Zh(_x29){return _ref15.apply(this,arguments)}}(),eS=/*#__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 qo(e.configuration.analytics,r)});return function eS(_x30,_x31){return _ref16.apply(this,arguments)}}();var Ir=ge(xr(),e=>{e.addCase(Er,(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})});d();c();l();u();var Pr=D("searchHub/set",e=>B(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();var Tr=ge(wr(),e=>{e.addCase(Pr,(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();var Ka=e=>({referrer:document.referrer,userAgent:navigator.userAgent,location:window.location.href,clientId:e}),Cn=()=>({referrer:null,userAgent:null,location:null,clientId:""});d();c();l();u();var Ya=pe(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 _o=(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:Sr(e)}});d();c();l();u();var Rl=pe(e=>e.context,e=>e);d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var bn=pe(e=>e.query,e=>e);var El=e=>rS(e)?{answerAPIEnabled:!0,id:Pl(e).data?.answerId}:tS(e)?{answerAPIEnabled:!1,id:e.search.response.extendedResults.generativeQuestionAnsweringId}:{answerAPIEnabled:!1,id:void 0},tS=e=>"search"in e,rS=e=>"answer"in e&&"generatedAnswer"in e&&!X(e.generatedAnswer?.answerConfigurationId),Il=e=>e.generatedAnswer?.fieldsToIncludeInCitations,nS=pe(e=>e.generatedAnswer?.citations,(e,t)=>t,(e,t)=>e?.find(r=>r.id===t)),tq=pe(e=>bn(e)?.q,e=>e.search.requestId,(e,t)=>({q:e,requestId:t}));var Vo=e=>Me({prefix:"analytics/generatedAnswer/streamEnd",__legacy__getBuilder:(t,r)=>{let{id:n,answerAPIEnabled:o}=El(r),i=e?!r.generatedAnswer?.answer||!r.generatedAnswer?.answer.length:void 0;return n?t.makeGeneratedAnswerStreamEnd({...(o?{answerAPIStreamId:n}:{generativeQuestionAnsweringId:n}),answerGenerated:e,answerTextIsEmpty:i}):null},analyticsType:"Rga.AnswerReceived",analyticsPayloadBuilder:t=>({answerId:t.search?.response.searchUid||"",answerGenerated:e??!1})});d();c();l();u();var Tl=/*#__PURE__*/function(){var _ref17=_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 Tl(_x32){return _ref17.apply(this,arguments)}}();d();c();l();u();var Fl=["text/plain","text/markdown"];var Fr=new H({required:!0}),Ol=new H,kr=new te({required:!0}),oS={id:Fr,title:Fr,uri:Fr,permanentid:Fr,clickUri:Ol},Dl=new H({required:!0,constrainTo:Fl}),qq=D("generatedAnswer/setIsVisible",e=>B(e,kr)),Mq=D("generatedAnswer/setIsEnabled",e=>B(e,kr)),Xa=D("generatedAnswer/updateMessage",e=>B(e,{textDelta:Fr})),Za=D("generatedAnswer/updateCitations",e=>B(e,{citations:new ie({required:!0,each:new K({values:oS})})})),iS=D("generatedAnswer/updateError",e=>B(e,{message:Ol,code:new J({min:0})})),aS=D("generatedAnswer/resetAnswer"),jq=D("generatedAnswer/like"),Nq=D("generatedAnswer/dislike"),_q=D("generatedAnswer/feedbackModal/open"),Vq=D("generatedAnswer/expand"),Lq=D("generatedAnswer/collapse"),Uq=D("generatedAnswer/setId",e=>B(e,{id:new H({required:!0})})),Bq=D("generatedAnswer/feedbackModal/close"),Qq=D("generatedAnswer/sendFeedback"),Ja=D("generatedAnswer/setIsLoading",e=>B(e,kr)),kl=D("generatedAnswer/setIsStreaming",e=>B(e,kr)),es=D("generatedAnswer/setAnswerContentFormat",e=>B(e,Dl)),$q=D("generatedAnswer/updateResponseFormat",e=>B(e,{contentFormat:new ie({each:Dl,default:["text/plain"]})})),Hq=D("knowledge/updateAnswerConfigurationId",e=>B(e,Fr)),zq=D("generatedAnswer/registerFieldsToIncludeInCitations",e=>B(e,oo)),sS=D("generatedAnswer/setIsAnswerGenerated",e=>B(e,kr)),ts=D("generatedAnswer/setCannotAnswer",e=>B(e,kr)),Wq=ue("generatedAnswer/streamAnswer",/*#__PURE__*/function(){var _ref18=_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 Tl(r),y=(g,v)=>{switch(g){case"genqa.headerMessageType":{let R=JSON.parse(v);n(es(R.contentFormat));break}case"genqa.messageType":n(Xa(JSON.parse(v)));break;case"genqa.citationsType":n(Za(JSON.parse(v)));break;case"genqa.endOfStreamType":{let R=JSON.parse(v).answerGenerated,P=m.length!==0&&!R;n(ts(P)),n(kl(!1)),n(sS(R)),n(Vo(R));break}default:r.debug&&o.logger.warn(`Unknown payloadType: "${g}"`)}};n(Ja(!0));let h=g=>g.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,S=o.streamingClient?.streamGeneratedAnswer(p,{write:g=>{h(p)&&(n(Ja(!1)),g.payload&&g.payloadType&&y(g.payloadType,g.payload))},abort:g=>{h(p)&&n(iS(g))},close:()=>{h(p)&&n(kl(!1))},resetAnswer:()=>{h(p)&&n(aS())}});S?f(S):n(Ja(!1))});return function(_x33,_x34){return _ref18.apply(this,arguments)}}());d();c();l();u();d();c();l();u();var ql=pe(e=>e.pipeline,e=>e);d();c();l();u();d();c();l();u();var An=Qe(Lo(),1),Ll=Qe(Ml(),1);d();c();l();u();var Uo=Qe(Lo(),1),Nl=Qe(jl(),1);Uo.default.extend(Nl.default);var _l="YYYY/MM/DD@HH:mm:ss",cS="1401-01-01";function Or(e,t){let r=(0,Uo.default)(e,t);return!r.isValid()&&!t?(0,Uo.default)(e,_l):r}function Bo(e){return e.format(_l)}function Vl(e,t){let r=Or(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}`)}cs(r)}function cs(e){if(e.isBefore(cS))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}An.default.extend(Ll.default);var Ul=["past","now","next"],Bl=["minute","hour","day","week","month","quarter","year"],uS=e=>{let t=e==="now";return{amount:new J({required:!t,min:1}),unit:new H({required:!t,constrainTo:Bl}),period:new H({required:!0,constrainTo:Ul})}};function us(e){if(typeof e=="string"&&!wt(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?Wl(e):e;new Fe(uS(t.period)).validate(t);let r=$l(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);cs(r)}function Ql(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function $l(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return(0,An.default)().subtract(r,n);case"next":return(0,An.default)().add(r,n);case"now":return(0,An.default)()}}function wn(e){return Bo($l(Wl(e)))}function Hl(e){return e.toLocaleLowerCase().split("-")}function wt(e){let[t,r,n]=Hl(e);if(t==="now")return!0;if(!Ul.includes(t)||!Bl.includes(n))return!1;let o=parseInt(r);return!(Number.isNaN(o)||o<=0)}function zl(e){return!!e&&typeof e=="object"&&"period"in e}function Wl(e){let[t,r,n]=Hl(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r):void 0,unit:n||void 0}}d();c();l();u();function Gl(e){return e.type==="dateRange"}function Kl(e){return`start${e}`}function Yl(e){return`end${e}`}var ls=()=>({dateFacetValueMap:{}});function lS(e,t,r){let n=e.start,o=e.end;return wt(n)&&(n=wn(n),r.dateFacetValueMap[t][Kl(n)]=e.start),wt(o)&&(o=wn(o),r.dateFacetValueMap[t][Yl(o)]=e.end),{...e,start:n,end:o}}function ds(e,t){if(Gl(e)){let{facetId:r,currentValues:n}=e;return t.dateFacetValueMap[r]={},{...e,currentValues:n.map(o=>lS(o,r,t))}}return e}function xt(e){let t=ls();return{request:{...e,facets:e.facets?.map(n=>ds(n,t))},mappings:t}}function dS(e,t,r){return{...e,start:r.dateFacetValueMap[t][Kl(e.start)]||e.start,end:r.dateFacetValueMap[t][Yl(e.end)]||e.end}}function pS(e,t){return e.facetId in t.dateFacetValueMap}function fS(e,t){return pS(e,t)?{...e,values:e.values.map(r=>dS(r,e.facetId,t))}:e}function Qo(e,t){return"success"in e?{success:{...e.success,facets:e.success.facets?.map(n=>fS(n,t))}}:e}d();c();l();u();d();c();l();u();var xn=(e,t)=>{let r=e;return X(r[t])?X(e.raw[t])?null:e.raw[t]:r[t]},mS=e=>t=>e.every(r=>!X(xn(t,r))),gS=e=>t=>e.every(r=>X(xn(t,r))),yS=(e,t)=>r=>{let n=Jl(e,r);return t.some(o=>n.some(i=>`${i}`.toLowerCase()===o.toLowerCase()))},hS=(e,t)=>r=>{let n=Jl(e,r);return t.every(o=>n.every(i=>`${i}`.toLowerCase()!==o.toLowerCase()))},Jl=(e,t)=>{let r=xn(t,e);return Sc(r)?r:[r]},Xl={getResultProperty:xn,fieldsMustBeDefined:mS,fieldsMustNotBeDefined:gS,fieldMustMatch:yS,fieldMustNotMatch:hS};var Zl=pe(e=>e.search,e=>e?.searchAction?.actionCause||"");d();c();l();u();var ed=pe(e=>e.searchHub,e=>e);d();c();l();u();var $o=pe(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}));d();c();l();u();var ps=pe(e=>e,e=>{if(!e)return"";for(let t in e)if(e[t].isActive)return e[t].id;return""}),td=pe(e=>e,e=>{let t=ps(e);return t&&e?e[t].expression:""});d();c();l();u();d();c();l();u();function Rt(e){return Object.values(e).map(t=>t.request)}function fs(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 rd(e){return Rt(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}var ms={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function SS(e){return Rt(e).map(t=>{let r=ms[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function vS(e){return[...SS(e.facetSet??{}),...rd(e.numericFacetSet??{}),...rd(e.dateFacetSet??{}),...Rt(e.categoryFacetSet??{})]}function CS(e){return vS(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function Ho(e){return fs(CS(e),e.facetOrder??[])}d();c();l();u();d();c();l();u();function od(_x35,_x36){return _od.apply(this,arguments)}function _od(){_od=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _od.apply(this,arguments)}function id(e){let t,r,n,o=!1;return function(a){t===void 0?(t=a,r=0,n=-1):t=AS(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 ad(e,t,r){let n=nd(),o=new TextDecoder;return function(a,m){if(a.length===0)r?.(n),n=nd();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":bS(y,n,t);break}}}}function bS(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function AS(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function nd(){return{data:"",event:"",id:"",retry:void 0}}var gs="text/event-stream",wS=1e3,sd="last-event-id";function cd(){return typeof window<"u"}function ud(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=gs);let g;function v(){g?.abort(),document.hidden||E()}!m&&cd()&&document.addEventListener("visibilitychange",v);let R=wS,P;function x(){cd()&&document.removeEventListener("visibilitychange",v),clearTimeout(P),g?.abort()}t?.addEventListener("abort",()=>{x(),y()});let T=f??b,w=n??xS;function E(){return _E.apply(this,arguments)}function _E(){_E=_asyncToGenerator(function*(){g=s.AbortController?new s.AbortController:null;try{let j=yield T(e,{...p,headers:S,signal:g?.signal});yield w(j),yield od(j.body,id(ad(k=>{k?S[sd]=k:delete S[sd]},k=>{R=k},o))),i?.(),x(),y()}catch(j){if(!g?.signal?.aborted)try{let k=a?.(j)??R;clearTimeout(P),P=setTimeout(E,k)}catch(k){x(),h(k)}}});return _E.apply(this,arguments)}E()})}function xS(e){let t=e.headers.get("content-type");if(!t?.startsWith(gs))throw new Error(`Expected content-type to be ${gs}, Actual: ${t}`)}d();c();l();u();d();c();l();u();function ld(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var dd=Ke;function wd(e,t){if(e===t||!(dd(e)&&dd(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]=wd(e[a],t[a]),o&&(o=e[a]===i[a]);return o?e:i}function Dr(e){let t=0;for(let r in e)t++;return t}var pd=e=>[].concat(...e);function RS(e){return new RegExp("(^|:)//").test(e)}function ES(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function Go(e){return e!=null}function IS(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var PS=e=>e.replace(/\/$/,""),TS=e=>e.replace(/^\//,"");function FS(e,t){if(!e)return t;if(!t)return e;if(RS(t))return t;let r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=PS(e),t=TS(t),`${e}${r}${t}`}function kS(e,t,r){return e.has(t)?e.get(t):e.set(t,r).get(t)}var fd=(...e)=>b(...e),OS=e=>e.status>=200&&e.status<=299,DS=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function md(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 xd({baseUrl:e,prepareHeaders:t=h=>h,fetchFn:r=fd,paramsSerializer:n,isJsonContentType:o=DS,jsonContentType:i="application/json",jsonReplacer:a,timeout:m,responseHandler:f,validateStatus:p,...y}={}){return typeof b>"u"&&r===fd&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),(/*#__PURE__*/function(){var _ref19=_asyncToGenerator(function*(S,g,v){let{getState:R,extra:P,endpoint:x,forced:T,type:w}=g,E,{url:j,headers:k=new A(y.headers),params:I=void 0,responseHandler:F=f??"json",validateStatus:O=p??OS,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,...$};k=new A(md(k)),_.headers=(yield t(k,{getState:R,arg:S,extra:P,endpoint:x,forced:T,type:w,extraOptions:v}))||k;let Q=Z=>typeof Z=="object"&&(Ke(Z)||Array.isArray(Z)||typeof Z.toJSON=="function");if(!_.headers.has("content-type")&&Q(_.body)&&_.headers.set("content-type",i),Q(_.body)&&o(_.headers)&&(_.body=JSON.stringify(_.body,a)),I){let Z=~j.indexOf("?")?"&":"?",oe=n?n(I):new URLSearchParams(md(I));j+=Z+oe}j=FS(e,j);let L=new Request(j,_);E={request:new Request(j,_)};let W,Y=!1,re=U&&setTimeout(()=>{Y=!0,U.abort()},N);try{W=yield r(L)}catch(Z){return{error:{status:Y?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Z)},meta:E}}finally{re&&clearTimeout(re),U?.signal.removeEventListener("abort",U.abort)}let se=W.clone();E.response=se;let ee,ne="";try{let Z;if(yield Promise.all([h(W,F).then(oe=>ee=oe,oe=>Z=oe),se.text().then(oe=>ne=oe,()=>{})]),Z)throw Z}catch(Z){return{error:{status:"PARSING_ERROR",originalStatus:W.status,data:ne,error:String(Z)},meta:E}}return O(W,ee)?{data:ee,meta:E}:{error:{status:W.status,data:ee},meta:E}});return function(_x37,_x38,_x39){return _ref19.apply(this,arguments)}}());function h(_x40,_x41){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 qr=class{constructor(e,t=void 0){this.value=e,this.meta=t}};function qS(){return _qS.apply(this,arguments)}function _qS(){_qS=_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 _qS.apply(this,arguments)}function MS(e,t){throw Object.assign(new qr({error:e,meta:t}),{throwImmediately:!0})}var gd={},jS=(e,t)=>(/*#__PURE__*/function(){var _ref20=_asyncToGenerator(function*(r,n,o){let i=[5,(t||gd).maxRetries,(o||gd).maxRetries].filter(y=>y!==void 0),[a]=i.slice(-1),f={maxRetries:a,backoff:qS,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 qr(y);return y}catch(y){if(p++,y.throwImmediately){if(y instanceof qr)return y.value;throw y}if(y instanceof qr&&!f.retryCondition(y.value.error,r,{attempt:p,baseQueryApi:n,extraOptions:o}))return y.value;yield f.backoff(p,f.maxRetries)}});return function(_x42,_x43,_x44){return _ref20.apply(this,arguments)}}()),Rd=Object.assign(jS,{fail:MS}),Cs=D("__rtkq/focused"),Ed=D("__rtkq/unfocused"),bs=D("__rtkq/online"),Id=D("__rtkq/offline");function As(e){return e.type==="query"}function NS(e){return e.type==="mutation"}function ws(e){return e.type==="infinitequery"}function xs(e,t,r,n,o,i){return _S(e)?e(t,r,n,o).filter(Go).map(hs).map(i):Array.isArray(e)?e.map(hs).map(i):[]}function _S(e){return typeof e=="function"}function hs(e){return typeof e=="string"?{type:e}:e}function VS(e,t){return e.catch(t)}var En=Symbol("forceQueryFn"),Ss=e=>typeof e[En]=="function";function LS({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:T,buildInitiateMutation:w,getRunningQueryThunk:h,getRunningMutationThunk:S,getRunningQueriesThunk:g,getRunningMutationsThunk:v};function h(E,j){return k=>{let I=i.endpointDefinitions[E],F=e({queryArgs:j,endpointDefinition:I,endpointName:E});return a.get(k)?.[F]}}function S(E,j){return k=>m.get(k)?.[j]}function g(){return E=>Object.values(a.get(E)||{}).filter(Go)}function v(){return E=>Object.values(m.get(E)||{}).filter(Go)}function R(E){}function P(E,j){let k=(I,{subscribe:F=!0,forceRefetch:O,subscriptionOptions:N,[En]:$,...U}={})=>(V,_)=>{let Q=e({queryArgs:I,endpointDefinition:j,endpointName:E}),L,z={...U,type:"query",subscribe:F,forceRefetch:O,subscriptionOptions:N,endpointName:E,originalArgs:I,queryCacheKey:Q,[En]:$};if(As(j))L=t(z);else{let{direction:ce,initialPageParam:me}=U;L=r({...z,direction:ce,initialPageParam:me})}let W=o.endpoints[E].select(I),Y=V(L),re=W(_());let{requestId:se,abort:ee}=Y,ne=re.requestId!==se,Z=a.get(V)?.[Q],oe=()=>W(_()),ye=Object.assign($?Y.then(oe):ne&&!Z?Promise.resolve(re):Promise.all([Z,Y]).then(oe),{arg:I,requestId:se,subscriptionOptions:N,queryCacheKey:Q,abort:ee,unwrap(){return _asyncToGenerator(function*(){let ce=yield ye;if(ce.isError)throw ce.error;return ce.data})()},refetch:()=>V(k(I,{subscribe:!1,forceRefetch:!0})),unsubscribe(){F&&V(f({queryCacheKey:Q,requestId:se}))},updateSubscriptionOptions(ce){ye.subscriptionOptions=ce,V(y({endpointName:E,requestId:se,queryCacheKey:Q,options:ce}))}});if(!Z&&!ne&&!$){let ce=kS(a,V,{});ce[Q]=ye,ye.then(()=>{delete ce[Q],Dr(ce)||a.delete(V)})}return ye};return k}function x(E,j){return P(E,j)}function T(E,j){return P(E,j)}function w(E){return(j,{track:k=!0,fixedCacheKey:I}={})=>(F,O)=>{let N=n({type:"mutation",endpointName:E,originalArgs:j,track:k,fixedCacheKey:I}),$=F(N);let{requestId:U,abort:V,unwrap:_}=$,Q=VS($.unwrap().then(Y=>({data:Y})),Y=>({error:Y})),L=()=>{F(p({requestId:U,fixedCacheKey:I}))},z=Object.assign(Q,{arg:$.arg,requestId:U,abort:V,unwrap:_,reset:L}),W=m.get(F)||{};return m.set(F,W),W[U]=z,z.then(()=>{delete W[U],Dr(W)||m.delete(F)}),I&&(W[I]=z,z.then(()=>{W[I]===z&&(delete W[I],Dr(W)||m.delete(F))})),z}}}function US(e){return e}var zo=(e={})=>({...e,[un]:!0});function BS({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:o,assertTagType:i,selectors:a}){let m=(F,O,N,$)=>(U,V)=>{let _=r[F],Q=n({queryArgs:O,endpointDefinition:_,endpointName:F});if(U(o.internalActions.queryResultPatched({queryCacheKey:Q,patches:N})),!$)return;let L=o.endpoints[F].select(O)(V()),z=xs(_.providesTags,L.data,void 0,O,{},i);U(o.internalActions.updateProvidedBy({queryCacheKey:Q,providedTags:z}))};function f(F,O,N=0){let $=[O,...F];return N&&$.length>N?$.slice(0,-1):$}function p(F,O,N=0){let $=[...F,O];return N&&$.length>N?$.slice(1):$}let y=(F,O,N,$=!0)=>(U,V)=>{let Q=o.endpoints[F].select(O)(V()),L={patches:[],inversePatches:[],undo:()=>U(o.util.patchQueryData(F,O,L.inversePatches,$))};if(Q.status==="uninitialized")return L;let z;if("data"in Q)if(De(Q.data)){let[W,Y,re]=Jn(Q.data,N);L.patches.push(...Y),L.inversePatches.push(...re),z=W}else z=N(Q.data),L.patches.push({op:"replace",path:[],value:z}),L.inversePatches.push({op:"replace",path:[],value:Q.data});return L.patches.length===0||U(o.util.patchQueryData(F,O,L.patches,$)),L},h=(F,O,N)=>$=>$(o.endpoints[F].initiate(O,{subscribe:!1,forceRefetch:!0,[En]:()=>({data:N})})),S=(F,O)=>F.query&&F[O]?F[O]:US,g=/*#__PURE__*/function(){var _ref21=_asyncToGenerator(function*(F,{signal:O,abort:N,rejectWithValue:$,fulfillWithValue:U,dispatch:V,getState:_,extra:Q}){let L=r[F.endpointName];try{let z=S(L,"transformResponse"),W={signal:O,abort:N,dispatch:V,getState:_,extra:Q,endpoint:F.endpointName,type:F.type,forced:F.type==="query"?v(F,_()):void 0,queryCacheKey:F.type==="query"?F.queryCacheKey:void 0},Y=F.type==="query"?F[En]:void 0,re,se=/*#__PURE__*/function(){var _ref22=_asyncToGenerator(function*(ne,Z,oe,ye){if(Z==null&&ne.pages.length)return Promise.resolve({data:ne});let ce={queryArg:F.originalArgs,pageParam:Z},me=yield ee(ce),he=ye?f:p;return{data:{pages:he(ne.pages,me.data,oe),pageParams:he(ne.pageParams,Z,oe)}}});return function se(_x47,_x48,_x49,_x50){return _ref22.apply(this,arguments)}}();function ee(_x51){return _ee.apply(this,arguments)}function _ee(){_ee=_asyncToGenerator(function*(ne){let Z,{extraOptions:oe}=L;if(Y?Z=Y():L.query?Z=yield t(L.query(ne),W,oe):Z=yield L.queryFn(ne,W,oe,ce=>t(ce,W,oe)),typeof process<"u",Z.error)throw new qr(Z.error,Z.meta);let ye=yield z(Z.data,Z.meta,ne);return{...Z,data:ye}});return _ee.apply(this,arguments)}if(F.type==="query"&&"infiniteQueryOptions"in L){let{infiniteQueryOptions:ne}=L,{maxPages:Z=1/0}=ne,oe,ye={pages:[],pageParams:[]},ce=a.selectQueryEntry(_(),F.queryCacheKey)?.data,he=v(F,_())&&!F.direction||!ce?ye:ce;if("direction"in F&&F.direction&&he.pages.length){let Te=F.direction==="backward",ft=(Te?Pd:vs)(ne,he);oe=yield se(he,ft,Z,Te)}else{let{initialPageParam:Te=ne.initialPageParam}=F,Ve=ce?.pageParams??[],ft=Ve[0]??Te,Xt=Ve.length;oe=yield se(he,ft,Z),Y&&(oe={data:oe.data.pages[0]});for(let Zt=1;Zt<Xt;Zt++){let Qr=vs(ne,oe.data);oe=yield se(oe.data,Qr,Z)}}re=oe}else re=yield ee(F.originalArgs);return U(re.data,zo({fulfilledTimeStamp:Date.now(),baseQueryMeta:re.meta}))}catch(z){let W=z;if(W instanceof qr){let Y=S(L,"transformErrorResponse");try{return $(yield Y(W.value,W.meta,F.originalArgs),zo({baseQueryMeta:W.meta}))}catch(re){W=re}}throw typeof process<"u",console.error(W),W}});return function g(_x45,_x46){return _ref21.apply(this,arguments)}}();function v(F,O){let N=a.selectQueryEntry(O,F.queryCacheKey),$=a.selectConfig(O).refetchOnMountOrArgChange,U=N?.fulfilledTimeStamp,V=F.forceRefetch??(F.subscribe&&$);return V?V===!0||(Number(new Date)-Number(U))/1e3>=V:!1}let R=()=>ue(`${e}/executeQuery`,g,{getPendingMeta({arg:O}){let N=r[O.endpointName];return zo({startedTimeStamp:Date.now(),...(ws(N)?{direction:O.direction}:{})})},condition(O,{getState:N}){let $=N(),U=a.selectQueryEntry($,O.queryCacheKey),V=U?.fulfilledTimeStamp,_=O.originalArgs,Q=U?.originalArgs,L=r[O.endpointName],z=O.direction;return Ss(O)?!0:U?.status==="pending"?!1:v(O,$)||As(L)&&L?.forceRefetch?.({currentArg:_,previousArg:Q,endpointState:U,state:$})?!0:!(V&&!z)},dispatchConditionRejection:!0}),P=R(),x=R(),T=ue(`${e}/executeMutation`,g,{getPendingMeta(){return zo({startedTimeStamp:Date.now()})}}),w=F=>"force"in F,E=F=>"ifOlderThan"in F,j=(F,O,N)=>($,U)=>{let V=w(N)&&N.force,_=E(N)&&N.ifOlderThan,Q=(z=!0)=>{let W={forceRefetch:z,isPrefetch:!0};return o.endpoints[F].initiate(O,W)},L=o.endpoints[F].select(O)(U());if(V)$(Q());else if(_){let z=L?.fulfilledTimeStamp;if(!z){$(Q());return}(Number(new Date)-Number(new Date(z)))/1e3>=_&&$(Q())}else $(Q(!1))};function k(F){return O=>O?.meta?.arg?.endpointName===F}function I(F,O){return{matchPending:sr(to(F),k(O)),matchFulfilled:sr(at(F),k(O)),matchRejected:sr($t(F),k(O))}}return{queryThunk:P,mutationThunk:T,infiniteQueryThunk:x,prefetch:j,updateQueryData:y,upsertQueryData:h,patchQueryData:m,buildMatchThunkActions:I}}function vs(e,{pages:t,pageParams:r}){let n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function Pd(e,{pages:t,pageParams:r}){return e.getPreviousPageParam?.(t[0],t,r[0],r)}function Td(e,t,r,n){return xs(r[e.meta.arg.endpointName][t],at(e)?e.payload:void 0,dn(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function Wo(e,t,r){let n=e[t];n&&r(n)}function In(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function yd(e,t,r){let n=e[In(t)];n&&r(n)}var Rn={};function QS({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:m},assertTagType:f,config:p}){let y=D(`${e}/resetApiState`);function h(k,I,F,O){var N;k[N=I.queryCacheKey]??(k[N]={status:"uninitialized",endpointName:I.endpointName}),Wo(k,I.queryCacheKey,$=>{$.status="pending",$.requestId=F&&$.requestId?$.requestId:O.requestId,I.originalArgs!==void 0&&($.originalArgs=I.originalArgs),$.startedTimeStamp=O.startedTimeStamp;let U=o[O.arg.endpointName];ws(U)&&"direction"in I&&($.direction=I.direction)})}function S(k,I,F,O){Wo(k,I.arg.queryCacheKey,N=>{if(N.requestId!==I.requestId&&!O)return;let{merge:$}=o[I.arg.endpointName];if(N.status="fulfilled",$){if(N.data!==void 0){let{fulfilledTimeStamp:U,arg:V,baseQueryMeta:_,requestId:Q}=I,L=it(N.data,z=>$(z,F,{arg:V.originalArgs,baseQueryMeta:_,fulfilledTimeStamp:U,requestId:Q}));N.data=L}else N.data=F;}else N.data=o[I.arg.endpointName].structuralSharing??!0?wd(je(N.data)?ca(N.data):N.data,F):F;delete N.error,N.fulfilledTimeStamp=I.fulfilledTimeStamp})}let g=Ht({name:`${e}/queries`,initialState:Rn,reducers:{removeQueryResult:{reducer(k,{payload:{queryCacheKey:I}}){delete k[I]},prepare:cr()},cacheEntriesUpserted:{reducer(k,I){for(let F of I.payload){let{queryDescription:O,value:N}=F;h(k,O,!0,{arg:O,requestId:I.meta.requestId,startedTimeStamp:I.meta.timestamp}),S(k,{arg:O,requestId:I.meta.requestId,fulfilledTimeStamp:I.meta.timestamp,baseQueryMeta:{}},N,!0)}},prepare:k=>({payload:k.map(O=>{let{endpointName:N,arg:$,value:U}=O,V=o[N];return{queryDescription:{type:"query",endpointName:N,originalArgs:O.arg,queryCacheKey:n({queryArgs:$,endpointDefinition:V,endpointName:N})},value:U}}),meta:{[un]:!0,requestId:no(),timestamp:Date.now()}})},queryResultPatched:{reducer(k,{payload:{queryCacheKey:I,patches:F}}){Wo(k,I,O=>{O.data=la(O.data,F.concat())})},prepare:cr()}},extraReducers(k){k.addCase(t.pending,(I,{meta:F,meta:{arg:O}})=>{let N=Ss(O);h(I,O,N,F)}).addCase(t.fulfilled,(I,{meta:F,payload:O})=>{let N=Ss(F.arg);S(I,F,O,N)}).addCase(t.rejected,(I,{meta:{condition:F,arg:O,requestId:N},error:$,payload:U})=>{Wo(I,O.queryCacheKey,V=>{if(!F){if(V.requestId!==N)return;V.status="rejected",V.error=U??$}})}).addMatcher(m,(I,F)=>{let{queries:O}=a(F);for(let[N,$]of Object.entries(O))($?.status==="fulfilled"||$?.status==="rejected")&&(I[N]=$)})}}),v=Ht({name:`${e}/mutations`,initialState:Rn,reducers:{removeMutationResult:{reducer(k,{payload:I}){let F=In(I);F in k&&delete k[F]},prepare:cr()}},extraReducers(k){k.addCase(r.pending,(I,{meta:F,meta:{requestId:O,arg:N,startedTimeStamp:$}})=>{N.track&&(I[In(F)]={requestId:O,status:"pending",endpointName:N.endpointName,startedTimeStamp:$})}).addCase(r.fulfilled,(I,{payload:F,meta:O})=>{O.arg.track&&yd(I,O,N=>{N.requestId===O.requestId&&(N.status="fulfilled",N.data=F,N.fulfilledTimeStamp=O.fulfilledTimeStamp)})}).addCase(r.rejected,(I,{payload:F,error:O,meta:N})=>{N.arg.track&&yd(I,N,$=>{$.requestId===N.requestId&&($.status="rejected",$.error=F??O)})}).addMatcher(m,(I,F)=>{let{mutations:O}=a(F);for(let[N,$]of Object.entries(O))($?.status==="fulfilled"||$?.status==="rejected")&&N!==$?.requestId&&(I[N]=$)})}}),R=Ht({name:`${e}/invalidation`,initialState:Rn,reducers:{updateProvidedBy:{reducer(k,I){var N,$;let{queryCacheKey:F,providedTags:O}=I.payload;for(let U of Object.values(k))for(let V of Object.values(U)){let _=V.indexOf(F);_!==-1&&V.splice(_,1)}for(let{type:U,id:V}of O){let _=(N=k[U]??(k[U]={}))[$=V||"__internal_without_id"]??(N[$]=[]);_.includes(F)||_.push(F)}},prepare:cr()}},extraReducers(k){k.addCase(g.actions.removeQueryResult,(I,{payload:{queryCacheKey:F}})=>{for(let O of Object.values(I))for(let N of Object.values(O)){let $=N.indexOf(F);$!==-1&&N.splice($,1)}}).addMatcher(m,(I,F)=>{var N,$;let{provided:O}=a(F);for(let[U,V]of Object.entries(O))for(let[_,Q]of Object.entries(V)){let L=(N=I[U]??(I[U]={}))[$=_||"__internal_without_id"]??(N[$]=[]);for(let z of Q)L.includes(z)||L.push(z)}}).addMatcher(Ye(at(t),dn(t)),(I,F)=>{let O=Td(F,"providesTags",o,f),{queryCacheKey:N}=F.meta.arg;R.caseReducers.updateProvidedBy(I,R.actions.updateProvidedBy({queryCacheKey:N,providedTags:O}))})}}),P=Ht({name:`${e}/subscriptions`,initialState:Rn,reducers:{updateSubscriptionOptions(k,I){},unsubscribeQueryResult(k,I){},internal_getRTKQSubscriptions(){}}}),x=Ht({name:`${e}/internalSubscriptions`,initialState:Rn,reducers:{subscriptionsUpdated:{reducer(k,I){return la(k,I.payload)},prepare:cr()}}}),T=Ht({name:`${e}/config`,initialState:{online:IS(),focused:ES(),middlewareRegistered:!1,...p},reducers:{middlewareRegistered(k,{payload:I}){k.middlewareRegistered=k.middlewareRegistered==="conflict"||i!==I?"conflict":!0}},extraReducers:k=>{k.addCase(bs,I=>{I.online=!0}).addCase(Id,I=>{I.online=!1}).addCase(Cs,I=>{I.focused=!0}).addCase(Ed,I=>{I.focused=!1}).addMatcher(m,I=>({...I}))}}),w=or({queries:g.reducer,mutations:v.reducer,provided:R.reducer,subscriptions:x.reducer,config:T.reducer}),E=(k,I)=>w(y.match(I)?void 0:k,I),j={...T.actions,...g.actions,...P.actions,...x.actions,...v.actions,...R.actions,resetApiState:y};return{reducer:E,actions:j}}var ys=Symbol.for("RTKQ/skipToken"),Fd={status:"uninitialized"},hd=it(Fd,()=>{}),Sd=it(Fd,()=>{});function $S({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=w=>hd,o=w=>Sd;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,...ld(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,j){return k=>{if(k===ys)return r(n,j);let I=e({queryArgs:k,endpointDefinition:E,endpointName:w});return r(O=>f(O,I)??hd,j)}}function S(w,E){return h(w,E,i)}function g(w,E){let{infiniteQueryOptions:j}=E;function k(I){let F={...I,...ld(I.status)},{isLoading:O,isError:N,direction:$}=F,U=$==="forward",V=$==="backward";return{...F,hasNextPage:x(j,F.data),hasPreviousPage:T(j,F.data),isFetchingNextPage:O&&U,isFetchingPreviousPage:O&&V,isFetchNextPageError:N&&U,isFetchPreviousPageError:N&&V}}return h(w,E,k)}function v(){return w=>{let E;return typeof w=="object"?E=In(w)??ys:E=w,r(E===ys?o:I=>a(I)?.mutations?.[E]??Sd,i)}}function R(w,E){let j=w[t],k=new Set;for(let I of E.filter(Go).map(hs)){let F=j.provided[I.type];if(!F)continue;let O=(I.id!==void 0?F[I.id]:pd(Object.values(F)))??[];for(let N of O)k.add(N)}return pd(Array.from(k.values()).map(I=>{let F=j.queries[I];return F?[{queryCacheKey:I,endpointName:F.endpointName,originalArgs:F.originalArgs}]:[]}))}function P(w,E){return Object.values(m(w)).filter(j=>j?.endpointName===E&&j.status!=="uninitialized").map(j=>j.originalArgs)}function x(w,E){return E?vs(w,E)!=null:!1}function T(w,E){return!E||!w.getPreviousPageParam?!1:Pd(w,E)!=null}}var vd=WeakMap?new WeakMap:void 0,Cd=({endpointName:e,queryArgs:t})=>{let r="",n=vd?.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)&&vd?.set(t,o),r=o}return`${e}(${r})`};function HS(...e){return function(r){let n=ar(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=Cd;if("serializeQueryArgs"in p.endpointDefinition){let h=p.endpointDefinition.serializeQueryArgs;y=S=>{let g=h(S);return typeof g=="string"?g:Cd({...S,queryArgs:g})}}else r.serializeQueryArgs&&(y=r.serializeQueryArgs);return y(p)},tagTypes:[...(r.tagTypes||[])]},i={endpointDefinitions:{},batch(p){p()},apiUid:no(),extractRehydrationInfo:n,hasRehydrationInfo:ar(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 dt(e,...t){return Object.assign(e,...t)}var zS=({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:T,requestId:w,options:E}=v.payload;return g?.[T]?.[w]&&(g[T][w]=E),!0}if(m.match(v)){let{queryCacheKey:T,requestId:w}=v.payload;return g[T]&&delete g[T][w],!0}if(e.internalActions.removeQueryResult.match(v))return delete g[v.payload.queryCacheKey],!0;if(t.pending.match(v)){let{meta:{arg:T,requestId:w}}=v,E=g[P=T.queryCacheKey]??(g[P]={});return E[`${w}_running`]={},T.subscribe&&(E[w]=T.subscriptionOptions??E[w]??{}),!0}let R=!1;if(t.fulfilled.match(v)||t.rejected.match(v)){let T=g[v.meta.arg.queryCacheKey]||{},w=`${v.meta.requestId}_running`;R||(R=!!T[w]),delete T[w]}if(t.rejected.match(v)){let{meta:{condition:T,arg:w,requestId:E}}=v;if(T&&w.subscribe){let j=g[x=w.queryCacheKey]??(g[x]={});j[E]=w.subscriptionOptions??j[E]??{},R=!0}}return R},p=()=>r.currentSubscriptions,S={getSubscriptions:p,getSubscriptionCount:g=>{let R=p()[g]??{};return Dr(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]=Jn(o,()=>w);v.next(e.internalActions.subscriptionsUpdated(E)),o=w,i=null},500));let x=typeof g.type=="string"&&!!g.type.startsWith(n),T=t.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;P=!x&&!T}return[P,!1]}};function WS(e){for(let t in e)return!1;return!0}var GS=2147483647/1e3-1,KS=({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&&!WS(x)}let S={},g=(P,x,T)=>{let w=x.getState(),E=a(w);if(y(P)){let j;if(p.match(P))j=P.payload.map(k=>k.queryDescription.queryCacheKey);else{let{queryCacheKey:k}=f.match(P)?P.payload:P.meta.arg;j=[k]}v(j,x,E)}if(t.util.resetApiState.match(P))for(let[j,k]of Object.entries(S))k&&clearTimeout(k),delete S[j];if(n.hasRehydrationInfo(P)){let{queries:j}=n.extractRehydrationInfo(P);v(Object.keys(j),x,E)}};function v(P,x,T){let w=x.getState();for(let E of P){let j=i(w,E);R(E,j?.endpointName,x,T)}}function R(P,x,T,w){let j=n.endpointDefinitions[x]?.keepUnusedDataFor??w.keepUnusedDataFor;if(j===1/0)return;let k=Math.max(0,Math.min(j,GS));if(!h(P)){let I=S[P];I&&clearTimeout(I),S[P]=setTimeout(()=>{h(P)||T.dispatch(m({queryCacheKey:P})),delete S[P]},k*1e3)}}return g},bd=new Error("Promise never resolved before cacheEntryRemoved."),YS=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:o,internalState:i,selectors:{selectQueryEntry:a,selectApiState:m}})=>{let f=ro(n),p=ro(o),y=at(n,o),h={};function S(x,T,w){let E=h[x];E?.valueResolved&&(E.valueResolved({data:T,meta:w}),delete E.valueResolved)}function g(x){let T=h[x];T&&(delete h[x],T.cacheEntryRemoved())}let v=(x,T,w)=>{let E=R(x);function j(k,I,F,O){let N=a(w,I),$=a(T.getState(),I);!N&&$&&P(k,O,I,T,F)}if(n.pending.match(x))j(x.meta.arg.endpointName,E,x.meta.requestId,x.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(x))for(let{queryDescription:k,value:I}of x.payload){let{endpointName:F,originalArgs:O,queryCacheKey:N}=k;j(F,N,x.meta.requestId,O),S(N,I,{})}else if(o.pending.match(x))T.getState()[t].mutations[E]&&P(x.meta.arg.endpointName,x.meta.arg.originalArgs,E,T,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 k of Object.keys(h))g(k)};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)?In(x.payload):""}function P(x,T,w,E,j){let k=r.endpointDefinitions[x],I=k?.onCacheEntryAdded;if(!I)return;let F={},O=new Promise(Q=>{F.cacheEntryRemoved=Q}),N=Promise.race([new Promise(Q=>{F.valueResolved=Q}),O.then(()=>{throw bd})]);N.catch(()=>{}),h[w]=F;let $=e.endpoints[x].select(k.type==="query"?T:w),U=E.dispatch((Q,L,z)=>z),V={...E,getCacheEntry:()=>$(E.getState()),requestId:j,extra:U,updateCachedData:k.type==="query"?Q=>E.dispatch(e.util.updateQueryData(x,T,Q)):void 0,cacheDataLoaded:N,cacheEntryRemoved:O},_=I(T,V);Promise.resolve(_).catch(Q=>{if(Q!==bd)throw Q})}return v},JS=({api:e,context:{apiUid:t},reducerPath:r})=>(n,o)=>{e.util.resetApiState.match(n)&&o.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},XS=({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(at(n),dn(n)),h=Ye(at(n,o),$t(n,o)),S=[],g=(P,x)=>{y(P)?R(Td(P,"invalidatesTags",r,a),x):h(P)?R([],x):i.util.invalidateTags.match(P)&&R(xs(P.payload,void 0,void 0,void 0,void 0,a),x)};function v(P){let{queries:x,mutations:T}=P;for(let w of[x,T])for(let E in w)if(w[E]?.status==="pending")return!0;return!1}function R(P,x){let T=x.getState(),w=T[e];if(S.push(...P),w.config.invalidationBehavior==="delayed"&&v(w))return;let E=S;if(S=[],E.length===0)return;let j=i.util.selectInvalidatedBy(T,E);t.batch(()=>{let k=Array.from(j.values());for(let{queryCacheKey:I}of k){let F=w.queries[I],O=f.currentSubscriptions[I]??{};F&&(Dr(O)===0?x.dispatch(p({queryCacheKey:I})):F.status!=="uninitialized"&&x.dispatch(m(F)))}})}return g},ZS=({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:T,skipPollingIfUnfocused:w}=S(x);if(!Number.isFinite(T))return;let E=i[g];E?.timeout&&(clearTimeout(E.timeout),E.timeout=void 0);let j=Date.now()+T;i[g]={nextPollTimestamp:j,pollingInterval:T,timeout:setTimeout(()=>{(R.config.focused||!w)&&v.dispatch(n(P)),f({queryCacheKey:g},v)},T)}}function p({queryCacheKey:g},v){let P=v.getState()[e].queries[g],x=o.currentSubscriptions[g];if(!P||P.status==="uninitialized")return;let{lowestPollingInterval:T}=S(x);if(!Number.isFinite(T)){y(g);return}let w=i[g],E=Date.now()+T;(!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},ev=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let o=to(r,n),i=$t(r,n),a=at(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((j,k)=>{P.resolve=j,P.reject=k});x.catch(()=>{}),m[h]=P;let T=e.endpoints[S].select(v.type==="query"?g:h),w=y.dispatch((j,k,I)=>I),E={...y,getCacheEntry:()=>T(y.getState()),requestId:h,extra:w,updateCachedData:v.type==="query"?j=>y.dispatch(e.util.updateQueryData(S,g,j)):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]}}},tv=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:o})=>{let{removeQueryResult:i}=r.internalActions,a=(f,p)=>{Cs.match(f)&&m(p,"refetchOnFocus"),bs.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])&&(Dr(R)===0?f.dispatch(i({queryCacheKey:g})):v.status!=="uninitialized"&&f.dispatch(n(v)))}})}return a};function rv(e){let{reducerPath:t,queryThunk:r,api:n,context:o}=e,{apiUid:i}=o,a={invalidateTags:D(`${t}/invalidateTags`)},m=h=>h.type.startsWith(`${t}/`),f=[JS,KS,XS,ZS,YS,ev];return{middleware:h=>{let S=!1,v={...e,internalState:{currentSubscriptions:{}},refetchQuery:y,isThisApiSliceAction:m},R=f.map(T=>T(v)),P=zS(v),x=tv(v);return T=>w=>{if(!zn(w))return T(w);S||(S=!0,h.dispatch(n.internalActions.middlewareRegistered(i)));let E={...h,next:T},j=h.getState(),[k,I]=P(w,E,j),F;if(k?F=T(w):F=I,h.getState()[t]&&(x(w,E,j),m(w)||o.hasRehydrationInfo(w)))for(let O of R)O(w,E,j);return F}},actions:a};function y(h){return e.api.endpoints[h.endpointName].initiate(h.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Ad=Symbol(),nv=({createSelector:e=pe}={})=>({name:Ad,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:m,refetchOnFocus:f,refetchOnReconnect:p,invalidationBehavior:y},h){Xc();let S=ee=>(typeof process<"u",ee);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:bs,onOffline:Id,onFocus:Cs,onFocusLost:Ed},util:{}});let g=$S({serializeQueryArgs:i,reducerPath:o,createSelector:e}),{selectInvalidatedBy:v,selectCachedArgsForQuery:R,buildQuerySelector:P,buildInfiniteQuerySelector:x,buildMutationSelector:T}=g;dt(t.util,{selectInvalidatedBy:v,selectCachedArgsForQuery:R});let{queryThunk:w,infiniteQueryThunk:E,mutationThunk:j,patchQueryData:k,updateQueryData:I,upsertQueryData:F,prefetch:O,buildMatchThunkActions:N}=BS({baseQuery:r,reducerPath:o,context:h,api:t,serializeQueryArgs:i,assertTagType:S,selectors:g}),{reducer:$,actions:U}=QS({context:h,queryThunk:w,infiniteQueryThunk:E,mutationThunk:j,serializeQueryArgs:i,reducerPath:o,assertTagType:S,config:{refetchOnFocus:f,refetchOnReconnect:p,refetchOnMountOrArgChange:m,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:y}});dt(t.util,{patchQueryData:k,updateQueryData:I,upsertQueryData:F,prefetch:O,resetApiState:U.resetApiState,upsertQueryEntries:U.cacheEntriesUpserted}),dt(t.internalActions,U);let{middleware:V,actions:_}=rv({reducerPath:o,context:h,queryThunk:w,mutationThunk:j,infiniteQueryThunk:E,api:t,assertTagType:S,selectors:g});dt(t.util,_),dt(t,{reducer:$,middleware:V});let{buildInitiateQuery:Q,buildInitiateInfiniteQuery:L,buildInitiateMutation:z,getRunningMutationThunk:W,getRunningMutationsThunk:Y,getRunningQueriesThunk:re,getRunningQueryThunk:se}=LS({queryThunk:w,mutationThunk:j,infiniteQueryThunk:E,api:t,serializeQueryArgs:i,context:h});return dt(t.util,{getRunningMutationThunk:W,getRunningMutationsThunk:Y,getRunningQueryThunk:se,getRunningQueriesThunk:re}),{name:Ad,injectEndpoint(ee,ne){var ye;let oe=(ye=t.endpoints)[ee]??(ye[ee]={});As(ne)&&dt(oe,{name:ee,select:P(ee,ne),initiate:Q(ee,ne)},N(w,ee)),NS(ne)&&dt(oe,{name:ee,select:T(),initiate:z(ee)},N(j,ee)),ws(ne)&&dt(oe,{name:ee,select:x(ee,ne),initiate:L(ee,ne)},N(w,ee))}}}}),kd=HS(nv());var ov=/*#__PURE__*/function(){var _ref23=_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:xd({baseUrl:`${p}/rest/organizations/${a}/answer/v1/configs/${m}`,fetchFn:function(){var _ref24=_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(_x55){return _ref24.apply(this,arguments)}}()})(f,{...t,signal:null},r)}}catch(p){return{error:p}}});return function ov(_x52,_x53,_x54){return _ref23.apply(this,arguments)}}(),Od=kd({reducerPath:"answer",baseQuery:Rd(ov,{maxRetries:3}),endpoints:()=>({})});var iv=(e,t)=>{let{contentFormat:r}=t;e.contentFormat=r,e.isStreaming=!0,e.isLoading=!1},av=(e,t)=>{e.answer===void 0?e.answer=t.textDelta:typeof t.textDelta=="string"&&(e.answer=e.answer.concat(t.textDelta))},sv=(e,t)=>{e.citations=t.citations},cv=(e,t)=>{e.generated=t.answerGenerated,e.isStreaming=!1},uv=(e,t)=>{e.error={message:t.errorMessage,code:t.code},e.isStreaming=!1,e.isLoading=!1,console.error(`${t.errorMessage} - code ${t.code}`)},lv=(e,t,r)=>{let n=JSON.parse(e.data);n.finishReason==="ERROR"&&n.errorMessage&&uv(t,n);let o=n.payload.length?JSON.parse(n.payload):{};switch(n.payloadType){case"genqa.headerMessageType":o.contentFormat&&(iv(t,o),r(es(o.contentFormat)));break;case"genqa.messageType":o.textDelta&&(av(t,o),r(Xa({textDelta:o.textDelta})));break;case"genqa.citationsType":o.citations&&(sv(t,o),r(Za({citations:o.citations})));break;case"genqa.endOfStreamType":cv(t,o),r(Vo(o.answerGenerated??!1));break}},Rs=Od.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 n=JSON.parse(JSON.stringify(r));return n.analytics&&(delete n.analytics.clientTimestamp,delete n.analytics.actionCause),`${t}(${JSON.stringify(n)})`},onCacheEntryAdded(_x56,_x57){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=`${S}/rest/organizations/${p}/insight/v1/configs/${f?.insightId}/answer/${m.answerConfigurationId}/generate`,v=`${S}/rest/organizations/${p}/answer/v1/configs/${m.answerConfigurationId}/generate`;yield ud(f?g:v,{method:"POST",body:JSON.stringify(t),headers:{Authorization:`Bearer ${h}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch:b,onopen:function(){var _ref25=_asyncToGenerator(function*(R){let P=R.headers.get("x-answer-id");P&&o(x=>{x.answerId=P})});return function onopen(_x58){return _ref25.apply(this,arguments)}}(),onmessage:R=>{o(P=>{lv(R,P,i)})},onerror:R=>{throw R},onclose:()=>{o(R=>{i(ts(!R.generated))})}})}).apply(this,arguments)}})})}),Mj=pe(e=>bn(e)?.q,e=>e.search.requestId,e=>e.generatedAnswer.cannotAnswer,(e,t,r)=>({q:e,requestId:t,cannotAnswer:r})),Ko={},dv=(e,t)=>({...Ko,[e]:Ho(t)?.map(r=>ds(r,ls())).sort((r,n)=>r.facetId>n.facetId?1:n.facetId>r.facetId?-1:0)}),pv=e=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0,fv=e=>{let t=Ya(e),r=mv(e);return{...t,...(r&&{cq:r})}},mv=e=>{let t=td(e.tabSet),r=$o(e),{cq:n}=Ya(e);return[t,...r,n].filter(o=>!!o).join(" AND ")},gv=(e,t,r)=>{let n=bn(e)?.q,{aq:o,cq:i,dq:a,lq:m}=fv(e),f=Rl(e),p=ed(e),y=ql(e),h=Il(e)??[];return n&&t==="fetch"&&(Ko=dv(n,e)),{q:n,...(o&&{aq:o}),...(i&&{cq:i}),...(a&&{dq:a}),...(m&&{lq:m}),...(f?.contextValues&&{context:f.contextValues}),pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:h}},...(p?.length&&{searchHub:p}),...(y?.length&&{pipeline:y}),...(Ko[n]?.length&&{facets:Ko[n]}),...(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:pv(e),firstResult:e.pagination.firstResult}),tab:ps(e.tabSet),..._o(e.configuration.analytics,r,{actionCause:Zl(e)})}};var Pl=(e,t)=>Rs.endpoints.getAnswer.select(gv(e,"select",t||Cn()))(e);d();c();l();u();var Dd=ge(ur,e=>e);d();c();l();u();function Es(){return typeof window<"u"&&typeof document<"u"}d();c();l();u();function yv(e){let t=e.payload?.analyticsAction;return qd(e)&&!X(t)}function qd(e){return"type"in e}var Md=e=>t=>r=>{let n;yv(r)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let o=t(r);return qd(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 cN=D("tab/register",e=>{let t=new K({values:{id:G,expression:we}});return B(e,t)}),Yo=D("tab/updateActiveTab",e=>B(e,G));d();c();l();u();var Jo=Qe(Lo(),1),_d=Qe(jd(),1),Vd=Qe(Nd(),1);Jo.default.extend(Vd.default);Jo.default.extend(_d.default);var Ld=()=>({organizationId:"",accessToken:"",search:{locale:"en-US",timezone:Jo.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 hv=/(^|; )Coveo-Pendragon=([^;]*)/;function ks(){return typeof window>"u"?!1:hv.exec(document.cookie)?.pop()||null}var Ud=ge(Ld(),e=>e.addCase(St,(t,r)=>{Sv(t,r.payload)}).addCase(Je,(t,r)=>{vv(t,r.payload)}).addCase(lr,(t,r)=>{Cv(t,r.payload)}).addCase(dr,t=>{t.analytics.enabled=!1}).addCase(pr,t=>{t.analytics.enabled=!0}).addCase(io,(t,r)=>{t.analytics.originLevel2=r.payload.originLevel2}).addCase(ao,(t,r)=>{t.analytics.originLevel3=r.payload.originLevel3}).addCase(Yo,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(Eu,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(vt,(t,r)=>{X(r.payload.tab)||(t.analytics.originLevel2=r.payload.tab)}));function Sv(e,t){X(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",X(t.organizationId)||(e.organizationId=t.organizationId)}function vv(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 Cv(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=ks();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=Ud;d();c();l();u();function bv(e){return e.instantlyCallable}var Bd=()=>e=>t=>e(bv(t)?t():t);d();c();l();u();var Qd=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)},$d=e=>t=>r=>n=>(e.debug({action:n,nextState:t.getState()},`Action dispatched: ${n.type}`),r(n));d();c();l();u();function Hd(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=Cc(Object.entries(t).filter(([a])=>!(a in r)).map(([a,m])=>[a,()=>m]));return o(or({...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 Xo(e,t,r){var n,o,i;t===void 0&&(t=50),r===void 0&&(r={});var a=(n=r.isImmediate)!=null&&n,m=(o=r.callback)!=null&&o,f=r.maxWait,p=Date.now(),y=[];function h(){if(f!==void 0){var g=Date.now()-p;if(g+t>=f)return f-g}return t}var S=function(){var g=[].slice.call(arguments),v=this;return new Promise(function(R,P){var x=a&&i===void 0;if(i!==void 0&&clearTimeout(i),i=setTimeout(function(){if(i=void 0,p=Date.now(),!a){var w=e.apply(v,g);m&&m(w),y.forEach(function(E){return(0,E.resolve)(w)}),y=[]}},h()),x){var T=e.apply(v,g);return m&&m(T),R(T)}y.push({resolve:R,reject:P})})};return S.cancel=function(g){i!==void 0&&clearTimeout(i),y.forEach(function(v){return(0,v.reject)(g)}),y=[]},S}function zd(e,t){let r=0,n=Xo(()=>{r=0},500);return o=>i=>(/*#__PURE__*/function(){var _ref26=_asyncToGenerator(function*(a){if(!(typeof a=="function"))return i(a);let f=yield i(a);if(!Av(f))return f;if(typeof t!="function")return e.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),f;if(r>=5)return e.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),f;r++,n();let p=yield wv(t);o.dispatch(St({accessToken:p})),o.dispatch(a)});return function(_x59){return _ref26.apply(this,arguments)}}())}function Av(e){return e?.error?.name===new nr().name}function wv(_x60){return _wv.apply(this,arguments)}function _wv(){_wv=_asyncToGenerator(function*(e){try{return yield e()}catch{return""}});return _wv.apply(this,arguments)}d();c();l();u();function Wd({reducer:e,preloadedState:t,middlewares:r=[],thunkExtraArguments:n,name:o}){return lu({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($d(n.logger))})}function xv(e,t){let{analytics:r}=e,{analyticsClientMiddleware:n,...o}=r??{},i={...o,...(r?.proxyBaseUrl&&{apiBaseUrl:r.proxyBaseUrl,nexApiBaseUrl:r.proxyBaseUrl})};return i.analyticsMode!=="next"&&vc()?(t.info("Analytics disabled since doNotTrack is active."),{...i,enabled:!1}):i}function Gd(e,t){let r={...e.reducers,configuration:ze,version:Dd},n=Rv({...e,reducers:r},t,ze),{accessToken:o,environment:i,organizationId:a}=e.configuration;n.dispatch(St({accessToken:o,environment:i,organizationId:a}));let m=xv(e.configuration,n.logger);return m&&n.dispatch(lr(m)),n}function Rv(e,t,r){let{reducers:n}=e,o=Hd({...n,configurationReducer:r},e.preloadedState??{});e.crossReducer&&o.addCrossReducer(e.crossReducer);let i=t.logger,a=()=>{let y="";try{y=Rr(p.state).getMeta("").clientId}catch(h){i.warn("Error while obtaining clientID from relay",h)}return y},m={...t,get relay(){return Rr(p.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():Es()?Ka(a()):Cn()}},f=Ev(e,m,o),p={addReducers(y){o.containsAll(y)||(o.add(y),f.replaceReducer(o.combinedReducer))},dispatch:f.dispatch,subscribe:f.subscribe,enableAnalytics(){f.dispatch(pr())},disableAnalytics(){f.dispatch(dr())},get state(){return f.getState()},get relay(){return Rr(this.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():Es()?Ka(a()):Cn()},logger:i,store:f};return p}function Ev(e,t,r){let{preloadedState:n,configuration:o}=e,i=o.name||"coveo-headless",a=Iv(e,t.logger);return Wd({preloadedState:n,reducer:r.combinedReducer,middlewares:a,thunkExtraArguments:t,name:i})}function Iv(e,t){let{renewAccessToken:r}=e.configuration,n=zd(t,r);return[Bd,n,Qd(t),Md].concat(Rs.middleware,e.middlewares||[])}d();c();l();u();var np=Qe(rp(),1);function op(e){return(0,np.pino)({name:"@coveo/headless",level:e?.level||"warn",formatters:{log:e?.logFormatter}})}d();c();l();u();function ip(e,t){let r=Hv(e),n=Le,o=zv(e);return{analyticsClientMiddleware:r,validatePayload:n,preprocessRequest:o,logger:t}}function Hv(e){let{analytics:t}=e,r=(n,o)=>o;return t?.analyticsClientMiddleware||r}function zv(e){return e.preprocessRequest||Ln}d();c();l();u();d();c();l();u();var ap={organizationId:G,accessToken:G,name:new H({required:!1,emptyAllowed:!1}),analytics:new K({options:{required:!1},values:{enabled:new te({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 sp(){return{organizationId:"searchuisamples",accessToken:"xx564559b1-0045-48e1-953c-3addd1ee4457"}}var cp=new Fe({...ap,pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:Ae,locale:Ae,timezone:Ae});function Ns(){return{...sp(),searchHub:"default"}}var Wv={debug:lo,pipeline:gr,searchHub:Tr,recommendation:Ir};function up(e){let t=op(e.loggerOptions);Gv(e.configuration,t);let r=Kv(e.configuration,t),n={...ip(e.configuration,t),apiClient:r},o={...e,reducers:Wv},i=Gd(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(fr(a)),X(m)||i.dispatch(Pr(m)),{...i,get state(){return i.state}}}function Gv(e,t){try{cp.validate(e)}catch(r){throw t.error(r,"Recommendation engine configuration error"),r}}function Kv(e,t){return new Qn({logger:t,preprocessRequest:e.preprocessRequest||Ln,postprocessSearchResponseMiddleware:e.preprocessSearchResponseMiddleware||Nc,postprocessFacetSearchResponseMiddleware:_c,postprocessQuerySuggestResponseMiddleware:Vc})}d();c();l();u();d();c();l();u();d();c();l();u();var Yv=new ie({each:G,required:!0}),lp=(e,t)=>(B(e,G),jn(t)?B(t,G):B(t,Yv),{payload:{contextKey:e,contextValue:t}}),Kt=D("context/set",e=>{for(let[t,r]of Object.entries(e))lp(t,r);return{payload:e}}),Yt=D("context/add",e=>lp(e.contextKey,e.contextValue)),Jt=D("context/remove",e=>B(e,G));d();c();l();u();d();c();l();u();function ti(){return{contextValues:{}}}var ri=ge(ti(),e=>{e.addCase(Kt,(t,r)=>{t.contextValues=r.payload}).addCase(Yt,(t,r)=>{t.contextValues[r.payload.contextKey]=r.payload.contextValue}).addCase(Jt,(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 Jv=["caseId","caseNumber"],Xv={caseId:"caseContext",caseNumber:"caseContext"},Tn=class extends Error{constructor(t){super(`The key "${t}" is reserved for internal use. Use ${Xv[t]} to set this value.}`)}};function _s(e){return Jv.includes(e)}var Zv=new Fe({values:new K({options:{required:!1}})});function dp(e,t={}){if(!rC(e))throw We;let r=It(e),{dispatch:n}=e,o=()=>e.state,i=Cu(e,Zv,t.initialState,"buildContext");return i.values&&n(Kt(i.values)),{...r,get state(){return{values:o().context.contextValues}},set(a){n(Kt(a))},...(o().configuration.analytics.analyticsMode==="legacy"?eC(n):tC(n))}}var eC=e=>({add(t,r){e(Yt({contextKey:t,contextValue:r}))},remove(t){e(Jt(t))}}),tC=e=>({add(t,r){if(_s(t))throw new Tn(t);e(Yt({contextKey:t,contextValue:r}))},remove(t){if(_s(t))throw new Tn(t);e(Jt(t))}});function rC(e){return e.addReducers({context:ri}),!0}function pp(e,t){return dp(e,t)}d();c();l();u();d();c();l();u();var jr=D("dictionaryFieldContext/set",e=>{let t=new K({options:{required:!0}}),r=B(e,t).error;if(r)return{payload:e,error:r};let n=Object.values(e),o=new ie({each:we}),i=B(n,o).error;return i?{payload:e,error:i}:{payload:e}}),Nr=D("dictionaryFieldContext/add",e=>{let t=new K({options:{required:!0},values:{field:we,key:we}});return B(e,t)}),_r=D("dictionaryFieldContext/remove",e=>B(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(Nr,(t,r)=>{let{field:n,key:o}=r.payload;t.contextValues[n]=o}).addCase(_r,(t,r)=>{delete t.contextValues[r.payload]}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.dictionaryFieldContext.contextValues)})});function fp(e){if(!nC(e))throw We;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(Nr({field:o,key:i}))},remove(o){r(_r(o))}}}function nC(e){return e.addReducers({dictionaryFieldContext:oi}),!0}d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var Vr=D("breadcrumb/deselectAll"),ii=D("breadcrumb/deselectAllNonBreadcrumbs");d();c();l();u();d();c();l();u();var Fn={value:G,numberOfResults:new J({min:0}),state:G};d();c();l();u();var le=G;var sC=new J({min:1,default:8,required:!1}),cC=new J({min:1,max:20,default:5,required:!1}),uC={desiredCount:cC,numberOfValues:sC},ZU=D("automaticFacet/setOptions",e=>B(e,uC)),eB=D("automaticFacet/deselectAll",e=>B(e,le)),lC=G,mp=D("automaticFacet/toggleSelectValue",e=>B(e,{field:lC,selection:new K({values:Fn})}));d();c();l();u();d();c();l();u();var dC={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:G}),moreValuesAvailable:new te({required:!1})};function Vs(e){e.children.forEach(t=>{Vs(t)}),Le({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},dC)}var Lr={facetId:le,field:G,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 te({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:G}),filterByBasePath:new te({required:!1})};var SB=D("categoryFacet/register",e=>B(e,Lr)),gp=D("categoryFacet/toggleSelectValue",e=>{try{return Le(e.facetId,G),Vs(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}}),yp=D("categoryFacet/deselectAll",e=>B(e,Lr.facetId)),vB=D("categoryFacet/updateNumberOfValues",e=>B(e,{facetId:Lr.facetId,numberOfValues:Lr.numberOfValues})),CB=D("categoryFacet/updateSortCriterion",e=>B(e,{facetId:Lr.facetId,criterion:new fe})),bB=D("categoryFacet/updateBasePath",e=>B(e,{facetId:Lr.facetId,basePath:new ie({each:G})}));d();c();l();u();d();c();l();u();var kn={facetId:le,captions:new K({options:{required:!1}}),numberOfValues:new J({required:!1,min:1}),query:new H({required:!1,emptyAllowed:!0})};var pC={path:new ie({required:!0,each:G}),displayValue:we,rawValue:we,count:new J({required:!0,min:0})},hp=D("categoryFacet/selectSearchResult",e=>B(e,{facetId:le,value:new K({values:pC})})),VB=D("categoryFacetSearch/register",e=>B(e,kn));d();c();l();u();var Sp={facetId:le,value:new K({values:{displayValue:we,rawValue:we,count:new J({required:!0,min:0})}})},YB=D("facetSearch/register",e=>B(e,kn)),JB=D("facetSearch/update",e=>B(e,kn)),vp=D("facetSearch/toggleSelectValue",e=>B(e,Sp)),Cp=D("facetSearch/toggleExcludeValue",e=>B(e,Sp));d();c();l();u();d();c();l();u();var oQ=new H({regex:/^[a-zA-Z0-9-_]+$/}),iQ=new H({required:!0}),aQ=new ie({each:new H}),sQ=new H,cQ=new te,uQ=new te,lQ=new J({min:0}),fC=new J({min:1}),dQ=new te({required:!0}),mC=new K,gC=new H,yC={captions:mC,numberOfValues:fC,query:gC},pQ=new K({values:yC}),bp=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})})}}),fQ=new te,Ap=new ie({min:1,max:25,required:!1,each:new H({emptyAllowed:!1,required:!0})});var hC={facetId:le,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 te({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:bp,customSort:Ap},RQ=D("facet/register",e=>B(e,hC)),wp=D("facet/toggleSelectValue",e=>B(e,{facetId:le,selection:new K({values:Fn})})),xp=D("facet/toggleExcludeValue",e=>B(e,{facetId:le,selection:new K({values:Fn})})),ai=D("facet/deselectAll",e=>B(e,le)),EQ=D("facet/updateSortCriterion",e=>B(e,{facetId:le,criterion:new fe({required:!0})})),IQ=D("facet/updateNumberOfValues",e=>B(e,{facetId:le,numberOfValues:new J({required:!0,min:1})})),PQ=D("facet/updateIsFieldExpanded",e=>B(e,{facetId:le,isFieldExpanded:new te({required:!0})})),TQ=D("facet/updateFreezeCurrentValues",e=>B(e,{facetId:le,freezeCurrentValues:new te({required:!0})}));d();c();l();u();d();c();l();u();function Ep(e){let t=Rp(e.start,e),r=Rp(e.end,e),n=e.endInclusive??!1,o=e.state??"idle";return{start:t,end:r,endInclusive:n,state:o}}function Rp(e,t){let{dateFormat:r}=t;return zl(e)?(us(e),Ql(e)):typeof e=="string"&&wt(e)?(us(e),e):(Vl(e,r),Bo(Or(e,r)))}d();c();l();u();var Ip=D("rangeFacet/updateSortCriterion",e=>B(e,{facetId:le,criterion:new fe({required:!0})}));d();c();l();u();var si={state:G,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new te({required:!0}),numberOfResults:new J({required:!0,min:0})},ci={start:G,end:G,endInclusive:new te({required:!0}),state:G,numberOfResults:new J({required:!0,min:0})};var SC={start:G,end:G,endInclusive:new te({required:!0}),state:G},vC={facetId:le,field:G,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:SC})}),generateAutomaticRanges:new te({required:!0}),filterFacetCount:new te({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 Pp(e){return wt(e)?wn(e):e}function Tp(e){e.currentValues&&e.currentValues.forEach(t=>{let{start:r,end:n}=Ep(t);if(Or(Pp(r)).isAfter(Or(Pp(n))))throw new Error(`The start value is greater than the end value for the date range ${t.start} to ${t.end}`)})}var g1=D("dateFacet/register",e=>{try{return Le(e,vC),Tp(e),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}}),Fp=D("dateFacet/toggleSelectValue",e=>B(e,{facetId:le,selection:new K({values:ci})})),kp=D("dateFacet/toggleExcludeValue",e=>B(e,{facetId:le,selection:new K({values:ci})})),Op=D("dateFacet/updateFacetValues",e=>{try{return Le(e,{facetId:le,values:new ie({each:new K({values:ci})})}),Tp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}});d();c();l();u();var CC={state:G,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new te({required:!0})},bC={facetId:le,field:G,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:CC})}),generateAutomaticRanges:new te({required:!0}),filterFacetCount:new te({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 Dp(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 P1=D("numericFacet/register",e=>{try{return B(e,bC),Dp(e),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}}),qp=D("numericFacet/toggleSelectValue",e=>B(e,{facetId:le,selection:new K({values:si})})),Mp=D("numericFacet/toggleExcludeValue",e=>B(e,{facetId:le,selection:new K({values:si})})),jp=D("numericFacet/updateFacetValues",e=>{try{return Le(e,{facetId:le,values:new ie({each:new K({values:si})})}),Dp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}});d();c();l();u();d();c();l();u();var ui=D("facet/updateFacetAutoSelection",e=>B(e,{allow:new te({required:!0})}));d();c();l();u();d();c();l();u();var li=class extends bt{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??_e().q}get responseTime(){return this.activeInstantResultCache?.duration??Ge().duration}get numberOfResults(){return this.activeInstantResultCache?.totalCountFiltered??Ge().response.totalCountFiltered}getSearchUID(){return this.activeInstantResultCache?.searchUid||super.getSearchUID()}};var Np=()=>Me("analytics/instantResult/searchboxAsYouType",e=>e.makeSearchboxAsYouType(),e=>new li(e)),_p=()=>({actionCause:"searchboxAsYouType"});d();c();l();u();var Ls={id:G},AC={...Ls,q:we},s$=D("instantResults/register",e=>B(e,Ls)),di=D("instantResults/updateQuery",e=>B(e,AC)),c$=D("instantResults/clearExpired",e=>B(e,Ls));d();c();l();u();var pi=new J({required:!0,min:0}),fi=D("pagination/registerNumberOfResults",e=>B(e,pi)),mi=D("pagination/updateNumberOfResults",e=>B(e,pi)),gi=D("pagination/registerPage",e=>B(e,pi)),Pt=D("pagination/updatePage",e=>B(e,pi)),yi=D("pagination/nextPage"),hi=D("pagination/previousPage");d();c();l();u();var Tt=D("query/updateQuery",e=>B(e,{q:new H,enableQuerySyntax:new te}));d();c();l();u();var Ur=(e,t,r)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??mt(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&&_o(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();d();c();l();u();var Ft=/*#__PURE__*/function(){var _ref27=_asyncToGenerator(function*(e,t){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??mt(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:Ze.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 qo(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 Ft(_x61,_x62){return _ref27.apply(this,arguments)}}();d();c();l();u();d();c();l();u();var kt=()=>({cq:"",cqWasSet:!1,aq:"",aqWasSet:!1,lq:"",lqWasSet:!1,dq:"",dqWasSet:!1,defaultFilters:{cq:"",aq:"",lq:"",dq:""}});var Us=()=>Me("search/logFetchMoreResults",e=>e.makeFetchMoreResults()),Ot=e=>Me("search/queryError",(t,r)=>t.makeQueryError({query:r.query?.q||_e().q,aq:r.advancedSearchQueries?.aq||kt().aq,cq:r.advancedSearchQueries?.cq||kt().cq,dq:r.advancedSearchQueries?.dq||kt().dq,errorType:e.type,errorMessage:e.message}));d();c();l();u();d();c();l();u();var uH=D("didYouMean/enable"),lH=D("didYouMean/disable"),dH=D("didYouMean/automaticCorrections/disable"),pH=D("didYouMean/automaticCorrections/enable"),Si=D("didYouMean/correction",e=>B(e,G)),fH=D("didYouMean/automaticCorrections/mode",e=>B(e,new H({constrainTo:["next","legacy"],emptyAllowed:!1,required:!0})));d();c();l();u();var Bs=()=>Me("analytics/didyoumean/automatic",e=>e.makeDidYouMeanAutomatic());var Vp=()=>({actionCause:"didYouMeanAutomatic"});d();c();l();u();d();c();l();u();function Lp(){return{freezeFacetOrder:!1,facets:{}}}d();c();l();u();function Up(){return[]}d();c();l();u();function On(){return{firstResult:0,defaultNumberOfResults:10,numberOfResults:10,totalCountFiltered:0}}d();c();l();u();function Bp(){return{}}d();c();l();u();function Qp(){return{}}d();c();l();u();function $p(){return{}}function rt(e){return{context:e.context||ti(),dictionaryFieldContext:e.dictionaryFieldContext||ni(),facetSet:e.facetSet||Oo(),numericFacetSet:e.numericFacetSet||ko(),dateFacetSet:e.dateFacetSet||Fo(),categoryFacetSet:e.categoryFacetSet||To(),automaticFacetSet:e.automaticFacetSet??Po(),pagination:e.pagination||On(),query:e.query||_e(),tabSet:e.tabSet||$p(),advancedSearchQueries:e.advancedSearchQueries||kt(),staticFilterSet:e.staticFilterSet||Qp(),querySet:e.querySet||Bp(),sortCriteria:e.sortCriteria||Do(),pipeline:e.pipeline||mr(),searchHub:e.searchHub||wr(),facetOptions:e.facetOptions||Lp(),facetOrder:e.facetOrder??Up(),debug:e.debug??uo()}}d();c();l();u();var Tz=new K({values:{undoneQuery:we},options:{required:!0}}),Hp=()=>Me("analytics/trigger/query",(e,t)=>t.triggers?.queryModification.newQuery?e.makeTriggerQuery():null);d();c();l();u();var vi=D("trigger/query/ignore",e=>B(e,new H({emptyAllowed:!0,required:!0}))),Ci=D("trigger/query/modification",e=>B(e,new K({values:{originalQuery:Ae,modification:Ae}})));d();c();l();u();var Dt=/*#__PURE__*/function(){var _ref28=_asyncToGenerator(function*(e,t){let r=RC(e),n=Ho(e),o=wC(e),i=yield Ft(e,t),a=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return xt({...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 Dt(_x63,_x64){return _ref28.apply(this,arguments)}}();function wC(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(xC).filter(r=>r.currentValues.length>0):void 0}function xC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function RC(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=EC(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function EC(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 qt=class{constructor(t,r=n=>{this.dispatch(Tt({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI(_x65,_x66){var _this10=this;return _asyncToGenerator(function*({mappings:t,request:r},n){let o=Date.now(),i=Qo(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 ke(t.response)?(this.dispatch(Ot(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(rt(_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 ke(i.response)?(_this13.dispatch(Ot(i.response.error)),_this13.rejectWithValue(i.response.error)):(_this13.logOriginalAnalyticsQueryBeforeAutoCorrection(t),_this13.dispatch(Xe(rt(_this13.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r,analyticsAction:Bs()})})()}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:Bs()}}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(vi("")),null;_this14.analyticsAction&&(yield _this14.dispatch(_this14.analyticsAction));let i=_this14.getCurrentQuery(),a=yield _this14.automaticallyRetryQueryWithTriggerModification(n);return ke(a.response)?(_this14.dispatch(Ot(a.response.error)),_this14.rejectWithValue(a.response.error)):(_this14.dispatch(Xe(rt(_this14.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i,analyticsAction:Hp()})})()}getStateAfterResponse(t,r,n,o){return{...n,query:{q:t,enableQuerySyntax:n.query?.enableQuerySyntax??_e().enableQuerySyntax},search:{...Ge(),duration:r,response:o,results:o.results}}}processSuccessResponse(t){return this.dispatch(Xe(rt(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 Dt(_this15.getState()),{origin:"mainSearch"});return _this15.dispatch(Si(t)),r})()}automaticallyRetryQueryWithTriggerModification(t){var _this16=this;return _asyncToGenerator(function*(){return _this16.dispatch(Ci({newQuery:t,originalQuery:_this16.getCurrentQuery()})),_this16.onUpdateQueryForCorrection(t),yield _this16.fetchFromAPI(yield Dt(_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 DW=ue("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;B(e,{q:new H,enableQuerySyntax:new te,clearFilters:new te}),e.clearFilters&&(r(Vr()),r(ii())),r(ui({allow:!0})),r(Tt({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Pt(1))}),qW=ue("search/executeSearch",/*#__PURE__*/function(){var _ref29=_asyncToGenerator(function*(e,t){let r=t.getState();return yield bi(r,t,e)});return function(_x67,_x68){return _ref29.apply(this,arguments)}}()),MW=ue("search/fetchPage",/*#__PURE__*/function(){var _ref30=_asyncToGenerator(function*(e,t){let r=t.getState();return yield $s(r,t,e)});return function(_x69,_x70){return _ref30.apply(this,arguments)}}()),jW=ue("search/fetchMoreResults",/*#__PURE__*/function(){var _ref31=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Hs(t,r)});return function(_x71,_x72){return _ref31.apply(this,arguments)}}()),NW=ue("search/fetchFacetValues",/*#__PURE__*/function(){var _ref32=_asyncToGenerator(function*(e,t){let r=t.getState();return yield FC(t,e,r)});return function(_x73,_x74){return _ref32.apply(this,arguments)}}()),_W=ue("search/fetchInstantResults",/*#__PURE__*/function(){var _ref33=_asyncToGenerator(function*(e,t){return Qs(e,t)});return function(_x75,_x76){return _ref33.apply(this,arguments)}}()),IC=/*#__PURE__*/function(){var _ref34=_asyncToGenerator(function*(e,t){let r=yield Dt(e,t);return r.request={...r.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},r});return function IC(_x77,_x78){return _ref34.apply(this,arguments)}}(),PC=/*#__PURE__*/function(){var _ref35=_asyncToGenerator(function*(e,t,r){let n=yield Ft(e);return xt({...n,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:r,q:t})});return function PC(_x79,_x80,_x81){return _ref35.apply(this,arguments)}}(),TC=/*#__PURE__*/function(){var _ref36=_asyncToGenerator(function*(e,t){let r=yield Dt(e,t);return r.request.numberOfResults=0,r});return function TC(_x82,_x83){return _ref36.apply(this,arguments)}}(),zp=e=>{e.configuration.analytics.enabled&&Ze.getInstance().addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})};function Qs(_x84,_x85){return _Qs.apply(this,arguments)}function _Qs(){_Qs=_asyncToGenerator(function*(e,t){B(e,{id:G,q:G,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:r,maxResultsPerQuery:n}=e,o=t.getState(),i=new qt({...t,analyticsAction:Np()},p=>{t.dispatch(di({q:p,id:e.id}))}),a=yield PC(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 _Qs.apply(this,arguments)}function $s(_x86,_x87,_x88){return _$s.apply(this,arguments)}function _$s(){_$s=_asyncToGenerator(function*(e,t,r){zp(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 qt({...t,analyticsAction:r}),f=yield Dt(e,a),p=yield m.fetchFromAPI(f,{origin:"mainSearch"});return yield m.process(p)});return _$s.apply(this,arguments)}function Hs(_x89,_x90){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 qt({...e,analyticsAction:Us()}),m=yield IC(t,i),f=yield a.fetchFromAPI(m,{origin:"mainSearch"});return yield a.process(f)});return _Hs.apply(this,arguments)}function FC(_x91,_x92,_x93){return _FC.apply(this,arguments)}function _FC(){_FC=_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 qt({...e,analyticsAction:t}),f=yield TC(r,a),p=yield m.fetchFromAPI(f,{origin:"facetValues"});return yield m.process(p)});return _FC.apply(this,arguments)}function bi(_x94,_x95,_x96){return _bi.apply(this,arguments)}function _bi(){_bi=_asyncToGenerator(function*(e,t,r){zp(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i});a?.actionCause&&t.dispatch(zs({actionCause:a.actionCause}));let m=yield Dt(e,a),f=new qt({...t,analyticsAction:r}),p=yield f.fetchFromAPI(m,{origin:"mainSearch"});return yield f.process(p)});return _bi.apply(this,arguments)}d();c();l();u();d();c();l();u();var Mt=/*#__PURE__*/function(){var _ref37=_asyncToGenerator(function*(e,t,r){let n=NC(e),o=kC(e),i=OC(e),a=e.configuration.analytics.analyticsMode==="legacy"?yield Ft(e,r):Ur(e,t,r),m=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return xt({...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:m(),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 Mt(_x97,_x98,_x99){return _ref37.apply(this,arguments)}}();function kC(e){return fs(qC(e),e.facetOrder??[])}function OC(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(DC).filter(r=>r.currentValues.length>0):void 0}function DC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function qC(e){return MC(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function MC(e){return[...jC(e.facetSet??{}),...Wp(e.numericFacetSet??{}),...Wp(e.dateFacetSet??{}),...Rt(e.categoryFacetSet??{})]}function jC(e){return Rt(e).map(t=>{let r=ms[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function Wp(e){return Rt(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 NC(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=$o(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}var jt=class{constructor(t,r=n=>{this.dispatch(Tt({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI(_x100,_x101){var _this17=this;return _asyncToGenerator(function*({mappings:t,request:r},n){let o=Date.now(),i=Qo(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 ke(t.response)?(this.dispatch(Ot(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(rt(_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 ke(i.response)?(_this20.dispatch(Ot(i.response.error)),_this20.rejectWithValue(i.response.error)):(_this20.dispatch(Xe(rt(_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(vi("")),null;let i=_this21.getCurrentQuery(),a=yield _this21.automaticallyRetryQueryWithTriggerModification(n);return ke(a.response)?(_this21.dispatch(Ot(a.response.error)),_this21.rejectWithValue(a.response.error)):(_this21.dispatch(Xe(rt(_this21.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i})})()}processSuccessResponse(t){return this.dispatch(Xe(rt(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}=Vp(),o=yield _this22.fetchFromAPI(yield Mt(r,_this22.extra.navigatorContext,{actionCause:n}),{origin:"mainSearch"});return _this22.dispatch(Si(t)),o})()}automaticallyRetryQueryWithTriggerModification(t){var _this23=this;return _asyncToGenerator(function*(){return _this23.dispatch(Ci({newQuery:t,originalQuery:_this23.getCurrentQuery()})),_this23.onUpdateQueryForCorrection(t),yield _this23.fetchFromAPI(yield Mt(_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 M2=ue("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;B(e,{q:new H,enableQuerySyntax:new te,clearFilters:new te}),e.clearFilters&&(r(Vr()),r(ii())),r(ui({allow:!0})),r(Tt({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Pt(1))}),zs=D("search/updateSearchAction"),Gp=ue("search/executeSearch",/*#__PURE__*/function(){var _ref38=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return bi(r,t,e.legacy);Kp(r);let n=e.next?Yp(e.next):void 0;t.dispatch(zs(e.next));let o=yield Mt(r,t.extra.navigatorContext,n),i=new jt({...t,analyticsAction:n??{}}),a=yield i.fetchFromAPI(o,{origin:"mainSearch"});return yield i.process(a)});return function(_x102,_x103){return _ref38.apply(this,arguments)}}()),j2=ue("search/fetchPage",/*#__PURE__*/function(){var _ref39=_asyncToGenerator(function*(e,t){let r=t.getState();if(Kp(r),r.configuration.analytics.analyticsMode==="legacy"||!e.next)return $s(r,t,e.legacy);let n=new jt({...t,analyticsAction:e.next}),o=yield Mt(r,t.extra.navigatorContext,e.next),i=yield n.fetchFromAPI(o,{origin:"mainSearch"});return yield n.process(i)});return function(_x104,_x105){return _ref39.apply(this,arguments)}}()),N2=ue("search/fetchMoreResults",/*#__PURE__*/function(){var _ref40=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Hs(t,r);let n=vl("browseResults",t.getState),o=new jt({...t,analyticsAction:n}),i=yield _C(r,t.extra.navigatorContext,n),a=yield o.fetchFromAPI(i,{origin:"mainSearch"});return yield o.process(a)});return function(_x106,_x107){return _ref40.apply(this,arguments)}}()),_2=ue("search/fetchFacetValues",/*#__PURE__*/function(){var _ref41=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return bi(r,t,e.legacy);let n=new jt({...t,analyticsAction:{}}),o=yield LC(r,t.extra.navigatorContext),i=yield n.fetchFromAPI(o,{origin:"facetValues"});return yield n.process(i)});return function(_x108,_x109){return _ref41.apply(this,arguments)}}()),V2=ue("search/fetchInstantResults",/*#__PURE__*/function(){var _ref42=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Qs(e,t);B(e,{id:G,q:G,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:n,maxResultsPerQuery:o}=e,i=Yp(_p()),a=yield VC(r,t.extra.navigatorContext,n,o,i),m=new jt({...t,analyticsAction:i},y=>{t.dispatch(di({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(_x110,_x111){return _ref42.apply(this,arguments)}}()),_C=/*#__PURE__*/function(){var _ref43=_asyncToGenerator(function*(e,t,r){let n=yield Mt(e,t,r);return n.request={...n.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},n});return function _C(_x112,_x113,_x114){return _ref43.apply(this,arguments)}}(),VC=/*#__PURE__*/function(){var _ref44=_asyncToGenerator(function*(e,t,r,n,o){let i=Ur(e,t,o);return xt({...i,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:n,q:r})});return function VC(_x115,_x116,_x117,_x118,_x119){return _ref44.apply(this,arguments)}}(),LC=/*#__PURE__*/function(){var _ref45=_asyncToGenerator(function*(e,t,r){let n=yield Mt(e,t,r);return n.request.numberOfResults=0,n});return function LC(_x120,_x121,_x122){return _ref45.apply(this,arguments)}}(),Kp=e=>{e.configuration.analytics.enabled&&Ze.getInstance().addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})},Yp=e=>({actionCause:e.actionCause,type:e.actionCause});var Jp=ge(On(),e=>{e.addCase(fi,(t,r)=>{let n=Ws(t),o=r.payload;t.defaultNumberOfResults=t.numberOfResults=o,t.firstResult=Dn(n,o)}).addCase(mi,(t,r)=>{t.numberOfResults=r.payload,t.firstResult=0}).addCase(Yo,t=>{t.firstResult=0}).addCase(gi,(t,r)=>{let n=r.payload;t.firstResult=Dn(n,t.numberOfResults)}).addCase(Pt,(t,r)=>{let n=r.payload;t.firstResult=Dn(n,t.numberOfResults)}).addCase(hi,t=>{let r=Ws(t),n=Math.max(r-1,1);t.firstResult=Dn(n,t.numberOfResults)}).addCase(yi,t=>{let r=Ws(t),n=BC(t),o=Math.min(r+1,n);t.firstResult=Dn(o,t.numberOfResults)}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.numberOfResults=r.payload.pagination.numberOfResults,t.firstResult=r.payload.pagination.firstResult)}).addCase(vt,(t,r)=>{t.firstResult=r.payload.firstResult??t.firstResult,t.numberOfResults=r.payload.numberOfResults??t.defaultNumberOfResults}).addCase(Gp.fulfilled,(t,r)=>{let{response:n}=r.payload;t.totalCountFiltered=n.totalCountFiltered}).addCase(ai,t=>{Ie(t)}).addCase(kp,t=>{Ie(t)}).addCase(xp,t=>{Ie(t)}).addCase(Mp,t=>{Ie(t)}).addCase(Cp,t=>{Ie(t)}).addCase(wp,t=>{Ie(t)}).addCase(yp,t=>{Ie(t)}).addCase(gp,t=>{Ie(t)}).addCase(hp,t=>{Ie(t)}).addCase(Fp,t=>{Ie(t)}).addCase(qp,t=>{Ie(t)}).addCase(Vr,t=>{Ie(t)}).addCase(Op,t=>{Ie(t)}).addCase(jp,t=>{Ie(t)}).addCase(vp,t=>{Ie(t)}).addCase(mp,t=>{Ie(t)})});function Ie(e){e.firstResult=On().firstResult}function Ws(e){let{firstResult:t,numberOfResults:r}=e;return QC(t,r)}function BC(e){let{totalCountFiltered:t,numberOfResults:r}=e;return $C(t,r)}function Dn(e,t){return(e-1)*t}function QC(e,t){return Math.round(e/t)+1}function $C(e,t){let r=Math.min(e,5e3);return Math.ceil(r/t)}function Gs(e){return e.addReducers({pagination:Jp}),{nextPage:yi,previousPage:hi,registerNumberOfResults:fi,registerPage:gi,updateNumberOfResults:mi,updatePage:Pt}}var HC=new Fe({id:new H({emptyAllowed:!0,required:!1,default:""}),numberOfRecommendations:new J({min:0})});function Xp(e,t={}){if(!zC(e))throw We;let r=It(e),{dispatch:n}=e,o=()=>e.state,i=bu(e,HC,t.options,"buildRecommendationList");return i.id!==""&&n(Er({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 zC(e){return e.addReducers({recommendation:Ir,configuration:ze}),!0}d();c();l();u();d();c();l();u();function Zp(e,t,r){if(!WC(e))throw We;let n=1e3,o={selectionDelay:n,debounceWait:n,...t.options},i;return{select:Xo(r,o.debounceWait,{isImmediate:!0}),beginDelayedSelect(){i=setTimeout(r,o.selectionDelay)},cancelPendingSelect(){i&&clearTimeout(i)}}}function WC(e){return e.addReducers({configuration:ze}),!0}function ef(e,t){let r=!1,n=()=>{r||(r=!0,e.dispatch(No(t.options.result)))};return Zp(e,t,()=>{n()})}d();c();l();u();d();c();l();u();d();c();l();u();var Nt=()=>new H({required:!1,emptyAllowed:!0}),Ai=D("advancedSearchQueries/update",e=>B(e,{aq:Nt(),cq:Nt(),lq:Nt(),dq:Nt()})),wi=D("advancedSearchQueries/register",e=>B(e,{aq:Nt(),cq:Nt(),lq:Nt(),dq:Nt()}));var tf=ge(kt(),e=>{e.addCase(Ai,(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(wi,(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(vt,(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 GC(e){return e.addReducers({advancedSearchQueries:tf}),{updateAdvancedSearchQueries:Ai,registerAdvancedSearchQueries:wi}}d();c();l();u();function KC(e){return e.addReducers({configuration:ze}),{disableAnalytics:dr,enableAnalytics:pr,setOriginLevel2:io,setOriginLevel3:ao,updateAnalyticsConfiguration:lr,updateBasicConfiguration:St}}d();c();l();u();function YC(e){return e.addReducers({configuration:ze,pipeline:gr,searchHub:Tr}),{updateSearchConfiguration:Je}}d();c();l();u();function JC(e){return e.addReducers({context:ri}),{addContext:Yt,removeContext:Jt,setContext:Kt}}d();c();l();u();function XC(e){return e.addReducers({debug:lo}),{disableDebug:co,enableDebug:so}}d();c();l();u();function ZC(e){return e.addReducers({dictionaryFieldContext:oi}),{addContext:Nr,removeContext:_r,setContext:jr}}d();c();l();u();d();c();l();u();d();c();l();u();var eb={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})},rf=D("folding/register",e=>B(e,eb)),c3=ue("folding/loadCollection",/*#__PURE__*/function(){var _ref46=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}}){let i=t(),a=i.configuration.analytics.analyticsMode==="legacy"?yield Ft(i):Ur(i,o),m=yield n.search({...a,q:tb(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 ke(m)?r(m.error):{collectionId:e,results:m.success.results,searchUid:m.success.searchUid,rootResult:i.folding.collections[e].result}});return function(_x123,_x124){return _ref46.apply(this,arguments)}}());function tb(e){return e.query.q===""?"":e.query.enableQuerySyntax?`${e.query.q} OR @uri`:`( <@- ${e.query.q} -@> ) OR @uri`}d();c();l();u();var nf=()=>({enabled:!1,fields:{collection:"foldingcollection",parent:"foldingparent",child:"foldingchild"},filterFieldRange:2,collections:{}});d();c();l();u();var Br=D("fields/registerFieldsToInclude",e=>B(e,oo)),xi=D("fields/fetchall/enable"),Ri=D("fields/fetchall/disable"),Ei=ue("fields/fetchDescription",/*#__PURE__*/function(){var _ref47=_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??mt(m,a)});return ke(p)?n(p.error):p.success.fields});return function(_x125,_x126){return _ref47.apply(this,arguments)}}());d();c();l();u();var Ii=["author","language","urihash","objecttype","collection","source","permanentid"],Ks=[...Ii,"date","filetype","parents"],of=[...Ks,"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"],af=()=>({fieldsToInclude:Ii,fetchAllFields:!1,fieldsDescription:[]});var Pi=ge(af(),e=>e.addCase(Br,(t,r)=>{t.fieldsToInclude=[...new Set(t.fieldsToInclude.concat(r.payload))]}).addCase(xi,t=>{t.fetchAllFields=!0}).addCase(Ri,t=>{t.fetchAllFields=!1}).addCase(Ei.fulfilled,(t,{payload:r})=>{t.fieldsDescription=r}).addCase(rf,(t,{payload:r})=>{let n=nf().fields;t.fieldsToInclude.push(r.collectionField??n.collection,r.parentField??n.parent,r.childField??n.child)}));function rb(e){return e.addReducers({fields:Pi}),{registerFieldsToInclude:Br,enableFetchAllFields:xi,disableFetchAllFields:Ri,fetchFieldsDescription:Ei}}d();c();l();u();function nb(e){return e.addReducers({pipeline:gr}),{setPipeline:fr}}d();c();l();u();function ob(e){return e.addReducers({recommendation:Ir}),{getRecommendations:At,setRecommendationId:Er}}d();c();l();u();function ib(e){return e.addReducers({}),{logRecommendationOpen:No}}d();c();l();u();d();c();l();u();var ab=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:G})});function sf(){let e=[],t=r=>{let n=ab.validate(r);if(!r.conditions.every(i=>i instanceof Function))throw new Kr("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 cf(e){if(!sb(e))throw We;let{registerTemplates:t,selectTemplate:r,selectLinkTemplate:n}=sf();return{registerTemplates:(...o)=>{t(...o);let i=[];o.forEach(a=>{a.fields&&i.push(...a.fields)}),e.dispatch(Br(i))},selectTemplate:r,selectLinkTemplate:n}}function sb(e){return e.addReducers({fields:Pi}),!0}d();c();l();u();function cb(e){return e.addReducers({searchHub:Tr}),{setSearchHub:Pr}}/**
30
+ `;function Jy(){return typeof navigator<"u"&&navigator.product=="ReactNative"}var Xy=["1",1,"yes",!0];function Co(){let e=[];return ha()&&e.push(window.doNotTrack),Fa()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(t=>Xy.indexOf(t)!==-1)}var Ku="v15",Yu={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 Zy(e=Yu.default,t=Ku,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 eh="38824e1f-37f5-42d3-8372-a4b8fa9df946",et=class{get defaultOptions(){return{endpoint:Yu.default,isCustomEndpoint:!1,token:"",version:Ku,beforeSendHooks:[],afterSendHooks:[]}}get version(){return Hu}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=[Bg,Ng].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};Co()?this.runtime=new vo: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 ha()&&hr()?new Pa(t,()=>{let r=[...this.bufferedRequests];return this.bufferedRequests=[],r}):(Jy()&&console.warn(Yy),new Ta(t))}get storage(){return this.runtime.storage}determineVisitorId(){return q(this,void 0,void 0,function*(){try{return ha()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||Ht()}catch(t){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),Ht()}})}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(go(t))this.setCurrentVisitorId(t.toLowerCase());else{if(!r)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(Ou(t,Ou(r,eh)))}})}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(Ht()),this.visitorId}set currentVisitorId(t){this.visitorId=t,this.storage.setItem("visitorId",t)}extractClientIdFromLink(t){if(Co())return null;try{let r=new URL(t).searchParams.get(Ct.cvo_cid);if(r==null)return null;let n=Ct.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?Ly(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 mo().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.search,t)})}sendSearchEvent(t){var{searchQueryUid:r}=t,n=ct(t,["searchQueryUid"]);return q(this,void 0,void 0,function*(){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){var{searchQueryUid:r}=t,n=ct(t,["searchQueryUid"]);return q(this,void 0,void 0,function*(){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){var{lastSearchQueryUid:r}=t,n=ct(t,["lastSearchQueryUid"]);return q(this,void 0,void 0,function*(){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($y(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=ct(t,["custom"]),o={};r&&fo(r)&&(o=this.lowercaseKeys(r));let i=Hy(n);return Object.assign(Object.assign({},o),i)}mapCustomParametersToCustomData(t){let{custom:r}=t,n=ct(t,["custom"]);if(r&&fo(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=ct(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=ct(t,["userId"]);return Ky(this.options.token)&&!r?(n.userId="anonymous",n):t}setTrackingIdIfTrackingIdNotPresent(t){let{trackingId:r}=t,n=ct(t,["trackingId"]);return r?t:(n.hasOwnProperty("custom")&&fo(n.custom)&&(n.custom.hasOwnProperty("context_website")||n.custom.hasOwnProperty("siteName"))&&(n.trackingId=n.custom.context_website||n.custom.siteName),n.hasOwnProperty("customData")&&fo(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"?ny(t,r):t}get baseUrl(){return Zy(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}},ut;(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"})(ut||(ut={}));var M;(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"})(M||(M={}));var Vu={[M.triggerNotify]:"queryPipelineTriggers",[M.triggerExecute]:"queryPipelineTriggers",[M.triggerQuery]:"queryPipelineTriggers",[M.triggerRedirect]:"queryPipelineTriggers",[M.queryError]:"errors",[M.queryErrorBack]:"errors",[M.queryErrorClear]:"errors",[M.queryErrorRetry]:"errors",[M.pagerNext]:"getMoreResults",[M.pagerPrevious]:"getMoreResults",[M.pagerNumber]:"getMoreResults",[M.pagerResize]:"getMoreResults",[M.pagerScrolling]:"getMoreResults",[M.facetSearch]:"facet",[M.facetShowLess]:"facet",[M.facetShowMore]:"facet",[M.recommendation]:"recommendation",[M.likeSmartSnippet]:"smartSnippet",[M.dislikeSmartSnippet]:"smartSnippet",[M.expandSmartSnippet]:"smartSnippet",[M.collapseSmartSnippet]:"smartSnippet",[M.openSmartSnippetFeedbackModal]:"smartSnippet",[M.closeSmartSnippetFeedbackModal]:"smartSnippet",[M.sendSmartSnippetReason]:"smartSnippet",[M.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[M.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[M.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[M.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[M.clearRecentQueries]:"recentQueries",[M.recentResultClick]:"recentlyClickedDocuments",[M.clearRecentResults]:"recentlyClickedDocuments",[M.showLessFoldedResults]:"folding",[M.caseDetach]:"case",[M.likeGeneratedAnswer]:"generatedAnswer",[M.dislikeGeneratedAnswer]:"generatedAnswer",[M.openGeneratedAnswerSource]:"generatedAnswer",[M.generatedAnswerStreamEnd]:"generatedAnswer",[M.generatedAnswerSourceHover]:"generatedAnswer",[M.generatedAnswerCopyToClipboard]:"generatedAnswer",[M.generatedAnswerHideAnswers]:"generatedAnswer",[M.generatedAnswerShowAnswers]:"generatedAnswer",[M.generatedAnswerExpand]:"generatedAnswer",[M.generatedAnswerCollapse]:"generatedAnswer",[M.generatedAnswerFeedbackSubmit]:"generatedAnswer",[M.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[ut.expandToFullUI]:"interface",[ut.openUserActions]:"User Actions",[ut.showPrecedingSessions]:"User Actions",[ut.showFollowingSessions]:"User Actions",[ut.clickViewedDocument]:"User Actions",[ut.clickPageView]:"User Actions",[ut.createArticle]:"createArticle"},Cr=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(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 Hu}};function th(e){let t="";return e.filter(r=>{let n=r!==t;return t=r,n})}function rh(e){return e.map(t=>t.replace(/;/g,""))}function Ju(e){let r=e.join(";");return r.length<=256?r:Ju(e.slice(1))}var Lu=e=>{let t=rh(e),r=th(t);return Ju(r)};function Uu(e){let t=typeof e.partialQueries=="string"?e.partialQueries:Lu(e.partialQueries),r=typeof e.suggestions=="string"?e.suggestions:Lu(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}var bo=class{constructor(t,r){this.opts=t,this.provider=r;let n=t.enableAnalytics===!1||Co();this.coveoAnalyticsClient=n?new Cr:new et(t)}disable(){this.coveoAnalyticsClient=new Cr}enable(){this.coveoAnalyticsClient=new et(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(M.interfaceLoad)}logInterfaceLoad(){return q(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(M.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return q(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return q(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(M.didyoumeanClick)}logDidYouMeanClick(){return q(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(t){return this.makeSearchEvent(M.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(M.searchboxSubmit)}logSearchboxSubmit(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(M.searchboxClear)}logSearchboxClear(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(M.searchboxAsYouType)}logSearchboxAsYouType(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(t){return this.makeSearchEvent(M.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(M.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(M.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(M.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(M.omniboxAnalytics,Uu(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(M.omniboxFromLink,Uu(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(M.searchFromLink)}logSearchFromLink(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(t){return this.makeCustomEvent(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.pagerScrolling)}logPagerScrolling(){return q(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(t){return this.makeSearchEvent(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.queryErrorBack);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(M.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(M.queryErrorRetry);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(M.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(M.queryErrorClear);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(M.queryErrorClear)})}})}logQueryErrorClear(){return q(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(M.likeSmartSnippet)}logLikeSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(M.dislikeSmartSnippet)}logDislikeSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(M.expandSmartSnippet)}logExpandSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(M.collapseSmartSnippet)}logCollapseSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(M.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.openSmartSnippetSuggestionSource,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}makeCopyToClipboard(t,r){return this.makeClickEvent(M.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(M.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(M.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(M.recentQueryClick)}logRecentQueryClick(){return q(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(M.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(M.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(M.clearRecentResults)}logClearRecentResults(){return q(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(M.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(M.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(M.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,n=Vu[t]){return q(this,void 0,void 0,function*(){this.coveoAnalyticsClient.getParameters;let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),r),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:n,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEvent(t,r,n=Vu[t]){return q(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(t,r,n)).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){var n,o;return q(this,void 0,void 0,function*(){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 et?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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.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(M.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return q(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(t){return this.makeCustomEvent(M.generatedAnswerStreamEnd,t)}logGeneratedAnswerStreamEnd(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(t)).log({searchUID:this.provider.getSearchUID()})})}},Ao=Object.assign({},dn),Bu=Object.keys(Ao).map(e=>Ao[e]),Sr=class extends Ca{constructor({client:t,uuidGenerator:r=Ht}){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(Ao.pageview,{newEventType:ae.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addHooksForEvent(){this.client.addEventTypeMapping(Ao.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 cy(this.ticket)}};Sr.Id="svc";var wo;(function(e){e.click="click",e.flowStart="flowStart"})(wo||(wo={}));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 xo;(function(e){e.quit="Quit",e.solved="Solved"})(xo||(xo={}));var Ro=class{constructor(t,r){var n;this.options=t,this.provider=r;let o=((n=t.enableAnalytics)!==null&&n!==void 0?n:!0)&&!Co();this.coveoAnalyticsClient=o?new et(t):new Cr,this.svc=new Sr({client:this.coveoAnalyticsClient})}disable(){this.coveoAnalyticsClient=new Cr,this.svc=new Sr({client:this.coveoAnalyticsClient})}enable(){this.coveoAnalyticsClient=new et(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:xo.quit}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseSolved(t){return this.svc.setAction(Ue.caseSolved,{reason:xo.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",wo.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}sendClickEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",wo.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}getBaseEventRequest(t){var r,n;return q(this,void 0,void 0,function*(){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 et?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){var i,a;return q(this,void 0,void 0,function*(){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 Xu=e=>new et(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 Eo(){return{desiredCount:5,numberOfValues:8,set:{}}}d();c();l();u();d();c();l();u();d();c();l();u();function Zu(e){let{activeValue:t,ancestryMap:r}=nh(e);return t?oh(t,r):[]}function nh(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 oh(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}var ih=(e,t)=>e.categoryFacetSet[t]?.request;var Da=(e,t)=>{let r=ih(e,t);return Zu(r?.currentValues??[])};d();c();l();u();function Io(){return{}}d();c();l();u();function Po(){return{}}d();c();l();u();function To(){return{}}d();c();l();u();function Fo(){return{}}function qa(e){return{facetSet:e.facetSet??Fo(),categoryFacetSet:e.categoryFacetSet??Io(),dateFacetSet:e.dateFacetSet??Po(),numericFacetSet:e.numericFacetSet??To(),automaticFacetSet:e.automaticFacetSet??Eo()}}var Ma=e=>{let t=[];return ch(e).forEach((r,n)=>{let o=yh(e,r.facetId),i=mh(r,n+1);if(sh(r)){if(!!!Da(e,r.facetId).length)return;t.push({...i,...ph(e,r.facetId),facetType:o,state:"selected"});return}r.currentValues.forEach((a,m)=>{if(a.state==="idle")return;let f=el(a,m+1,o),p=ah(r)?tl(a):lh(a);t.push({...i,...f,...p})})}),uh(e).forEach((r,n)=>{let o=fh(r,n+1);r.values.forEach((i,a)=>{if(i.state==="idle")return;let m=el(i,a+1,"specific"),f=tl(i);t.push({...o,...m,...f})})}),t},ah=e=>e.type==="specific",sh=e=>e.type==="hierarchical",ch=e=>[...Object.values(e.facetSet),...Object.values(e.categoryFacetSet),...Object.values(e.dateFacetSet),...Object.values(e.numericFacetSet)].map(t=>t.request),uh=e=>[...Object.values(e.automaticFacetSet.set)].map(t=>t.response),el=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),lh=e=>({displayValue:`${e.start}..${e.end}`,value:`${e.start}..${e.end}`,start:e.start,end:e.end,endInclusive:e.endInclusive}),tl=e=>({displayValue:e.value,value:e.value}),dh=(e,t)=>Da(e,t).map(n=>n.value).join(";"),ph=(e,t)=>{let n=dh(e,t);return{value:n,valuePosition:1,displayValue:n}},fh=(e,t)=>({title:rl(e.field,e.field),field:e.field,id:e.field,facetPosition:t}),mh=(e,t)=>({title:rl(e.field,e.facetId),field:e.field,id:e.facetId,facetPosition:t}),rl=(e,t)=>`${e}_${t}`,gh=(e,t)=>e.facetSet[t]?.request||e.categoryFacetSet[t]?.request||e.dateFacetSet[t]?.request||e.numericFacetSet[t]?.request||e.automaticFacetSet.set[t]?.response,yh=(e,t)=>{let r=gh(e,t);return r?r.type:"specific"};d();c();l();u();var _e=()=>({q:"",enableQuerySyntax:!1});d();c();l();u();d();c();l();u();var nl=(r=>(r.Ascending="ascending",r.Descending="descending",r))(nl||{}),ol=(i=>(i.Relevancy="relevancy",i.QRE="qre",i.Date="date",i.Field="field",i.NoSort="nosort",i))(ol||{}),ja=e=>{if(gc(e))return e.map(t=>ja(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""}},il=()=>({by:"relevancy"});var hT=new K({values:{by:new ji({enum:ol,required:!0}),order:new ji({enum:nl}),field:new H}});function ko(){return ja(il())}d();c();l();u();d();c();l();u();var br=()=>"default";var hh=e=>{let t=e.configuration.search.locale.split("-")[0];return!t||t.length!==2?"en":t},lt=class{constructor(t){this.getState=t;le(this,"state");this.state=t()}getLanguage(){return hh(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||br()}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 lt{constructor(){super(...arguments);le(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 Ma(qa(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||Ge().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=r.search?.response?.extendedResults?.generativeQuestionAnsweringId;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??ko()}}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||_e().q}get responseTime(){return this.state.search?.duration||Ge().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||Ge().response.totalCountFiltered}};le(yn,"fallbackPipelineName","default");var bt=yn,al=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new bt(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 bo({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},Na=()=>{let t=Ze.getInstance().getHistory().reverse().find(r=>r.name==="PageView"&&r.value);return t?t.value:""};var Oo=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(e,t){let r=e.analyticsMode==="next";return{analytics:{clientId:yield Xu(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}),...(Na()&&{pageId:Na()}),...(r&&e.trackingId&&{trackingId:e.trackingId}),capture:r,...(r&&{source:yr(e)})}}});return function Oo(_x9,_x0){return _ref7.apply(this,arguments)}}();d();c();l();u();d();c();l();u();d();c();l();u();var Ar=()=>({duration:0,error:null,isLoading:!1,id:"Recommendation",recommendations:[],searchUid:"",splitTestRun:"",pipeline:""});var hn=class extends lt{getPipeline(){return this.state.pipeline||this.state.recommendation?.pipeline||"default"}getSearchEventRequestPayload(){return{queryText:_e().q,responseTime:this.responseTime,results:this.mapResultsToAnalyticsDocument(),numberOfResults:this.numberOfResults}}getSearchUID(){return this.getState().recommendation?.searchUid||Ar().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||Ar().duration}mapResultsToAnalyticsDocument(){return this.state.recommendation?.recommendations.map(t=>({documentUri:t.uri,documentUriHash:t.raw.urihash}))}get numberOfResults(){return this.state.recommendation?.recommendations.length||Ar().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 sl=/^(?:[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 Sh(e){return typeof e=="string"&&sl.test(e)}var _a=Sh;d();c();l();u();var Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function cl(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 Va,vh=new Uint8Array(16);function La(){if(!Va){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Va=crypto.getRandomValues.bind(crypto)}return Va(vh)}d();c();l();u();d();c();l();u();var Ch=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ua={randomUUID:Ch};function bh(e,t,r){if(Ua.randomUUID&&!t&&!e)return Ua.randomUUID();e=e||{};let n=e.random??e.rng?.()??La();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 cl(n)}var Ba=bh;d();c();l();u();function ul(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function Ah({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 ll="visitorId";function wh(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(ll),o=n&&_a(n)?n:t.generateUUID();return r.setItem(ll,o),o}}}var pl="1.2.5";function xh(e){let{trackingId:t}=e;return{trackingId:t}}function Rh(e){return(e.source||[]).concat([`relay@${pl}`])}function fl(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,m=xh(t),f=n.getClientId();return Object.freeze({type:e,config:m,ts:Date.now(),source:Rh(t),clientId:f,userAgent:a(),referrer:o(),location:i()})}function Eh(e,t,r,n,o){return{...t,meta:fl(e,r,n,o)}}var Ih="*";function Ph(){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===Ih)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 dl({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 Th(e){let t=dl(e);return{get:()=>t,update:r=>{t=dl({...t,...r})}}}var Qa=Fh();function Fh(){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 kh(){return{getItem(e){return Qa.getItem(e)||localStorage.getItem(e)},removeItem(e){Qa.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Qa.setItem(e,t,31556952e3)}}}function Oh(){let e=document.referrer;return e===""?null:ml(e)}function ml(e){return e.slice(0,1024)}function Dh(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(ul().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:()=>Oh(),getLocation:()=>ml(window.location.href),getUserAgent:()=>navigator.userAgent,generateUUID:()=>Ba(),storage:kh()}}function qh(){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 Mh(){return{getItem(){return null},removeItem(){},setItem(){}}}function jh(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:Mh()}}function Nh(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=jh();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&_h()&&qh()?Dh():n}function _h(){try{return typeof window=="object"}catch{return!1}}function Vh(e){return{get:()=>Object.freeze(Nh(e))}}function gl(e){let t=Th(e),r=Ph(),n=Vh(t),o=wh(n);return{emit:(i,a)=>{let m=t.get(),f=n.get(),p=Eh(i,a,m,f,o);return Ah({config:m,environment:f,event:p,listenerManager:r})},getMeta:i=>fl(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}}var wr=pe(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>yr(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a)=>gl({mode:i?"emit":"disabled",url:o??Nn(e,t),token:r,trackingId:n??null,source:a}));d();c();l();u();var Sn=class extends lt{getSearchUID(){return this.state.documentSuggestion?.status.lastResponseId??""}},yl=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new Sn(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 Ro({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 hl(e,t){return{...new bt(t).getBaseMetadata(),actionCause:e,type:e}}function Lh(e){return Object.assign(e,{instantlyCallable:!0})}function Uh(e,t){let r=i=>Lh(de(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 Sl=(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 $h(i)}return n},Bh=e=>e.configuration.analytics.analyticsMode==="legacy",Qh=e=>e.configuration.analytics.analyticsMode==="next",$h=({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:o,analyticsConfigurator:i,providerClass:a})=>(r??(r=m=>new a(m)),Uh(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 T of h)yield T(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){Bh(x)&&(yield Hh(R,r,x,y,v.coveoAnalyticsClient))});return function(_x16){return _ref11.apply(this,arguments)}}());let{emit:P}=wr(g);return h.push(/*#__PURE__*/function(){var _ref12=_asyncToGenerator(function*(x){if(Qh(x)&&o&&n){let T=n(x);yield Xh(P,o,T)}});return function(_x17){return _ref12.apply(this,arguments)}}()),S});return function(_x14){return _ref1.apply(this,arguments)}}()));function Hh(_x18,_x19,_x20,_x21,_x22){return _Hh.apply(this,arguments)}function _Hh(){_Hh=_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 _Hh.apply(this,arguments)}var zh=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)}}()}),Me=Sl(al,e=>e,bt),vO=Sl(yl,zh("caseAssist"),Sn);var $a=(e,t)=>{let r=t.recommendation?.recommendations.findIndex(({uniqueId:n})=>e.uniqueId===n)||0;return Wh(e,r,t)};function Wh(e,t,r){let n=e.raw.collection;return{collectionName:typeof n=="string"?n:"default",documentAuthor:Yh(e),documentPosition:t+1,documentTitle:e.title,documentUri:e.uri,documentUriHash:e.raw.urihash,documentUrl:e.clickUri,rankingModifier:e.rankingModifier||"",sourceName:Jh(e),queryPipeline:r.pipeline||pr()}}var Do=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||""}),vl={urihash:new H,sourcetype:new H,permanentid:new H},Cl={uniqueId:G,raw:new K({values:vl}),title:G,uri:G,clickUri:G,rankingModifier:new H({required:!1,emptyAllowed:!0})};function Gh(e){return Object.assign({},...Object.keys(vl).map(t=>({[t]:e[t]})))}function Kh(e){return Object.assign({},...Object.keys(Cl).map(t=>({[t]:e[t]})),{raw:Gh(e.raw)})}function Yh(e){let t=e.raw.author;return X(t)?"unknown":Array.isArray(t)?t.join(";"):`${t}`}function Jh(e){let t=e.raw.source;return X(t)?"unknown":t}var Ha=e=>new Fe(Cl).validate(Kh(e));function Xh(_x24,_x25,_x26){return _Xh.apply(this,arguments)}function _Xh(){_Xh=_asyncToGenerator(function*(e,t,r){yield e(t,r)});return _Xh.apply(this,arguments)}d();c();l();u();var bl=()=>Me("analytics/recommendation/update",e=>e.makeRecommendationInterfaceLoad(),e=>new hn(e)),Al=()=>({actionCause:"recommendationInterfaceLoad"}),Mo=e=>Me({prefix:"analytics/recommendation/open",__legacy__getBuilder:(t,r)=>(Ha(e),t.makeRecommendationOpen($a(e,r),Do(e))),__legacy__provider:t=>new hn(t),analyticsType:"itemClick",analyticsPayloadBuilder:t=>{let r=$a(e,t),n=Do(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=D("recommendation/set",e=>B(e,{id:G})),At=de("recommendation/get",/*#__PURE__*/function(){var _ref14=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n}}){let o=t(),i=Date.now(),a=yield Zh(o),m=yield n.recommendations(a),f=Date.now()-i;return ke(m)?r(m.error):{recommendations:m.success.results,analyticsAction:bl(),duration:f,searchUid:m.success.searchUid,splitTestRun:m.success.splitTestRun,pipeline:m.success.pipeline}});return function(_x27,_x28){return _ref14.apply(this,arguments)}}()),Zh=/*#__PURE__*/function(){var _ref15=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??mt(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?Ze.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 eS(e,Al()))),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}),...(e.pagination&&{numberOfResults:e.pagination.numberOfResults})}});return function Zh(_x29){return _ref15.apply(this,arguments)}}(),eS=/*#__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 Oo(e.configuration.analytics,r)});return function eS(_x30,_x31){return _ref16.apply(this,arguments)}}();var Rr=ge(Ar(),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})});d();c();l();u();var Er=D("searchHub/set",e=>B(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();var Ir=ge(br(),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();var za=e=>({referrer:document.referrer,userAgent:navigator.userAgent,location:window.location.href,clientId:e}),vn=()=>({referrer:null,userAgent:null,location:null,clientId:""});d();c();l();u();var Wa=pe(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 jo=(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 wl=pe(e=>e.context,e=>e);d();c();l();u();d();c();l();u();d();c();l();u();var xl=e=>rS(e)?{answerAPIEnabled:!0,id:El(e).data?.answerId}:tS(e)?{answerAPIEnabled:!1,id:e.search.response.extendedResults.generativeQuestionAnsweringId}:{answerAPIEnabled:!1,id:void 0},tS=e=>"search"in e,rS=e=>"answer"in e&&"generatedAnswer"in e&&!X(e.generatedAnswer?.answerConfigurationId),Rl=e=>e.generatedAnswer?.fieldsToIncludeInCitations,nS=pe(e=>e.generatedAnswer?.citations,(e,t)=>t,(e,t)=>e?.find(r=>r.id===t));var No=e=>Me({prefix:"analytics/generatedAnswer/streamEnd",__legacy__getBuilder:(t,r)=>{let{id:n,answerAPIEnabled:o}=xl(r),i=e?!r.generatedAnswer?.answer||!r.generatedAnswer?.answer.length:void 0;return n?t.makeGeneratedAnswerStreamEnd({...(o?{answerAPIStreamId:n}:{generativeQuestionAnsweringId:n}),answerGenerated:e,answerTextIsEmpty:i}):null},analyticsType:"Rga.AnswerReceived",analyticsPayloadBuilder:t=>({answerId:t.search?.response.searchUid||"",answerGenerated:e??!1})});d();c();l();u();var Il=/*#__PURE__*/function(){var _ref17=_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 Il(_x32){return _ref17.apply(this,arguments)}}();d();c();l();u();var Pl=["text/plain","text/markdown"];var Pr=new H({required:!0}),Fl=new H,Tr=new ne({required:!0}),oS={id:Pr,title:Pr,uri:Pr,permanentid:Pr,clickUri:Fl},kl=new H({required:!0,constrainTo:Pl}),Eq=D("generatedAnswer/setIsVisible",e=>B(e,Tr)),Iq=D("generatedAnswer/setIsEnabled",e=>B(e,Tr)),Ka=D("generatedAnswer/updateMessage",e=>B(e,{textDelta:Pr})),Ya=D("generatedAnswer/updateCitations",e=>B(e,{citations:new ie({required:!0,each:new K({values:oS})})})),iS=D("generatedAnswer/updateError",e=>B(e,{message:Fl,code:new J({min:0})})),aS=D("generatedAnswer/resetAnswer"),Pq=D("generatedAnswer/like"),Tq=D("generatedAnswer/dislike"),Fq=D("generatedAnswer/feedbackModal/open"),kq=D("generatedAnswer/expand"),Oq=D("generatedAnswer/collapse"),Dq=D("generatedAnswer/setId",e=>B(e,{id:new H({required:!0})})),qq=D("generatedAnswer/feedbackModal/close"),Mq=D("generatedAnswer/sendFeedback"),Ga=D("generatedAnswer/setIsLoading",e=>B(e,Tr)),Tl=D("generatedAnswer/setIsStreaming",e=>B(e,Tr)),Ja=D("generatedAnswer/setAnswerContentFormat",e=>B(e,kl)),jq=D("generatedAnswer/updateResponseFormat",e=>B(e,{contentFormat:new ie({each:kl,default:["text/plain"]})})),Nq=D("knowledge/updateAnswerConfigurationId",e=>B(e,Pr)),_q=D("generatedAnswer/registerFieldsToIncludeInCitations",e=>B(e,ro)),sS=D("generatedAnswer/setIsAnswerGenerated",e=>B(e,Tr)),Xa=D("generatedAnswer/setCannotAnswer",e=>B(e,Tr)),Vq=de("generatedAnswer/streamAnswer",/*#__PURE__*/function(){var _ref18=_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 Il(r),y=(g,v)=>{switch(g){case"genqa.headerMessageType":{let R=JSON.parse(v);n(Ja(R.contentFormat));break}case"genqa.messageType":n(Ka(JSON.parse(v)));break;case"genqa.citationsType":n(Ya(JSON.parse(v)));break;case"genqa.endOfStreamType":{let R=JSON.parse(v).answerGenerated,P=m.length!==0&&!R;n(Xa(P)),n(Tl(!1)),n(sS(R)),n(No(R));break}default:r.debug&&o.logger.warn(`Unknown payloadType: "${g}"`)}};n(Ga(!0));let h=g=>g.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,S=o.streamingClient?.streamGeneratedAnswer(p,{write:g=>{h(p)&&(n(Ga(!1)),g.payload&&g.payloadType&&y(g.payloadType,g.payload))},abort:g=>{h(p)&&n(iS(g))},close:()=>{h(p)&&n(Tl(!1))},resetAnswer:()=>{h(p)&&n(aS())}});S?f(S):n(Ga(!1))});return function(_x33,_x34){return _ref18.apply(this,arguments)}}());d();c();l();u();d();c();l();u();var Ol=pe(e=>e.pipeline,e=>e);d();c();l();u();var Za=pe(e=>e.query,e=>e);d();c();l();u();d();c();l();u();var Cn=Qe(_o(),1),_l=Qe(Dl(),1);d();c();l();u();var Vo=Qe(_o(),1),Ml=Qe(ql(),1);Vo.default.extend(Ml.default);var jl="YYYY/MM/DD@HH:mm:ss",cS="1401-01-01";function Fr(e,t){let r=(0,Vo.default)(e,t);return!r.isValid()&&!t?(0,Vo.default)(e,jl):r}function Lo(e){return e.format(jl)}function Nl(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}`)}as(r)}function as(e){if(e.isBefore(cS))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}Cn.default.extend(_l.default);var Vl=["past","now","next"],Ll=["minute","hour","day","week","month","quarter","year"],uS=e=>{let t=e==="now";return{amount:new J({required:!t,min:1}),unit:new H({required:!t,constrainTo:Ll}),period:new H({required:!0,constrainTo:Vl})}};function ss(e){if(typeof e=="string"&&!wt(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?Hl(e):e;new Fe(uS(t.period)).validate(t);let r=Bl(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);as(r)}function Ul(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function Bl(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return(0,Cn.default)().subtract(r,n);case"next":return(0,Cn.default)().add(r,n);case"now":return(0,Cn.default)()}}function bn(e){return Lo(Bl(Hl(e)))}function Ql(e){return e.toLocaleLowerCase().split("-")}function wt(e){let[t,r,n]=Ql(e);if(t==="now")return!0;if(!Vl.includes(t)||!Ll.includes(n))return!1;let o=parseInt(r);return!(Number.isNaN(o)||o<=0)}function $l(e){return!!e&&typeof e=="object"&&"period"in e}function Hl(e){let[t,r,n]=Ql(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r):void 0,unit:n||void 0}}d();c();l();u();function zl(e){return e.type==="dateRange"}function Wl(e){return`start${e}`}function Gl(e){return`end${e}`}var cs=()=>({dateFacetValueMap:{}});function lS(e,t,r){let n=e.start,o=e.end;return wt(n)&&(n=bn(n),r.dateFacetValueMap[t][Wl(n)]=e.start),wt(o)&&(o=bn(o),r.dateFacetValueMap[t][Gl(o)]=e.end),{...e,start:n,end:o}}function us(e,t){if(zl(e)){let{facetId:r,currentValues:n}=e;return t.dateFacetValueMap[r]={},{...e,currentValues:n.map(o=>lS(o,r,t))}}return e}function xt(e){let t=cs();return{request:{...e,facets:e.facets?.map(n=>us(n,t))},mappings:t}}function dS(e,t,r){return{...e,start:r.dateFacetValueMap[t][Wl(e.start)]||e.start,end:r.dateFacetValueMap[t][Gl(e.end)]||e.end}}function pS(e,t){return e.facetId in t.dateFacetValueMap}function fS(e,t){return pS(e,t)?{...e,values:e.values.map(r=>dS(r,e.facetId,t))}:e}function Uo(e,t){return"success"in e?{success:{...e.success,facets:e.success.facets?.map(n=>fS(n,t))}}:e}d();c();l();u();d();c();l();u();var An=(e,t)=>{let r=e;return X(r[t])?X(e.raw[t])?null:e.raw[t]:r[t]},mS=e=>t=>e.every(r=>!X(An(t,r))),gS=e=>t=>e.every(r=>X(An(t,r))),yS=(e,t)=>r=>{let n=Kl(e,r);return t.some(o=>n.some(i=>`${i}`.toLowerCase()===o.toLowerCase()))},hS=(e,t)=>r=>{let n=Kl(e,r);return t.every(o=>n.every(i=>`${i}`.toLowerCase()!==o.toLowerCase()))},Kl=(e,t)=>{let r=An(t,e);return yc(r)?r:[r]},Yl={getResultProperty:An,fieldsMustBeDefined:mS,fieldsMustNotBeDefined:gS,fieldMustMatch:yS,fieldMustNotMatch:hS};var Jl=pe(e=>e.search,e=>e?.searchAction?.actionCause||"");d();c();l();u();var Xl=pe(e=>e.searchHub,e=>e);d();c();l();u();var Bo=pe(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}));d();c();l();u();var ls=pe(e=>e,e=>{if(!e)return"";for(let t in e)if(e[t].isActive)return e[t].id;return""}),Zl=pe(e=>e,e=>{let t=ls(e);return t&&e?e[t].expression:""});d();c();l();u();d();c();l();u();function Rt(e){return Object.values(e).map(t=>t.request)}function ds(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 ed(e){return Rt(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}var ps={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function SS(e){return Rt(e).map(t=>{let r=ps[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function vS(e){return[...SS(e.facetSet??{}),...ed(e.numericFacetSet??{}),...ed(e.dateFacetSet??{}),...Rt(e.categoryFacetSet??{})]}function CS(e){return vS(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function Qo(e){return ds(CS(e),e.facetOrder??[])}d();c();l();u();d();c();l();u();function rd(_x35,_x36){return _rd.apply(this,arguments)}function _rd(){_rd=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _rd.apply(this,arguments)}function nd(e){let t,r,n,o=!1;return function(a){t===void 0?(t=a,r=0,n=-1):t=AS(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 od(e,t,r){let n=td(),o=new TextDecoder;return function(a,m){if(a.length===0)r?.(n),n=td();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":bS(y,n,t);break}}}}function bS(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function AS(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function td(){return{data:"",event:"",id:"",retry:void 0}}var fs="text/event-stream",wS=1e3,id="last-event-id";function ad(){return typeof window<"u"}function sd(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=fs);let g;function v(){g?.abort(),document.hidden||E()}!m&&ad()&&document.addEventListener("visibilitychange",v);let R=wS,P;function x(){ad()&&document.removeEventListener("visibilitychange",v),clearTimeout(P),g?.abort()}t?.addEventListener("abort",()=>{x(),y()});let T=f??b,w=n??xS;function E(){return _E.apply(this,arguments)}function _E(){_E=_asyncToGenerator(function*(){g=s.AbortController?new s.AbortController:null;try{let j=yield T(e,{...p,headers:S,signal:g?.signal});yield w(j),yield rd(j.body,nd(od(k=>{k?S[id]=k:delete S[id]},k=>{R=k},o))),i?.(),x(),y()}catch(j){if(!g?.signal?.aborted)try{let k=a?.(j)??R;clearTimeout(P),P=setTimeout(E,k)}catch(k){x(),h(k)}}});return _E.apply(this,arguments)}E()})}function xS(e){let t=e.headers.get("content-type");if(!t?.startsWith(fs))throw new Error(`Expected content-type to be ${fs}, Actual: ${t}`)}d();c();l();u();d();c();l();u();function cd(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var ud=Ke;function bd(e,t){if(e===t||!(ud(e)&&ud(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]=bd(e[a],t[a]),o&&(o=e[a]===i[a]);return o?e:i}function kr(e){let t=0;for(let r in e)t++;return t}var ld=e=>[].concat(...e);function RS(e){return new RegExp("(^|:)//").test(e)}function ES(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function zo(e){return e!=null}function IS(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var PS=e=>e.replace(/\/$/,""),TS=e=>e.replace(/^\//,"");function FS(e,t){if(!e)return t;if(!t)return e;if(RS(t))return t;let r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=PS(e),t=TS(t),`${e}${r}${t}`}function kS(e,t,r){return e.has(t)?e.get(t):e.set(t,r).get(t)}var dd=(...e)=>b(...e),OS=e=>e.status>=200&&e.status<=299,DS=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function pd(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 Ad({baseUrl:e,prepareHeaders:t=h=>h,fetchFn:r=dd,paramsSerializer:n,isJsonContentType:o=DS,jsonContentType:i="application/json",jsonReplacer:a,timeout:m,responseHandler:f,validateStatus:p,...y}={}){return typeof b>"u"&&r===dd&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),(/*#__PURE__*/function(){var _ref19=_asyncToGenerator(function*(S,g,v){let{getState:R,extra:P,endpoint:x,forced:T,type:w}=g,E,{url:j,headers:k=new A(y.headers),params:I=void 0,responseHandler:F=f??"json",validateStatus:O=p??OS,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,...$};k=new A(pd(k)),_.headers=(yield t(k,{getState:R,arg:S,extra:P,endpoint:x,forced:T,type:w,extraOptions:v}))||k;let Q=Z=>typeof Z=="object"&&(Ke(Z)||Array.isArray(Z)||typeof Z.toJSON=="function");if(!_.headers.has("content-type")&&Q(_.body)&&_.headers.set("content-type",i),Q(_.body)&&o(_.headers)&&(_.body=JSON.stringify(_.body,a)),I){let Z=~j.indexOf("?")?"&":"?",oe=n?n(I):new URLSearchParams(pd(I));j+=Z+oe}j=FS(e,j);let L=new Request(j,_);E={request:new Request(j,_)};let W,Y=!1,te=U&&setTimeout(()=>{Y=!0,U.abort()},N);try{W=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 se=W.clone();E.response=se;let ee,re="";try{let Z;if(yield Promise.all([h(W,F).then(oe=>ee=oe,oe=>Z=oe),se.text().then(oe=>re=oe,()=>{})]),Z)throw Z}catch(Z){return{error:{status:"PARSING_ERROR",originalStatus:W.status,data:re,error:String(Z)},meta:E}}return O(W,ee)?{data:ee,meta:E}:{error:{status:W.status,data:ee},meta:E}});return function(_x37,_x38,_x39){return _ref19.apply(this,arguments)}}());function h(_x40,_x41){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 Or=class{constructor(e,t=void 0){this.value=e,this.meta=t}};function qS(){return _qS.apply(this,arguments)}function _qS(){_qS=_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 _qS.apply(this,arguments)}function MS(e,t){throw Object.assign(new Or({error:e,meta:t}),{throwImmediately:!0})}var fd={},jS=(e,t)=>(/*#__PURE__*/function(){var _ref20=_asyncToGenerator(function*(r,n,o){let i=[5,(t||fd).maxRetries,(o||fd).maxRetries].filter(y=>y!==void 0),[a]=i.slice(-1),f={maxRetries:a,backoff:qS,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 Or(y);return y}catch(y){if(p++,y.throwImmediately){if(y instanceof Or)return y.value;throw y}if(y instanceof Or&&!f.retryCondition(y.value.error,r,{attempt:p,baseQueryApi:n,extraOptions:o}))return y.value;yield f.backoff(p,f.maxRetries)}});return function(_x42,_x43,_x44){return _ref20.apply(this,arguments)}}()),wd=Object.assign(jS,{fail:MS}),Ss=D("__rtkq/focused"),xd=D("__rtkq/unfocused"),vs=D("__rtkq/online"),Rd=D("__rtkq/offline");function Cs(e){return e.type==="query"}function NS(e){return e.type==="mutation"}function bs(e){return e.type==="infinitequery"}function As(e,t,r,n,o,i){return _S(e)?e(t,r,n,o).filter(zo).map(gs).map(i):Array.isArray(e)?e.map(gs).map(i):[]}function _S(e){return typeof e=="function"}function gs(e){return typeof e=="string"?{type:e}:e}function VS(e,t){return e.catch(t)}var xn=Symbol("forceQueryFn"),ys=e=>typeof e[xn]=="function";function LS({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:T,buildInitiateMutation:w,getRunningQueryThunk:h,getRunningMutationThunk:S,getRunningQueriesThunk:g,getRunningMutationsThunk:v};function h(E,j){return k=>{let I=i.endpointDefinitions[E],F=e({queryArgs:j,endpointDefinition:I,endpointName:E});return a.get(k)?.[F]}}function S(E,j){return k=>m.get(k)?.[j]}function g(){return E=>Object.values(a.get(E)||{}).filter(zo)}function v(){return E=>Object.values(m.get(E)||{}).filter(zo)}function R(E){}function P(E,j){let k=(I,{subscribe:F=!0,forceRefetch:O,subscriptionOptions:N,[xn]:$,...U}={})=>(V,_)=>{let Q=e({queryArgs:I,endpointDefinition:j,endpointName:E}),L,z={...U,type:"query",subscribe:F,forceRefetch:O,subscriptionOptions:N,endpointName:E,originalArgs:I,queryCacheKey:Q,[xn]:$};if(Cs(j))L=t(z);else{let{direction:ce,initialPageParam:me}=U;L=r({...z,direction:ce,initialPageParam:me})}let W=o.endpoints[E].select(I),Y=V(L),te=W(_());let{requestId:se,abort:ee}=Y,re=te.requestId!==se,Z=a.get(V)?.[Q],oe=()=>W(_()),ye=Object.assign($?Y.then(oe):re&&!Z?Promise.resolve(te):Promise.all([Z,Y]).then(oe),{arg:I,requestId:se,subscriptionOptions:N,queryCacheKey:Q,abort:ee,unwrap(){return _asyncToGenerator(function*(){let ce=yield ye;if(ce.isError)throw ce.error;return ce.data})()},refetch:()=>V(k(I,{subscribe:!1,forceRefetch:!0})),unsubscribe(){F&&V(f({queryCacheKey:Q,requestId:se}))},updateSubscriptionOptions(ce){ye.subscriptionOptions=ce,V(y({endpointName:E,requestId:se,queryCacheKey:Q,options:ce}))}});if(!Z&&!re&&!$){let ce=kS(a,V,{});ce[Q]=ye,ye.then(()=>{delete ce[Q],kr(ce)||a.delete(V)})}return ye};return k}function x(E,j){return P(E,j)}function T(E,j){return P(E,j)}function w(E){return(j,{track:k=!0,fixedCacheKey:I}={})=>(F,O)=>{let N=n({type:"mutation",endpointName:E,originalArgs:j,track:k,fixedCacheKey:I}),$=F(N);let{requestId:U,abort:V,unwrap:_}=$,Q=VS($.unwrap().then(Y=>({data:Y})),Y=>({error:Y})),L=()=>{F(p({requestId:U,fixedCacheKey:I}))},z=Object.assign(Q,{arg:$.arg,requestId:U,abort:V,unwrap:_,reset:L}),W=m.get(F)||{};return m.set(F,W),W[U]=z,z.then(()=>{delete W[U],kr(W)||m.delete(F)}),I&&(W[I]=z,z.then(()=>{W[I]===z&&(delete W[I],kr(W)||m.delete(F))})),z}}}function US(e){return e}var $o=(e={})=>({...e,[cn]:!0});function BS({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:o,assertTagType:i,selectors:a}){let m=(F,O,N,$)=>(U,V)=>{let _=r[F],Q=n({queryArgs:O,endpointDefinition:_,endpointName:F});if(U(o.internalActions.queryResultPatched({queryCacheKey:Q,patches:N})),!$)return;let L=o.endpoints[F].select(O)(V()),z=As(_.providesTags,L.data,void 0,O,{},i);U(o.internalActions.updateProvidedBy({queryCacheKey:Q,providedTags:z}))};function f(F,O,N=0){let $=[O,...F];return N&&$.length>N?$.slice(0,-1):$}function p(F,O,N=0){let $=[...F,O];return N&&$.length>N?$.slice(1):$}let y=(F,O,N,$=!0)=>(U,V)=>{let Q=o.endpoints[F].select(O)(V()),L={patches:[],inversePatches:[],undo:()=>U(o.util.patchQueryData(F,O,L.inversePatches,$))};if(Q.status==="uninitialized")return L;let z;if("data"in Q)if(De(Q.data)){let[W,Y,te]=Kn(Q.data,N);L.patches.push(...Y),L.inversePatches.push(...te),z=W}else z=N(Q.data),L.patches.push({op:"replace",path:[],value:z}),L.inversePatches.push({op:"replace",path:[],value:Q.data});return L.patches.length===0||U(o.util.patchQueryData(F,O,L.patches,$)),L},h=(F,O,N)=>$=>$(o.endpoints[F].initiate(O,{subscribe:!1,forceRefetch:!0,[xn]:()=>({data:N})})),S=(F,O)=>F.query&&F[O]?F[O]:US,g=/*#__PURE__*/function(){var _ref21=_asyncToGenerator(function*(F,{signal:O,abort:N,rejectWithValue:$,fulfillWithValue:U,dispatch:V,getState:_,extra:Q}){let L=r[F.endpointName];try{let z=S(L,"transformResponse"),W={signal:O,abort:N,dispatch:V,getState:_,extra:Q,endpoint:F.endpointName,type:F.type,forced:F.type==="query"?v(F,_()):void 0,queryCacheKey:F.type==="query"?F.queryCacheKey:void 0},Y=F.type==="query"?F[xn]:void 0,te,se=/*#__PURE__*/function(){var _ref22=_asyncToGenerator(function*(re,Z,oe,ye){if(Z==null&&re.pages.length)return Promise.resolve({data:re});let ce={queryArg:F.originalArgs,pageParam:Z},me=yield ee(ce),he=ye?f:p;return{data:{pages:he(re.pages,me.data,oe),pageParams:he(re.pageParams,Z,oe)}}});return function se(_x47,_x48,_x49,_x50){return _ref22.apply(this,arguments)}}();function ee(_x51){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),W,oe):Z=yield L.queryFn(re,W,oe,ce=>t(ce,W,oe)),typeof process<"u",Z.error)throw new Or(Z.error,Z.meta);let ye=yield z(Z.data,Z.meta,re);return{...Z,data:ye}});return _ee.apply(this,arguments)}if(F.type==="query"&&"infiniteQueryOptions"in L){let{infiniteQueryOptions:re}=L,{maxPages:Z=1/0}=re,oe,ye={pages:[],pageParams:[]},ce=a.selectQueryEntry(_(),F.queryCacheKey)?.data,he=v(F,_())&&!F.direction||!ce?ye:ce;if("direction"in F&&F.direction&&he.pages.length){let Te=F.direction==="backward",ft=(Te?Ed:hs)(re,he);oe=yield se(he,ft,Z,Te)}else{let{initialPageParam:Te=re.initialPageParam}=F,Ve=ce?.pageParams??[],ft=Ve[0]??Te,Yt=Ve.length;oe=yield se(he,ft,Z),Y&&(oe={data:oe.data.pages[0]});for(let Jt=1;Jt<Yt;Jt++){let Br=hs(re,oe.data);oe=yield se(oe.data,Br,Z)}}te=oe}else te=yield ee(F.originalArgs);return U(te.data,$o({fulfilledTimeStamp:Date.now(),baseQueryMeta:te.meta}))}catch(z){let W=z;if(W instanceof Or){let Y=S(L,"transformErrorResponse");try{return $(yield Y(W.value,W.meta,F.originalArgs),$o({baseQueryMeta:W.meta}))}catch(te){W=te}}throw typeof process<"u",console.error(W),W}});return function g(_x45,_x46){return _ref21.apply(this,arguments)}}();function v(F,O){let N=a.selectQueryEntry(O,F.queryCacheKey),$=a.selectConfig(O).refetchOnMountOrArgChange,U=N?.fulfilledTimeStamp,V=F.forceRefetch??(F.subscribe&&$);return V?V===!0||(Number(new Date)-Number(U))/1e3>=V:!1}let R=()=>de(`${e}/executeQuery`,g,{getPendingMeta({arg:O}){let N=r[O.endpointName];return $o({startedTimeStamp:Date.now(),...(bs(N)?{direction:O.direction}:{})})},condition(O,{getState:N}){let $=N(),U=a.selectQueryEntry($,O.queryCacheKey),V=U?.fulfilledTimeStamp,_=O.originalArgs,Q=U?.originalArgs,L=r[O.endpointName],z=O.direction;return ys(O)?!0:U?.status==="pending"?!1:v(O,$)||Cs(L)&&L?.forceRefetch?.({currentArg:_,previousArg:Q,endpointState:U,state:$})?!0:!(V&&!z)},dispatchConditionRejection:!0}),P=R(),x=R(),T=de(`${e}/executeMutation`,g,{getPendingMeta(){return $o({startedTimeStamp:Date.now()})}}),w=F=>"force"in F,E=F=>"ifOlderThan"in F,j=(F,O,N)=>($,U)=>{let V=w(N)&&N.force,_=E(N)&&N.ifOlderThan,Q=(z=!0)=>{let W={forceRefetch:z,isPrefetch:!0};return o.endpoints[F].initiate(O,W)},L=o.endpoints[F].select(O)(U());if(V)$(Q());else if(_){let z=L?.fulfilledTimeStamp;if(!z){$(Q());return}(Number(new Date)-Number(new Date(z)))/1e3>=_&&$(Q())}else $(Q(!1))};function k(F){return O=>O?.meta?.arg?.endpointName===F}function I(F,O){return{matchPending:ir(Zn(F),k(O)),matchFulfilled:ir(at(F),k(O)),matchRejected:ir(Bt(F),k(O))}}return{queryThunk:P,mutationThunk:T,infiniteQueryThunk:x,prefetch:j,updateQueryData:y,upsertQueryData:h,patchQueryData:m,buildMatchThunkActions:I}}function hs(e,{pages:t,pageParams:r}){let n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function Ed(e,{pages:t,pageParams:r}){return e.getPreviousPageParam?.(t[0],t,r[0],r)}function Id(e,t,r,n){return As(r[e.meta.arg.endpointName][t],at(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 Ho(e,t,r){let n=e[t];n&&r(n)}function Rn(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function md(e,t,r){let n=e[Rn(t)];n&&r(n)}var wn={};function QS({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:m},assertTagType:f,config:p}){let y=D(`${e}/resetApiState`);function h(k,I,F,O){var N;k[N=I.queryCacheKey]??(k[N]={status:"uninitialized",endpointName:I.endpointName}),Ho(k,I.queryCacheKey,$=>{$.status="pending",$.requestId=F&&$.requestId?$.requestId:O.requestId,I.originalArgs!==void 0&&($.originalArgs=I.originalArgs),$.startedTimeStamp=O.startedTimeStamp;let U=o[O.arg.endpointName];bs(U)&&"direction"in I&&($.direction=I.direction)})}function S(k,I,F,O){Ho(k,I.arg.queryCacheKey,N=>{if(N.requestId!==I.requestId&&!O)return;let{merge:$}=o[I.arg.endpointName];if(N.status="fulfilled",$){if(N.data!==void 0){let{fulfilledTimeStamp:U,arg:V,baseQueryMeta:_,requestId:Q}=I,L=it(N.data,z=>$(z,F,{arg:V.originalArgs,baseQueryMeta:_,fulfilledTimeStamp:U,requestId:Q}));N.data=L}else N.data=F;}else N.data=o[I.arg.endpointName].structuralSharing??!0?bd(je(N.data)?ia(N.data):N.data,F):F;delete N.error,N.fulfilledTimeStamp=I.fulfilledTimeStamp})}let g=Qt({name:`${e}/queries`,initialState:wn,reducers:{removeQueryResult:{reducer(k,{payload:{queryCacheKey:I}}){delete k[I]},prepare:ar()},cacheEntriesUpserted:{reducer(k,I){for(let F of I.payload){let{queryDescription:O,value:N}=F;h(k,O,!0,{arg:O,requestId:I.meta.requestId,startedTimeStamp:I.meta.timestamp}),S(k,{arg:O,requestId:I.meta.requestId,fulfilledTimeStamp:I.meta.timestamp,baseQueryMeta:{}},N,!0)}},prepare:k=>({payload:k.map(O=>{let{endpointName:N,arg:$,value:U}=O,V=o[N];return{queryDescription:{type:"query",endpointName:N,originalArgs:O.arg,queryCacheKey:n({queryArgs:$,endpointDefinition:V,endpointName:N})},value:U}}),meta:{[cn]:!0,requestId:to(),timestamp:Date.now()}})},queryResultPatched:{reducer(k,{payload:{queryCacheKey:I,patches:F}}){Ho(k,I,O=>{O.data=sa(O.data,F.concat())})},prepare:ar()}},extraReducers(k){k.addCase(t.pending,(I,{meta:F,meta:{arg:O}})=>{let N=ys(O);h(I,O,N,F)}).addCase(t.fulfilled,(I,{meta:F,payload:O})=>{let N=ys(F.arg);S(I,F,O,N)}).addCase(t.rejected,(I,{meta:{condition:F,arg:O,requestId:N},error:$,payload:U})=>{Ho(I,O.queryCacheKey,V=>{if(!F){if(V.requestId!==N)return;V.status="rejected",V.error=U??$}})}).addMatcher(m,(I,F)=>{let{queries:O}=a(F);for(let[N,$]of Object.entries(O))($?.status==="fulfilled"||$?.status==="rejected")&&(I[N]=$)})}}),v=Qt({name:`${e}/mutations`,initialState:wn,reducers:{removeMutationResult:{reducer(k,{payload:I}){let F=Rn(I);F in k&&delete k[F]},prepare:ar()}},extraReducers(k){k.addCase(r.pending,(I,{meta:F,meta:{requestId:O,arg:N,startedTimeStamp:$}})=>{N.track&&(I[Rn(F)]={requestId:O,status:"pending",endpointName:N.endpointName,startedTimeStamp:$})}).addCase(r.fulfilled,(I,{payload:F,meta:O})=>{O.arg.track&&md(I,O,N=>{N.requestId===O.requestId&&(N.status="fulfilled",N.data=F,N.fulfilledTimeStamp=O.fulfilledTimeStamp)})}).addCase(r.rejected,(I,{payload:F,error:O,meta:N})=>{N.arg.track&&md(I,N,$=>{$.requestId===N.requestId&&($.status="rejected",$.error=F??O)})}).addMatcher(m,(I,F)=>{let{mutations:O}=a(F);for(let[N,$]of Object.entries(O))($?.status==="fulfilled"||$?.status==="rejected")&&N!==$?.requestId&&(I[N]=$)})}}),R=Qt({name:`${e}/invalidation`,initialState:wn,reducers:{updateProvidedBy:{reducer(k,I){var N,$;let{queryCacheKey:F,providedTags:O}=I.payload;for(let U of Object.values(k))for(let V of Object.values(U)){let _=V.indexOf(F);_!==-1&&V.splice(_,1)}for(let{type:U,id:V}of O){let _=(N=k[U]??(k[U]={}))[$=V||"__internal_without_id"]??(N[$]=[]);_.includes(F)||_.push(F)}},prepare:ar()}},extraReducers(k){k.addCase(g.actions.removeQueryResult,(I,{payload:{queryCacheKey:F}})=>{for(let O of Object.values(I))for(let N of Object.values(O)){let $=N.indexOf(F);$!==-1&&N.splice($,1)}}).addMatcher(m,(I,F)=>{var N,$;let{provided:O}=a(F);for(let[U,V]of Object.entries(O))for(let[_,Q]of Object.entries(V)){let L=(N=I[U]??(I[U]={}))[$=_||"__internal_without_id"]??(N[$]=[]);for(let z of Q)L.includes(z)||L.push(z)}}).addMatcher(Ye(at(t),ln(t)),(I,F)=>{let O=Id(F,"providesTags",o,f),{queryCacheKey:N}=F.meta.arg;R.caseReducers.updateProvidedBy(I,R.actions.updateProvidedBy({queryCacheKey:N,providedTags:O}))})}}),P=Qt({name:`${e}/subscriptions`,initialState:wn,reducers:{updateSubscriptionOptions(k,I){},unsubscribeQueryResult(k,I){},internal_getRTKQSubscriptions(){}}}),x=Qt({name:`${e}/internalSubscriptions`,initialState:wn,reducers:{subscriptionsUpdated:{reducer(k,I){return sa(k,I.payload)},prepare:ar()}}}),T=Qt({name:`${e}/config`,initialState:{online:IS(),focused:ES(),middlewareRegistered:!1,...p},reducers:{middlewareRegistered(k,{payload:I}){k.middlewareRegistered=k.middlewareRegistered==="conflict"||i!==I?"conflict":!0}},extraReducers:k=>{k.addCase(vs,I=>{I.online=!0}).addCase(Rd,I=>{I.online=!1}).addCase(Ss,I=>{I.focused=!0}).addCase(xd,I=>{I.focused=!1}).addMatcher(m,I=>({...I}))}}),w=rr({queries:g.reducer,mutations:v.reducer,provided:R.reducer,subscriptions:x.reducer,config:T.reducer}),E=(k,I)=>w(y.match(I)?void 0:k,I),j={...T.actions,...g.actions,...P.actions,...x.actions,...v.actions,...R.actions,resetApiState:y};return{reducer:E,actions:j}}var ms=Symbol.for("RTKQ/skipToken"),Pd={status:"uninitialized"},gd=it(Pd,()=>{}),yd=it(Pd,()=>{});function $S({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=w=>gd,o=w=>yd;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,...cd(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,j){return k=>{if(k===ms)return r(n,j);let I=e({queryArgs:k,endpointDefinition:E,endpointName:w});return r(O=>f(O,I)??gd,j)}}function S(w,E){return h(w,E,i)}function g(w,E){let{infiniteQueryOptions:j}=E;function k(I){let F={...I,...cd(I.status)},{isLoading:O,isError:N,direction:$}=F,U=$==="forward",V=$==="backward";return{...F,hasNextPage:x(j,F.data),hasPreviousPage:T(j,F.data),isFetchingNextPage:O&&U,isFetchingPreviousPage:O&&V,isFetchNextPageError:N&&U,isFetchPreviousPageError:N&&V}}return h(w,E,k)}function v(){return w=>{let E;return typeof w=="object"?E=Rn(w)??ms:E=w,r(E===ms?o:I=>a(I)?.mutations?.[E]??yd,i)}}function R(w,E){let j=w[t],k=new Set;for(let I of E.filter(zo).map(gs)){let F=j.provided[I.type];if(!F)continue;let O=(I.id!==void 0?F[I.id]:ld(Object.values(F)))??[];for(let N of O)k.add(N)}return ld(Array.from(k.values()).map(I=>{let F=j.queries[I];return F?[{queryCacheKey:I,endpointName:F.endpointName,originalArgs:F.originalArgs}]:[]}))}function P(w,E){return Object.values(m(w)).filter(j=>j?.endpointName===E&&j.status!=="uninitialized").map(j=>j.originalArgs)}function x(w,E){return E?hs(w,E)!=null:!1}function T(w,E){return!E||!w.getPreviousPageParam?!1:Ed(w,E)!=null}}var hd=WeakMap?new WeakMap:void 0,Sd=({endpointName:e,queryArgs:t})=>{let r="",n=hd?.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)&&hd?.set(t,o),r=o}return`${e}(${r})`};function HS(...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=Sd;if("serializeQueryArgs"in p.endpointDefinition){let h=p.endpointDefinition.serializeQueryArgs;y=S=>{let g=h(S);return typeof g=="string"?g:Sd({...S,queryArgs:g})}}else r.serializeQueryArgs&&(y=r.serializeQueryArgs);return y(p)},tagTypes:[...(r.tagTypes||[])]},i={endpointDefinitions:{},batch(p){p()},apiUid:to(),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 dt(e,...t){return Object.assign(e,...t)}var zS=({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:T,requestId:w,options:E}=v.payload;return g?.[T]?.[w]&&(g[T][w]=E),!0}if(m.match(v)){let{queryCacheKey:T,requestId:w}=v.payload;return g[T]&&delete g[T][w],!0}if(e.internalActions.removeQueryResult.match(v))return delete g[v.payload.queryCacheKey],!0;if(t.pending.match(v)){let{meta:{arg:T,requestId:w}}=v,E=g[P=T.queryCacheKey]??(g[P]={});return E[`${w}_running`]={},T.subscribe&&(E[w]=T.subscriptionOptions??E[w]??{}),!0}let R=!1;if(t.fulfilled.match(v)||t.rejected.match(v)){let T=g[v.meta.arg.queryCacheKey]||{},w=`${v.meta.requestId}_running`;R||(R=!!T[w]),delete T[w]}if(t.rejected.match(v)){let{meta:{condition:T,arg:w,requestId:E}}=v;if(T&&w.subscribe){let j=g[x=w.queryCacheKey]??(g[x]={});j[E]=w.subscriptionOptions??j[E]??{},R=!0}}return R},p=()=>r.currentSubscriptions,S={getSubscriptions:p,getSubscriptionCount:g=>{let R=p()[g]??{};return kr(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]=Kn(o,()=>w);v.next(e.internalActions.subscriptionsUpdated(E)),o=w,i=null},500));let x=typeof g.type=="string"&&!!g.type.startsWith(n),T=t.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;P=!x&&!T}return[P,!1]}};function WS(e){for(let t in e)return!1;return!0}var GS=2147483647/1e3-1,KS=({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&&!WS(x)}let S={},g=(P,x,T)=>{let w=x.getState(),E=a(w);if(y(P)){let j;if(p.match(P))j=P.payload.map(k=>k.queryDescription.queryCacheKey);else{let{queryCacheKey:k}=f.match(P)?P.payload:P.meta.arg;j=[k]}v(j,x,E)}if(t.util.resetApiState.match(P))for(let[j,k]of Object.entries(S))k&&clearTimeout(k),delete S[j];if(n.hasRehydrationInfo(P)){let{queries:j}=n.extractRehydrationInfo(P);v(Object.keys(j),x,E)}};function v(P,x,T){let w=x.getState();for(let E of P){let j=i(w,E);R(E,j?.endpointName,x,T)}}function R(P,x,T,w){let j=n.endpointDefinitions[x]?.keepUnusedDataFor??w.keepUnusedDataFor;if(j===1/0)return;let k=Math.max(0,Math.min(j,GS));if(!h(P)){let I=S[P];I&&clearTimeout(I),S[P]=setTimeout(()=>{h(P)||T.dispatch(m({queryCacheKey:P})),delete S[P]},k*1e3)}}return g},vd=new Error("Promise never resolved before cacheEntryRemoved."),YS=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:o,internalState:i,selectors:{selectQueryEntry:a,selectApiState:m}})=>{let f=eo(n),p=eo(o),y=at(n,o),h={};function S(x,T,w){let E=h[x];E?.valueResolved&&(E.valueResolved({data:T,meta:w}),delete E.valueResolved)}function g(x){let T=h[x];T&&(delete h[x],T.cacheEntryRemoved())}let v=(x,T,w)=>{let E=R(x);function j(k,I,F,O){let N=a(w,I),$=a(T.getState(),I);!N&&$&&P(k,O,I,T,F)}if(n.pending.match(x))j(x.meta.arg.endpointName,E,x.meta.requestId,x.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(x))for(let{queryDescription:k,value:I}of x.payload){let{endpointName:F,originalArgs:O,queryCacheKey:N}=k;j(F,N,x.meta.requestId,O),S(N,I,{})}else if(o.pending.match(x))T.getState()[t].mutations[E]&&P(x.meta.arg.endpointName,x.meta.arg.originalArgs,E,T,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 k of Object.keys(h))g(k)};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)?Rn(x.payload):""}function P(x,T,w,E,j){let k=r.endpointDefinitions[x],I=k?.onCacheEntryAdded;if(!I)return;let F={},O=new Promise(Q=>{F.cacheEntryRemoved=Q}),N=Promise.race([new Promise(Q=>{F.valueResolved=Q}),O.then(()=>{throw vd})]);N.catch(()=>{}),h[w]=F;let $=e.endpoints[x].select(k.type==="query"?T:w),U=E.dispatch((Q,L,z)=>z),V={...E,getCacheEntry:()=>$(E.getState()),requestId:j,extra:U,updateCachedData:k.type==="query"?Q=>E.dispatch(e.util.updateQueryData(x,T,Q)):void 0,cacheDataLoaded:N,cacheEntryRemoved:O},_=I(T,V);Promise.resolve(_).catch(Q=>{if(Q!==vd)throw Q})}return v},JS=({api:e,context:{apiUid:t},reducerPath:r})=>(n,o)=>{e.util.resetApiState.match(n)&&o.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},XS=({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(at(n),ln(n)),h=Ye(at(n,o),Bt(n,o)),S=[],g=(P,x)=>{y(P)?R(Id(P,"invalidatesTags",r,a),x):h(P)?R([],x):i.util.invalidateTags.match(P)&&R(As(P.payload,void 0,void 0,void 0,void 0,a),x)};function v(P){let{queries:x,mutations:T}=P;for(let w of[x,T])for(let E in w)if(w[E]?.status==="pending")return!0;return!1}function R(P,x){let T=x.getState(),w=T[e];if(S.push(...P),w.config.invalidationBehavior==="delayed"&&v(w))return;let E=S;if(S=[],E.length===0)return;let j=i.util.selectInvalidatedBy(T,E);t.batch(()=>{let k=Array.from(j.values());for(let{queryCacheKey:I}of k){let F=w.queries[I],O=f.currentSubscriptions[I]??{};F&&(kr(O)===0?x.dispatch(p({queryCacheKey:I})):F.status!=="uninitialized"&&x.dispatch(m(F)))}})}return g},ZS=({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:T,skipPollingIfUnfocused:w}=S(x);if(!Number.isFinite(T))return;let E=i[g];E?.timeout&&(clearTimeout(E.timeout),E.timeout=void 0);let j=Date.now()+T;i[g]={nextPollTimestamp:j,pollingInterval:T,timeout:setTimeout(()=>{(R.config.focused||!w)&&v.dispatch(n(P)),f({queryCacheKey:g},v)},T)}}function p({queryCacheKey:g},v){let P=v.getState()[e].queries[g],x=o.currentSubscriptions[g];if(!P||P.status==="uninitialized")return;let{lowestPollingInterval:T}=S(x);if(!Number.isFinite(T)){y(g);return}let w=i[g],E=Date.now()+T;(!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},ev=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let o=Zn(r,n),i=Bt(r,n),a=at(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((j,k)=>{P.resolve=j,P.reject=k});x.catch(()=>{}),m[h]=P;let T=e.endpoints[S].select(v.type==="query"?g:h),w=y.dispatch((j,k,I)=>I),E={...y,getCacheEntry:()=>T(y.getState()),requestId:h,extra:w,updateCachedData:v.type==="query"?j=>y.dispatch(e.util.updateQueryData(S,g,j)):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]}}},tv=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:o})=>{let{removeQueryResult:i}=r.internalActions,a=(f,p)=>{Ss.match(f)&&m(p,"refetchOnFocus"),vs.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])&&(kr(R)===0?f.dispatch(i({queryCacheKey:g})):v.status!=="uninitialized"&&f.dispatch(n(v)))}})}return a};function rv(e){let{reducerPath:t,queryThunk:r,api:n,context:o}=e,{apiUid:i}=o,a={invalidateTags:D(`${t}/invalidateTags`)},m=h=>h.type.startsWith(`${t}/`),f=[JS,KS,XS,ZS,YS,ev];return{middleware:h=>{let S=!1,v={...e,internalState:{currentSubscriptions:{}},refetchQuery:y,isThisApiSliceAction:m},R=f.map(T=>T(v)),P=zS(v),x=tv(v);return T=>w=>{if(!$n(w))return T(w);S||(S=!0,h.dispatch(n.internalActions.middlewareRegistered(i)));let E={...h,next:T},j=h.getState(),[k,I]=P(w,E,j),F;if(k?F=T(w):F=I,h.getState()[t]&&(x(w,E,j),m(w)||o.hasRehydrationInfo(w)))for(let O of R)O(w,E,j);return F}},actions:a};function y(h){return e.api.endpoints[h.endpointName].initiate(h.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Cd=Symbol(),nv=({createSelector:e=pe}={})=>({name:Cd,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:m,refetchOnFocus:f,refetchOnReconnect:p,invalidationBehavior:y},h){Yc();let S=ee=>(typeof process<"u",ee);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:vs,onOffline:Rd,onFocus:Ss,onFocusLost:xd},util:{}});let g=$S({serializeQueryArgs:i,reducerPath:o,createSelector:e}),{selectInvalidatedBy:v,selectCachedArgsForQuery:R,buildQuerySelector:P,buildInfiniteQuerySelector:x,buildMutationSelector:T}=g;dt(t.util,{selectInvalidatedBy:v,selectCachedArgsForQuery:R});let{queryThunk:w,infiniteQueryThunk:E,mutationThunk:j,patchQueryData:k,updateQueryData:I,upsertQueryData:F,prefetch:O,buildMatchThunkActions:N}=BS({baseQuery:r,reducerPath:o,context:h,api:t,serializeQueryArgs:i,assertTagType:S,selectors:g}),{reducer:$,actions:U}=QS({context:h,queryThunk:w,infiniteQueryThunk:E,mutationThunk:j,serializeQueryArgs:i,reducerPath:o,assertTagType:S,config:{refetchOnFocus:f,refetchOnReconnect:p,refetchOnMountOrArgChange:m,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:y}});dt(t.util,{patchQueryData:k,updateQueryData:I,upsertQueryData:F,prefetch:O,resetApiState:U.resetApiState,upsertQueryEntries:U.cacheEntriesUpserted}),dt(t.internalActions,U);let{middleware:V,actions:_}=rv({reducerPath:o,context:h,queryThunk:w,mutationThunk:j,infiniteQueryThunk:E,api:t,assertTagType:S,selectors:g});dt(t.util,_),dt(t,{reducer:$,middleware:V});let{buildInitiateQuery:Q,buildInitiateInfiniteQuery:L,buildInitiateMutation:z,getRunningMutationThunk:W,getRunningMutationsThunk:Y,getRunningQueriesThunk:te,getRunningQueryThunk:se}=LS({queryThunk:w,mutationThunk:j,infiniteQueryThunk:E,api:t,serializeQueryArgs:i,context:h});return dt(t.util,{getRunningMutationThunk:W,getRunningMutationsThunk:Y,getRunningQueryThunk:se,getRunningQueriesThunk:te}),{name:Cd,injectEndpoint(ee,re){var ye;let oe=(ye=t.endpoints)[ee]??(ye[ee]={});Cs(re)&&dt(oe,{name:ee,select:P(ee,re),initiate:Q(ee,re)},N(w,ee)),NS(re)&&dt(oe,{name:ee,select:T(),initiate:z(ee)},N(j,ee)),bs(re)&&dt(oe,{name:ee,select:x(ee,re),initiate:L(ee,re)},N(w,ee))}}}}),Td=HS(nv());var ov=/*#__PURE__*/function(){var _ref23=_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:Ad({baseUrl:`${p}/rest/organizations/${a}/answer/v1/configs/${m}`,fetchFn:function(){var _ref24=_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(_x55){return _ref24.apply(this,arguments)}}()})(f,{...t,signal:null},r)}}catch(p){return{error:p}}});return function ov(_x52,_x53,_x54){return _ref23.apply(this,arguments)}}(),Fd=Td({reducerPath:"answer",baseQuery:wd(ov,{maxRetries:3}),endpoints:()=>({})});var iv=(e,t)=>{let{contentFormat:r}=t;e.contentFormat=r,e.isStreaming=!0,e.isLoading=!1},av=(e,t)=>{e.answer===void 0?e.answer=t.textDelta:typeof t.textDelta=="string"&&(e.answer=e.answer.concat(t.textDelta))},sv=(e,t)=>{e.citations=t.citations},cv=(e,t)=>{e.generated=t.answerGenerated,e.isStreaming=!1},uv=(e,t)=>{e.error={message:t.errorMessage,code:t.code},e.isStreaming=!1,e.isLoading=!1,console.error(`${t.errorMessage} - code ${t.code}`)},lv=(e,t,r)=>{let n=JSON.parse(e.data);n.finishReason==="ERROR"&&n.errorMessage&&uv(t,n);let o=n.payload.length?JSON.parse(n.payload):{};switch(n.payloadType){case"genqa.headerMessageType":o.contentFormat&&(iv(t,o),r(Ja(o.contentFormat)));break;case"genqa.messageType":o.textDelta&&(av(t,o),r(Ka({textDelta:o.textDelta})));break;case"genqa.citationsType":o.citations&&(sv(t,o),r(Ya({citations:o.citations})));break;case"genqa.endOfStreamType":cv(t,o),r(No(o.answerGenerated??!1));break}},ws=Fd.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(_x56,_x57){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=`${S}/rest/organizations/${p}/insight/v1/configs/${f?.insightId}/answer/${m.answerConfigurationId}/generate`,v=`${S}/rest/organizations/${p}/answer/v1/configs/${m.answerConfigurationId}/generate`;yield sd(f?g:v,{method:"POST",body:JSON.stringify(t),headers:{Authorization:`Bearer ${h}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch:b,onopen:function(){var _ref25=_asyncToGenerator(function*(R){let P=R.headers.get("x-answer-id");P&&o(x=>{x.answerId=P})});return function onopen(_x58){return _ref25.apply(this,arguments)}}(),onmessage:R=>{o(P=>{lv(R,P,i)})},onerror:R=>{throw R},onclose:()=>{o(R=>{i(Xa(!R.generated))})}})}).apply(this,arguments)}})})}),Dj=pe(e=>Za(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})),Wo={},dv=(e,t)=>({...Wo,[e]:Qo(t)?.map(r=>us(r,cs())).sort((r,n)=>r.facetId>n.facetId?1:n.facetId>r.facetId?-1:0)}),pv=e=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0,fv=e=>{let t=Wa(e),r=mv(e);return{...t,...(r&&{cq:r})}},mv=e=>{let t=Zl(e.tabSet),r=Bo(e),{cq:n}=Wa(e);return[t,...r,n].filter(o=>!!o).join(" AND ")},gv=(e,t,r)=>{let n=Za(e)?.q,{aq:o,cq:i,dq:a,lq:m}=fv(e),f=wl(e),p=t==="select"?{}:jo(e.configuration.analytics,r,{actionCause:Jl(e)}),y=Xl(e),h=Ol(e),S=Rl(e)??[];return n&&t==="fetch"&&(Wo=dv(n,e)),{q:n,...(o&&{aq:o}),...(i&&{cq:i}),...(a&&{dq:a}),...(m&&{lq:m}),...(f?.contextValues&&{context:f.contextValues}),pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:S}},...(y?.length&&{searchHub:y}),...(h?.length&&{pipeline:h}),...(Wo[n]?.length&&{facets:Wo[n]}),...(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:pv(e),firstResult:e.pagination.firstResult}),tab:ls(e.tabSet),...p}};var El=(e,t)=>ws.endpoints.getAnswer.select(gv(e,"select",t||vn()))(e);d();c();l();u();var kd=ge(sr,e=>e);d();c();l();u();function xs(){return typeof window<"u"&&typeof document<"u"}d();c();l();u();function yv(e){let t=e.payload?.analyticsAction;return Od(e)&&!X(t)}function Od(e){return"type"in e}var Dd=e=>t=>r=>{let n;yv(r)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let o=t(r);return Od(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 aN=D("tab/register",e=>{let t=new K({values:{id:G,expression:we}});return B(e,t)}),Go=D("tab/updateActiveTab",e=>B(e,G));d();c();l();u();var Ko=Qe(_o(),1),jd=Qe(qd(),1),Nd=Qe(Md(),1);Ko.default.extend(Nd.default);Ko.default.extend(jd.default);var _d=()=>({organizationId:"",accessToken:"",search:{locale:"en-US",timezone:Ko.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 hv=/(^|; )Coveo-Pendragon=([^;]*)/;function Ts(){return typeof window>"u"?!1:hv.exec(document.cookie)?.pop()||null}var Vd=ge(_d(),e=>e.addCase(St,(t,r)=>{Sv(t,r.payload)}).addCase(Je,(t,r)=>{vv(t,r.payload)}).addCase(cr,(t,r)=>{Cv(t,r.payload)}).addCase(ur,t=>{t.analytics.enabled=!1}).addCase(lr,t=>{t.analytics.enabled=!0}).addCase(no,(t,r)=>{t.analytics.originLevel2=r.payload.originLevel2}).addCase(oo,(t,r)=>{t.analytics.originLevel3=r.payload.originLevel3}).addCase(Go,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(xu,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(vt,(t,r)=>{X(r.payload.tab)||(t.analytics.originLevel2=r.payload.tab)}));function Sv(e,t){X(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",X(t.organizationId)||(e.organizationId=t.organizationId)}function vv(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 Cv(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=Ts();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=Vd;d();c();l();u();function bv(e){return e.instantlyCallable}var Ld=()=>e=>t=>e(bv(t)?t():t);d();c();l();u();var Ud=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)},Bd=e=>t=>r=>n=>(e.debug({action:n,nextState:t.getState()},`Action dispatched: ${n.type}`),r(n));d();c();l();u();function Qd(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=Sc(Object.entries(t).filter(([a])=>!(a in r)).map(([a,m])=>[a,()=>m]));return o(rr({...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 Yo(e,t,r){var n,o,i;t===void 0&&(t=50),r===void 0&&(r={});var a=(n=r.isImmediate)!=null&&n,m=(o=r.callback)!=null&&o,f=r.maxWait,p=Date.now(),y=[];function h(){if(f!==void 0){var g=Date.now()-p;if(g+t>=f)return f-g}return t}var S=function(){var g=[].slice.call(arguments),v=this;return new Promise(function(R,P){var x=a&&i===void 0;if(i!==void 0&&clearTimeout(i),i=setTimeout(function(){if(i=void 0,p=Date.now(),!a){var w=e.apply(v,g);m&&m(w),y.forEach(function(E){return(0,E.resolve)(w)}),y=[]}},h()),x){var T=e.apply(v,g);return m&&m(T),R(T)}y.push({resolve:R,reject:P})})};return S.cancel=function(g){i!==void 0&&clearTimeout(i),y.forEach(function(v){return(0,v.reject)(g)}),y=[]},S}function $d(e,t){let r=0,n=Yo(()=>{r=0},500);return o=>i=>(/*#__PURE__*/function(){var _ref26=_asyncToGenerator(function*(a){if(!(typeof a=="function"))return i(a);let f=yield i(a);if(!Av(f))return f;if(typeof t!="function")return e.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),f;if(r>=5)return e.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),f;r++,n();let p=yield wv(t);o.dispatch(St({accessToken:p})),o.dispatch(a)});return function(_x59){return _ref26.apply(this,arguments)}}())}function Av(e){return e?.error?.name===new tr().name}function wv(_x60){return _wv.apply(this,arguments)}function _wv(){_wv=_asyncToGenerator(function*(e){try{return yield e()}catch{return""}});return _wv.apply(this,arguments)}d();c();l();u();function Hd({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(Bd(n.logger))})}function xv(e,t){let{analytics:r}=e,{analyticsClientMiddleware:n,...o}=r??{},i={...o,...(r?.proxyBaseUrl&&{apiBaseUrl:r.proxyBaseUrl,nexApiBaseUrl:r.proxyBaseUrl})};return i.analyticsMode!=="next"&&hc()?(t.info("Analytics disabled since doNotTrack is active."),{...i,enabled:!1}):i}function zd(e,t){let r={...e.reducers,configuration:ze,version:kd},n=Rv({...e,reducers:r},t,ze),{accessToken:o,environment:i,organizationId:a}=e.configuration;n.dispatch(St({accessToken:o,environment:i,organizationId:a}));let m=xv(e.configuration,n.logger);return m&&n.dispatch(cr(m)),n}function Rv(e,t,r){let{reducers:n}=e,o=Qd({...n,configurationReducer:r},e.preloadedState??{});e.crossReducer&&o.addCrossReducer(e.crossReducer);let i=t.logger,a=()=>{let y="";try{y=wr(p.state).getMeta("").clientId}catch(h){i.warn("Error while obtaining clientID from relay",h)}return y},m={...t,get relay(){return wr(p.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():xs()?za(a()):vn()}},f=Ev(e,m,o),p={addReducers(y){o.containsAll(y)||(o.add(y),f.replaceReducer(o.combinedReducer))},dispatch:f.dispatch,subscribe:f.subscribe,enableAnalytics(){f.dispatch(lr())},disableAnalytics(){f.dispatch(ur())},get state(){return f.getState()},get relay(){return wr(this.state)},get navigatorContext(){return e.navigatorContextProvider?e.navigatorContextProvider():xs()?za(a()):vn()},logger:i,store:f};return p}function Ev(e,t,r){let{preloadedState:n,configuration:o}=e,i=o.name||"coveo-headless",a=Iv(e,t.logger);return Hd({preloadedState:n,reducer:r.combinedReducer,middlewares:a,thunkExtraArguments:t,name:i})}function Iv(e,t){let{renewAccessToken:r}=e.configuration,n=$d(t,r);return[Ld,n,Ud(t),Dd].concat(ws.middleware,e.middlewares||[])}d();c();l();u();var tp=Qe(ep(),1);function rp(e){return(0,tp.pino)({name:"@coveo/headless",level:e?.level||"warn",formatters:{log:e?.logFormatter}})}d();c();l();u();function np(e,t){let r=Hv(e),n=Le,o=zv(e);return{analyticsClientMiddleware:r,validatePayload:n,preprocessRequest:o,logger:t}}function Hv(e){let{analytics:t}=e,r=(n,o)=>o;return t?.analyticsClientMiddleware||r}function zv(e){return e.preprocessRequest||_n}d();c();l();u();d();c();l();u();var op={organizationId:G,accessToken:G,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 ip(){return{organizationId:"searchuisamples",accessToken:"xx564559b1-0045-48e1-953c-3addd1ee4457"}}var ap=new Fe({...op,pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:Ae,locale:Ae,timezone:Ae});function Ms(){return{...ip(),searchHub:"default"}}var Wv={debug:co,pipeline:fr,searchHub:Ir,recommendation:Rr};function sp(e){let t=rp(e.loggerOptions);Gv(e.configuration,t);let r=Kv(e.configuration,t),n={...np(e.configuration,t),apiClient:r},o={...e,reducers:Wv},i=zd(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 Gv(e,t){try{ap.validate(e)}catch(r){throw t.error(r,"Recommendation engine configuration error"),r}}function Kv(e,t){return new Un({logger:t,preprocessRequest:e.preprocessRequest||_n,postprocessSearchResponseMiddleware:e.preprocessSearchResponseMiddleware||Mc,postprocessFacetSearchResponseMiddleware:jc,postprocessQuerySuggestResponseMiddleware:Nc})}d();c();l();u();d();c();l();u();d();c();l();u();var Yv=new ie({each:G,required:!0}),cp=(e,t)=>(B(e,G),qn(t)?B(t,G):B(t,Yv),{payload:{contextKey:e,contextValue:t}}),Wt=D("context/set",e=>{for(let[t,r]of Object.entries(e))cp(t,r);return{payload:e}}),Gt=D("context/add",e=>cp(e.contextKey,e.contextValue)),Kt=D("context/remove",e=>B(e,G));d();c();l();u();d();c();l();u();function Zo(){return{contextValues:{}}}var ei=ge(Zo(),e=>{e.addCase(Wt,(t,r)=>{t.contextValues=r.payload}).addCase(Gt,(t,r)=>{t.contextValues[r.payload.contextKey]=r.payload.contextValue}).addCase(Kt,(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 Jv=["caseId","caseNumber"],Xv={caseId:"caseContext",caseNumber:"caseContext"},In=class extends Error{constructor(t){super(`The key "${t}" is reserved for internal use. Use ${Xv[t]} to set this value.}`)}};function js(e){return Jv.includes(e)}var Zv=new Fe({values:new K({options:{required:!1}})});function up(e,t={}){if(!rC(e))throw We;let r=It(e),{dispatch:n}=e,o=()=>e.state,i=Su(e,Zv,t.initialState,"buildContext");return i.values&&n(Wt(i.values)),{...r,get state(){return{values:o().context.contextValues}},set(a){n(Wt(a))},...(o().configuration.analytics.analyticsMode==="legacy"?eC(n):tC(n))}}var eC=e=>({add(t,r){e(Gt({contextKey:t,contextValue:r}))},remove(t){e(Kt(t))}}),tC=e=>({add(t,r){if(js(t))throw new In(t);e(Gt({contextKey:t,contextValue:r}))},remove(t){if(js(t))throw new In(t);e(Kt(t))}});function rC(e){return e.addReducers({context:ei}),!0}function lp(e,t){return up(e,t)}d();c();l();u();d();c();l();u();var qr=D("dictionaryFieldContext/set",e=>{let t=new K({options:{required:!0}}),r=B(e,t).error;if(r)return{payload:e,error:r};let n=Object.values(e),o=new ie({each:we}),i=B(n,o).error;return i?{payload:e,error:i}:{payload:e}}),Mr=D("dictionaryFieldContext/add",e=>{let t=new K({options:{required:!0},values:{field:we,key:we}});return B(e,t)}),jr=D("dictionaryFieldContext/remove",e=>B(e,we));d();c();l();u();d();c();l();u();function ti(){return{contextValues:{}}}var ri=ge(ti(),e=>{e.addCase(qr,(t,r)=>{t.contextValues=r.payload}).addCase(Mr,(t,r)=>{let{field:n,key:o}=r.payload;t.contextValues[n]=o}).addCase(jr,(t,r)=>{delete t.contextValues[r.payload]}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.dictionaryFieldContext.contextValues)})});function dp(e){if(!nC(e))throw We;let t=It(e),{dispatch:r}=e,n=()=>e.state;return{...t,get state(){return{values:n().dictionaryFieldContext.contextValues}},set(o){r(qr(o))},add(o,i){r(Mr({field:o,key:i}))},remove(o){r(jr(o))}}}function nC(e){return e.addReducers({dictionaryFieldContext:ri}),!0}d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var ni=D("breadcrumb/deselectAll"),pp=D("breadcrumb/deselectAllNonBreadcrumbs");d();c();l();u();d();c();l();u();var Pn={value:G,numberOfResults:new J({min:0}),state:G};d();c();l();u();var ue=G;var sC=new J({min:1,default:8,required:!1}),cC=new J({min:1,max:20,default:5,required:!1}),uC={desiredCount:cC,numberOfValues:sC},JU=D("automaticFacet/setOptions",e=>B(e,uC)),XU=D("automaticFacet/deselectAll",e=>B(e,ue)),lC=G,fp=D("automaticFacet/toggleSelectValue",e=>B(e,{field:lC,selection:new K({values:Pn})}));d();c();l();u();d();c();l();u();var dC={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:G}),moreValuesAvailable:new ne({required:!1})};function Ns(e){e.children.forEach(t=>{Ns(t)}),Le({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},dC)}var Nr={facetId:ue,field:G,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:G}),filterByBasePath:new ne({required:!1})};var y1=D("categoryFacet/register",e=>B(e,Nr)),mp=D("categoryFacet/toggleSelectValue",e=>{try{return Le(e.facetId,G),Ns(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}}),gp=D("categoryFacet/deselectAll",e=>B(e,Nr.facetId)),h1=D("categoryFacet/updateNumberOfValues",e=>B(e,{facetId:Nr.facetId,numberOfValues:Nr.numberOfValues})),S1=D("categoryFacet/updateSortCriterion",e=>B(e,{facetId:Nr.facetId,criterion:new fe})),v1=D("categoryFacet/updateBasePath",e=>B(e,{facetId:Nr.facetId,basePath:new ie({each:G})}));d();c();l();u();d();c();l();u();var Tn={facetId:ue,captions:new K({options:{required:!1}}),numberOfValues:new J({required:!1,min:1}),query:new H({required:!1,emptyAllowed:!0})};var pC={path:new ie({required:!0,each:G}),displayValue:we,rawValue:we,count:new J({required:!0,min:0})},yp=D("categoryFacet/selectSearchResult",e=>B(e,{facetId:ue,value:new K({values:pC})})),N1=D("categoryFacetSearch/register",e=>B(e,Tn));d();c();l();u();var hp={facetId:ue,value:new K({values:{displayValue:we,rawValue:we,count:new J({required:!0,min:0})}})},G1=D("facetSearch/register",e=>B(e,Tn)),K1=D("facetSearch/update",e=>B(e,Tn)),Sp=D("facetSearch/toggleSelectValue",e=>B(e,hp)),vp=D("facetSearch/toggleExcludeValue",e=>B(e,hp));d();c();l();u();d();c();l();u();var rB=new H({regex:/^[a-zA-Z0-9-_]+$/}),nB=new H({required:!0}),oB=new ie({each:new H}),iB=new H,aB=new ne,sB=new ne,cB=new J({min:0}),fC=new J({min:1}),uB=new ne({required:!0}),mC=new K,gC=new H,yC={captions:mC,numberOfValues:fC,query:gC},lB=new K({values:yC}),Cp=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})})}}),dB=new ne,bp=new ie({min:1,max:25,required:!1,each:new H({emptyAllowed:!1,required:!0})});var hC={facetId:ue,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:Cp,customSort:bp},wB=D("facet/register",e=>B(e,hC)),Ap=D("facet/toggleSelectValue",e=>B(e,{facetId:ue,selection:new K({values:Pn})})),wp=D("facet/toggleExcludeValue",e=>B(e,{facetId:ue,selection:new K({values:Pn})})),oi=D("facet/deselectAll",e=>B(e,ue)),xB=D("facet/updateSortCriterion",e=>B(e,{facetId:ue,criterion:new fe({required:!0})})),RB=D("facet/updateNumberOfValues",e=>B(e,{facetId:ue,numberOfValues:new J({required:!0,min:1})})),EB=D("facet/updateIsFieldExpanded",e=>B(e,{facetId:ue,isFieldExpanded:new ne({required:!0})})),IB=D("facet/updateFreezeCurrentValues",e=>B(e,{facetId:ue,freezeCurrentValues:new ne({required:!0})}));d();c();l();u();d();c();l();u();function Rp(e){let t=xp(e.start,e),r=xp(e.end,e),n=e.endInclusive??!1,o=e.state??"idle";return{start:t,end:r,endInclusive:n,state:o}}function xp(e,t){let{dateFormat:r}=t;return $l(e)?(ss(e),Ul(e)):typeof e=="string"&&wt(e)?(ss(e),e):(Nl(e,r),Lo(Fr(e,r)))}d();c();l();u();var Ep=D("rangeFacet/updateSortCriterion",e=>B(e,{facetId:ue,criterion:new fe({required:!0})}));d();c();l();u();var ii={state:G,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new ne({required:!0}),numberOfResults:new J({required:!0,min:0})},ai={start:G,end:G,endInclusive:new ne({required:!0}),state:G,numberOfResults:new J({required:!0,min:0})};var SC={start:G,end:G,endInclusive:new ne({required:!0}),state:G},vC={facetId:ue,field:G,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:SC})}),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 Ip(e){return wt(e)?bn(e):e}function Pp(e){e.currentValues&&e.currentValues.forEach(t=>{let{start:r,end:n}=Rp(t);if(Fr(Ip(r)).isAfter(Fr(Ip(n))))throw new Error(`The start value is greater than the end value for the date range ${t.start} to ${t.end}`)})}var fQ=D("dateFacet/register",e=>{try{return Le(e,vC),Pp(e),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}}),Tp=D("dateFacet/toggleSelectValue",e=>B(e,{facetId:ue,selection:new K({values:ai})})),Fp=D("dateFacet/toggleExcludeValue",e=>B(e,{facetId:ue,selection:new K({values:ai})})),kp=D("dateFacet/updateFacetValues",e=>{try{return Le(e,{facetId:ue,values:new ie({each:new K({values:ai})})}),Pp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}});d();c();l();u();var CC={state:G,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new ne({required:!0})},bC={facetId:ue,field:G,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:CC})}),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 Op(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 EQ=D("numericFacet/register",e=>{try{return B(e,bC),Op(e),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}}),Dp=D("numericFacet/toggleSelectValue",e=>B(e,{facetId:ue,selection:new K({values:ii})})),qp=D("numericFacet/toggleExcludeValue",e=>B(e,{facetId:ue,selection:new K({values:ii})})),Mp=D("numericFacet/updateFacetValues",e=>{try{return Le(e,{facetId:ue,values:new ie({each:new K({values:ii})})}),Op({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:st(t)}}});d();c();l();u();d();c();l();u();var jp=D("facet/updateFacetAutoSelection",e=>B(e,{allow:new ne({required:!0})}));d();c();l();u();d();c();l();u();var si=class extends bt{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??_e().q}get responseTime(){return this.activeInstantResultCache?.duration??Ge().duration}get numberOfResults(){return this.activeInstantResultCache?.totalCountFiltered??Ge().response.totalCountFiltered}getSearchUID(){return this.activeInstantResultCache?.searchUid||super.getSearchUID()}};var Np=()=>Me("analytics/instantResult/searchboxAsYouType",e=>e.makeSearchboxAsYouType(),e=>new si(e)),_p=()=>({actionCause:"searchboxAsYouType"});d();c();l();u();var _s={id:G},AC={..._s,q:we},i$=D("instantResults/register",e=>B(e,_s)),ci=D("instantResults/updateQuery",e=>B(e,AC)),a$=D("instantResults/clearExpired",e=>B(e,_s));d();c();l();u();var ui=new J({required:!0,min:0}),li=D("pagination/registerNumberOfResults",e=>B(e,ui)),di=D("pagination/updateNumberOfResults",e=>B(e,ui)),pi=D("pagination/registerPage",e=>B(e,ui)),_r=D("pagination/updatePage",e=>B(e,ui)),fi=D("pagination/nextPage"),mi=D("pagination/previousPage");d();c();l();u();var Vr=D("query/updateQuery",e=>B(e,{q:new H,enableQuerySyntax:new ne}));d();c();l();u();var Lr=(e,t,r)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??mt(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&&jo(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();d();c();l();u();var Pt=/*#__PURE__*/function(){var _ref27=_asyncToGenerator(function*(e,t){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??mt(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:Ze.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 Oo(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 Pt(_x61,_x62){return _ref27.apply(this,arguments)}}();d();c();l();u();d();c();l();u();var Tt=()=>({cq:"",cqWasSet:!1,aq:"",aqWasSet:!1,lq:"",lqWasSet:!1,dq:"",dqWasSet:!1,defaultFilters:{cq:"",aq:"",lq:"",dq:""}});var Vs=()=>Me("search/logFetchMoreResults",e=>e.makeFetchMoreResults()),Ft=e=>Me("search/queryError",(t,r)=>t.makeQueryError({query:r.query?.q||_e().q,aq:r.advancedSearchQueries?.aq||Tt().aq,cq:r.advancedSearchQueries?.cq||Tt().cq,dq:r.advancedSearchQueries?.dq||Tt().dq,errorType:e.type,errorMessage:e.message}));d();c();l();u();d();c();l();u();var sH=D("didYouMean/enable"),cH=D("didYouMean/disable"),uH=D("didYouMean/automaticCorrections/disable"),lH=D("didYouMean/automaticCorrections/enable"),gi=D("didYouMean/correction",e=>B(e,G)),dH=D("didYouMean/automaticCorrections/mode",e=>B(e,new H({constrainTo:["next","legacy"],emptyAllowed:!1,required:!0})));d();c();l();u();var Ls=()=>Me("analytics/didyoumean/automatic",e=>e.makeDidYouMeanAutomatic());var Vp=()=>({actionCause:"didYouMeanAutomatic"});d();c();l();u();d();c();l();u();function Lp(){return{freezeFacetOrder:!1,facets:{}}}d();c();l();u();function Up(){return[]}d();c();l();u();function Fn(){return{firstResult:0,defaultNumberOfResults:10,numberOfResults:10,totalCountFiltered:0}}d();c();l();u();function Bp(){return{}}d();c();l();u();function Qp(){return{}}d();c();l();u();function $p(){return{}}function rt(e){return{context:e.context||Zo(),dictionaryFieldContext:e.dictionaryFieldContext||ti(),facetSet:e.facetSet||Fo(),numericFacetSet:e.numericFacetSet||To(),dateFacetSet:e.dateFacetSet||Po(),categoryFacetSet:e.categoryFacetSet||Io(),automaticFacetSet:e.automaticFacetSet??Eo(),pagination:e.pagination||Fn(),query:e.query||_e(),tabSet:e.tabSet||$p(),advancedSearchQueries:e.advancedSearchQueries||Tt(),staticFilterSet:e.staticFilterSet||Qp(),querySet:e.querySet||Bp(),sortCriteria:e.sortCriteria||ko(),pipeline:e.pipeline||pr(),searchHub:e.searchHub||br(),facetOptions:e.facetOptions||Lp(),facetOrder:e.facetOrder??Up(),debug:e.debug??so()}}d();c();l();u();var Iz=new K({values:{undoneQuery:we},options:{required:!0}}),Hp=()=>Me("analytics/trigger/query",(e,t)=>t.triggers?.queryModification.newQuery?e.makeTriggerQuery():null);d();c();l();u();var yi=D("trigger/query/ignore",e=>B(e,new H({emptyAllowed:!0,required:!0}))),hi=D("trigger/query/modification",e=>B(e,new K({values:{originalQuery:Ae,modification:Ae}})));d();c();l();u();var kt=/*#__PURE__*/function(){var _ref28=_asyncToGenerator(function*(e,t){let r=RC(e),n=Qo(e),o=wC(e),i=yield Pt(e,t),a=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return xt({...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 kt(_x63,_x64){return _ref28.apply(this,arguments)}}();function wC(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(xC).filter(r=>r.currentValues.length>0):void 0}function xC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function RC(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=EC(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function EC(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(Vr({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI(_x65,_x66){var _this10=this;return _asyncToGenerator(function*({mappings:t,request:r},n){let o=Date.now(),i=Uo(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 ke(t.response)?(this.dispatch(Ft(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(rt(_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 ke(i.response)?(_this13.dispatch(Ft(i.response.error)),_this13.rejectWithValue(i.response.error)):(_this13.logOriginalAnalyticsQueryBeforeAutoCorrection(t),_this13.dispatch(Xe(rt(_this13.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r,analyticsAction:Ls()})})()}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:Ls()}}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(yi("")),null;_this14.analyticsAction&&(yield _this14.dispatch(_this14.analyticsAction));let i=_this14.getCurrentQuery(),a=yield _this14.automaticallyRetryQueryWithTriggerModification(n);return ke(a.response)?(_this14.dispatch(Ft(a.response.error)),_this14.rejectWithValue(a.response.error)):(_this14.dispatch(Xe(rt(_this14.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i,analyticsAction:Hp()})})()}getStateAfterResponse(t,r,n,o){return{...n,query:{q:t,enableQuerySyntax:n.query?.enableQuerySyntax??_e().enableQuerySyntax},search:{...Ge(),duration:r,response:o,results:o.results}}}processSuccessResponse(t){return this.dispatch(Xe(rt(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery(),analyticsAction:this.analyticsAction}}getSuccessResponse(t){return Bn(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this15=this;return _asyncToGenerator(function*(){_this15.onUpdateQueryForCorrection(t);let r=yield _this15.fetchFromAPI(yield kt(_this15.getState()),{origin:"mainSearch"});return _this15.dispatch(gi(t)),r})()}automaticallyRetryQueryWithTriggerModification(t){var _this16=this;return _asyncToGenerator(function*(){return _this16.dispatch(hi({newQuery:t,originalQuery:_this16.getCurrentQuery()})),_this16.onUpdateQueryForCorrection(t),yield _this16.fetchFromAPI(yield kt(_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 IW=de("search/executeSearch",/*#__PURE__*/function(){var _ref29=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Si(r,t,e)});return function(_x67,_x68){return _ref29.apply(this,arguments)}}()),PW=de("search/fetchPage",/*#__PURE__*/function(){var _ref30=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Bs(r,t,e)});return function(_x69,_x70){return _ref30.apply(this,arguments)}}()),TW=de("search/fetchMoreResults",/*#__PURE__*/function(){var _ref31=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Qs(t,r)});return function(_x71,_x72){return _ref31.apply(this,arguments)}}()),FW=de("search/fetchFacetValues",/*#__PURE__*/function(){var _ref32=_asyncToGenerator(function*(e,t){let r=t.getState();return yield FC(t,e,r)});return function(_x73,_x74){return _ref32.apply(this,arguments)}}()),kW=de("search/fetchInstantResults",/*#__PURE__*/function(){var _ref33=_asyncToGenerator(function*(e,t){return Us(e,t)});return function(_x75,_x76){return _ref33.apply(this,arguments)}}()),IC=/*#__PURE__*/function(){var _ref34=_asyncToGenerator(function*(e,t){let r=yield kt(e,t);return r.request={...r.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},r});return function IC(_x77,_x78){return _ref34.apply(this,arguments)}}(),PC=/*#__PURE__*/function(){var _ref35=_asyncToGenerator(function*(e,t,r){let n=yield Pt(e);return xt({...n,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:r,q:t})});return function PC(_x79,_x80,_x81){return _ref35.apply(this,arguments)}}(),TC=/*#__PURE__*/function(){var _ref36=_asyncToGenerator(function*(e,t){let r=yield kt(e,t);return r.request.numberOfResults=0,r});return function TC(_x82,_x83){return _ref36.apply(this,arguments)}}(),zp=e=>{e.configuration.analytics.enabled&&Ze.getInstance().addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})};function Us(_x84,_x85){return _Us.apply(this,arguments)}function _Us(){_Us=_asyncToGenerator(function*(e,t){B(e,{id:G,q:G,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:r,maxResultsPerQuery:n}=e,o=t.getState(),i=new Ot({...t,analyticsAction:Np()},p=>{t.dispatch(ci({q:p,id:e.id}))}),a=yield PC(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 _Us.apply(this,arguments)}function Bs(_x86,_x87,_x88){return _Bs.apply(this,arguments)}function _Bs(){_Bs=_asyncToGenerator(function*(e,t,r){zp(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 kt(e,a),p=yield m.fetchFromAPI(f,{origin:"mainSearch"});return yield m.process(p)});return _Bs.apply(this,arguments)}function Qs(_x89,_x90){return _Qs.apply(this,arguments)}function _Qs(){_Qs=_asyncToGenerator(function*(e,t){let{analyticsClientMiddleware:r,preprocessRequest:n,logger:o}=e.extra,{description:i}=yield Vs().prepare({getState:()=>e.getState(),analyticsClientMiddleware:r,preprocessRequest:n,logger:o}),a=new Ot({...e,analyticsAction:Vs()}),m=yield IC(t,i),f=yield a.fetchFromAPI(m,{origin:"mainSearch"});return yield a.process(f)});return _Qs.apply(this,arguments)}function FC(_x91,_x92,_x93){return _FC.apply(this,arguments)}function _FC(){_FC=_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 TC(r,a),p=yield m.fetchFromAPI(f,{origin:"facetValues"});return yield m.process(p)});return _FC.apply(this,arguments)}function Si(_x94,_x95,_x96){return _Si.apply(this,arguments)}function _Si(){_Si=_asyncToGenerator(function*(e,t,r){zp(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i});a?.actionCause&&t.dispatch($s({actionCause:a.actionCause}));let m=yield kt(e,a),f=new Ot({...t,analyticsAction:r}),p=yield f.fetchFromAPI(m,{origin:"mainSearch"});return yield f.process(p)});return _Si.apply(this,arguments)}d();c();l();u();d();c();l();u();var Dt=/*#__PURE__*/function(){var _ref37=_asyncToGenerator(function*(e,t,r){let n=NC(e),o=kC(e),i=OC(e),a=e.configuration.analytics.analyticsMode==="legacy"?yield Pt(e,r):Lr(e,t,r),m=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return xt({...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:m(),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(_x97,_x98,_x99){return _ref37.apply(this,arguments)}}();function kC(e){return ds(qC(e),e.facetOrder??[])}function OC(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(DC).filter(r=>r.currentValues.length>0):void 0}function DC(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function qC(e){return MC(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function MC(e){return[...jC(e.facetSet??{}),...Wp(e.numericFacetSet??{}),...Wp(e.dateFacetSet??{}),...Rt(e.categoryFacetSet??{})]}function jC(e){return Rt(e).map(t=>{let r=ps[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function Wp(e){return Rt(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 NC(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=Bo(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}var qt=class{constructor(t,r=n=>{this.dispatch(Vr({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI(_x100,_x101){var _this17=this;return _asyncToGenerator(function*({mappings:t,request:r},n){let o=Date.now(),i=Uo(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 ke(t.response)?(this.dispatch(Ft(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(rt(_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 ke(i.response)?(_this20.dispatch(Ft(i.response.error)),_this20.rejectWithValue(i.response.error)):(_this20.dispatch(Xe(rt(_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(yi("")),null;let i=_this21.getCurrentQuery(),a=yield _this21.automaticallyRetryQueryWithTriggerModification(n);return ke(a.response)?(_this21.dispatch(Ft(a.response.error)),_this21.rejectWithValue(a.response.error)):(_this21.dispatch(Xe(rt(_this21.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i})})()}processSuccessResponse(t){return this.dispatch(Xe(rt(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery()}}getSuccessResponse(t){return Bn(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this22=this;return _asyncToGenerator(function*(){_this22.onUpdateQueryForCorrection(t);let r=_this22.getState(),{actionCause:n}=Vp(),o=yield _this22.fetchFromAPI(yield Dt(r,_this22.extra.navigatorContext,{actionCause:n}),{origin:"mainSearch"});return _this22.dispatch(gi(t)),o})()}automaticallyRetryQueryWithTriggerModification(t){var _this23=this;return _asyncToGenerator(function*(){return _this23.dispatch(hi({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 P2=de("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;B(e,{q:new H,enableQuerySyntax:new ne,clearFilters:new ne}),e.clearFilters&&(r(ni()),r(pp())),r(jp({allow:!0})),r(Vr({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(_r(1))}),$s=D("search/updateSearchAction"),Gp=de("search/executeSearch",/*#__PURE__*/function(){var _ref38=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Si(r,t,e.legacy);Kp(r);let n=e.next?Yp(e.next):void 0;t.dispatch($s(e.next));let o=yield Dt(r,t.extra.navigatorContext,n),i=new qt({...t,analyticsAction:n??{}}),a=yield i.fetchFromAPI(o,{origin:"mainSearch"});return yield i.process(a)});return function(_x102,_x103){return _ref38.apply(this,arguments)}}()),T2=de("search/fetchPage",/*#__PURE__*/function(){var _ref39=_asyncToGenerator(function*(e,t){let r=t.getState();if(Kp(r),r.configuration.analytics.analyticsMode==="legacy"||!e.next)return Bs(r,t,e.legacy);let n=new qt({...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(_x104,_x105){return _ref39.apply(this,arguments)}}()),F2=de("search/fetchMoreResults",/*#__PURE__*/function(){var _ref40=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Qs(t,r);let n=hl("browseResults",t.getState),o=new qt({...t,analyticsAction:n}),i=yield _C(r,t.extra.navigatorContext,n),a=yield o.fetchFromAPI(i,{origin:"mainSearch"});return yield o.process(a)});return function(_x106,_x107){return _ref40.apply(this,arguments)}}()),k2=de("search/fetchFacetValues",/*#__PURE__*/function(){var _ref41=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Si(r,t,e.legacy);let n=new qt({...t,analyticsAction:{}}),o=yield LC(r,t.extra.navigatorContext),i=yield n.fetchFromAPI(o,{origin:"facetValues"});return yield n.process(i)});return function(_x108,_x109){return _ref41.apply(this,arguments)}}()),O2=de("search/fetchInstantResults",/*#__PURE__*/function(){var _ref42=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Us(e,t);B(e,{id:G,q:G,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:n,maxResultsPerQuery:o}=e,i=Yp(_p()),a=yield VC(r,t.extra.navigatorContext,n,o,i),m=new qt({...t,analyticsAction:i},y=>{t.dispatch(ci({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(_x110,_x111){return _ref42.apply(this,arguments)}}()),_C=/*#__PURE__*/function(){var _ref43=_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 _C(_x112,_x113,_x114){return _ref43.apply(this,arguments)}}(),VC=/*#__PURE__*/function(){var _ref44=_asyncToGenerator(function*(e,t,r,n,o){let i=Lr(e,t,o);return xt({...i,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:n,q:r})});return function VC(_x115,_x116,_x117,_x118,_x119){return _ref44.apply(this,arguments)}}(),LC=/*#__PURE__*/function(){var _ref45=_asyncToGenerator(function*(e,t,r){let n=yield Dt(e,t,r);return n.request.numberOfResults=0,n});return function LC(_x120,_x121,_x122){return _ref45.apply(this,arguments)}}(),Kp=e=>{e.configuration.analytics.enabled&&Ze.getInstance().addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})},Yp=e=>({actionCause:e.actionCause,type:e.actionCause});var Jp=ge(Fn(),e=>{e.addCase(li,(t,r)=>{let n=Hs(t),o=r.payload;t.defaultNumberOfResults=t.numberOfResults=o,t.firstResult=kn(n,o)}).addCase(di,(t,r)=>{t.numberOfResults=r.payload,t.firstResult=0}).addCase(Go,t=>{t.firstResult=0}).addCase(pi,(t,r)=>{let n=r.payload;t.firstResult=kn(n,t.numberOfResults)}).addCase(_r,(t,r)=>{let n=r.payload;t.firstResult=kn(n,t.numberOfResults)}).addCase(mi,t=>{let r=Hs(t),n=Math.max(r-1,1);t.firstResult=kn(n,t.numberOfResults)}).addCase(fi,t=>{let r=Hs(t),n=BC(t),o=Math.min(r+1,n);t.firstResult=kn(o,t.numberOfResults)}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.numberOfResults=r.payload.pagination.numberOfResults,t.firstResult=r.payload.pagination.firstResult)}).addCase(vt,(t,r)=>{t.firstResult=r.payload.firstResult??t.firstResult,t.numberOfResults=r.payload.numberOfResults??t.defaultNumberOfResults}).addCase(Gp.fulfilled,(t,r)=>{let{response:n}=r.payload;t.totalCountFiltered=n.totalCountFiltered}).addCase(oi,t=>{Ie(t)}).addCase(Fp,t=>{Ie(t)}).addCase(wp,t=>{Ie(t)}).addCase(qp,t=>{Ie(t)}).addCase(vp,t=>{Ie(t)}).addCase(Ap,t=>{Ie(t)}).addCase(gp,t=>{Ie(t)}).addCase(mp,t=>{Ie(t)}).addCase(yp,t=>{Ie(t)}).addCase(Tp,t=>{Ie(t)}).addCase(Dp,t=>{Ie(t)}).addCase(ni,t=>{Ie(t)}).addCase(kp,t=>{Ie(t)}).addCase(Mp,t=>{Ie(t)}).addCase(Sp,t=>{Ie(t)}).addCase(fp,t=>{Ie(t)})});function Ie(e){e.firstResult=Fn().firstResult}function Hs(e){let{firstResult:t,numberOfResults:r}=e;return QC(t,r)}function BC(e){let{totalCountFiltered:t,numberOfResults:r}=e;return $C(t,r)}function kn(e,t){return(e-1)*t}function QC(e,t){return Math.round(e/t)+1}function $C(e,t){let r=Math.min(e,5e3);return Math.ceil(r/t)}function zs(e){return e.addReducers({pagination:Jp}),{nextPage:fi,previousPage:mi,registerNumberOfResults:li,registerPage:pi,updateNumberOfResults:di,updatePage:_r}}var HC=new Fe({id:new H({emptyAllowed:!0,required:!1,default:""}),numberOfRecommendations:new J({min:0})});function Xp(e,t={}){if(!zC(e))throw We;let r=It(e),{dispatch:n}=e,o=()=>e.state,i=vu(e,HC,t.options,"buildRecommendationList");return i.id!==""&&n(xr({id:i.id})),i.numberOfRecommendations&&n(zs(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 zC(e){return e.addReducers({recommendation:Rr,configuration:ze}),!0}d();c();l();u();d();c();l();u();function Zp(e,t,r){if(!WC(e))throw We;let n=1e3,o={selectionDelay:n,debounceWait:n,...t.options},i;return{select:Yo(r,o.debounceWait,{isImmediate:!0}),beginDelayedSelect(){i=setTimeout(r,o.selectionDelay)},cancelPendingSelect(){i&&clearTimeout(i)}}}function WC(e){return e.addReducers({configuration:ze}),!0}function ef(e,t){let r=!1,n=()=>{r||(r=!0,e.dispatch(Mo(t.options.result)))};return Zp(e,t,()=>{n()})}d();c();l();u();d();c();l();u();d();c();l();u();var Mt=()=>new H({required:!1,emptyAllowed:!0}),vi=D("advancedSearchQueries/update",e=>B(e,{aq:Mt(),cq:Mt(),lq:Mt(),dq:Mt()})),Ci=D("advancedSearchQueries/register",e=>B(e,{aq:Mt(),cq:Mt(),lq:Mt(),dq:Mt()}));var tf=ge(Tt(),e=>{e.addCase(vi,(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(vt,(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 GC(e){return e.addReducers({advancedSearchQueries:tf}),{updateAdvancedSearchQueries:vi,registerAdvancedSearchQueries:Ci}}d();c();l();u();function KC(e){return e.addReducers({configuration:ze}),{disableAnalytics:ur,enableAnalytics:lr,setOriginLevel2:no,setOriginLevel3:oo,updateAnalyticsConfiguration:cr,updateBasicConfiguration:St}}d();c();l();u();function YC(e){return e.addReducers({configuration:ze,pipeline:fr,searchHub:Ir}),{updateSearchConfiguration:Je}}d();c();l();u();function JC(e){return e.addReducers({context:ei}),{addContext:Gt,removeContext:Kt,setContext:Wt}}d();c();l();u();function XC(e){return e.addReducers({debug:co}),{disableDebug:ao,enableDebug:io}}d();c();l();u();function ZC(e){return e.addReducers({dictionaryFieldContext:ri}),{addContext:Mr,removeContext:jr,setContext:qr}}d();c();l();u();d();c();l();u();d();c();l();u();var eb={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})},rf=D("folding/register",e=>B(e,eb)),t3=de("folding/loadCollection",/*#__PURE__*/function(){var _ref46=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}}){let i=t(),a=i.configuration.analytics.analyticsMode==="legacy"?yield Pt(i):Lr(i,o),m=yield n.search({...a,q:tb(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 ke(m)?r(m.error):{collectionId:e,results:m.success.results,searchUid:m.success.searchUid,rootResult:i.folding.collections[e].result}});return function(_x123,_x124){return _ref46.apply(this,arguments)}}());function tb(e){return e.query.q===""?"":e.query.enableQuerySyntax?`${e.query.q} OR @uri`:`( <@- ${e.query.q} -@> ) OR @uri`}d();c();l();u();var nf=()=>({enabled:!1,fields:{collection:"foldingcollection",parent:"foldingparent",child:"foldingchild"},filterFieldRange:2,collections:{}});d();c();l();u();var Ur=D("fields/registerFieldsToInclude",e=>B(e,ro)),bi=D("fields/fetchall/enable"),Ai=D("fields/fetchall/disable"),wi=de("fields/fetchDescription",/*#__PURE__*/function(){var _ref47=_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??mt(m,a)});return ke(p)?n(p.error):p.success.fields});return function(_x125,_x126){return _ref47.apply(this,arguments)}}());d();c();l();u();var xi=["author","language","urihash","objecttype","collection","source","permanentid"],Ws=[...xi,"date","filetype","parents"],of=[...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"],af=()=>({fieldsToInclude:xi,fetchAllFields:!1,fieldsDescription:[]});var Ri=ge(af(),e=>e.addCase(Ur,(t,r)=>{t.fieldsToInclude=[...new Set(t.fieldsToInclude.concat(r.payload))]}).addCase(bi,t=>{t.fetchAllFields=!0}).addCase(Ai,t=>{t.fetchAllFields=!1}).addCase(wi.fulfilled,(t,{payload:r})=>{t.fieldsDescription=r}).addCase(rf,(t,{payload:r})=>{let n=nf().fields;t.fieldsToInclude.push(r.collectionField??n.collection,r.parentField??n.parent,r.childField??n.child)}));function rb(e){return e.addReducers({fields:Ri}),{registerFieldsToInclude:Ur,enableFetchAllFields:bi,disableFetchAllFields:Ai,fetchFieldsDescription:wi}}d();c();l();u();function nb(e){return e.addReducers({pipeline:fr}),{setPipeline:dr}}d();c();l();u();function ob(e){return e.addReducers({recommendation:Rr}),{getRecommendations:At,setRecommendationId:xr}}d();c();l();u();function ib(e){return e.addReducers({}),{logRecommendationOpen:Mo}}d();c();l();u();d();c();l();u();var ab=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:G})});function sf(){let e=[],t=r=>{let n=ab.validate(r);if(!r.conditions.every(i=>i instanceof Function))throw new Gr("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 cf(e){if(!sb(e))throw We;let{registerTemplates:t,selectTemplate:r,selectLinkTemplate:n}=sf();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 sb(e){return e.addReducers({fields:Ri}),!0}d();c();l();u();function cb(e){return e.addReducers({searchHub:Ir}),{setSearchHub:Er}}/**
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":b
46
46
  * limitations under the License.
47
47
  */if(__exports!=exports)module.exports=exports;return module.exports});
48
48
 
49
- window.coveoQuanticVersion = '3.27.0-pre.e8e95b2dbe';
49
+ window.coveoQuanticVersion = '3.27.0';