@dcl/landing-site 0.5.1-24686484792.commit-e56f2bf → 0.5.1-24696786650.commit-39f76cb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{AnimatedBackground-BbbuCmrW.js → AnimatedBackground-ChAxvzpE.js} +2 -2
- package/assets/{AnimatedBackground-BbbuCmrW.js.map → AnimatedBackground-ChAxvzpE.js.map} +1 -1
- package/assets/{AnimatedSection-CcAt5h6R.js → AnimatedSection-BTD2Dz_H.js} +1 -1
- package/assets/{AnimatedSection-CcAt5h6R.js.map → AnimatedSection-BTD2Dz_H.js.map} +1 -1
- package/assets/{ArrowBackIosNew-lqzUFZQL.js → ArrowBackIosNew-Dy0wgUVY.js} +1 -1
- package/assets/{ArrowBackIosNew-lqzUFZQL.js.map → ArrowBackIosNew-Dy0wgUVY.js.map} +1 -1
- package/assets/{AuthorPage-4inFQH2X.js → AuthorPage-Byuf4cVh.js} +1 -1
- package/assets/{AuthorPage-4inFQH2X.js.map → AuthorPage-Byuf4cVh.js.map} +1 -1
- package/assets/{Badges-DPcq_7dC.js → Badges-MRoIfo36.js} +1 -1
- package/assets/{Badges-DPcq_7dC.js.map → Badges-MRoIfo36.js.map} +1 -1
- package/assets/{BlogLayout-Bl9FID_L.js → BlogLayout-zeqeF6P_.js} +1 -1
- package/assets/{BlogLayout-Bl9FID_L.js.map → BlogLayout-zeqeF6P_.js.map} +1 -1
- package/assets/{BlogPage-4c8ZFzdw.js → BlogPage-D9JUOgNf.js} +1 -1
- package/assets/{BlogPage-4c8ZFzdw.js.map → BlogPage-D9JUOgNf.js.map} +1 -1
- package/assets/{CTAButton-D8_9d6Wu.js → CTAButton-dUbnAFrF.js} +1 -1
- package/assets/{CTAButton-D8_9d6Wu.js.map → CTAButton-dUbnAFrF.js.map} +1 -1
- package/assets/{CardContent-BQ0iSa2p.js → CardContent-C2Yp8bGg.js} +1 -1
- package/assets/{CardContent-BQ0iSa2p.js.map → CardContent-C2Yp8bGg.js.map} +1 -1
- package/assets/{CardMedia-B6PneSTk.js → CardMedia-B8io6l5d.js} +1 -1
- package/assets/{CardMedia-B6PneSTk.js.map → CardMedia-B8io6l5d.js.map} +1 -1
- package/assets/{Carousel-DJd7E-wq.js → Carousel-8PM_J7Qk.js} +1 -1
- package/assets/{Carousel-DJd7E-wq.js.map → Carousel-8PM_J7Qk.js.map} +1 -1
- package/assets/{CategoryPage-DNQI3nXz.js → CategoryPage-BgijBlf0.js} +1 -1
- package/assets/{CategoryPage-DNQI3nXz.js.map → CategoryPage-BgijBlf0.js.map} +1 -1
- package/assets/{CircleAndArrow-DIeWRbH9.js → CircleAndArrow-DeiiAyu0.js} +1 -1
- package/assets/{CircleAndArrow-DIeWRbH9.js.map → CircleAndArrow-DeiiAyu0.js.map} +1 -1
- package/assets/{CircularProgress-AsNM1BvH.js → CircularProgress-COCfVUkZ.js} +1 -1
- package/assets/{CircularProgress-AsNM1BvH.js.map → CircularProgress-COCfVUkZ.js.map} +1 -1
- package/assets/{ContentCopy-CDhBZqHF.js → ContentCopy-D1MZhJvE.js} +1 -1
- package/assets/{ContentCopy-CDhBZqHF.js.map → ContentCopy-D1MZhJvE.js.map} +1 -1
- package/assets/{CreateEventPage-NcQUT47j.js → CreateEventPage-hChmRJMr.js} +1 -1
- package/assets/CreateEventPage-hChmRJMr.js.map +1 -0
- package/assets/{CreatorHubDownload-y9x_B8ll.js → CreatorHubDownload-DYMGdevm.js} +1 -1
- package/assets/{CreatorHubDownload-y9x_B8ll.js.map → CreatorHubDownload-DYMGdevm.js.map} +1 -1
- package/assets/{CreatorHubDownloadSuccess-BP7MSbSp.js → CreatorHubDownloadSuccess-B_jSl9tg.js} +1 -1
- package/assets/{CreatorHubDownloadSuccess-BP7MSbSp.js.map → CreatorHubDownloadSuccess-B_jSl9tg.js.map} +1 -1
- package/assets/{DappsShell-HNAsXcn5.js → DappsShell-BicDTonr.js} +1 -1
- package/assets/{DappsShell-HNAsXcn5.js.map → DappsShell-BicDTonr.js.map} +1 -1
- package/assets/{DownloadSuccessLayout-COBp7A1N.js → DownloadSuccessLayout-CqT-1vfy.js} +1 -1
- package/assets/{DownloadSuccessLayout-COBp7A1N.js.map → DownloadSuccessLayout-CqT-1vfy.js.map} +1 -1
- package/assets/{Grow-eKASrvPe.js → Grow-BrqQ3k5X.js} +1 -1
- package/assets/{Grow-eKASrvPe.js.map → Grow-BrqQ3k5X.js.map} +1 -1
- package/assets/HomePage-BZg04XAY.js +3 -0
- package/assets/HomePage-BZg04XAY.js.map +1 -0
- package/assets/{InviteFaqs-BkOvxqyN.js → InviteFaqs-CsVkWLzg.js} +1 -1
- package/assets/{InviteFaqs-BkOvxqyN.js.map → InviteFaqs-CsVkWLzg.js.map} +1 -1
- package/assets/{InvitePage-D5lELZNP.js → InvitePage-BDekb47F.js} +2 -2
- package/assets/{InvitePage-D5lELZNP.js.map → InvitePage-BDekb47F.js.map} +1 -1
- package/assets/{JumpInIcon-bPOWl5ae.js → JumpInIcon-TFxEXFSr.js} +1 -1
- package/assets/{JumpInIcon-bPOWl5ae.js.map → JumpInIcon-TFxEXFSr.js.map} +1 -1
- package/assets/{LegalPageLayout-DeH35WpT.js → LegalPageLayout-DpJoq1IM.js} +1 -1
- package/assets/{LegalPageLayout-DeH35WpT.js.map → LegalPageLayout-DpJoq1IM.js.map} +1 -1
- package/assets/{Link-C3GGl2C6.js → Link-Knt-Kosk.js} +1 -1
- package/assets/{Link-C3GGl2C6.js.map → Link-Knt-Kosk.js.map} +1 -1
- package/assets/{MenuItem-B0piwgTa.js → MenuItem-ibmHV6zy.js} +1 -1
- package/assets/{MenuItem-B0piwgTa.js.map → MenuItem-ibmHV6zy.js.map} +1 -1
- package/assets/{Paper-BfSYUoim.js → Paper-DQs--rBO.js} +1 -1
- package/assets/{Paper-BfSYUoim.js.map → Paper-DQs--rBO.js.map} +1 -1
- package/assets/{PostCard-Zsk0_WYz.js → PostCard-BbfzA3Qx.js} +1 -1
- package/assets/{PostCard-Zsk0_WYz.js.map → PostCard-BbfzA3Qx.js.map} +1 -1
- package/assets/{PostPage-FBb63V37.js → PostPage-CosfC1Na.js} +1 -1
- package/assets/{PostPage-FBb63V37.js.map → PostPage-CosfC1Na.js.map} +1 -1
- package/assets/{PostPage.styled-B7Xofl3c.js → PostPage.styled-Dd-3Ce5F.js} +3 -3
- package/assets/{PostPage.styled-B7Xofl3c.js.map → PostPage.styled-Dd-3Ce5F.js.map} +1 -1
- package/assets/{PreviewPage-Dla6vQZW.js → PreviewPage-Dcx8YtgK.js} +1 -1
- package/assets/{PreviewPage-Dla6vQZW.js.map → PreviewPage-Dcx8YtgK.js.map} +1 -1
- package/assets/{SEO-CGGKu_zm.js → SEO-CwFoEftO.js} +1 -1
- package/assets/{SEO-CGGKu_zm.js.map → SEO-CwFoEftO.js.map} +1 -1
- package/assets/{SearchPage-ByMcz1c8.js → SearchPage-BUTdqyzo.js} +1 -1
- package/assets/{SearchPage-ByMcz1c8.js.map → SearchPage-BUTdqyzo.js.map} +1 -1
- package/assets/{SignInRedirect-BNwfxyGB.js → SignInRedirect-C-ss1k0l.js} +1 -1
- package/assets/{SignInRedirect-BNwfxyGB.js.map → SignInRedirect-C-ss1k0l.js.map} +1 -1
- package/assets/{SignInRedirect-Bxl1dwag.js → SignInRedirect-CsLtxSTb.js} +1 -1
- package/assets/{SignInRedirect-Bxl1dwag.js.map → SignInRedirect-CsLtxSTb.js.map} +1 -1
- package/assets/{Skeleton-BP1Os8gY.js → Skeleton-yDn4B-G5.js} +1 -1
- package/assets/{Skeleton-BP1Os8gY.js.map → Skeleton-yDn4B-G5.js.map} +1 -1
- package/assets/{TwitterEmbed-BbSYYog-.js → TwitterEmbed-CD3AmHIQ.js} +1 -1
- package/assets/{TwitterEmbed-BbSYYog-.js.map → TwitterEmbed-CD3AmHIQ.js.map} +1 -1
- package/assets/{Video--A0fBGqz.js → Video-phAvQnqc.js} +1 -1
- package/assets/{Video--A0fBGqz.js.map → Video-phAvQnqc.js.map} +1 -1
- package/assets/{WearablePreview-KunRQByO.js → WearablePreview-DJQBWbVv.js} +1 -1
- package/assets/{WearablePreview-KunRQByO.js.map → WearablePreview-DJQBWbVv.js.map} +1 -1
- package/assets/{auto-track-DJw7KsLA.js → auto-track-b36iF1aP.js} +1 -1
- package/assets/{auto-track-DJw7KsLA.js.map → auto-track-b36iF1aP.js.map} +1 -1
- package/assets/{ccip-EHA4QwVS.js → ccip-C--_xcyn.js} +1 -1
- package/assets/{ccip-EHA4QwVS.js.map → ccip-C--_xcyn.js.map} +1 -1
- package/assets/{createSvgIcon-CnAtXIjx.js → createSvgIcon-Ck-nYodG.js} +1 -1
- package/assets/{createSvgIcon-CnAtXIjx.js.map → createSvgIcon-Ck-nYodG.js.map} +1 -1
- package/assets/{download-Csh0UAX4.js → download-DdWNey2d.js} +2 -2
- package/assets/{download-Csh0UAX4.js.map → download-DdWNey2d.js.map} +1 -1
- package/assets/{downloadWithIdentity-imzC-1Iy.js → downloadWithIdentity-BySK_Bjg.js} +1 -1
- package/assets/{downloadWithIdentity-imzC-1Iy.js.map → downloadWithIdentity-BySK_Bjg.js.map} +1 -1
- package/assets/{events.client-BypQp_hx.js → events.client-CWWGjxi9.js} +1 -1
- package/assets/events.client-CWWGjxi9.js.map +1 -0
- package/assets/host_avatar-Gho9W3pF.webp +0 -0
- package/assets/host_scene-BStngEfA.webp +0 -0
- package/assets/{index-DwKCx_Fj.js → index-4Rn0RKA3.js} +17 -17
- package/assets/{index-DwKCx_Fj.js.map → index-4Rn0RKA3.js.map} +1 -1
- package/assets/{index-Hs2OtJ7_.js → index-AQyj9O_P.js} +1 -1
- package/assets/{index-Hs2OtJ7_.js.map → index-AQyj9O_P.js.map} +1 -1
- package/assets/{index-BtL1Whr6.js → index-BD4zd6ws.js} +1 -1
- package/assets/{index-BtL1Whr6.js.map → index-BD4zd6ws.js.map} +1 -1
- package/assets/{index-CqU_IKja.js → index-BJ7TnoEw.js} +1 -1
- package/assets/{index-CqU_IKja.js.map → index-BJ7TnoEw.js.map} +1 -1
- package/assets/{index-Bfn0rTR9.js → index-Bdgec4Ls.js} +1 -1
- package/assets/{index-Bfn0rTR9.js.map → index-Bdgec4Ls.js.map} +1 -1
- package/assets/{index-DV8UooZK.js → index-BjIVdBT0.js} +1 -1
- package/assets/{index-DV8UooZK.js.map → index-BjIVdBT0.js.map} +1 -1
- package/assets/{index-fmnLygLZ.js → index-BnaCJ0sp.js} +1 -1
- package/assets/{index-fmnLygLZ.js.map → index-BnaCJ0sp.js.map} +1 -1
- package/assets/{index-BO6ciUn8.js → index-C5c9wKGi.js} +1 -1
- package/assets/{index-BO6ciUn8.js.map → index-C5c9wKGi.js.map} +1 -1
- package/assets/{index-Bq7PojkE.js → index-CLRzSdDs.js} +1 -1
- package/assets/{index-Bq7PojkE.js.map → index-CLRzSdDs.js.map} +1 -1
- package/assets/{index-B-PLjKpI.js → index-CM1y4MwR.js} +1 -1
- package/assets/{index-B-PLjKpI.js.map → index-CM1y4MwR.js.map} +1 -1
- package/assets/{index-FcfsIuei.js → index-CSbcajOU.js} +1 -1
- package/assets/{index-FcfsIuei.js.map → index-CSbcajOU.js.map} +1 -1
- package/assets/{index-CC8b5SLA.js → index-CWHKL6N8.js} +1 -1
- package/assets/{index-CC8b5SLA.js.map → index-CWHKL6N8.js.map} +1 -1
- package/assets/index-CaN3aesa.js +1 -0
- package/assets/{index-DJdpP3iF.js.map → index-CaN3aesa.js.map} +1 -1
- package/assets/{index-CJ9b6HdV.js → index-CeX_Loqr.js} +1 -1
- package/assets/{index-CJ9b6HdV.js.map → index-CeX_Loqr.js.map} +1 -1
- package/assets/{index-BKY10VNY.js → index-Cjz0nm3N.js} +1 -1
- package/assets/{index-BKY10VNY.js.map → index-Cjz0nm3N.js.map} +1 -1
- package/assets/{index-pguZ7Pr7.js → index-CkaRi2_3.js} +2 -2
- package/assets/{index-pguZ7Pr7.js.map → index-CkaRi2_3.js.map} +1 -1
- package/assets/{index-XwRFjo-F.js → index-D6yjbNdZ.js} +3 -3
- package/assets/{index-XwRFjo-F.js.map → index-D6yjbNdZ.js.map} +1 -1
- package/assets/{index-0VgKmd34.js → index-DGs_qCuq.js} +1 -1
- package/assets/{index-0VgKmd34.js.map → index-DGs_qCuq.js.map} +1 -1
- package/assets/{index-DIU7xr_7.js → index-DHJSVI3a.js} +1 -1
- package/assets/{index-DIU7xr_7.js.map → index-DHJSVI3a.js.map} +1 -1
- package/assets/{index-KkMZZ6nz.js → index-DMpXTyjU.js} +1 -1
- package/assets/{index-KkMZZ6nz.js.map → index-DMpXTyjU.js.map} +1 -1
- package/assets/{index-iTL2dY0l.js → index-DXcPgEVs.js} +1 -1
- package/assets/{index-iTL2dY0l.js.map → index-DXcPgEVs.js.map} +1 -1
- package/assets/{index-BaEE4ZXP.js → index-D_URcwLX.js} +1 -1
- package/assets/{index-BaEE4ZXP.js.map → index-D_URcwLX.js.map} +1 -1
- package/assets/index-DckfeXPH.js +1 -0
- package/assets/index-DckfeXPH.js.map +1 -0
- package/assets/{index-CsY_wahP.js → index-Dg-O6Pur.js} +1 -1
- package/assets/{index-CsY_wahP.js.map → index-Dg-O6Pur.js.map} +1 -1
- package/assets/{index-CXMTgMUj.js → index-DhwtUY1f.js} +1 -1
- package/assets/{index-CXMTgMUj.js.map → index-DhwtUY1f.js.map} +1 -1
- package/assets/{index-Dx9lzInm.js → index-DrayNXRb.js} +1 -1
- package/assets/{index-Dx9lzInm.js.map → index-DrayNXRb.js.map} +1 -1
- package/assets/{index-CfKiEnnb.js → index-UYb7Po3h.js} +1 -1
- package/assets/{index-CfKiEnnb.js.map → index-UYb7Po3h.js.map} +1 -1
- package/assets/{index-Bd63106P.js → index-XKJmyO_p.js} +1 -1
- package/assets/{index-Bd63106P.js.map → index-XKJmyO_p.js.map} +1 -1
- package/assets/{index-BVu5N7d0.js → index-ZgulVRiq.js} +1 -1
- package/assets/{index-BVu5N7d0.js.map → index-ZgulVRiq.js.map} +1 -1
- package/assets/{index-DUmIu2EK.js → index-_DB-noma.js} +29 -29
- package/assets/{index-DUmIu2EK.js.map → index-_DB-noma.js.map} +1 -1
- package/assets/{index-DW87VeBc.js → index-mEd8fX0_.js} +1 -1
- package/assets/{index-DW87VeBc.js.map → index-mEd8fX0_.js.map} +1 -1
- package/assets/{index-BzmWmDt2.js → index-niWFQNCe.js} +1 -1
- package/assets/{index-BzmWmDt2.js.map → index-niWFQNCe.js.map} +1 -1
- package/assets/{profile.client-BtZZbgxj.js → profile.client-CmNJLNox.js} +1 -1
- package/assets/{profile.client-BtZZbgxj.js.map → profile.client-CmNJLNox.js.map} +1 -1
- package/assets/{shared.styled-D8qloAmp.js → shared.styled-8JiXG0YJ.js} +1 -1
- package/assets/{shared.styled-D8qloAmp.js.map → shared.styled-8JiXG0YJ.js.map} +1 -1
- package/assets/{store-OyTPwmKI.js → store-ChFhVM4L.js} +1 -1
- package/assets/{store-OyTPwmKI.js.map → store-ChFhVM4L.js.map} +1 -1
- package/assets/{url-BHzlJYXC.js → url-DaZlsYoU.js} +1 -1
- package/assets/{url-BHzlJYXC.js.map → url-DaZlsYoU.js.map} +1 -1
- package/assets/{useAuthIdentity-D2zQ3q5X.js → useAuthIdentity-CvL2aq09.js} +1 -1
- package/assets/{useAuthIdentity-D2zQ3q5X.js.map → useAuthIdentity-CvL2aq09.js.map} +1 -1
- package/assets/{useCreatorHubDownload-Dp_zMaiv.js → useCreatorHubDownload-EAoN-CCw.js} +1 -1
- package/assets/{useCreatorHubDownload-Dp_zMaiv.js.map → useCreatorHubDownload-EAoN-CCw.js.map} +1 -1
- package/assets/{useInfiniteBlogPosts-B9Mv_Fup.js → useInfiniteBlogPosts-Bp1S1sH2.js} +1 -1
- package/assets/{useInfiniteBlogPosts-B9Mv_Fup.js.map → useInfiniteBlogPosts-Bp1S1sH2.js.map} +1 -1
- package/assets/{useSlot-DM_UQPu8.js → useSlot-Cy5UGC7c.js} +1 -1
- package/assets/{useSlot-DM_UQPu8.js.map → useSlot-Cy5UGC7c.js.map} +1 -1
- package/assets/{utils-CJGePSnj.js → utils-Ci8rWaIt.js} +1 -1
- package/assets/{utils-CJGePSnj.js.map → utils-Ci8rWaIt.js.map} +1 -1
- package/index.html +15 -15
- package/package.json +3 -3
- package/assets/CreateEventPage-NcQUT47j.js.map +0 -1
- package/assets/HomePage-CZwkfB5G.js +0 -3
- package/assets/HomePage-CZwkfB5G.js.map +0 -1
- package/assets/events.client-BypQp_hx.js.map +0 -1
- package/assets/index-C1apFG92.js +0 -1
- package/assets/index-C1apFG92.js.map +0 -1
- package/assets/index-DJdpP3iF.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlogLayout-Bl9FID_L.js","sources":["../../node_modules/@contentful/rich-text-types/dist/cjs/blocks.js","../../node_modules/@contentful/rich-text-types/dist/cjs/inlines.js","../../node_modules/@contentful/rich-text-types/dist/cjs/marks.js","../../node_modules/@contentful/rich-text-types/dist/cjs/schemaConstraints.js","../../node_modules/@contentful/rich-text-types/dist/cjs/types.js","../../node_modules/@contentful/rich-text-types/dist/cjs/nodeTypes.js","../../node_modules/@contentful/rich-text-types/dist/cjs/emptyDocument.js","../../node_modules/@contentful/rich-text-types/dist/cjs/helpers.js","../../node_modules/is-plain-obj/index.js","../../node_modules/@contentful/rich-text-types/dist/cjs/validator/errors.js","../../node_modules/@contentful/rich-text-types/dist/cjs/validator/assert.js","../../node_modules/@contentful/rich-text-types/dist/cjs/validator/node.js","../../node_modules/@contentful/rich-text-types/dist/cjs/validator/path.js","../../node_modules/@contentful/rich-text-types/dist/cjs/validator/text.js","../../node_modules/@contentful/rich-text-types/dist/cjs/validator/index.js","../../node_modules/@contentful/rich-text-types/dist/cjs/index.js","../../node_modules/react-fast-compare/index.js","../../node_modules/invariant/browser.js","../../node_modules/shallowequal/index.js","../../node_modules/react-helmet-async/lib/index.esm.js","../../src/features/blog/blog.helpers.ts","../../src/shared/blog/utils/date.ts","../../src/shared/blog/utils/locations.ts","../../src/shared/blog/utils/string.ts","../../src/features/blog/blog.mappers.ts","../../src/features/blog/blog.client.ts","../../node_modules/@algolia/requester-browser-xhr/dist/requester.xhr.js","../../node_modules/@algolia/client-common/dist/common.js","../../node_modules/@algolia/abtesting/dist/builds/browser.js","../../node_modules/@algolia/client-abtesting/dist/builds/browser.js","../../node_modules/@algolia/client-analytics/dist/builds/browser.js","../../node_modules/@algolia/client-insights/dist/builds/browser.js","../../node_modules/@algolia/client-personalization/dist/builds/browser.js","../../node_modules/@algolia/client-query-suggestions/dist/builds/browser.js","../../node_modules/@algolia/client-search/dist/builds/browser.js","../../node_modules/@algolia/ingestion/dist/builds/browser.js","../../node_modules/@algolia/monitoring/dist/builds/browser.js","../../node_modules/@algolia/recommend/dist/builds/browser.js","../../node_modules/algoliasearch/dist/browser.js","../../src/features/search/search.client.ts","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/blog/Search/sanitizeHighlight.ts","../../src/components/blog/utils/safeCssUrl.ts","../../src/components/blog/Search/Search.styled.ts","../../src/components/blog/Search/Search.tsx","../../src/components/blog/BlogNavigation/BlogNavigation.styled.ts","../../src/components/blog/BlogNavigation/BlogNavigation.tsx","../../src/components/blog/BlogLayout.styled.ts","../../src/components/blog/BlogLayout.tsx"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"BLOCKS\", {\n enumerable: true,\n get: function() {\n return BLOCKS;\n }\n});\nvar BLOCKS = /*#__PURE__*/ function(BLOCKS) {\n BLOCKS[\"DOCUMENT\"] = \"document\";\n BLOCKS[\"PARAGRAPH\"] = \"paragraph\";\n BLOCKS[\"HEADING_1\"] = \"heading-1\";\n BLOCKS[\"HEADING_2\"] = \"heading-2\";\n BLOCKS[\"HEADING_3\"] = \"heading-3\";\n BLOCKS[\"HEADING_4\"] = \"heading-4\";\n BLOCKS[\"HEADING_5\"] = \"heading-5\";\n BLOCKS[\"HEADING_6\"] = \"heading-6\";\n BLOCKS[\"OL_LIST\"] = \"ordered-list\";\n BLOCKS[\"UL_LIST\"] = \"unordered-list\";\n BLOCKS[\"LIST_ITEM\"] = \"list-item\";\n BLOCKS[\"HR\"] = \"hr\";\n BLOCKS[\"QUOTE\"] = \"blockquote\";\n BLOCKS[\"EMBEDDED_ENTRY\"] = \"embedded-entry-block\";\n BLOCKS[\"EMBEDDED_ASSET\"] = \"embedded-asset-block\";\n BLOCKS[\"EMBEDDED_RESOURCE\"] = \"embedded-resource-block\";\n BLOCKS[\"TABLE\"] = \"table\";\n BLOCKS[\"TABLE_ROW\"] = \"table-row\";\n BLOCKS[\"TABLE_CELL\"] = \"table-cell\";\n BLOCKS[\"TABLE_HEADER_CELL\"] = \"table-header-cell\";\n return BLOCKS;\n}({});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"INLINES\", {\n enumerable: true,\n get: function() {\n return INLINES;\n }\n});\nvar INLINES = /*#__PURE__*/ function(INLINES) {\n INLINES[\"ASSET_HYPERLINK\"] = \"asset-hyperlink\";\n INLINES[\"EMBEDDED_ENTRY\"] = \"embedded-entry-inline\";\n INLINES[\"EMBEDDED_RESOURCE\"] = \"embedded-resource-inline\";\n INLINES[\"ENTRY_HYPERLINK\"] = \"entry-hyperlink\";\n INLINES[\"HYPERLINK\"] = \"hyperlink\";\n INLINES[\"RESOURCE_HYPERLINK\"] = \"resource-hyperlink\";\n return INLINES;\n}({});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"MARKS\", {\n enumerable: true,\n get: function() {\n return MARKS;\n }\n});\nvar MARKS = /*#__PURE__*/ function(MARKS) {\n MARKS[\"BOLD\"] = \"bold\";\n MARKS[\"ITALIC\"] = \"italic\";\n MARKS[\"UNDERLINE\"] = \"underline\";\n MARKS[\"CODE\"] = \"code\";\n MARKS[\"SUPERSCRIPT\"] = \"superscript\";\n MARKS[\"SUBSCRIPT\"] = \"subscript\";\n MARKS[\"STRIKETHROUGH\"] = \"strikethrough\";\n return MARKS;\n}({});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get CONTAINERS () {\n return CONTAINERS;\n },\n get HEADINGS () {\n return HEADINGS;\n },\n get LIST_ITEM_BLOCKS () {\n return LIST_ITEM_BLOCKS;\n },\n get TABLE_BLOCKS () {\n return TABLE_BLOCKS;\n },\n get TEXT_CONTAINERS () {\n return TEXT_CONTAINERS;\n },\n get TOP_LEVEL_BLOCKS () {\n return TOP_LEVEL_BLOCKS;\n },\n get V1_MARKS () {\n return V1_MARKS;\n },\n get V1_NODE_TYPES () {\n return V1_NODE_TYPES;\n },\n get VOID_BLOCKS () {\n return VOID_BLOCKS;\n }\n});\nvar _blocks = require(\"./blocks.js\");\nvar _inlines = require(\"./inlines.js\");\nvar _marks = require(\"./marks.js\");\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar TOP_LEVEL_BLOCKS = [\n _blocks.BLOCKS.PARAGRAPH,\n _blocks.BLOCKS.HEADING_1,\n _blocks.BLOCKS.HEADING_2,\n _blocks.BLOCKS.HEADING_3,\n _blocks.BLOCKS.HEADING_4,\n _blocks.BLOCKS.HEADING_5,\n _blocks.BLOCKS.HEADING_6,\n _blocks.BLOCKS.OL_LIST,\n _blocks.BLOCKS.UL_LIST,\n _blocks.BLOCKS.HR,\n _blocks.BLOCKS.QUOTE,\n _blocks.BLOCKS.EMBEDDED_ENTRY,\n _blocks.BLOCKS.EMBEDDED_ASSET,\n _blocks.BLOCKS.EMBEDDED_RESOURCE,\n _blocks.BLOCKS.TABLE\n];\nvar LIST_ITEM_BLOCKS = [\n _blocks.BLOCKS.PARAGRAPH,\n _blocks.BLOCKS.HEADING_1,\n _blocks.BLOCKS.HEADING_2,\n _blocks.BLOCKS.HEADING_3,\n _blocks.BLOCKS.HEADING_4,\n _blocks.BLOCKS.HEADING_5,\n _blocks.BLOCKS.HEADING_6,\n _blocks.BLOCKS.OL_LIST,\n _blocks.BLOCKS.UL_LIST,\n _blocks.BLOCKS.HR,\n _blocks.BLOCKS.QUOTE,\n _blocks.BLOCKS.EMBEDDED_ENTRY,\n _blocks.BLOCKS.EMBEDDED_ASSET,\n _blocks.BLOCKS.EMBEDDED_RESOURCE\n];\nvar TABLE_BLOCKS = [\n _blocks.BLOCKS.TABLE,\n _blocks.BLOCKS.TABLE_ROW,\n _blocks.BLOCKS.TABLE_CELL,\n _blocks.BLOCKS.TABLE_HEADER_CELL\n];\nvar VOID_BLOCKS = [\n _blocks.BLOCKS.HR,\n _blocks.BLOCKS.EMBEDDED_ENTRY,\n _blocks.BLOCKS.EMBEDDED_ASSET,\n _blocks.BLOCKS.EMBEDDED_RESOURCE\n];\nvar _obj;\nvar CONTAINERS = (_obj = {}, _define_property(_obj, _blocks.BLOCKS.OL_LIST, [\n _blocks.BLOCKS.LIST_ITEM\n]), _define_property(_obj, _blocks.BLOCKS.UL_LIST, [\n _blocks.BLOCKS.LIST_ITEM\n]), _define_property(_obj, _blocks.BLOCKS.LIST_ITEM, LIST_ITEM_BLOCKS), _define_property(_obj, _blocks.BLOCKS.QUOTE, [\n _blocks.BLOCKS.PARAGRAPH\n]), _define_property(_obj, _blocks.BLOCKS.TABLE, [\n _blocks.BLOCKS.TABLE_ROW\n]), _define_property(_obj, _blocks.BLOCKS.TABLE_ROW, [\n _blocks.BLOCKS.TABLE_CELL,\n _blocks.BLOCKS.TABLE_HEADER_CELL\n]), _define_property(_obj, _blocks.BLOCKS.TABLE_CELL, [\n _blocks.BLOCKS.PARAGRAPH,\n _blocks.BLOCKS.UL_LIST,\n _blocks.BLOCKS.OL_LIST\n]), _define_property(_obj, _blocks.BLOCKS.TABLE_HEADER_CELL, [\n _blocks.BLOCKS.PARAGRAPH\n]), _obj);\nvar HEADINGS = [\n _blocks.BLOCKS.HEADING_1,\n _blocks.BLOCKS.HEADING_2,\n _blocks.BLOCKS.HEADING_3,\n _blocks.BLOCKS.HEADING_4,\n _blocks.BLOCKS.HEADING_5,\n _blocks.BLOCKS.HEADING_6\n];\nvar TEXT_CONTAINERS = [\n _blocks.BLOCKS.PARAGRAPH\n].concat(_to_consumable_array(HEADINGS));\nvar V1_NODE_TYPES = [\n _blocks.BLOCKS.DOCUMENT,\n _blocks.BLOCKS.PARAGRAPH,\n _blocks.BLOCKS.HEADING_1,\n _blocks.BLOCKS.HEADING_2,\n _blocks.BLOCKS.HEADING_3,\n _blocks.BLOCKS.HEADING_4,\n _blocks.BLOCKS.HEADING_5,\n _blocks.BLOCKS.HEADING_6,\n _blocks.BLOCKS.OL_LIST,\n _blocks.BLOCKS.UL_LIST,\n _blocks.BLOCKS.LIST_ITEM,\n _blocks.BLOCKS.HR,\n _blocks.BLOCKS.QUOTE,\n _blocks.BLOCKS.EMBEDDED_ENTRY,\n _blocks.BLOCKS.EMBEDDED_ASSET,\n _inlines.INLINES.HYPERLINK,\n _inlines.INLINES.ENTRY_HYPERLINK,\n _inlines.INLINES.ASSET_HYPERLINK,\n _inlines.INLINES.EMBEDDED_ENTRY,\n 'text'\n];\nvar V1_MARKS = [\n _marks.MARKS.BOLD,\n _marks.MARKS.CODE,\n _marks.MARKS.ITALIC,\n _marks.MARKS.UNDERLINE\n];\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"EMPTY_DOCUMENT\", {\n enumerable: true,\n get: function() {\n return EMPTY_DOCUMENT;\n }\n});\nvar _blocks = require(\"./blocks.js\");\nvar EMPTY_DOCUMENT = {\n nodeType: _blocks.BLOCKS.DOCUMENT,\n data: {},\n content: [\n {\n nodeType: _blocks.BLOCKS.PARAGRAPH,\n data: {},\n content: [\n {\n nodeType: 'text',\n value: '',\n marks: [],\n data: {}\n }\n ]\n }\n ]\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get isBlock () {\n return isBlock;\n },\n get isEmptyParagraph () {\n return isEmptyParagraph;\n },\n get isInline () {\n return isInline;\n },\n get isText () {\n return isText;\n },\n get stripEmptyTrailingParagraphFromDocument () {\n return stripEmptyTrailingParagraphFromDocument;\n }\n});\nvar _blocks = require(\"./blocks.js\");\nvar _inlines = require(\"./inlines.js\");\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction hasValue(obj, value) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;\n try {\n for(var _iterator = Object.keys(obj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){\n var key = _step.value;\n if (value === obj[key]) {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally{\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally{\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return false;\n}\nfunction isInline(node) {\n return hasValue(_inlines.INLINES, node.nodeType);\n}\nfunction isBlock(node) {\n return hasValue(_blocks.BLOCKS, node.nodeType);\n}\nfunction isText(node) {\n return node.nodeType === 'text';\n}\nfunction isEmptyParagraph(node) {\n if (node.nodeType !== _blocks.BLOCKS.PARAGRAPH) {\n return false;\n }\n if (node.content.length !== 1) {\n return false;\n }\n var textNode = node.content[0];\n return textNode.nodeType === 'text' && textNode.value === '';\n}\nfunction isValidDocument(document) {\n return document != null && (typeof document === \"undefined\" ? \"undefined\" : _type_of(document)) === 'object' && 'content' in document && Array.isArray(document.content);\n}\nvar MIN_NODES_FOR_STRIPPING = 2;\nfunction stripEmptyTrailingParagraphFromDocument(document) {\n if (!isValidDocument(document) || document.content.length < MIN_NODES_FOR_STRIPPING) {\n return document;\n }\n var lastNode = document.content[document.content.length - 1];\n if (isEmptyParagraph(lastNode)) {\n return _object_spread_props(_object_spread({}, document), {\n content: document.content.slice(0, -1)\n });\n }\n return document;\n}\n","'use strict';\n\nmodule.exports = value => {\n\tif (Object.prototype.toString.call(value) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === null || prototype === Object.prototype;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get enumError () {\n return enumError;\n },\n get maxSizeError () {\n return maxSizeError;\n },\n get minSizeError () {\n return minSizeError;\n },\n get requiredPropertyError () {\n return requiredPropertyError;\n },\n get typeMismatchError () {\n return typeMismatchError;\n },\n get unknownPropertyError () {\n return unknownPropertyError;\n }\n});\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar typeMismatchError = function(param) {\n var path = param.path, property = param.property, typeName = param.typeName, value = param.value;\n return {\n details: 'The type of \"'.concat(property, '\" is incorrect, expected type: ').concat(typeName),\n name: 'type',\n path: path.toArray(),\n type: typeName,\n value: value\n };\n};\nvar minSizeError = function(param) {\n var min = param.min, value = param.value, path = param.path;\n return {\n name: 'size',\n min: min,\n path: path.toArray(),\n details: \"Size must be at least \".concat(min),\n value: value\n };\n};\nvar maxSizeError = function(param) {\n var max = param.max, value = param.value, path = param.path;\n return {\n name: 'size',\n max: max,\n path: path.toArray(),\n details: \"Size must be at most \".concat(max),\n value: value\n };\n};\nvar enumError = function(param) {\n var expected = param.expected, value = param.value, path = param.path;\n return {\n details: \"Value must be one of expected values\",\n name: 'in',\n expected: _to_consumable_array(expected).sort(),\n path: path.toArray(),\n value: value\n };\n};\nvar unknownPropertyError = function(param) {\n var property = param.property, path = param.path;\n return {\n details: 'The property \"'.concat(property, '\" is not expected'),\n name: 'unexpected',\n path: path.toArray()\n };\n};\nvar requiredPropertyError = function(param) {\n var property = param.property, path = param.path;\n return {\n details: 'The property \"'.concat(property, '\" is required here'),\n name: 'required',\n path: path.toArray()\n };\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"ObjectAssertion\", {\n enumerable: true,\n get: function() {\n return ObjectAssertion;\n }\n});\nvar _isplainobj = /*#__PURE__*/ _interop_require_default(require(\"is-plain-obj\"));\nvar _errors = require(\"./errors.js\");\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _create_class(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar ObjectAssertion = /*#__PURE__*/ function() {\n \"use strict\";\n function ObjectAssertion(obj, path) {\n var _this = this;\n var _this1 = this;\n _class_call_check(this, ObjectAssertion);\n _define_property(this, \"obj\", void 0);\n _define_property(this, \"path\", void 0);\n _define_property(this, \"_errors\", void 0);\n _define_property(this, \"catch\", void 0);\n _define_property(this, \"exists\", void 0);\n _define_property(this, \"object\", void 0);\n _define_property(this, \"string\", void 0);\n _define_property(this, \"number\", void 0);\n _define_property(this, \"array\", void 0);\n _define_property(this, \"enum\", void 0);\n _define_property(this, \"empty\", void 0);\n _define_property(this, \"minLength\", void 0);\n _define_property(this, \"noAdditionalProperties\", void 0);\n _define_property(this, \"each\", void 0);\n this.obj = obj;\n this.path = path;\n this._errors = [];\n this.catch = function() {\n for(var _len = arguments.length, errors = new Array(_len), _key = 0; _key < _len; _key++){\n errors[_key] = arguments[_key];\n }\n var _this__errors;\n (_this__errors = _this1._errors).push.apply(_this__errors, _to_consumable_array(errors));\n };\n this.exists = function(key) {\n if (key in _this.obj) {\n return true;\n }\n _this.catch((0, _errors.requiredPropertyError)({\n property: key,\n path: _this.path.of(key)\n }));\n return false;\n };\n this.object = function(key) {\n var value = key ? _this.obj[key] : _this.obj;\n if (key) {\n if (!_this.exists(key)) {\n return false;\n }\n }\n if ((0, _isplainobj.default)(value)) {\n return true;\n }\n var _$path = key ? _this.path.of(key) : _this.path;\n var _ref;\n var property = (_ref = key !== null && key !== void 0 ? key : _this.path.last()) !== null && _ref !== void 0 ? _ref : 'value';\n _this.catch((0, _errors.typeMismatchError)({\n typeName: 'Object',\n property: property,\n path: _$path,\n value: value\n }));\n return false;\n };\n this.string = function(key) {\n var value = _this.obj[key];\n if (key && !_this.exists(key)) {\n return false;\n }\n if (typeof value === 'string') {\n return true;\n }\n _this.catch((0, _errors.typeMismatchError)({\n typeName: 'String',\n property: key,\n path: _this.path.of(key),\n value: value\n }));\n return false;\n };\n this.number = function(key, optional) {\n var value = _this.obj[key];\n if (optional && !(key in _this.obj)) {\n return true;\n }\n if (!_this.exists(key)) {\n return false;\n }\n if (typeof value === 'number' && !Number.isNaN(value)) {\n return true;\n }\n _this.catch((0, _errors.typeMismatchError)({\n typeName: 'Number',\n property: key,\n path: _this.path.of(key),\n value: value\n }));\n return false;\n };\n this.array = function(key) {\n var value = _this.obj[key];\n if (key && !_this.exists(key)) {\n return false;\n }\n if (Array.isArray(value)) {\n return true;\n }\n _this.catch((0, _errors.typeMismatchError)({\n typeName: 'Array',\n property: key,\n path: _this.path.of(key),\n value: value\n }));\n return false;\n };\n this.enum = function(key, expected) {\n var value = _this.obj[key];\n if (typeof value === 'string' && expected.includes(value)) {\n return true;\n }\n _this.catch((0, _errors.enumError)({\n expected: expected,\n value: value,\n path: _this.path.of(key)\n }));\n return false;\n };\n this.empty = function(key) {\n if (!_this.array(key)) {\n return false;\n }\n var value = _this.obj[key];\n if (value.length === 0) {\n return true;\n }\n _this.catch((0, _errors.maxSizeError)({\n max: 0,\n value: value,\n path: _this.path.of(key)\n }));\n return false;\n };\n this.minLength = function(key, min) {\n if (!_this.array(key)) {\n return false;\n }\n var value = _this.obj[key];\n if (value.length >= min) {\n return true;\n }\n _this.catch((0, _errors.minSizeError)({\n min: min,\n value: value,\n path: _this.path.of(key)\n }));\n return false;\n };\n this.noAdditionalProperties = function(properties) {\n var unknowns = Object.keys(_this.obj).sort().filter(function(key) {\n return !properties.includes(key);\n });\n unknowns.forEach(function(property) {\n return _this.catch((0, _errors.unknownPropertyError)({\n property: property,\n path: _this.path.of(property)\n }));\n });\n return unknowns.length === 0;\n };\n this.each = function(key, assert) {\n if (!_this.array(key)) {\n return;\n }\n var value = _this.obj[key];\n var foundErrors = false;\n value.forEach(function(item, index) {\n if (foundErrors) {\n return;\n }\n var errors = assert(item, _this.path.of(key).of(index));\n if (errors.length > 0) {\n foundErrors = true;\n }\n _this.catch.apply(_this, _to_consumable_array(errors));\n });\n };\n }\n _create_class(ObjectAssertion, [\n {\n key: \"errors\",\n get: function get() {\n var _this = this;\n var serializeError = function(error) {\n return JSON.stringify({\n details: error.details,\n path: error.path\n });\n };\n return this._errors.filter(function(error, index) {\n return _this._errors.findIndex(function(step) {\n return serializeError(error) === serializeError(step);\n }) === index;\n });\n }\n }\n ]);\n return ObjectAssertion;\n}();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get EntityLinkAssertion () {\n return EntityLinkAssertion;\n },\n get HyperLinkAssertion () {\n return HyperLinkAssertion;\n },\n get NodeAssertion () {\n return NodeAssertion;\n },\n get VOID_CONTENT () {\n return VOID_CONTENT;\n },\n get assert () {\n return assert;\n },\n get assertLink () {\n return assertLink;\n }\n});\nvar _assert = require(\"./assert.js\");\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _assert_this_initialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _call_super(_this, derived, args) {\n derived = _get_prototype_of(derived);\n return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _create_class(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _get_prototype_of(o) {\n _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _get_prototype_of(o);\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _set_prototype_of(subClass, superClass);\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _possible_constructor_return(self, call) {\n if (call && (_type_of(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assert_this_initialized(self);\n}\nfunction _set_prototype_of(o, p) {\n _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _set_prototype_of(o, p);\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nfunction _is_native_reflect_construct() {\n try {\n var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));\n } catch (_) {}\n return (_is_native_reflect_construct = function() {\n return !!result;\n })();\n}\nvar VOID_CONTENT = [];\nvar NodeAssertion = /*#__PURE__*/ function() {\n \"use strict\";\n function NodeAssertion(contentRule, validateData) {\n _class_call_check(this, NodeAssertion);\n _define_property(this, \"contentRule\", void 0);\n _define_property(this, \"validateData\", void 0);\n this.contentRule = contentRule;\n this.validateData = validateData;\n }\n _create_class(NodeAssertion, [\n {\n key: \"assert\",\n value: function assert(node, path) {\n var $ = new _assert.ObjectAssertion(node, path);\n if (!$.object()) {\n return $.errors;\n }\n $.noAdditionalProperties([\n 'nodeType',\n 'data',\n 'content'\n ]);\n var _ref = Array.isArray(this.contentRule) ? {\n nodeTypes: this.contentRule\n } : this.contentRule(node, path), nodeTypes = _ref.nodeTypes, _ref_min = _ref.min, min = _ref_min === void 0 ? 0 : _ref_min;\n if (nodeTypes.length === 0 && min > 0) {\n throw new Error(\"Invalid content rule. Cannot have enforce a 'min' of \".concat(min, \" with no nodeTypes\"));\n }\n $.minLength('content', min);\n if (nodeTypes.length === 0) {\n $.empty('content');\n } else {\n $.each('content', function(item, path) {\n var item$ = new _assert.ObjectAssertion(item, path);\n if (!item$.object()) {\n return item$.errors;\n }\n item$.enum('nodeType', nodeTypes);\n return item$.errors;\n });\n }\n if ($.object('data')) {\n var _$;\n var _this_validateData, _this;\n var _this_validateData1;\n var dataErrors = (_this_validateData1 = (_this_validateData = (_this = this).validateData) === null || _this_validateData === void 0 ? void 0 : _this_validateData.call(_this, node.data, path.of('data'))) !== null && _this_validateData1 !== void 0 ? _this_validateData1 : [];\n (_$ = $).catch.apply(_$, _to_consumable_array(dataErrors));\n }\n return $.errors;\n }\n }\n ]);\n return NodeAssertion;\n}();\nvar EntityLinkAssertion = /*#__PURE__*/ function(NodeAssertion) {\n \"use strict\";\n _inherits(EntityLinkAssertion, NodeAssertion);\n function EntityLinkAssertion(linkType, contentNodeTypes) {\n _class_call_check(this, EntityLinkAssertion);\n var _this;\n _this = _call_super(this, EntityLinkAssertion, [\n contentNodeTypes,\n function(data, path) {\n return _assert_this_initialized(_this).assertLink(data, path);\n }\n ]), _define_property(_this, \"linkType\", void 0), _define_property(_this, \"type\", void 0), _define_property(_this, \"assertLink\", void 0), _this.linkType = linkType, _this.assertLink = function(data, path) {\n var $ = new _assert.ObjectAssertion(data, path);\n if ($.object('target')) {\n var _$;\n var sys$ = new _assert.ObjectAssertion(data.target.sys, path.of('target').of('sys'));\n if (sys$.object()) {\n sys$.enum('type', [\n _this.type\n ]);\n sys$.enum('linkType', [\n _this.linkType\n ]);\n if (_this.type === 'Link') {\n sys$.string('id');\n sys$.noAdditionalProperties([\n 'type',\n 'linkType',\n 'id'\n ]);\n } else if (_this.type === 'ResourceLink') {\n sys$.string('urn');\n sys$.noAdditionalProperties([\n 'type',\n 'linkType',\n 'urn'\n ]);\n }\n }\n (_$ = $).catch.apply(_$, _to_consumable_array(sys$.errors));\n }\n $.noAdditionalProperties([\n 'target'\n ]);\n return $.errors;\n };\n _this.type = _this.linkType.startsWith('Contentful:') ? 'ResourceLink' : 'Link';\n return _this;\n }\n return EntityLinkAssertion;\n}(NodeAssertion);\nvar HyperLinkAssertion = /*#__PURE__*/ function(NodeAssertion) {\n \"use strict\";\n _inherits(HyperLinkAssertion, NodeAssertion);\n function HyperLinkAssertion() {\n _class_call_check(this, HyperLinkAssertion);\n var _this;\n _this = _call_super(this, HyperLinkAssertion, [\n [\n 'text'\n ],\n function(data, path) {\n return _assert_this_initialized(_this).assertLink(data, path);\n }\n ]), _define_property(_this, \"assertLink\", function(data, path) {\n var $ = new _assert.ObjectAssertion(data, path);\n $.string('uri');\n $.noAdditionalProperties([\n 'uri'\n ]);\n return $.errors;\n });\n return _this;\n }\n return HyperLinkAssertion;\n}(NodeAssertion);\nvar assert = function(contentRule, validateData) {\n return new NodeAssertion(contentRule, validateData);\n};\nvar assertLink = function(linkType, contentRule) {\n return new EntityLinkAssertion(linkType, contentRule);\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Path\", {\n enumerable: true,\n get: function() {\n return Path;\n }\n});\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar Path = function Path() {\n \"use strict\";\n var _this = this;\n var path = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];\n _class_call_check(this, Path);\n _define_property(this, \"path\", void 0);\n _define_property(this, \"of\", void 0);\n _define_property(this, \"isRoot\", void 0);\n _define_property(this, \"last\", void 0);\n _define_property(this, \"toArray\", void 0);\n this.path = path;\n this.of = function(element) {\n return new Path(_to_consumable_array(_this.path).concat([\n element\n ]));\n };\n this.isRoot = function() {\n return _this.path.length === 0;\n };\n this.last = function() {\n return _this.path[_this.path.length - 1];\n };\n this.toArray = function() {\n return _this.path;\n };\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"assertText\", {\n enumerable: true,\n get: function() {\n return assertText;\n }\n});\nvar _assert = require(\"./assert.js\");\nfunction assertText(text, path) {\n var $ = new _assert.ObjectAssertion(text, path);\n if (!$.object()) {\n return $.errors;\n }\n $.noAdditionalProperties([\n 'nodeType',\n 'data',\n 'value',\n 'marks'\n ]);\n $.object('data');\n $.each('marks', function(mark, path) {\n var mark$ = new _assert.ObjectAssertion(mark, path);\n if (!mark$.object()) {\n return mark$.errors;\n }\n mark$.string('type');\n return mark$.errors;\n });\n $.string('value');\n return $.errors;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"validateRichTextDocument\", {\n enumerable: true,\n get: function() {\n return validateRichTextDocument;\n }\n});\nvar _blocks = require(\"../blocks.js\");\nvar _inlines = require(\"../inlines.js\");\nvar _schemaConstraints = require(\"../schemaConstraints.js\");\nvar _assert = require(\"./assert.js\");\nvar _node = require(\"./node.js\");\nvar _path = require(\"./path.js\");\nvar _text = require(\"./text.js\");\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar assertInlineOrText = (0, _node.assert)(_to_consumable_array(Object.values(_inlines.INLINES)).concat([\n 'text'\n]).sort());\nvar assertList = (0, _node.assert)([\n _blocks.BLOCKS.LIST_ITEM\n]);\nvar assertVoidEntryLink = (0, _node.assertLink)('Entry', _node.VOID_CONTENT);\nvar assertTableCell = (0, _node.assert)(function() {\n return {\n nodeTypes: [\n _blocks.BLOCKS.PARAGRAPH\n ],\n min: 1\n };\n}, function(data, path) {\n var $ = new _assert.ObjectAssertion(data, path);\n $.noAdditionalProperties([\n 'colspan',\n 'rowspan'\n ]);\n $.number('colspan', true);\n $.number('rowspan', true);\n return $.errors;\n});\nvar _obj;\nvar nodeValidator = (_obj = {}, _define_property(_obj, _blocks.BLOCKS.DOCUMENT, (0, _node.assert)(_schemaConstraints.TOP_LEVEL_BLOCKS)), _define_property(_obj, _blocks.BLOCKS.PARAGRAPH, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_1, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_2, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_3, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_4, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_5, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_6, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.QUOTE, (0, _node.assert)(_schemaConstraints.CONTAINERS[_blocks.BLOCKS.QUOTE])), _define_property(_obj, _blocks.BLOCKS.EMBEDDED_ENTRY, assertVoidEntryLink), _define_property(_obj, _blocks.BLOCKS.EMBEDDED_ASSET, (0, _node.assertLink)('Asset', _node.VOID_CONTENT)), _define_property(_obj, _blocks.BLOCKS.EMBEDDED_RESOURCE, (0, _node.assertLink)('Contentful:Entry', _node.VOID_CONTENT)), _define_property(_obj, _blocks.BLOCKS.HR, (0, _node.assert)(_node.VOID_CONTENT)), _define_property(_obj, _blocks.BLOCKS.OL_LIST, assertList), _define_property(_obj, _blocks.BLOCKS.UL_LIST, assertList), _define_property(_obj, _blocks.BLOCKS.LIST_ITEM, (0, _node.assert)(_to_consumable_array(_schemaConstraints.LIST_ITEM_BLOCKS).sort())), _define_property(_obj, _blocks.BLOCKS.TABLE, (0, _node.assert)(function() {\n return {\n nodeTypes: [\n _blocks.BLOCKS.TABLE_ROW\n ],\n min: 1\n };\n})), _define_property(_obj, _blocks.BLOCKS.TABLE_ROW, (0, _node.assert)(function() {\n return {\n nodeTypes: [\n _blocks.BLOCKS.TABLE_CELL,\n _blocks.BLOCKS.TABLE_HEADER_CELL\n ],\n min: 1\n };\n})), _define_property(_obj, _blocks.BLOCKS.TABLE_CELL, assertTableCell), _define_property(_obj, _blocks.BLOCKS.TABLE_HEADER_CELL, assertTableCell), _define_property(_obj, _inlines.INLINES.HYPERLINK, new _node.HyperLinkAssertion()), _define_property(_obj, _inlines.INLINES.EMBEDDED_ENTRY, assertVoidEntryLink), _define_property(_obj, _inlines.INLINES.EMBEDDED_RESOURCE, (0, _node.assertLink)('Contentful:Entry', _node.VOID_CONTENT)), _define_property(_obj, _inlines.INLINES.ENTRY_HYPERLINK, (0, _node.assertLink)('Entry', [\n 'text'\n])), _define_property(_obj, _inlines.INLINES.ASSET_HYPERLINK, (0, _node.assertLink)('Asset', [\n 'text'\n])), _define_property(_obj, _inlines.INLINES.RESOURCE_HYPERLINK, (0, _node.assertLink)('Contentful:Entry', [\n 'text'\n])), _obj);\nfunction validateNode(node, path) {\n if (node.nodeType === 'text') {\n return (0, _text.assertText)(node, path);\n }\n var errors = nodeValidator[node.nodeType].assert(node, path);\n if (errors.length > 0) {\n return errors;\n }\n var $ = new _assert.ObjectAssertion(node, path);\n $.each('content', function(item, path) {\n return validateNode(item, path);\n });\n return $.errors;\n}\nvar validateRichTextDocument = function(document) {\n var path = new _path.Path();\n var $ = new _assert.ObjectAssertion(document, path);\n if ($.object()) {\n $.enum('nodeType', [\n _blocks.BLOCKS.DOCUMENT\n ]);\n }\n if ($.errors.length > 0) {\n return $.errors;\n }\n return validateNode(document, path);\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get BLOCKS () {\n return _blocks.BLOCKS;\n },\n get EMPTY_DOCUMENT () {\n return _emptyDocument.EMPTY_DOCUMENT;\n },\n get INLINES () {\n return _inlines.INLINES;\n },\n get MARKS () {\n return _marks.MARKS;\n },\n get helpers () {\n return _helpers;\n },\n get validateRichTextDocument () {\n return _index.validateRichTextDocument;\n }\n});\nvar _blocks = require(\"./blocks.js\");\nvar _inlines = require(\"./inlines.js\");\nvar _marks = require(\"./marks.js\");\n_export_star(require(\"./schemaConstraints.js\"), exports);\n_export_star(require(\"./types.js\"), exports);\n_export_star(require(\"./nodeTypes.js\"), exports);\nvar _emptyDocument = require(\"./emptyDocument.js\");\nvar _helpers = /*#__PURE__*/ _interop_require_wildcard(require(\"./helpers.js\"));\nvar _index = require(\"./validator/index.js\");\nfunction _export_star(from, to) {\n Object.keys(from).forEach(function(k) {\n if (k !== \"default\" && !Object.prototype.hasOwnProperty.call(to, k)) {\n Object.defineProperty(to, k, {\n enumerable: true,\n get: function() {\n return from[k];\n }\n });\n }\n });\n return from;\n}\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interop_require_wildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n var cache = _getRequireWildcardCache(nodeInterop);\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {\n __proto__: null\n };\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for(var key in obj){\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\n","/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.3\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n // START: Modifications:\n // Apply guards for `Object.create(null)` handling. See:\n // - https://github.com/FormidableLabs/react-fast-compare/issues/64\n // - https://github.com/epoberezkin/fast-deep-equal/issues/49\n if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();\n // END: Modifications\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","//\n\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if (ret !== void 0) {\n return !!ret;\n }\n\n if (objA === objB) {\n return true;\n }\n\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n // Test for A's keys different from B.\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n\n if (!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if (ret === false || (ret === void 0 && valueA !== valueB)) {\n return false;\n }\n }\n\n return true;\n};\n","// src/index.tsx\nimport React3, { Component as Component3 } from \"react\";\nimport fastCompare from \"react-fast-compare\";\nimport invariant from \"invariant\";\n\n// src/Provider.tsx\nimport React2, { Component } from \"react\";\n\n// src/server.ts\nimport React from \"react\";\n\n// src/constants.ts\nvar TAG_NAMES = /* @__PURE__ */ ((TAG_NAMES2) => {\n TAG_NAMES2[\"BASE\"] = \"base\";\n TAG_NAMES2[\"BODY\"] = \"body\";\n TAG_NAMES2[\"HEAD\"] = \"head\";\n TAG_NAMES2[\"HTML\"] = \"html\";\n TAG_NAMES2[\"LINK\"] = \"link\";\n TAG_NAMES2[\"META\"] = \"meta\";\n TAG_NAMES2[\"NOSCRIPT\"] = \"noscript\";\n TAG_NAMES2[\"SCRIPT\"] = \"script\";\n TAG_NAMES2[\"STYLE\"] = \"style\";\n TAG_NAMES2[\"TITLE\"] = \"title\";\n TAG_NAMES2[\"FRAGMENT\"] = \"Symbol(react.fragment)\";\n return TAG_NAMES2;\n})(TAG_NAMES || {});\nvar SEO_PRIORITY_TAGS = {\n link: { rel: [\"amphtml\", \"canonical\", \"alternate\"] },\n script: { type: [\"application/ld+json\"] },\n meta: {\n charset: \"\",\n name: [\"generator\", \"robots\", \"description\"],\n property: [\n \"og:type\",\n \"og:title\",\n \"og:url\",\n \"og:image\",\n \"og:image:alt\",\n \"og:description\",\n \"twitter:url\",\n \"twitter:title\",\n \"twitter:description\",\n \"twitter:image\",\n \"twitter:image:alt\",\n \"twitter:card\",\n \"twitter:site\"\n ]\n }\n};\nvar VALID_TAG_NAMES = Object.values(TAG_NAMES);\nvar REACT_TAG_MAP = {\n accesskey: \"accessKey\",\n charset: \"charSet\",\n class: \"className\",\n contenteditable: \"contentEditable\",\n contextmenu: \"contextMenu\",\n \"http-equiv\": \"httpEquiv\",\n itemprop: \"itemProp\",\n tabindex: \"tabIndex\"\n};\nvar HTML_TAG_MAP = Object.entries(REACT_TAG_MAP).reduce(\n (carry, [key, value]) => {\n carry[value] = key;\n return carry;\n },\n {}\n);\nvar HELMET_ATTRIBUTE = \"data-rh\";\n\n// src/utils.ts\nvar HELMET_PROPS = {\n DEFAULT_TITLE: \"defaultTitle\",\n DEFER: \"defer\",\n ENCODE_SPECIAL_CHARACTERS: \"encodeSpecialCharacters\",\n ON_CHANGE_CLIENT_STATE: \"onChangeClientState\",\n TITLE_TEMPLATE: \"titleTemplate\",\n PRIORITIZE_SEO_TAGS: \"prioritizeSeoTags\"\n};\nvar getInnermostProperty = (propsList, property) => {\n for (let i = propsList.length - 1; i >= 0; i -= 1) {\n const props = propsList[i];\n if (Object.prototype.hasOwnProperty.call(props, property)) {\n return props[property];\n }\n }\n return null;\n};\nvar getTitleFromPropsList = (propsList) => {\n let innermostTitle = getInnermostProperty(propsList, \"title\" /* TITLE */);\n const innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);\n if (Array.isArray(innermostTitle)) {\n innermostTitle = innermostTitle.join(\"\");\n }\n if (innermostTemplate && innermostTitle) {\n return innermostTemplate.replace(/%s/g, () => innermostTitle);\n }\n const innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);\n return innermostTitle || innermostDefaultTitle || void 0;\n};\nvar getOnChangeClientState = (propsList) => getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || (() => {\n});\nvar getAttributesFromPropsList = (tagType, propsList) => propsList.filter((props) => typeof props[tagType] !== \"undefined\").map((props) => props[tagType]).reduce((tagAttrs, current) => ({ ...tagAttrs, ...current }), {});\nvar getBaseTagFromPropsList = (primaryAttributes, propsList) => propsList.filter((props) => typeof props[\"base\" /* BASE */] !== \"undefined\").map((props) => props[\"base\" /* BASE */]).reverse().reduce((innermostBaseTag, tag) => {\n if (!innermostBaseTag.length) {\n const keys = Object.keys(tag);\n for (let i = 0; i < keys.length; i += 1) {\n const attributeKey = keys[i];\n const lowerCaseAttributeKey = attributeKey.toLowerCase();\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {\n return innermostBaseTag.concat(tag);\n }\n }\n }\n return innermostBaseTag;\n}, []);\nvar warn = (msg) => console && typeof console.warn === \"function\" && console.warn(msg);\nvar getTagsFromPropsList = (tagName, primaryAttributes, propsList) => {\n const approvedSeenTags = {};\n return propsList.filter((props) => {\n if (Array.isArray(props[tagName])) {\n return true;\n }\n if (typeof props[tagName] !== \"undefined\") {\n warn(\n `Helmet: ${tagName} should be of type \"Array\". Instead found type \"${typeof props[tagName]}\"`\n );\n }\n return false;\n }).map((props) => props[tagName]).reverse().reduce((approvedTags, instanceTags) => {\n const instanceSeenTags = {};\n instanceTags.filter((tag) => {\n let primaryAttributeKey;\n const keys2 = Object.keys(tag);\n for (let i = 0; i < keys2.length; i += 1) {\n const attributeKey = keys2[i];\n const lowerCaseAttributeKey = attributeKey.toLowerCase();\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === \"rel\" /* REL */ && tag[primaryAttributeKey].toLowerCase() === \"canonical\") && !(lowerCaseAttributeKey === \"rel\" /* REL */ && tag[lowerCaseAttributeKey].toLowerCase() === \"stylesheet\")) {\n primaryAttributeKey = lowerCaseAttributeKey;\n }\n if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === \"innerHTML\" /* INNER_HTML */ || attributeKey === \"cssText\" /* CSS_TEXT */ || attributeKey === \"itemprop\" /* ITEM_PROP */)) {\n primaryAttributeKey = attributeKey;\n }\n }\n if (!primaryAttributeKey || !tag[primaryAttributeKey]) {\n return false;\n }\n const value = tag[primaryAttributeKey].toLowerCase();\n if (!approvedSeenTags[primaryAttributeKey]) {\n approvedSeenTags[primaryAttributeKey] = {};\n }\n if (!instanceSeenTags[primaryAttributeKey]) {\n instanceSeenTags[primaryAttributeKey] = {};\n }\n if (!approvedSeenTags[primaryAttributeKey][value]) {\n instanceSeenTags[primaryAttributeKey][value] = true;\n return true;\n }\n return false;\n }).reverse().forEach((tag) => approvedTags.push(tag));\n const keys = Object.keys(instanceSeenTags);\n for (let i = 0; i < keys.length; i += 1) {\n const attributeKey = keys[i];\n const tagUnion = {\n ...approvedSeenTags[attributeKey],\n ...instanceSeenTags[attributeKey]\n };\n approvedSeenTags[attributeKey] = tagUnion;\n }\n return approvedTags;\n }, []).reverse();\n};\nvar getAnyTrueFromPropsList = (propsList, checkedTag) => {\n if (Array.isArray(propsList) && propsList.length) {\n for (let index = 0; index < propsList.length; index += 1) {\n const prop = propsList[index];\n if (prop[checkedTag]) {\n return true;\n }\n }\n }\n return false;\n};\nvar reducePropsToState = (propsList) => ({\n baseTag: getBaseTagFromPropsList([\"href\" /* HREF */], propsList),\n bodyAttributes: getAttributesFromPropsList(\"bodyAttributes\" /* BODY */, propsList),\n defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),\n encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),\n htmlAttributes: getAttributesFromPropsList(\"htmlAttributes\" /* HTML */, propsList),\n linkTags: getTagsFromPropsList(\n \"link\" /* LINK */,\n [\"rel\" /* REL */, \"href\" /* HREF */],\n propsList\n ),\n metaTags: getTagsFromPropsList(\n \"meta\" /* META */,\n [\n \"name\" /* NAME */,\n \"charset\" /* CHARSET */,\n \"http-equiv\" /* HTTPEQUIV */,\n \"property\" /* PROPERTY */,\n \"itemprop\" /* ITEM_PROP */\n ],\n propsList\n ),\n noscriptTags: getTagsFromPropsList(\"noscript\" /* NOSCRIPT */, [\"innerHTML\" /* INNER_HTML */], propsList),\n onChangeClientState: getOnChangeClientState(propsList),\n scriptTags: getTagsFromPropsList(\n \"script\" /* SCRIPT */,\n [\"src\" /* SRC */, \"innerHTML\" /* INNER_HTML */],\n propsList\n ),\n styleTags: getTagsFromPropsList(\"style\" /* STYLE */, [\"cssText\" /* CSS_TEXT */], propsList),\n title: getTitleFromPropsList(propsList),\n titleAttributes: getAttributesFromPropsList(\"titleAttributes\" /* TITLE */, propsList),\n prioritizeSeoTags: getAnyTrueFromPropsList(propsList, HELMET_PROPS.PRIORITIZE_SEO_TAGS)\n});\nvar flattenArray = (possibleArray) => Array.isArray(possibleArray) ? possibleArray.join(\"\") : possibleArray;\nvar checkIfPropsMatch = (props, toMatch) => {\n const keys = Object.keys(props);\n for (let i = 0; i < keys.length; i += 1) {\n if (toMatch[keys[i]] && toMatch[keys[i]].includes(props[keys[i]])) {\n return true;\n }\n }\n return false;\n};\nvar prioritizer = (elementsList, propsToMatch) => {\n if (Array.isArray(elementsList)) {\n return elementsList.reduce(\n (acc, elementAttrs) => {\n if (checkIfPropsMatch(elementAttrs, propsToMatch)) {\n acc.priority.push(elementAttrs);\n } else {\n acc.default.push(elementAttrs);\n }\n return acc;\n },\n { priority: [], default: [] }\n );\n }\n return { default: elementsList, priority: [] };\n};\nvar without = (obj, key) => {\n return {\n ...obj,\n [key]: void 0\n };\n};\n\n// src/server.ts\nvar SELF_CLOSING_TAGS = [\"noscript\" /* NOSCRIPT */, \"script\" /* SCRIPT */, \"style\" /* STYLE */];\nvar encodeSpecialCharacters = (str, encode = true) => {\n if (encode === false) {\n return String(str);\n }\n return String(str).replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\");\n};\nvar generateElementAttributesAsString = (attributes) => Object.keys(attributes).reduce((str, key) => {\n const attr = typeof attributes[key] !== \"undefined\" ? `${key}=\"${attributes[key]}\"` : `${key}`;\n return str ? `${str} ${attr}` : attr;\n}, \"\");\nvar generateTitleAsString = (type, title, attributes, encode) => {\n const attributeString = generateElementAttributesAsString(attributes);\n const flattenedTitle = flattenArray(title);\n return attributeString ? `<${type} ${HELMET_ATTRIBUTE}=\"true\" ${attributeString}>${encodeSpecialCharacters(\n flattenedTitle,\n encode\n )}</${type}>` : `<${type} ${HELMET_ATTRIBUTE}=\"true\">${encodeSpecialCharacters(\n flattenedTitle,\n encode\n )}</${type}>`;\n};\nvar generateTagsAsString = (type, tags, encode = true) => tags.reduce((str, t) => {\n const tag = t;\n const attributeHtml = Object.keys(tag).filter(\n (attribute) => !(attribute === \"innerHTML\" /* INNER_HTML */ || attribute === \"cssText\" /* CSS_TEXT */)\n ).reduce((string, attribute) => {\n const attr = typeof tag[attribute] === \"undefined\" ? attribute : `${attribute}=\"${encodeSpecialCharacters(tag[attribute], encode)}\"`;\n return string ? `${string} ${attr}` : attr;\n }, \"\");\n const tagContent = tag.innerHTML || tag.cssText || \"\";\n const isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;\n return `${str}<${type} ${HELMET_ATTRIBUTE}=\"true\" ${attributeHtml}${isSelfClosing ? `/>` : `>${tagContent}</${type}>`}`;\n}, \"\");\nvar convertElementAttributesToReactProps = (attributes, initProps = {}) => Object.keys(attributes).reduce((obj, key) => {\n const mapped = REACT_TAG_MAP[key];\n obj[mapped || key] = attributes[key];\n return obj;\n}, initProps);\nvar generateTitleAsReactComponent = (_type, title, attributes) => {\n const initProps = {\n key: title,\n [HELMET_ATTRIBUTE]: true\n };\n const props = convertElementAttributesToReactProps(attributes, initProps);\n return [React.createElement(\"title\" /* TITLE */, props, title)];\n};\nvar generateTagsAsReactComponent = (type, tags) => tags.map((tag, i) => {\n const mappedTag = {\n key: i,\n [HELMET_ATTRIBUTE]: true\n };\n Object.keys(tag).forEach((attribute) => {\n const mapped = REACT_TAG_MAP[attribute];\n const mappedAttribute = mapped || attribute;\n if (mappedAttribute === \"innerHTML\" /* INNER_HTML */ || mappedAttribute === \"cssText\" /* CSS_TEXT */) {\n const content = tag.innerHTML || tag.cssText;\n mappedTag.dangerouslySetInnerHTML = { __html: content };\n } else {\n mappedTag[mappedAttribute] = tag[attribute];\n }\n });\n return React.createElement(type, mappedTag);\n});\nvar getMethodsForTag = (type, tags, encode = true) => {\n switch (type) {\n case \"title\" /* TITLE */:\n return {\n toComponent: () => generateTitleAsReactComponent(type, tags.title, tags.titleAttributes),\n toString: () => generateTitleAsString(type, tags.title, tags.titleAttributes, encode)\n };\n case \"bodyAttributes\" /* BODY */:\n case \"htmlAttributes\" /* HTML */:\n return {\n toComponent: () => convertElementAttributesToReactProps(tags),\n toString: () => generateElementAttributesAsString(tags)\n };\n default:\n return {\n toComponent: () => generateTagsAsReactComponent(type, tags),\n toString: () => generateTagsAsString(type, tags, encode)\n };\n }\n};\nvar getPriorityMethods = ({ metaTags, linkTags, scriptTags, encode }) => {\n const meta = prioritizer(metaTags, SEO_PRIORITY_TAGS.meta);\n const link = prioritizer(linkTags, SEO_PRIORITY_TAGS.link);\n const script = prioritizer(scriptTags, SEO_PRIORITY_TAGS.script);\n const priorityMethods = {\n toComponent: () => [\n ...generateTagsAsReactComponent(\"meta\" /* META */, meta.priority),\n ...generateTagsAsReactComponent(\"link\" /* LINK */, link.priority),\n ...generateTagsAsReactComponent(\"script\" /* SCRIPT */, script.priority)\n ],\n toString: () => (\n // generate all the tags as strings and concatenate them\n `${getMethodsForTag(\"meta\" /* META */, meta.priority, encode)} ${getMethodsForTag(\n \"link\" /* LINK */,\n link.priority,\n encode\n )} ${getMethodsForTag(\"script\" /* SCRIPT */, script.priority, encode)}`\n )\n };\n return {\n priorityMethods,\n metaTags: meta.default,\n linkTags: link.default,\n scriptTags: script.default\n };\n};\nvar mapStateOnServer = (props) => {\n const {\n baseTag,\n bodyAttributes,\n encode = true,\n htmlAttributes,\n noscriptTags,\n styleTags,\n title = \"\",\n titleAttributes,\n prioritizeSeoTags\n } = props;\n let { linkTags, metaTags, scriptTags } = props;\n let priorityMethods = {\n toComponent: () => {\n },\n toString: () => \"\"\n };\n if (prioritizeSeoTags) {\n ({ priorityMethods, linkTags, metaTags, scriptTags } = getPriorityMethods(props));\n }\n return {\n priority: priorityMethods,\n base: getMethodsForTag(\"base\" /* BASE */, baseTag, encode),\n bodyAttributes: getMethodsForTag(\"bodyAttributes\" /* BODY */, bodyAttributes, encode),\n htmlAttributes: getMethodsForTag(\"htmlAttributes\" /* HTML */, htmlAttributes, encode),\n link: getMethodsForTag(\"link\" /* LINK */, linkTags, encode),\n meta: getMethodsForTag(\"meta\" /* META */, metaTags, encode),\n noscript: getMethodsForTag(\"noscript\" /* NOSCRIPT */, noscriptTags, encode),\n script: getMethodsForTag(\"script\" /* SCRIPT */, scriptTags, encode),\n style: getMethodsForTag(\"style\" /* STYLE */, styleTags, encode),\n title: getMethodsForTag(\"title\" /* TITLE */, { title, titleAttributes }, encode)\n };\n};\nvar server_default = mapStateOnServer;\n\n// src/HelmetData.ts\nvar instances = [];\nvar isDocument = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar HelmetData = class {\n instances = [];\n canUseDOM = isDocument;\n context;\n value = {\n setHelmet: (serverState) => {\n this.context.helmet = serverState;\n },\n helmetInstances: {\n get: () => this.canUseDOM ? instances : this.instances,\n add: (instance) => {\n (this.canUseDOM ? instances : this.instances).push(instance);\n },\n remove: (instance) => {\n const index = (this.canUseDOM ? instances : this.instances).indexOf(instance);\n (this.canUseDOM ? instances : this.instances).splice(index, 1);\n }\n }\n };\n constructor(context, canUseDOM) {\n this.context = context;\n this.canUseDOM = canUseDOM || false;\n if (!canUseDOM) {\n context.helmet = server_default({\n baseTag: [],\n bodyAttributes: {},\n encodeSpecialCharacters: true,\n htmlAttributes: {},\n linkTags: [],\n metaTags: [],\n noscriptTags: [],\n scriptTags: [],\n styleTags: [],\n title: \"\",\n titleAttributes: {}\n });\n }\n }\n};\n\n// src/Provider.tsx\nvar defaultValue = {};\nvar Context = React2.createContext(defaultValue);\nvar HelmetProvider = class _HelmetProvider extends Component {\n static canUseDOM = isDocument;\n helmetData;\n constructor(props) {\n super(props);\n this.helmetData = new HelmetData(this.props.context || {}, _HelmetProvider.canUseDOM);\n }\n render() {\n return /* @__PURE__ */ React2.createElement(Context.Provider, { value: this.helmetData.value }, this.props.children);\n }\n};\n\n// src/Dispatcher.tsx\nimport { Component as Component2 } from \"react\";\nimport shallowEqual from \"shallowequal\";\n\n// src/client.ts\nvar updateTags = (type, tags) => {\n const headElement = document.head || document.querySelector(\"head\" /* HEAD */);\n const tagNodes = headElement.querySelectorAll(`${type}[${HELMET_ATTRIBUTE}]`);\n const oldTags = [].slice.call(tagNodes);\n const newTags = [];\n let indexToDelete;\n if (tags && tags.length) {\n tags.forEach((tag) => {\n const newElement = document.createElement(type);\n for (const attribute in tag) {\n if (Object.prototype.hasOwnProperty.call(tag, attribute)) {\n if (attribute === \"innerHTML\" /* INNER_HTML */) {\n newElement.innerHTML = tag.innerHTML;\n } else if (attribute === \"cssText\" /* CSS_TEXT */) {\n if (newElement.styleSheet) {\n newElement.styleSheet.cssText = tag.cssText;\n } else {\n newElement.appendChild(document.createTextNode(tag.cssText));\n }\n } else {\n const attr = attribute;\n const value = typeof tag[attr] === \"undefined\" ? \"\" : tag[attr];\n newElement.setAttribute(attribute, value);\n }\n }\n }\n newElement.setAttribute(HELMET_ATTRIBUTE, \"true\");\n if (oldTags.some((existingTag, index) => {\n indexToDelete = index;\n return newElement.isEqualNode(existingTag);\n })) {\n oldTags.splice(indexToDelete, 1);\n } else {\n newTags.push(newElement);\n }\n });\n }\n oldTags.forEach((tag) => tag.parentNode?.removeChild(tag));\n newTags.forEach((tag) => headElement.appendChild(tag));\n return {\n oldTags,\n newTags\n };\n};\nvar updateAttributes = (tagName, attributes) => {\n const elementTag = document.getElementsByTagName(tagName)[0];\n if (!elementTag) {\n return;\n }\n const helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);\n const helmetAttributes = helmetAttributeString ? helmetAttributeString.split(\",\") : [];\n const attributesToRemove = [...helmetAttributes];\n const attributeKeys = Object.keys(attributes);\n for (const attribute of attributeKeys) {\n const value = attributes[attribute] || \"\";\n if (elementTag.getAttribute(attribute) !== value) {\n elementTag.setAttribute(attribute, value);\n }\n if (helmetAttributes.indexOf(attribute) === -1) {\n helmetAttributes.push(attribute);\n }\n const indexToSave = attributesToRemove.indexOf(attribute);\n if (indexToSave !== -1) {\n attributesToRemove.splice(indexToSave, 1);\n }\n }\n for (let i = attributesToRemove.length - 1; i >= 0; i -= 1) {\n elementTag.removeAttribute(attributesToRemove[i]);\n }\n if (helmetAttributes.length === attributesToRemove.length) {\n elementTag.removeAttribute(HELMET_ATTRIBUTE);\n } else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(\",\")) {\n elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(\",\"));\n }\n};\nvar updateTitle = (title, attributes) => {\n if (typeof title !== \"undefined\" && document.title !== title) {\n document.title = flattenArray(title);\n }\n updateAttributes(\"title\" /* TITLE */, attributes);\n};\nvar commitTagChanges = (newState, cb) => {\n const {\n baseTag,\n bodyAttributes,\n htmlAttributes,\n linkTags,\n metaTags,\n noscriptTags,\n onChangeClientState,\n scriptTags,\n styleTags,\n title,\n titleAttributes\n } = newState;\n updateAttributes(\"body\" /* BODY */, bodyAttributes);\n updateAttributes(\"html\" /* HTML */, htmlAttributes);\n updateTitle(title, titleAttributes);\n const tagUpdates = {\n baseTag: updateTags(\"base\" /* BASE */, baseTag),\n linkTags: updateTags(\"link\" /* LINK */, linkTags),\n metaTags: updateTags(\"meta\" /* META */, metaTags),\n noscriptTags: updateTags(\"noscript\" /* NOSCRIPT */, noscriptTags),\n scriptTags: updateTags(\"script\" /* SCRIPT */, scriptTags),\n styleTags: updateTags(\"style\" /* STYLE */, styleTags)\n };\n const addedTags = {};\n const removedTags = {};\n Object.keys(tagUpdates).forEach((tagType) => {\n const { newTags, oldTags } = tagUpdates[tagType];\n if (newTags.length) {\n addedTags[tagType] = newTags;\n }\n if (oldTags.length) {\n removedTags[tagType] = tagUpdates[tagType].oldTags;\n }\n });\n if (cb) {\n cb();\n }\n onChangeClientState(newState, addedTags, removedTags);\n};\nvar _helmetCallback = null;\nvar handleStateChangeOnClient = (newState) => {\n if (_helmetCallback) {\n cancelAnimationFrame(_helmetCallback);\n }\n if (newState.defer) {\n _helmetCallback = requestAnimationFrame(() => {\n commitTagChanges(newState, () => {\n _helmetCallback = null;\n });\n });\n } else {\n commitTagChanges(newState);\n _helmetCallback = null;\n }\n};\nvar client_default = handleStateChangeOnClient;\n\n// src/Dispatcher.tsx\nvar HelmetDispatcher = class extends Component2 {\n rendered = false;\n shouldComponentUpdate(nextProps) {\n return !shallowEqual(nextProps, this.props);\n }\n componentDidUpdate() {\n this.emitChange();\n }\n componentWillUnmount() {\n const { helmetInstances } = this.props.context;\n helmetInstances.remove(this);\n this.emitChange();\n }\n emitChange() {\n const { helmetInstances, setHelmet } = this.props.context;\n let serverState = null;\n const state = reducePropsToState(\n helmetInstances.get().map((instance) => {\n const props = { ...instance.props };\n delete props.context;\n return props;\n })\n );\n if (HelmetProvider.canUseDOM) {\n client_default(state);\n } else if (server_default) {\n serverState = server_default(state);\n }\n setHelmet(serverState);\n }\n // componentWillMount will be deprecated\n // for SSR, initialize on first render\n // constructor is also unsafe in StrictMode\n init() {\n if (this.rendered) {\n return;\n }\n this.rendered = true;\n const { helmetInstances } = this.props.context;\n helmetInstances.add(this);\n this.emitChange();\n }\n render() {\n this.init();\n return null;\n }\n};\n\n// src/index.tsx\nvar Helmet = class extends Component3 {\n static defaultProps = {\n defer: true,\n encodeSpecialCharacters: true,\n prioritizeSeoTags: false\n };\n shouldComponentUpdate(nextProps) {\n return !fastCompare(without(this.props, \"helmetData\"), without(nextProps, \"helmetData\"));\n }\n mapNestedChildrenToProps(child, nestedChildren) {\n if (!nestedChildren) {\n return null;\n }\n switch (child.type) {\n case \"script\" /* SCRIPT */:\n case \"noscript\" /* NOSCRIPT */:\n return {\n innerHTML: nestedChildren\n };\n case \"style\" /* STYLE */:\n return {\n cssText: nestedChildren\n };\n default:\n throw new Error(\n `<${child.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`\n );\n }\n }\n flattenArrayTypeChildren(child, arrayTypeChildren, newChildProps, nestedChildren) {\n return {\n ...arrayTypeChildren,\n [child.type]: [\n ...arrayTypeChildren[child.type] || [],\n {\n ...newChildProps,\n ...this.mapNestedChildrenToProps(child, nestedChildren)\n }\n ]\n };\n }\n mapObjectTypeChildren(child, newProps, newChildProps, nestedChildren) {\n switch (child.type) {\n case \"title\" /* TITLE */:\n return {\n ...newProps,\n [child.type]: nestedChildren,\n titleAttributes: { ...newChildProps }\n };\n case \"body\" /* BODY */:\n return {\n ...newProps,\n bodyAttributes: { ...newChildProps }\n };\n case \"html\" /* HTML */:\n return {\n ...newProps,\n htmlAttributes: { ...newChildProps }\n };\n default:\n return {\n ...newProps,\n [child.type]: { ...newChildProps }\n };\n }\n }\n mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {\n let newFlattenedProps = { ...newProps };\n Object.keys(arrayTypeChildren).forEach((arrayChildName) => {\n newFlattenedProps = {\n ...newFlattenedProps,\n [arrayChildName]: arrayTypeChildren[arrayChildName]\n };\n });\n return newFlattenedProps;\n }\n warnOnInvalidChildren(child, nestedChildren) {\n invariant(\n VALID_TAG_NAMES.some((name) => child.type === name),\n typeof child.type === \"function\" ? `You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.` : `Only elements types ${VALID_TAG_NAMES.join(\n \", \"\n )} are allowed. Helmet does not support rendering <${child.type}> elements. Refer to our API for more information.`\n );\n invariant(\n !nestedChildren || typeof nestedChildren === \"string\" || Array.isArray(nestedChildren) && !nestedChildren.some((nestedChild) => typeof nestedChild !== \"string\"),\n `Helmet expects a string as a child of <${child.type}>. Did you forget to wrap your children in braces? ( <${child.type}>{\\`\\`}</${child.type}> ) Refer to our API for more information.`\n );\n return true;\n }\n mapChildrenToProps(children, newProps) {\n let arrayTypeChildren = {};\n React3.Children.forEach(children, (child) => {\n if (!child || !child.props) {\n return;\n }\n const { children: nestedChildren, ...childProps } = child.props;\n const newChildProps = Object.keys(childProps).reduce((obj, key) => {\n obj[HTML_TAG_MAP[key] || key] = childProps[key];\n return obj;\n }, {});\n let { type } = child;\n if (typeof type === \"symbol\") {\n type = type.toString();\n } else {\n this.warnOnInvalidChildren(child, nestedChildren);\n }\n switch (type) {\n case \"Symbol(react.fragment)\" /* FRAGMENT */:\n newProps = this.mapChildrenToProps(nestedChildren, newProps);\n break;\n case \"link\" /* LINK */:\n case \"meta\" /* META */:\n case \"noscript\" /* NOSCRIPT */:\n case \"script\" /* SCRIPT */:\n case \"style\" /* STYLE */:\n arrayTypeChildren = this.flattenArrayTypeChildren(\n child,\n arrayTypeChildren,\n newChildProps,\n nestedChildren\n );\n break;\n default:\n newProps = this.mapObjectTypeChildren(child, newProps, newChildProps, nestedChildren);\n break;\n }\n });\n return this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);\n }\n render() {\n const { children, ...props } = this.props;\n let newProps = { ...props };\n let { helmetData } = props;\n if (children) {\n newProps = this.mapChildrenToProps(children, newProps);\n }\n if (helmetData && !(helmetData instanceof HelmetData)) {\n const data = helmetData;\n helmetData = new HelmetData(data.context, true);\n delete newProps.helmetData;\n }\n return helmetData ? /* @__PURE__ */ React3.createElement(HelmetDispatcher, { ...newProps, context: helmetData.value }) : /* @__PURE__ */ React3.createElement(Context.Consumer, null, (context) => /* @__PURE__ */ React3.createElement(HelmetDispatcher, { ...newProps, context }));\n }\n};\nexport {\n Helmet,\n HelmetData,\n HelmetProvider\n};\n","import { cmsBaseUrl } from '../../services/blogClient'\nimport type { SlugFields } from './blog.types'\nimport type { CMSEntry, CMSQueryParams, CMSReference } from './cms.types'\n\n// ============================================================================\n// SLUG EXTRACTION - Unified logic for getting slug from CMS entries\n// ============================================================================\n\n/**\n * Extracts slug from CMS entry fields.\n */\nconst getEntrySlug = (fields: SlugFields, sysId?: string): string => {\n return fields.id || sysId || ''\n}\n\n// Helper function to fetch from CMS API\nconst fetchFromCMS = async (endpoint: string, params?: CMSQueryParams): Promise<unknown> => {\n const baseUrl = cmsBaseUrl\n const url = new URL(`${baseUrl}${endpoint}`, window.location.origin)\n\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n url.searchParams.append(key, String(value))\n }\n })\n }\n\n const response = await fetch(url.toString())\n\n if (!response.ok) {\n throw new Error(`CMS API error: ${response.status} ${response.statusText}`)\n }\n\n return response.json()\n}\n\n// ============================================================================\n// ENTRY CACHES - For assets, categories, authors, and resolved posts\n// Prevents duplicate requests when resolving references\n// TODO: These module-level Maps are unbounded. If the blog grows to thousands of entries,\n// replace with a capped LRU cache (e.g. lru-cache or a tiny custom implementation).\n// ============================================================================\n\nconst assetsCache = new Map<string, CMSEntry>()\nconst assetsCachePromises = new Map<string, Promise<CMSEntry>>()\n\nconst entriesCache = new Map<string, CMSEntry>()\nconst entriesCachePromises = new Map<string, Promise<CMSEntry>>()\n\nconst resolveAssetLink = async (value: unknown): Promise<unknown> => {\n const link = value as CMSReference\n if (link?.sys?.type === 'Link' && link.sys.linkType === 'Asset') {\n const assetId = link.sys.id\n\n // Return from cache if available\n if (assetsCache.has(assetId)) {\n return assetsCache.get(assetId)\n }\n\n // If already fetching, wait for that promise\n if (assetsCachePromises.has(assetId)) {\n return assetsCachePromises.get(assetId)\n }\n\n // Start fetching\n const assetPromise = fetchFromCMS(`/assets/${assetId}`)\n .then(asset => {\n const cmsAsset = asset as CMSEntry\n assetsCache.set(assetId, cmsAsset)\n assetsCachePromises.delete(assetId)\n return cmsAsset\n })\n .catch(() => {\n assetsCachePromises.delete(assetId)\n return value as CMSEntry\n })\n\n assetsCachePromises.set(assetId, assetPromise)\n return assetPromise\n }\n\n return value\n}\n\n// ============================================================================\n// CATEGORY RESOLVER - Uses module-level caches for resolved entries\n// ============================================================================\n\n// NOTE: initializeHelpers/storeRef were removed — the RTK cache-lookup shortcut was dead\n// code (initializeHelpers was never called, storeRef was always null). Entry resolution\n// falls through to fetchAndCacheEntry which has its own module-level dedup Map.\n\n// Local cache for resolved categories/authors with their images\nconst resolvedCategoriesCache = new Map<string, CMSEntry>()\nconst resolvedAuthorsCache = new Map<string, CMSEntry>()\n\n// TODO: Optimize — replace per-post reference resolution with Contentful `include` param\n// on the original query (resolves references server-side). Current implementation fires\n// 3 parallel requests per post; first load of 7 posts = 21+ requests.\n\n// Helper to fetch and cache an entry by ID\nconst fetchAndCacheEntry = async (entryId: string): Promise<CMSEntry> => {\n // Return from cache if available\n if (entriesCache.has(entryId)) {\n return entriesCache.get(entryId)!\n }\n\n // If already fetching, wait for that promise\n if (entriesCachePromises.has(entryId)) {\n return entriesCachePromises.get(entryId)!\n }\n\n // Start fetching\n const entryPromise = fetchFromCMS(`/entries/${entryId}`)\n .then(async fetched => {\n const cmsEntry = fetched as CMSEntry\n if (cmsEntry.fields?.image) {\n cmsEntry.fields.image = await resolveAssetLink(cmsEntry.fields.image)\n }\n entriesCache.set(entryId, cmsEntry)\n entriesCachePromises.delete(entryId)\n return cmsEntry\n })\n .catch(() => {\n entriesCachePromises.delete(entryId)\n throw new Error(`Failed to fetch entry ${entryId}`)\n })\n\n entriesCachePromises.set(entryId, entryPromise)\n return entryPromise\n}\n\nconst resolveCategoryLink = async (value: unknown): Promise<unknown> => {\n const link = value as CMSReference\n const entry = value as CMSEntry\n\n // If it's a Link reference, resolve via module-level entry cache\n if (link?.sys?.type === 'Link' && link.sys.linkType === 'Entry') {\n const entryId = link.sys.id\n\n // Check resolved cache first (already has image resolved)\n if (resolvedCategoriesCache.has(entryId)) {\n return resolvedCategoriesCache.get(entryId)!\n }\n\n try {\n const fetched = await fetchAndCacheEntry(entryId)\n resolvedCategoriesCache.set(entryId, fetched)\n return fetched\n } catch {\n return value\n }\n }\n\n // If it already has fields, it's already resolved\n if (entry?.sys?.id && entry?.fields) {\n if (resolvedCategoriesCache.has(entry.sys.id)) {\n return resolvedCategoriesCache.get(entry.sys.id)!\n }\n if (entry.fields.image) {\n entry.fields.image = await resolveAssetLink(entry.fields.image)\n }\n resolvedCategoriesCache.set(entry.sys.id, entry)\n return entry\n }\n\n return value\n}\n\n// ============================================================================\n// AUTHOR RESOLVER - Uses module-level caches\n// ============================================================================\n\nconst resolveAuthorLink = async (value: unknown): Promise<unknown> => {\n const link = value as CMSReference\n const entry = value as CMSEntry\n\n // If it's a Link reference, resolve via module-level entry cache\n if (link?.sys?.type === 'Link' && link.sys.linkType === 'Entry') {\n const entryId = link.sys.id\n\n if (resolvedAuthorsCache.has(entryId)) {\n return resolvedAuthorsCache.get(entryId)!\n }\n\n try {\n const fetched = await fetchAndCacheEntry(entryId)\n resolvedAuthorsCache.set(entryId, fetched)\n return fetched\n } catch {\n return value\n }\n }\n\n // If it already has fields, just resolve the image if needed\n if (entry?.sys?.id && entry?.fields) {\n if (resolvedAuthorsCache.has(entry.sys.id)) {\n return resolvedAuthorsCache.get(entry.sys.id)!\n }\n if (entry.fields.image) {\n entry.fields.image = await resolveAssetLink(entry.fields.image)\n }\n resolvedAuthorsCache.set(entry.sys.id, entry)\n return entry\n }\n\n return value\n}\n\n// ============================================================================\n// URL RESOLVERS - Simple functions that return just URLs/slugs from references\n// ============================================================================\n\nconst resolveAssetUrl = async (assetId: string): Promise<string> => {\n if (!assetId) return ''\n\n const resolved = await resolveAssetLink({ sys: { type: 'Link', linkType: 'Asset', id: assetId } })\n const asset = resolved as CMSEntry\n const url = (asset?.fields?.file as { url?: string })?.url || ''\n return url.startsWith('//') ? `https:${url}` : url\n}\n\nconst resolveEntrySlug = async (entryId: string): Promise<string> => {\n if (!entryId) return ''\n\n // Return from cache if available\n if (entriesCache.has(entryId)) {\n const entry = entriesCache.get(entryId)\n return entry?.fields?.id as string\n }\n\n // If already fetching, wait for that promise\n if (entriesCachePromises.has(entryId)) {\n const entry = await entriesCachePromises.get(entryId)\n return entry?.fields?.id as string\n }\n\n try {\n const entryPromise = fetchFromCMS(`/entries/${entryId}`)\n entriesCachePromises.set(entryId, entryPromise as Promise<CMSEntry>)\n\n const entry = (await entryPromise) as CMSEntry\n entriesCache.set(entryId, entry)\n entriesCachePromises.delete(entryId)\n\n return entry?.fields?.id as string\n } catch {\n entriesCachePromises.delete(entryId)\n return ''\n }\n}\n\nexport { fetchFromCMS, getEntrySlug, resolveAssetLink, resolveAssetUrl, resolveAuthorLink, resolveCategoryLink, resolveEntrySlug }\n","function formatUtcDate(value?: string): string {\n if (!value) return ''\n const raw = value\n const date = new Date(raw.includes('T') ? raw : `${raw}T00:00:00Z`)\n if (Number.isNaN(date.getTime())) {\n return raw\n }\n return new Intl.DateTimeFormat('en-US', {\n timeZone: 'UTC',\n month: 'short',\n day: '2-digit',\n year: 'numeric'\n }).format(date)\n}\n\nexport { formatUtcDate }\n","import type { BlogPost } from '../types/blog.domain'\n\nconst BASE_URL = '/blog'\n\nexport const locations = {\n home: () => '/',\n blogs: () => BASE_URL,\n category: (categorySlug: string) => `${BASE_URL}/${categorySlug}`,\n blog: (categorySlug: string, postSlug: string) => `${BASE_URL}/${categorySlug}/${postSlug}`,\n author: (authorSlug: string) => `${BASE_URL}/author/${authorSlug}`,\n search: (query: string) => `${BASE_URL}/search?q=${encodeURIComponent(query)}`,\n twitter: (post: BlogPost) => {\n const url = `${window.location.origin}${post.url}`\n return `https://x.com/intent/post?text=${encodeURIComponent(post.title)}&url=${encodeURIComponent(url)}`\n },\n facebook: (post: BlogPost) => {\n const url = `${window.location.origin}${post.url}`\n return `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`\n }\n}\n","export const slugify = (str: string | undefined | null): string => {\n if (!str) {\n return ''\n }\n return str\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, '')\n .replace(/[\\s_-]+/g, '-')\n .replace(/^-+|-+$/g, '')\n}\n","import { Document } from '@contentful/rich-text-types'\nimport type { BlogAuthor, BlogCategory, BlogPost, ContentfulAsset } from '../../shared/blog/types/blog.domain'\nimport { formatUtcDate } from '../../shared/blog/utils/date'\nimport { locations } from '../../shared/blog/utils/locations'\nimport { slugify } from '../../shared/blog/utils/string'\nimport type { CMSEntry } from './cms.types'\n\ninterface ContentfulAssetEntry {\n sys: {\n id: string\n type: string\n }\n fields: {\n file?: {\n url?: string\n contentType?: string\n details?: {\n image?: {\n width?: number\n height?: number\n }\n }\n }\n }\n}\n\nfunction mapContentfulAsset(asset: ContentfulAssetEntry | null | undefined): ContentfulAsset | null {\n if (!asset || !asset.sys || !asset.fields || !asset.fields.file) {\n return null\n }\n\n const url = asset.fields.file.url\n if (!url) {\n return null\n }\n\n return {\n id: asset.sys.id,\n url: url.startsWith('//') ? `https:${url}` : url,\n width: asset.fields.file.details?.image?.width || 0,\n height: asset.fields.file.details?.image?.height || 0,\n mimeType: asset.fields.file.contentType || 'image/jpeg'\n }\n}\n\nfunction mapBlogCategory(entry: CMSEntry | null | undefined): BlogCategory | null {\n if (!entry || !entry.sys || !entry.fields) {\n return null\n }\n\n const slug = (entry.fields.id as string | undefined) || slugify((entry.fields.title as string | undefined) || '')\n if (!slug) {\n return null\n }\n\n const image = mapContentfulAsset(entry.fields.image as ContentfulAssetEntry | null | undefined)\n if (!image) {\n return null\n }\n\n return {\n id: entry.sys.id,\n slug,\n title: (entry.fields.title as string | undefined) || '',\n description: (entry.fields.description as string | undefined) || '',\n image,\n isShownInMenu: (entry.fields.isShownInMenu as boolean | undefined) ?? true,\n url: locations.category(slug)\n }\n}\n\nfunction createDefaultCategory(entryId?: string): BlogCategory {\n return {\n id: entryId || 'uncategorized',\n slug: 'uncategorized',\n title: 'Uncategorized',\n description: 'Posts without a valid category',\n image: {\n id: 'default-category-image',\n url: 'https://decentraland.org/logos/png/color.png',\n width: 200,\n height: 200,\n mimeType: 'image/png'\n },\n isShownInMenu: false,\n url: locations.category('uncategorized')\n }\n}\n\nfunction createDefaultImage(entryId?: string): ContentfulAsset {\n return {\n id: entryId || 'default-image',\n url: 'https://decentraland.org/logos/png/color.png',\n width: 1200,\n height: 630,\n mimeType: 'image/png'\n }\n}\n\nfunction createDefaultAuthor(entryId?: string): BlogAuthor {\n const slug = entryId || 'decentraland'\n return {\n id: entryId || 'unknown',\n slug,\n title: 'Decentraland',\n description: 'Decentraland Team',\n image: {\n id: 'default-avatar',\n url: 'https://decentraland.org/logos/png/color.png',\n width: 200,\n height: 200,\n mimeType: 'image/png'\n },\n url: locations.author(slug)\n }\n}\n\nfunction mapBlogAuthor(entry: CMSEntry | null | undefined): BlogAuthor {\n if (!entry || !entry.sys || !entry.fields) {\n return createDefaultAuthor(entry?.sys?.id)\n }\n\n // Check if fields object is empty\n const fieldKeys = Object.keys(entry.fields)\n if (fieldKeys.length === 0) {\n return createDefaultAuthor(entry.sys.id)\n }\n\n // Extract title and slug BEFORE checking image\n const title = (entry.fields.title as string | undefined) || ''\n const slug = (entry.fields.id as string | undefined) || slugify(title) || entry.sys.id\n\n const image = mapContentfulAsset(entry.fields.image as ContentfulAssetEntry | null | undefined)\n if (!image) {\n // Use the actual author data but with a default image\n return {\n id: entry.sys.id,\n slug,\n title: title || 'Decentraland',\n description: (entry.fields.description as string | undefined) || '',\n image: {\n id: 'default-avatar',\n url: 'https://decentraland.org/logos/png/color.png',\n width: 200,\n height: 200,\n mimeType: 'image/png'\n },\n url: locations.author(slug)\n }\n }\n\n return {\n id: entry.sys.id,\n slug,\n title,\n description: (entry.fields.description as string | undefined) || '',\n image,\n url: locations.author(slug)\n }\n}\n\nfunction mapBlogPost(entry: CMSEntry | null | undefined): BlogPost | null {\n if (!entry || !entry.sys || !entry.fields) {\n return null\n }\n\n // Try to map category, fall back to default if it fails\n let category = mapBlogCategory(entry.fields.category as CMSEntry | null | undefined)\n if (!category) {\n category = createDefaultCategory(entry.sys.id)\n }\n\n // mapBlogAuthor now always returns a valid author (falls back to default if needed)\n const author = mapBlogAuthor(entry.fields.author as CMSEntry | null | undefined)\n\n // Try to map image, fall back to default if it fails\n let image = mapContentfulAsset(entry.fields.image as ContentfulAssetEntry | null | undefined)\n if (!image) {\n image = createDefaultImage(entry.sys.id)\n }\n\n const title = (entry.fields.title as string | undefined) || ''\n const slug = entry.fields.id as string\n const publishedDate = entry.fields.publishedDate as string | undefined\n const body = entry.fields.body as Document | undefined\n\n return {\n id: entry.sys.id,\n slug,\n title,\n description: (entry.fields.description as string | undefined) || '',\n publishedDate: formatUtcDate(publishedDate),\n body: body || ({} as Document),\n bodyAssets: {},\n image,\n category,\n author,\n url: locations.blog(category.slug, slug)\n }\n}\n\nexport { mapBlogAuthor, mapBlogCategory, mapBlogPost, mapContentfulAsset }\n","import { BLOCKS } from '@contentful/rich-text-types'\nimport { cmsClient, getCmsBaseUrl } from '../../services/blogClient'\nimport type { BlogAuthor, BlogCategory, BlogPost, ContentfulAsset, PaginatedBlogPosts } from '../../shared/blog/types/blog.domain'\n// NOTE: store is imported here only for getPostFromStore (normalized-cache read optimization).\n// Dispatches use onQueryStarted so transformResponse stays a pure data transformer.\nimport { store } from '../../shells/store'\nimport { getEntrySlug, resolveAssetLink, resolveAuthorLink, resolveCategoryLink } from './blog.helpers'\nimport { mapBlogAuthor, mapBlogCategory, mapBlogPost, mapContentfulAsset } from './blog.mappers'\nimport { postsUpserted } from './blog.slice'\nimport type {\n GetBlogAuthorBySlugParams,\n GetBlogAuthorParams,\n GetBlogCategoryBySlugParams,\n GetBlogPostBySlugParams,\n GetBlogPostParams,\n GetBlogPostPreviewParams,\n GetBlogPostsParams,\n SlugFields\n} from './blog.types'\nimport type { CMSEntry, CMSListResponse } from './cms.types'\n\n// Helper to check if a post is already in the normalized store\nconst getPostFromStore = (postId: string): BlogPost | undefined => {\n const state = store.getState()\n return state.blog.entities[postId]\n}\n\n// Helper to resolve all references (category, author, image) in a CMS entry\nconst resolveEntryReferences = async (entry: CMSEntry): Promise<CMSEntry> => {\n const resolvedEntry = { ...entry, fields: { ...entry.fields } }\n\n // Resolve all references in parallel for better performance\n const [category, author, image] = await Promise.all([\n resolvedEntry.fields.category ? resolveCategoryLink(resolvedEntry.fields.category) : undefined,\n resolvedEntry.fields.author ? resolveAuthorLink(resolvedEntry.fields.author) : undefined,\n resolvedEntry.fields.image ? resolveAssetLink(resolvedEntry.fields.image) : undefined\n ])\n\n if (category) resolvedEntry.fields.category = category\n if (author) resolvedEntry.fields.author = author\n if (image) resolvedEntry.fields.image = image\n\n return resolvedEntry\n}\n\n// Helper to resolve only image references (for categories/authors that don't have nested refs)\nconst resolveImageOnly = async (entry: CMSEntry): Promise<CMSEntry> => {\n const resolvedEntry = { ...entry, fields: { ...entry.fields } }\n\n if (resolvedEntry.fields.image) {\n resolvedEntry.fields.image = await resolveAssetLink(resolvedEntry.fields.image)\n }\n\n return resolvedEntry\n}\n\nconst normalizeCmsError = (error: unknown): string => {\n if (error instanceof Error) {\n return error.message\n }\n if (typeof error === 'object' && error !== null && 'error' in error) {\n const msg = (error as { error?: unknown }).error\n if (typeof msg === 'string') {\n return msg\n }\n }\n return 'Unknown error'\n}\n\ninterface DocumentNode {\n nodeType: string\n data?: { target?: { sys?: { id?: string } } }\n content?: DocumentNode[]\n}\n\n// Extract all embedded asset IDs from a rich text document\nconst extractEmbeddedAssetIds = (node: DocumentNode): string[] => {\n const ids: string[] = []\n\n if (node.nodeType === BLOCKS.EMBEDDED_ASSET && node.data?.target?.sys?.id) {\n ids.push(node.data.target.sys.id)\n }\n\n if (node.content) {\n for (const child of node.content) {\n ids.push(...extractEmbeddedAssetIds(child))\n }\n }\n\n return ids\n}\n\n// Resolve body assets and return a map of id -> ContentfulAsset\nconst resolveBodyAssets = async (body: DocumentNode): Promise<Record<string, ContentfulAsset>> => {\n const assetIds = extractEmbeddedAssetIds(body)\n const uniqueIds = [...new Set(assetIds)]\n\n if (uniqueIds.length === 0) {\n return {}\n }\n\n const resolvedAssets = await Promise.all(\n uniqueIds.map(async id => {\n const resolved = await resolveAssetLink({ sys: { type: 'Link', linkType: 'Asset', id } })\n const asset = mapContentfulAsset(resolved as CMSEntry)\n return { id, asset }\n })\n )\n\n const assetsMap: Record<string, ContentfulAsset> = {}\n for (const { id, asset } of resolvedAssets) {\n if (asset) {\n assetsMap[id] = asset\n }\n }\n\n return assetsMap\n}\n\nconst blogClient = cmsClient.injectEndpoints({\n endpoints: build => ({\n getBlogPosts: build.query<PaginatedBlogPosts, GetBlogPostsParams>({\n serializeQueryArgs: ({ queryArgs }) => {\n // Cache by category/author only - pagination is handled via merge\n return `posts-${queryArgs.category || 'all'}-${queryArgs.author || 'all'}`\n },\n merge: (currentCache, newItems, { arg }) => {\n // For skip=0, only replace if cache is empty or we're explicitly refreshing\n if (arg.skip === 0) {\n // If we have more posts in cache than what came back, keep the accumulated cache\n if (currentCache.posts.length > newItems.posts.length) {\n return currentCache\n }\n return newItems\n }\n\n // Merge new posts, avoiding duplicates\n const existingIds = new Set(currentCache.posts.map(p => p.id))\n const newPosts = newItems.posts.filter(p => !existingIds.has(p.id))\n\n return {\n posts: [...currentCache.posts, ...newPosts],\n total: newItems.total,\n hasMore: newItems.hasMore,\n nextCmsSkip: newItems.nextCmsSkip // Always use the latest CMS skip\n }\n },\n forceRefetch: ({ currentArg, previousArg }) => {\n // Only refetch if skip changed AND we're requesting more data\n if (!previousArg) return true\n return currentArg?.skip !== previousArg?.skip && (currentArg?.skip ?? 0) > (previousArg?.skip ?? 0)\n },\n query: ({ category, author, limit = 20, skip = 0 }) => ({\n url: getCmsBaseUrl() + '/blog/posts',\n params: { category, author, limit, skip }\n }),\n transformResponse: async (listResponse: CMSListResponse, _meta, { skip = 0 }) => {\n try {\n const totalAvailable = listResponse.total\n\n // Map each entry, using cached posts from normalized store when available\n const batchPosts = await Promise.all(\n listResponse.items.map(async item => {\n const postId = item.sys?.id\n if (postId) {\n // Check if post already exists in normalized store\n const cachedPost = getPostFromStore(postId)\n if (cachedPost) {\n return cachedPost\n }\n }\n\n // Post not in store, resolve references and map\n try {\n const resolvedEntry = await resolveEntryReferences(item)\n return mapBlogPost(resolvedEntry)\n } catch {\n return null\n }\n })\n )\n\n const validPosts = batchPosts.filter((post): post is BlogPost => post !== null)\n\n // Backend handles category/author filtering — total reflects the filtered set\n const nextCmsSkip = skip + listResponse.items.length\n const hasMore = listResponse.items.length === 0 ? false : nextCmsSkip < totalAvailable\n\n return {\n posts: validPosts,\n total: totalAvailable,\n hasMore,\n nextCmsSkip\n }\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: normalizeCmsError(error)\n }\n }\n },\n async onQueryStarted(_arg, { dispatch, queryFulfilled }) {\n try {\n const { data } = await queryFulfilled\n // Upsert fetched posts into the normalized entity store\n if (data.posts.length > 0) {\n dispatch(postsUpserted(data.posts))\n }\n } catch {\n // query failed — nothing to upsert\n }\n },\n keepUnusedDataFor: 60,\n providesTags: result =>\n result\n ? [\n ...result.posts.map(({ id }) => ({\n type: 'BlogPosts' as const,\n id\n })),\n { type: 'BlogPosts', id: 'LIST' }\n ]\n : [{ type: 'BlogPosts', id: 'LIST' }]\n }),\n\n getBlogPost: build.query<BlogPost, GetBlogPostParams>({\n query: ({ id }) => ({ url: getCmsBaseUrl() + `/entries/${id}` }),\n transformResponse: async (response: CMSEntry, _meta, { id }) => {\n try {\n // Check if post already exists in normalized store (with body assets)\n const cachedPost = getPostFromStore(id)\n if (cachedPost && cachedPost.bodyAssets && Object.keys(cachedPost.bodyAssets).length > 0) {\n return cachedPost\n }\n\n const resolvedEntry = await resolveEntryReferences(response)\n const post = mapBlogPost(resolvedEntry)\n\n if (!post) {\n throw {\n status: 'CUSTOM_ERROR',\n error: 'Failed to map blog post: missing required fields'\n }\n }\n\n // Resolve embedded assets in the body\n if (post.body) {\n post.bodyAssets = await resolveBodyAssets(post.body as unknown as DocumentNode)\n }\n\n return post\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: normalizeCmsError(error)\n }\n }\n },\n async onQueryStarted(_arg, { dispatch, queryFulfilled }) {\n try {\n const { data } = await queryFulfilled\n dispatch(postsUpserted([data]))\n } catch {\n // query failed — nothing to upsert\n }\n },\n providesTags: (result, _error, arg) => (result ? [{ type: 'BlogPost', id: arg.id }] : [])\n }),\n\n getBlogCategories: build.query<BlogCategory[], void>({\n query: () => ({ url: getCmsBaseUrl() + '/blog/categories' }),\n transformResponse: async (listResponse: CMSListResponse) => {\n try {\n // Categories only have image references, resolve them in parallel\n const resolvedEntries = await Promise.all(listResponse.items.map(item => resolveImageOnly(item)))\n return resolvedEntries.map(entry => mapBlogCategory(entry)).filter((cat): cat is BlogCategory => cat !== null)\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: normalizeCmsError(error)\n }\n }\n },\n providesTags: ['Categories']\n }),\n\n getBlogCategoryBySlug: build.query<BlogCategory, GetBlogCategoryBySlugParams>({\n query: () => ({ url: getCmsBaseUrl() + '/blog/categories' }),\n transformResponse: async (listResponse: CMSListResponse, _meta, { slug }) => {\n try {\n const categoryEntry = listResponse.items.find(item => {\n const fields = item.fields as unknown as SlugFields\n return getEntrySlug(fields, item.sys.id) === slug\n })\n\n if (!categoryEntry) {\n throw {\n status: 'CUSTOM_ERROR',\n error: `Category with slug \"${slug}\" not found`\n }\n }\n\n // The API response already includes all fields, just resolve the image\n const resolvedEntry = await resolveImageOnly(categoryEntry)\n const category = mapBlogCategory(resolvedEntry)\n\n if (!category) {\n throw {\n status: 'CUSTOM_ERROR',\n error: 'Failed to map category: missing required fields'\n }\n }\n\n return category\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: normalizeCmsError(error)\n }\n }\n },\n providesTags: (result, _error, arg) => (result ? [{ type: 'Categories', id: arg.slug }] : [])\n }),\n\n getBlogPostBySlug: build.query<BlogPost, GetBlogPostBySlugParams>({\n query: ({ postSlug }) => ({\n url: getCmsBaseUrl() + '/blog/posts',\n params: { slug: postSlug }\n }),\n transformResponse: async (listResponse: CMSListResponse, _meta, { postSlug }) => {\n try {\n // Find the post with matching slug in the response\n const postEntry = listResponse.items.find(item => item.fields.id === postSlug)\n\n if (!postEntry) {\n throw {\n status: 'CUSTOM_ERROR',\n error: `Post with slug \"${postSlug}\" not found`\n }\n }\n\n const postId = postEntry.sys?.id\n\n // Check if post already exists in normalized store (with body assets)\n if (postId) {\n const cachedPost = getPostFromStore(postId)\n if (cachedPost && cachedPost.bodyAssets && Object.keys(cachedPost.bodyAssets).length > 0) {\n return cachedPost\n }\n }\n\n // Resolve references and map\n const resolvedEntry = await resolveEntryReferences(postEntry)\n const post = mapBlogPost(resolvedEntry)\n\n if (!post) {\n throw {\n status: 'CUSTOM_ERROR',\n error: 'Failed to map post: missing required fields'\n }\n }\n\n // Resolve embedded assets in the body\n if (post.body) {\n post.bodyAssets = await resolveBodyAssets(post.body as unknown as DocumentNode)\n }\n\n return post\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: normalizeCmsError(error)\n }\n }\n },\n async onQueryStarted(_arg, { dispatch, queryFulfilled }) {\n try {\n const { data } = await queryFulfilled\n dispatch(postsUpserted([data]))\n } catch {\n // query failed — nothing to upsert\n }\n },\n providesTags: (result, _error, arg) => (result ? [{ type: 'BlogPost', id: `${arg.categorySlug}/${arg.postSlug}` }] : [])\n }),\n\n getBlogAuthors: build.query<BlogAuthor[], void>({\n query: () => ({ url: getCmsBaseUrl() + '/blog/authors' }),\n transformResponse: async (listResponse: CMSListResponse) => {\n try {\n // Authors only have image references, resolve them in parallel\n const resolvedEntries = await Promise.all(listResponse.items.map(item => resolveImageOnly(item)))\n return resolvedEntries.map(entry => mapBlogAuthor(entry)).filter((auth): auth is BlogAuthor => auth !== null)\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: error instanceof Error ? error.message : 'Unknown error'\n }\n }\n },\n providesTags: ['Authors']\n }),\n\n getBlogAuthor: build.query<BlogAuthor, GetBlogAuthorParams>({\n query: ({ id }) => ({ url: getCmsBaseUrl() + `/entries/${id}` }),\n transformResponse: (response: CMSEntry) => {\n const author = mapBlogAuthor(response)\n\n if (!author) {\n throw {\n status: 'CUSTOM_ERROR',\n error: 'Failed to map author: missing required fields'\n }\n }\n\n return author\n },\n providesTags: (result, _error, arg) => (result ? [{ type: 'Authors', id: arg.id }] : [])\n }),\n\n getBlogAuthorBySlug: build.query<BlogAuthor, GetBlogAuthorBySlugParams>({\n query: () => ({ url: getCmsBaseUrl() + '/blog/authors' }),\n transformResponse: async (listResponse: CMSListResponse, _meta, { slug }) => {\n try {\n const authorEntry = listResponse.items.find(item => {\n const fields = item.fields as unknown as SlugFields\n return getEntrySlug(fields, item.sys.id) === slug\n })\n\n if (!authorEntry) {\n throw {\n status: 'CUSTOM_ERROR',\n error: `Author with slug \"${slug}\" not found`\n }\n }\n\n // The API response already includes all fields, just resolve the image\n const resolvedEntry = await resolveImageOnly(authorEntry)\n const author = mapBlogAuthor(resolvedEntry)\n\n if (!author) {\n throw {\n status: 'CUSTOM_ERROR',\n error: 'Failed to map author: missing required fields'\n }\n }\n\n return author\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: normalizeCmsError(error)\n }\n }\n },\n providesTags: (result, _error, arg) => (result ? [{ type: 'Authors', id: arg.slug }] : [])\n }),\n\n getBlogPostPreview: build.query<BlogPost, GetBlogPostPreviewParams>({\n queryFn: async ({ id, env, token, previewBaseUrl, spaceId }) => {\n try {\n const previewUrl = `${previewBaseUrl}/spaces/${spaceId}/environments/${env}/entries?content_type=blog_post&fields.id=${id}&access_token=${token}`\n\n const response = await fetch(previewUrl)\n if (!response.ok) {\n return { error: { status: response.status, data: `Failed to fetch preview: ${response.statusText}` } as const }\n }\n\n const data = (await response.json()) as CMSListResponse\n if (!data.items || data.items.length === 0) {\n return { error: { status: 'CUSTOM_ERROR', error: `Preview post with id \"${id}\" not found` } as const }\n }\n\n const entry = data.items[0]\n const resolvedEntry = await resolveEntryReferences(entry)\n const post = mapBlogPost(resolvedEntry)\n\n if (!post) {\n return { error: { status: 'CUSTOM_ERROR', error: 'Failed to map preview post: missing required fields' } as const }\n }\n\n if (post.body) {\n post.bodyAssets = await resolveBodyAssets(post.body as unknown as DocumentNode)\n }\n\n return { data: post }\n } catch (error) {\n return { error: { status: 'CUSTOM_ERROR', error: normalizeCmsError(error) } as const }\n }\n },\n providesTags: (result, _error, arg) => (result ? [{ type: 'BlogPost', id: `preview-${arg.id}` }] : [])\n })\n }),\n overrideExisting: false\n})\n\nconst {\n useGetBlogPostsQuery,\n useGetBlogPostQuery,\n useGetBlogCategoriesQuery,\n useGetBlogCategoryBySlugQuery,\n useGetBlogPostBySlugQuery,\n useGetBlogAuthorsQuery,\n useGetBlogAuthorQuery,\n useGetBlogAuthorBySlugQuery,\n useGetBlogPostPreviewQuery\n} = blogClient\n\nexport {\n blogClient,\n useGetBlogAuthorBySlugQuery,\n useGetBlogAuthorQuery,\n useGetBlogAuthorsQuery,\n useGetBlogCategoriesQuery,\n useGetBlogCategoryBySlugQuery,\n useGetBlogPostBySlugQuery,\n useGetBlogPostPreviewQuery,\n useGetBlogPostQuery,\n useGetBlogPostsQuery\n}\n","function m(){function r(t){return new Promise(s=>{let e=new XMLHttpRequest;e.open(t.method,t.url,!0),Object.keys(t.headers).forEach(n=>e.setRequestHeader(n,t.headers[n]));let i=(n,a)=>setTimeout(()=>{e.abort(),s({status:0,content:a,isTimedOut:!0})},n),u=i(t.connectTimeout,\"Connection timeout\"),o;e.onreadystatechange=()=>{e.readyState>e.OPENED&&o===void 0&&(clearTimeout(u),o=i(t.responseTimeout,\"Socket timeout\"))},e.onerror=()=>{e.status===0&&(clearTimeout(u),clearTimeout(o),s({content:e.responseText||\"Network request failed\",status:e.status,isTimedOut:!1}))},e.onload=()=>{clearTimeout(u),clearTimeout(o),s({content:e.responseText,status:e.status,isTimedOut:!1})},e.send(t.data)})}return{send:r}}export{m as createXhrRequester};\n//# sourceMappingURL=requester.xhr.js.map","// src/cache/createBrowserLocalStorageCache.ts\nfunction createBrowserLocalStorageCache(options) {\n let storage;\n const namespaceKey = `algolia-client-js-${options.key}`;\n function getStorage() {\n if (storage === void 0) {\n storage = options.localStorage || window.localStorage;\n }\n return storage;\n }\n function getNamespace() {\n return JSON.parse(getStorage().getItem(namespaceKey) || \"{}\");\n }\n function setNamespace(namespace) {\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\n }\n function removeOutdatedCacheItems() {\n const timeToLive = options.timeToLive ? options.timeToLive * 1e3 : null;\n const namespace = getNamespace();\n const filteredNamespaceWithoutOldFormattedCacheItems = Object.fromEntries(\n Object.entries(namespace).filter(([, cacheItem]) => {\n return cacheItem.timestamp !== void 0;\n })\n );\n setNamespace(filteredNamespaceWithoutOldFormattedCacheItems);\n if (!timeToLive) {\n return;\n }\n const filteredNamespaceWithoutExpiredItems = Object.fromEntries(\n Object.entries(filteredNamespaceWithoutOldFormattedCacheItems).filter(([, cacheItem]) => {\n const currentTimestamp = (/* @__PURE__ */ new Date()).getTime();\n const isExpired = cacheItem.timestamp + timeToLive < currentTimestamp;\n return !isExpired;\n })\n );\n setNamespace(filteredNamespaceWithoutExpiredItems);\n }\n return {\n get(key, defaultValue, events = {\n miss: () => Promise.resolve()\n }) {\n return Promise.resolve().then(() => {\n removeOutdatedCacheItems();\n return getNamespace()[JSON.stringify(key)];\n }).then((value) => {\n return Promise.all([value ? value.value : defaultValue(), value !== void 0]);\n }).then(([value, exists]) => {\n return Promise.all([value, exists || events.miss(value)]);\n }).then(([value]) => value);\n },\n set(key, value) {\n return Promise.resolve().then(() => {\n const namespace = getNamespace();\n namespace[JSON.stringify(key)] = {\n timestamp: (/* @__PURE__ */ new Date()).getTime(),\n value\n };\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\n return value;\n });\n },\n delete(key) {\n return Promise.resolve().then(() => {\n const namespace = getNamespace();\n delete namespace[JSON.stringify(key)];\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\n });\n },\n clear() {\n return Promise.resolve().then(() => {\n getStorage().removeItem(namespaceKey);\n });\n }\n };\n}\n\n// src/cache/createNullCache.ts\nfunction createNullCache() {\n return {\n get(_key, defaultValue, events = {\n miss: () => Promise.resolve()\n }) {\n const value = defaultValue();\n return value.then((result) => Promise.all([result, events.miss(result)])).then(([result]) => result);\n },\n set(_key, value) {\n return Promise.resolve(value);\n },\n delete(_key) {\n return Promise.resolve();\n },\n clear() {\n return Promise.resolve();\n }\n };\n}\n\n// src/cache/createFallbackableCache.ts\nfunction createFallbackableCache(options) {\n const caches = [...options.caches];\n const current = caches.shift();\n if (current === void 0) {\n return createNullCache();\n }\n return {\n get(key, defaultValue, events = {\n miss: () => Promise.resolve()\n }) {\n return current.get(key, defaultValue, events).catch(() => {\n return createFallbackableCache({ caches }).get(key, defaultValue, events);\n });\n },\n set(key, value) {\n return current.set(key, value).catch(() => {\n return createFallbackableCache({ caches }).set(key, value);\n });\n },\n delete(key) {\n return current.delete(key).catch(() => {\n return createFallbackableCache({ caches }).delete(key);\n });\n },\n clear() {\n return current.clear().catch(() => {\n return createFallbackableCache({ caches }).clear();\n });\n }\n };\n}\n\n// src/cache/createMemoryCache.ts\nfunction createMemoryCache(options = { serializable: true }) {\n let cache = {};\n return {\n get(key, defaultValue, events = {\n miss: () => Promise.resolve()\n }) {\n const keyAsString = JSON.stringify(key);\n if (keyAsString in cache) {\n return Promise.resolve(options.serializable ? JSON.parse(cache[keyAsString]) : cache[keyAsString]);\n }\n const promise = defaultValue();\n return promise.then((value) => events.miss(value)).then(() => promise);\n },\n set(key, value) {\n cache[JSON.stringify(key)] = options.serializable ? JSON.stringify(value) : value;\n return Promise.resolve(value);\n },\n delete(key) {\n delete cache[JSON.stringify(key)];\n return Promise.resolve();\n },\n clear() {\n cache = {};\n return Promise.resolve();\n }\n };\n}\n\n// src/constants.ts\nvar DEFAULT_CONNECT_TIMEOUT_BROWSER = 1e3;\nvar DEFAULT_READ_TIMEOUT_BROWSER = 2e3;\nvar DEFAULT_WRITE_TIMEOUT_BROWSER = 3e4;\nvar DEFAULT_CONNECT_TIMEOUT_NODE = 2e3;\nvar DEFAULT_READ_TIMEOUT_NODE = 5e3;\nvar DEFAULT_WRITE_TIMEOUT_NODE = 3e4;\n\n// src/createAlgoliaAgent.ts\nfunction createAlgoliaAgent(version) {\n const algoliaAgent = {\n value: `Algolia for JavaScript (${version})`,\n add(options) {\n const addedAlgoliaAgent = `; ${options.segment}${options.version !== void 0 ? ` (${options.version})` : \"\"}`;\n if (algoliaAgent.value.indexOf(addedAlgoliaAgent) === -1) {\n algoliaAgent.value = `${algoliaAgent.value}${addedAlgoliaAgent}`;\n }\n return algoliaAgent;\n }\n };\n return algoliaAgent;\n}\n\n// src/createAuth.ts\nfunction createAuth(appId, apiKey, authMode = \"WithinHeaders\") {\n const credentials = {\n \"x-algolia-api-key\": apiKey,\n \"x-algolia-application-id\": appId\n };\n return {\n headers() {\n return authMode === \"WithinHeaders\" ? credentials : {};\n },\n queryParameters() {\n return authMode === \"WithinQueryParameters\" ? credentials : {};\n }\n };\n}\n\n// src/createIterablePromise.ts\nfunction createIterablePromise({\n func,\n validate,\n aggregator,\n error,\n timeout = () => 0\n}) {\n const retry = (previousResponse) => {\n return new Promise((resolve, reject) => {\n func(previousResponse).then(async (response) => {\n if (aggregator) {\n await aggregator(response);\n }\n if (await validate(response)) {\n return resolve(response);\n }\n if (error && await error.validate(response)) {\n return reject(new Error(await error.message(response)));\n }\n return setTimeout(\n () => {\n retry(response).then(resolve).catch(reject);\n },\n await timeout()\n );\n }).catch((err) => {\n reject(err);\n });\n });\n };\n return retry();\n}\n\n// src/getAlgoliaAgent.ts\nfunction getAlgoliaAgent({ algoliaAgents, client, version }) {\n const defaultAlgoliaAgent = createAlgoliaAgent(version).add({\n segment: client,\n version\n });\n algoliaAgents.forEach((algoliaAgent) => defaultAlgoliaAgent.add(algoliaAgent));\n return defaultAlgoliaAgent;\n}\n\n// src/logger/createNullLogger.ts\nfunction createNullLogger() {\n return {\n debug(_message, _args) {\n return Promise.resolve();\n },\n info(_message, _args) {\n return Promise.resolve();\n },\n error(_message, _args) {\n return Promise.resolve();\n }\n };\n}\n\n// src/transporter/createStatefulHost.ts\nvar EXPIRATION_DELAY = 2 * 60 * 1e3;\nfunction createStatefulHost(host, status = \"up\") {\n const lastUpdate = Date.now();\n function isUp() {\n return status === \"up\" || Date.now() - lastUpdate > EXPIRATION_DELAY;\n }\n function isTimedOut() {\n return status === \"timed out\" && Date.now() - lastUpdate <= EXPIRATION_DELAY;\n }\n return { ...host, status, lastUpdate, isUp, isTimedOut };\n}\n\n// src/transporter/errors.ts\nvar AlgoliaError = class extends Error {\n name = \"AlgoliaError\";\n constructor(message, name) {\n super(message);\n if (name) {\n this.name = name;\n }\n }\n};\nvar IndexNotFoundError = class extends AlgoliaError {\n constructor(indexName) {\n super(`${indexName} does not exist`, \"IndexNotFoundError\");\n }\n};\nvar IndicesInSameAppError = class extends AlgoliaError {\n constructor() {\n super(\"Indices are in the same application. Use operationIndex instead.\", \"IndicesInSameAppError\");\n }\n};\nvar IndexAlreadyExistsError = class extends AlgoliaError {\n constructor(indexName) {\n super(`${indexName} index already exists.`, \"IndexAlreadyExistsError\");\n }\n};\nvar ErrorWithStackTrace = class extends AlgoliaError {\n stackTrace;\n constructor(message, stackTrace, name) {\n super(message, name);\n this.stackTrace = stackTrace;\n }\n};\nvar RetryError = class extends ErrorWithStackTrace {\n constructor(stackTrace) {\n super(\n \"Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support\",\n stackTrace,\n \"RetryError\"\n );\n }\n};\nvar ApiError = class extends ErrorWithStackTrace {\n status;\n constructor(message, status, stackTrace, name = \"ApiError\") {\n super(message, stackTrace, name);\n this.status = status;\n }\n};\nvar DeserializationError = class extends AlgoliaError {\n response;\n constructor(message, response) {\n super(message, \"DeserializationError\");\n this.response = response;\n }\n};\nvar DetailedApiError = class extends ApiError {\n error;\n constructor(message, status, error, stackTrace) {\n super(message, status, stackTrace, \"DetailedApiError\");\n this.error = error;\n }\n};\n\n// src/transporter/helpers.ts\nfunction shuffle(array) {\n const shuffledArray = array;\n for (let c = array.length - 1; c > 0; c--) {\n const b = Math.floor(Math.random() * (c + 1));\n const a = array[c];\n shuffledArray[c] = array[b];\n shuffledArray[b] = a;\n }\n return shuffledArray;\n}\nfunction serializeUrl(host, path, queryParameters) {\n const queryParametersAsString = serializeQueryParameters(queryParameters);\n let url = `${host.protocol}://${host.url}${host.port ? `:${host.port}` : \"\"}/${path.charAt(0) === \"/\" ? path.substring(1) : path}`;\n if (queryParametersAsString.length) {\n url += `?${queryParametersAsString}`;\n }\n return url;\n}\nfunction serializeQueryParameters(parameters) {\n return Object.keys(parameters).filter((key) => parameters[key] !== void 0).sort().map(\n (key) => `${key}=${encodeURIComponent(\n Object.prototype.toString.call(parameters[key]) === \"[object Array]\" ? parameters[key].join(\",\") : parameters[key]\n ).replace(/\\+/g, \"%20\")}`\n ).join(\"&\");\n}\nfunction serializeData(request, requestOptions) {\n if (request.method === \"GET\" || request.data === void 0 && requestOptions.data === void 0) {\n return void 0;\n }\n const data = Array.isArray(request.data) ? request.data : { ...request.data, ...requestOptions.data };\n return JSON.stringify(data);\n}\nfunction serializeHeaders(baseHeaders, requestHeaders, requestOptionsHeaders) {\n const headers = {\n Accept: \"application/json\",\n ...baseHeaders,\n ...requestHeaders,\n ...requestOptionsHeaders\n };\n const serializedHeaders = {};\n Object.keys(headers).forEach((header) => {\n const value = headers[header];\n serializedHeaders[header.toLowerCase()] = value;\n });\n return serializedHeaders;\n}\nfunction deserializeSuccess(response) {\n try {\n return JSON.parse(response.content);\n } catch (e) {\n throw new DeserializationError(e.message, response);\n }\n}\nfunction deserializeFailure({ content, status }, stackFrame) {\n try {\n const parsed = JSON.parse(content);\n if (\"error\" in parsed) {\n return new DetailedApiError(parsed.message, status, parsed.error, stackFrame);\n }\n return new ApiError(parsed.message, status, stackFrame);\n } catch {\n }\n return new ApiError(content, status, stackFrame);\n}\n\n// src/transporter/responses.ts\nfunction isNetworkError({ isTimedOut, status }) {\n return !isTimedOut && ~~status === 0;\n}\nfunction isRetryable({ isTimedOut, status }) {\n return isTimedOut || isNetworkError({ isTimedOut, status }) || ~~(status / 100) !== 2 && ~~(status / 100) !== 4;\n}\nfunction isSuccess({ status }) {\n return ~~(status / 100) === 2;\n}\n\n// src/transporter/stackTrace.ts\nfunction stackTraceWithoutCredentials(stackTrace) {\n return stackTrace.map((stackFrame) => stackFrameWithoutCredentials(stackFrame));\n}\nfunction stackFrameWithoutCredentials(stackFrame) {\n const modifiedHeaders = stackFrame.request.headers[\"x-algolia-api-key\"] ? { \"x-algolia-api-key\": \"*****\" } : {};\n return {\n ...stackFrame,\n request: {\n ...stackFrame.request,\n headers: {\n ...stackFrame.request.headers,\n ...modifiedHeaders\n }\n }\n };\n}\n\n// src/transporter/createTransporter.ts\nfunction createTransporter({\n hosts,\n hostsCache,\n baseHeaders,\n logger,\n baseQueryParameters,\n algoliaAgent,\n timeouts,\n requester,\n requestsCache,\n responsesCache\n}) {\n async function createRetryableOptions(compatibleHosts) {\n const statefulHosts = await Promise.all(\n compatibleHosts.map((compatibleHost) => {\n return hostsCache.get(compatibleHost, () => {\n return Promise.resolve(createStatefulHost(compatibleHost));\n });\n })\n );\n const hostsUp = statefulHosts.filter((host) => host.isUp());\n const hostsTimedOut = statefulHosts.filter((host) => host.isTimedOut());\n const hostsAvailable = [...hostsUp, ...hostsTimedOut];\n const compatibleHostsAvailable = hostsAvailable.length > 0 ? hostsAvailable : compatibleHosts;\n return {\n hosts: compatibleHostsAvailable,\n getTimeout(timeoutsCount, baseTimeout) {\n const timeoutMultiplier = hostsTimedOut.length === 0 && timeoutsCount === 0 ? 1 : hostsTimedOut.length + 3 + timeoutsCount;\n return timeoutMultiplier * baseTimeout;\n }\n };\n }\n async function retryableRequest(request, requestOptions, isRead = true) {\n const stackTrace = [];\n const data = serializeData(request, requestOptions);\n const headers = serializeHeaders(baseHeaders, request.headers, requestOptions.headers);\n const dataQueryParameters = request.method === \"GET\" ? {\n ...request.data,\n ...requestOptions.data\n } : {};\n const queryParameters = {\n ...baseQueryParameters,\n ...request.queryParameters,\n ...dataQueryParameters\n };\n if (algoliaAgent.value) {\n queryParameters[\"x-algolia-agent\"] = algoliaAgent.value;\n }\n if (requestOptions && requestOptions.queryParameters) {\n for (const key of Object.keys(requestOptions.queryParameters)) {\n if (!requestOptions.queryParameters[key] || Object.prototype.toString.call(requestOptions.queryParameters[key]) === \"[object Object]\") {\n queryParameters[key] = requestOptions.queryParameters[key];\n } else {\n queryParameters[key] = requestOptions.queryParameters[key].toString();\n }\n }\n }\n let timeoutsCount = 0;\n const retry = async (retryableHosts, getTimeout) => {\n const host = retryableHosts.pop();\n if (host === void 0) {\n throw new RetryError(stackTraceWithoutCredentials(stackTrace));\n }\n const timeout = { ...timeouts, ...requestOptions.timeouts };\n const payload = {\n data,\n headers,\n method: request.method,\n url: serializeUrl(host, request.path, queryParameters),\n connectTimeout: getTimeout(timeoutsCount, timeout.connect),\n responseTimeout: getTimeout(timeoutsCount, isRead ? timeout.read : timeout.write)\n };\n const pushToStackTrace = (response2) => {\n const stackFrame = {\n request: payload,\n response: response2,\n host,\n triesLeft: retryableHosts.length\n };\n stackTrace.push(stackFrame);\n return stackFrame;\n };\n const response = await requester.send(payload);\n if (isRetryable(response)) {\n const stackFrame = pushToStackTrace(response);\n if (response.isTimedOut) {\n timeoutsCount++;\n }\n logger.info(\"Retryable failure\", stackFrameWithoutCredentials(stackFrame));\n await hostsCache.set(host, createStatefulHost(host, response.isTimedOut ? \"timed out\" : \"down\"));\n return retry(retryableHosts, getTimeout);\n }\n if (isSuccess(response)) {\n return deserializeSuccess(response);\n }\n pushToStackTrace(response);\n throw deserializeFailure(response, stackTrace);\n };\n const compatibleHosts = hosts.filter(\n (host) => host.accept === \"readWrite\" || (isRead ? host.accept === \"read\" : host.accept === \"write\")\n );\n const options = await createRetryableOptions(compatibleHosts);\n return retry([...options.hosts].reverse(), options.getTimeout);\n }\n function createRequest(request, requestOptions = {}) {\n const isRead = request.useReadTransporter || request.method === \"GET\";\n if (!isRead) {\n return retryableRequest(request, requestOptions, isRead);\n }\n const createRetryableRequest = () => {\n return retryableRequest(request, requestOptions);\n };\n const cacheable = requestOptions.cacheable || request.cacheable;\n if (cacheable !== true) {\n return createRetryableRequest();\n }\n const key = {\n request,\n requestOptions,\n transporter: {\n queryParameters: baseQueryParameters,\n headers: baseHeaders\n }\n };\n return responsesCache.get(\n key,\n () => {\n return requestsCache.get(\n key,\n () => (\n /**\n * Finally, if there is no request in progress with the same key,\n * this `createRetryableRequest()` will actually trigger the\n * retryable request.\n */\n requestsCache.set(key, createRetryableRequest()).then(\n (response) => Promise.all([requestsCache.delete(key), response]),\n (err) => Promise.all([requestsCache.delete(key), Promise.reject(err)])\n ).then(([_, response]) => response)\n )\n );\n },\n {\n /**\n * Of course, once we get this response back from the server, we\n * tell response cache to actually store the received response\n * to be used later.\n */\n miss: (response) => responsesCache.set(key, response)\n }\n );\n }\n return {\n hostsCache,\n requester,\n timeouts,\n logger,\n algoliaAgent,\n baseHeaders,\n baseQueryParameters,\n hosts,\n request: createRequest,\n requestsCache,\n responsesCache\n };\n}\n\n// src/types/logger.ts\nvar LogLevelEnum = {\n Debug: 1,\n Info: 2,\n Error: 3\n};\nexport {\n AlgoliaError,\n ApiError,\n DEFAULT_CONNECT_TIMEOUT_BROWSER,\n DEFAULT_CONNECT_TIMEOUT_NODE,\n DEFAULT_READ_TIMEOUT_BROWSER,\n DEFAULT_READ_TIMEOUT_NODE,\n DEFAULT_WRITE_TIMEOUT_BROWSER,\n DEFAULT_WRITE_TIMEOUT_NODE,\n DeserializationError,\n DetailedApiError,\n ErrorWithStackTrace,\n IndexAlreadyExistsError,\n IndexNotFoundError,\n IndicesInSameAppError,\n LogLevelEnum,\n RetryError,\n createAlgoliaAgent,\n createAuth,\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createIterablePromise,\n createMemoryCache,\n createNullCache,\n createNullLogger,\n createStatefulHost,\n createTransporter,\n deserializeFailure,\n deserializeSuccess,\n getAlgoliaAgent,\n isNetworkError,\n isRetryable,\n isSuccess,\n serializeData,\n serializeHeaders,\n serializeQueryParameters,\n serializeUrl,\n shuffle,\n stackFrameWithoutCredentials,\n stackTraceWithoutCredentials\n};\n//# sourceMappingURL=common.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/abtestingV3Client.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"1.7.0\";\nvar REGIONS = [\"de\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = !region ? \"analytics.algolia.com\" : \"analytics.{region}.algolia.com\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createAbtestingV3Client({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"AbtestingV3\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Creates a new A/B test.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param addABTestsRequest - The addABTestsRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n addABTests(addABTestsRequest, requestOptions) {\n if (!addABTestsRequest) {\n throw new Error(\"Parameter `addABTestsRequest` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.name) {\n throw new Error(\"Parameter `addABTestsRequest.name` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.variants) {\n throw new Error(\"Parameter `addABTestsRequest.variants` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.metrics) {\n throw new Error(\"Parameter `addABTestsRequest.metrics` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.endAt) {\n throw new Error(\"Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.\");\n }\n const requestPath = \"/3/abtests\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: addABTestsRequest\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes an A/B test by its ID.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteABTest - The deleteABTest object.\n * @param deleteABTest.id - Unique A/B test identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteABTest({ id }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `deleteABTest`.\");\n }\n const requestPath = \"/3/abtests/{id}\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic.\n *\n * Required API Key ACLs:\n * - analytics\n * @param estimateABTestRequest - The estimateABTestRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n estimateABTest(estimateABTestRequest, requestOptions) {\n if (!estimateABTestRequest) {\n throw new Error(\"Parameter `estimateABTestRequest` is required when calling `estimateABTest`.\");\n }\n if (!estimateABTestRequest.configuration) {\n throw new Error(\"Parameter `estimateABTestRequest.configuration` is required when calling `estimateABTest`.\");\n }\n if (!estimateABTestRequest.variants) {\n throw new Error(\"Parameter `estimateABTestRequest.variants` is required when calling `estimateABTest`.\");\n }\n const requestPath = \"/3/abtests/estimate\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: estimateABTestRequest\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the details for an A/B test by its ID.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getABTest - The getABTest object.\n * @param getABTest.id - Unique A/B test identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getABTest({ id }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `getABTest`.\");\n }\n const requestPath = \"/3/abtests/{id}\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves timeseries for an A/B test by its ID.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTimeseries - The getTimeseries object.\n * @param getTimeseries.id - Unique A/B test identifier.\n * @param getTimeseries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTimeseries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTimeseries.metric - List of metrics to retrieve. If not specified, all metrics are returned.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTimeseries({ id, startDate, endDate, metric }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `getTimeseries`.\");\n }\n const requestPath = \"/3/abtests/{id}/timeseries\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (metric !== void 0) {\n queryParameters[\"metric\"] = metric.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists all A/B tests you configured for this application.\n *\n * Required API Key ACLs:\n * - analytics\n * @param listABTests - The listABTests object.\n * @param listABTests.offset - Position of the first item to return.\n * @param listABTests.limit - Number of items to return.\n * @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.\n * @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.\n * @param listABTests.direction - Sort order for A/B tests by start date. Use \\'asc\\' for ascending or \\'desc\\' for descending. Active A/B tests are always listed first.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listABTests({ offset, limit, indexPrefix, indexSuffix, direction } = {}, requestOptions = void 0) {\n const requestPath = \"/3/abtests\";\n const headers = {};\n const queryParameters = {};\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (indexPrefix !== void 0) {\n queryParameters[\"indexPrefix\"] = indexPrefix.toString();\n }\n if (indexSuffix !== void 0) {\n queryParameters[\"indexSuffix\"] = indexSuffix.toString();\n }\n if (direction !== void 0) {\n queryParameters[\"direction\"] = direction.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Schedule an A/B test to be started at a later time.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param scheduleABTestsRequest - The scheduleABTestsRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n scheduleABTest(scheduleABTestsRequest, requestOptions) {\n if (!scheduleABTestsRequest) {\n throw new Error(\"Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.name) {\n throw new Error(\"Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.variants) {\n throw new Error(\"Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.metrics) {\n throw new Error(\"Parameter `scheduleABTestsRequest.metrics` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.scheduledAt) {\n throw new Error(\"Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.endAt) {\n throw new Error(\"Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.\");\n }\n const requestPath = \"/3/abtests/schedule\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: scheduleABTestsRequest\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Stops an A/B test by its ID. You can\\'t restart stopped A/B tests.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param stopABTest - The stopABTest object.\n * @param stopABTest.id - Unique A/B test identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n stopABTest({ id }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `stopABTest`.\");\n }\n const requestPath = \"/3/abtests/{id}/stop\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction abtestingV3Client(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createAbtestingV3Client({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n abtestingV3Client,\n apiClientVersion\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/abtestingClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nvar REGIONS = [\"de\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = !region ? \"analytics.algolia.com\" : \"analytics.{region}.algolia.com\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createAbtestingClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Abtesting\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Creates a new A/B test.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param addABTestsRequest - The addABTestsRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n addABTests(addABTestsRequest, requestOptions) {\n if (!addABTestsRequest) {\n throw new Error(\"Parameter `addABTestsRequest` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.name) {\n throw new Error(\"Parameter `addABTestsRequest.name` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.variants) {\n throw new Error(\"Parameter `addABTestsRequest.variants` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.endAt) {\n throw new Error(\"Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.\");\n }\n const requestPath = \"/2/abtests\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: addABTestsRequest\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes an A/B test by its ID.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteABTest - The deleteABTest object.\n * @param deleteABTest.id - Unique A/B test identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteABTest({ id }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `deleteABTest`.\");\n }\n const requestPath = \"/2/abtests/{id}\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic.\n *\n * Required API Key ACLs:\n * - analytics\n * @param estimateABTestRequest - The estimateABTestRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n estimateABTest(estimateABTestRequest, requestOptions) {\n if (!estimateABTestRequest) {\n throw new Error(\"Parameter `estimateABTestRequest` is required when calling `estimateABTest`.\");\n }\n if (!estimateABTestRequest.configuration) {\n throw new Error(\"Parameter `estimateABTestRequest.configuration` is required when calling `estimateABTest`.\");\n }\n if (!estimateABTestRequest.variants) {\n throw new Error(\"Parameter `estimateABTestRequest.variants` is required when calling `estimateABTest`.\");\n }\n const requestPath = \"/2/abtests/estimate\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: estimateABTestRequest\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the details for an A/B test by its ID.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getABTest - The getABTest object.\n * @param getABTest.id - Unique A/B test identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getABTest({ id }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `getABTest`.\");\n }\n const requestPath = \"/2/abtests/{id}\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists all A/B tests you configured for this application.\n *\n * Required API Key ACLs:\n * - analytics\n * @param listABTests - The listABTests object.\n * @param listABTests.offset - Position of the first item to return.\n * @param listABTests.limit - Number of items to return.\n * @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.\n * @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listABTests({ offset, limit, indexPrefix, indexSuffix } = {}, requestOptions = void 0) {\n const requestPath = \"/2/abtests\";\n const headers = {};\n const queryParameters = {};\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (indexPrefix !== void 0) {\n queryParameters[\"indexPrefix\"] = indexPrefix.toString();\n }\n if (indexSuffix !== void 0) {\n queryParameters[\"indexSuffix\"] = indexSuffix.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Schedule an A/B test to be started at a later time.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param scheduleABTestsRequest - The scheduleABTestsRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n scheduleABTest(scheduleABTestsRequest, requestOptions) {\n if (!scheduleABTestsRequest) {\n throw new Error(\"Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.name) {\n throw new Error(\"Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.variants) {\n throw new Error(\"Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.scheduledAt) {\n throw new Error(\"Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.endAt) {\n throw new Error(\"Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.\");\n }\n const requestPath = \"/2/abtests/schedule\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: scheduleABTestsRequest\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Stops an A/B test by its ID. You can\\'t restart stopped A/B tests.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param stopABTest - The stopABTest object.\n * @param stopABTest.id - Unique A/B test identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n stopABTest({ id }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `stopABTest`.\");\n }\n const requestPath = \"/2/abtests/{id}/stop\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction abtestingClient(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createAbtestingClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n abtestingClient,\n apiClientVersion\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/analyticsClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nvar REGIONS = [\"de\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = !region ? \"analytics.algolia.com\" : \"analytics.{region}.algolia.com\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createAnalyticsClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Analytics\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the add-to-cart rate for all your searches with at least one add-to-cart event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. The rate is the number of add-to-cart conversion events divided by the number of tracked searches. A search is tracked if it returns a queryID (`clickAnalytics` is `true`). This differs from the response\\'s `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`. **There\\'s a difference between a 0 and null add-to-cart rate when `clickAnalytics` is enabled:** - **Null** means there were no queries: since Algolia didn\\'t receive any events, the add-to-cart rate is null. - **0** mean there _were_ queries but no [add-to-cart events](https://www.algolia.com/doc/guides/sending-events/getting-started) were received.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getAddToCartRate - The getAddToCartRate object.\n * @param getAddToCartRate.index - Index name.\n * @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getAddToCartRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getAddToCartRate`.\");\n }\n const requestPath = \"/2/conversions/addToCartRate\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the average click position of your search results, including a daily breakdown. The average click position is the average of all clicked search result positions. For example, if users only ever click on the first result for any search, the average click position is 1. By default, the analyzed period includes the last eight days including the current day. An average of `null` when `clickAnalytics` is enabled means Algolia didn\\'t receive any [click events](https://www.algolia.com/doc/guides/sending-events/getting-started) for the queries. The average is `null` until Algolia receives at least one click event.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getAverageClickPosition - The getAverageClickPosition object.\n * @param getAverageClickPosition.index - Index name.\n * @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getAverageClickPosition.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getAverageClickPosition`.\");\n }\n const requestPath = \"/2/clicks/averageClickPosition\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the positions in the search results and their associated number of clicks. This lets you check how many clicks the first, second, or tenth search results receive. An average of `0` when `clickAnalytics` is enabled means Algolia didn\\'t receive any [click events](https://www.algolia.com/doc/guides/sending-events/getting-started) for the queries.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getClickPositions - The getClickPositions object.\n * @param getClickPositions.index - Index name.\n * @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getClickPositions.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClickPositions({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getClickPositions`.\");\n }\n const requestPath = \"/2/clicks/positions\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the click-through rate (CTR) for all your searches with at least one click event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. **There\\'s a difference between a 0 and null CTR when `clickAnalytics` is enabled:** - **Null** means there were no queries: since Algolia didn\\'t receive any events, CTR is null. - **0** mean there _were_ queries but no [click events](https://www.algolia.com/doc/guides/sending-events/getting-started) were received.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getClickThroughRate - The getClickThroughRate object.\n * @param getClickThroughRate.index - Index name.\n * @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getClickThroughRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getClickThroughRate`.\");\n }\n const requestPath = \"/2/clicks/clickThroughRate\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the conversion rate (CR) for all your searches with at least one conversion event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. **There\\'s a difference between a 0 and null CR when `clickAnalytics` is enabled:** - **Null** means there were no queries: since Algolia didn\\'t receive any events, CR is null. - **0** mean there _were_ queries but no [conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started) were received.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getConversionRate - The getConversionRate object.\n * @param getConversionRate.index - Index name.\n * @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getConversionRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConversionRate({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getConversionRate`.\");\n }\n const requestPath = \"/2/conversions/conversionRate\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the fraction of searches that didn\\'t lead to any click within a time range, including a daily breakdown. It also returns the number of tracked searches and tracked searches without clicks. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getNoClickRate - The getNoClickRate object.\n * @param getNoClickRate.index - Index name.\n * @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getNoClickRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getNoClickRate`.\");\n }\n const requestPath = \"/2/searches/noClickRate\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the fraction of searches that didn\\'t return any results within a time range, including a daily breakdown. It also returns the count of searches and searches without results used to compute the rates. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getNoResultsRate - The getNoResultsRate object.\n * @param getNoResultsRate.index - Index name.\n * @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getNoResultsRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getNoResultsRate`.\");\n }\n const requestPath = \"/2/searches/noResultRate\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the purchase rate for all your searches with at least one purchase event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. The rate is the number of purchase conversion events divided by the number of tracked searches. A search is tracked if it returns a query ID (`clickAnalytics` is `true`). This differs from the response\\'s `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`. **There\\'s a difference between a 0 and null purchase rate when `clickAnalytics` is enabled:** - **Null** means there were no queries: since Algolia didn\\'t receive any events, the purchase rate is null. - **0** mean there _were_ queries but no [purchase conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started) were received.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getPurchaseRate - The getPurchaseRate object.\n * @param getPurchaseRate.index - Index name.\n * @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getPurchaseRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getPurchaseRate`.\");\n }\n const requestPath = \"/2/conversions/purchaseRate\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves revenue-related metrics, such as the total revenue or the average order value. To retrieve revenue-related metrics, send purchase events. By default, the analyzed period includes the last eight days including the current day. Revenue is based on purchase conversion events (a conversion event with an `eventSubtype` attribute of `purchase`). The revenue is the `price` attribute multiplied by the `quantity` attribute for each object in the event\\'s `objectData` array.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getRevenue - The getRevenue object.\n * @param getRevenue.index - Index name.\n * @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getRevenue.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRevenue({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getRevenue`.\");\n }\n const requestPath = \"/2/conversions/revenue\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the number of searches within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getSearchesCount - The getSearchesCount object.\n * @param getSearchesCount.index - Index name.\n * @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getSearchesCount`.\");\n }\n const requestPath = \"/2/searches/count\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the most popular searches that didn\\'t lead to any clicks, from the 1,000 most frequent searches. For each search, it also returns the number of displayed search results that remained unclicked.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getSearchesNoClicks - The getSearchesNoClicks object.\n * @param getSearchesNoClicks.index - Index name.\n * @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesNoClicks.limit - Number of items to return.\n * @param getSearchesNoClicks.offset - Position of the first item to return.\n * @param getSearchesNoClicks.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getSearchesNoClicks`.\");\n }\n const requestPath = \"/2/searches/noClicks\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the 1,000 most frequent searches that produced zero results.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getSearchesNoResults - The getSearchesNoResults object.\n * @param getSearchesNoResults.index - Index name.\n * @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesNoResults.limit - Number of items to return.\n * @param getSearchesNoResults.offset - Position of the first item to return.\n * @param getSearchesNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSearchesNoResults({ index, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getSearchesNoResults`.\");\n }\n const requestPath = \"/2/searches/noResults\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the time when the Analytics data for the specified index was last updated. If the index has been recently created or no search has been performed yet the updated time is `null`. The Analytics data is updated every 5 minutes.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getStatus - The getStatus object.\n * @param getStatus.index - Index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getStatus({ index }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getStatus`.\");\n }\n const requestPath = \"/2/status\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the countries with the most searches in your index.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTopCountries - The getTopCountries object.\n * @param getTopCountries.index - Index name.\n * @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopCountries.limit - Number of items to return.\n * @param getTopCountries.offset - Position of the first item to return.\n * @param getTopCountries.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getTopCountries`.\");\n }\n const requestPath = \"/2/countries\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the 1,000 most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTopFilterAttributes - The getTopFilterAttributes object.\n * @param getTopFilterAttributes.index - Index name.\n * @param getTopFilterAttributes.search - Search query.\n * @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFilterAttributes.limit - Number of items to return.\n * @param getTopFilterAttributes.offset - Position of the first item to return.\n * @param getTopFilterAttributes.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getTopFilterAttributes`.\");\n }\n const requestPath = \"/2/filters\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (search !== void 0) {\n queryParameters[\"search\"] = search.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the 1,000 most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTopFilterForAttribute - The getTopFilterForAttribute object.\n * @param getTopFilterForAttribute.attribute - Attribute name.\n * @param getTopFilterForAttribute.index - Index name.\n * @param getTopFilterForAttribute.search - Search query.\n * @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFilterForAttribute.limit - Number of items to return.\n * @param getTopFilterForAttribute.offset - Position of the first item to return.\n * @param getTopFilterForAttribute.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!attribute) {\n throw new Error(\"Parameter `attribute` is required when calling `getTopFilterForAttribute`.\");\n }\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getTopFilterForAttribute`.\");\n }\n const requestPath = \"/2/filters/{attribute}\".replace(\"{attribute}\", encodeURIComponent(attribute));\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (search !== void 0) {\n queryParameters[\"search\"] = search.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the 1,000 most frequently used filters for a search that didn\\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](https://www.algolia.com/doc/rest-api/analytics/get-searches-no-results) operation.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTopFiltersNoResults - The getTopFiltersNoResults object.\n * @param getTopFiltersNoResults.index - Index name.\n * @param getTopFiltersNoResults.search - Search query.\n * @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFiltersNoResults.limit - Number of items to return.\n * @param getTopFiltersNoResults.offset - Position of the first item to return.\n * @param getTopFiltersNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getTopFiltersNoResults`.\");\n }\n const requestPath = \"/2/filters/noResults\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (search !== void 0) {\n queryParameters[\"search\"] = search.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the object IDs of the 1,000 most frequent search results. If you set the `clickAnalytics` query parameter to true, the response also includes: - Tracked searches count. Tracked searches are Search API requests with the `clickAnalytics` parameter set to `true`. This differs from the response\\'s `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`. - Click count - Click-through rate (CTR) - Conversion count - Conversion rate (CR) - Average click position If you set the `revenueAnalytics` parameter to `true`, the response also includes: - Add-to-cart count - Add-to-cart rate (ATCR) - Purchase count - Purchase rate - Revenue details for each currency **There\\'s a difference between 0% rates and null rates:** - **Null** means there were no queries: since Algolia didn\\'t receive any events, the rates (CTR, CR, ATCR, purchase rate) are null. - **0% rates** mean there _were_ queries but no [click or conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started) were received.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTopHits - The getTopHits object.\n * @param getTopHits.index - Index name.\n * @param getTopHits.search - Search query.\n * @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.\n * @param getTopHits.revenueAnalytics - Whether to include metrics related to revenue events in the response.\n * @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopHits.limit - Number of items to return.\n * @param getTopHits.offset - Position of the first item to return.\n * @param getTopHits.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getTopHits`.\");\n }\n const requestPath = \"/2/hits\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (search !== void 0) {\n queryParameters[\"search\"] = search.toString();\n }\n if (clickAnalytics !== void 0) {\n queryParameters[\"clickAnalytics\"] = clickAnalytics.toString();\n }\n if (revenueAnalytics !== void 0) {\n queryParameters[\"revenueAnalytics\"] = revenueAnalytics.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Returns the most popular searches. For each search, it also includes the average number of hits. If you set the `clickAnalytics` query parameter to `true`, the response also includes - Tracked searches count. Tracked searches are Search API requests with the `clickAnalytics` parameter set to `true`. This differs from the response\\'s `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`. - Click count - Click-through rate (CTR) - Conversion count - Conversion rate (CR) - Average click position If you set the `revenueAnalytics` query parameter to `true`, the response also includes: - Add-to-cart count - Add-to-cart rate (ATCR) - Purchase count - Purchase rate - Revenue details for each currency **There\\'s a difference between 0% rates and null rates:** - **Null** means there were no queries: since Algolia didn\\'t receive any events, the rates (CTR, CR, ATCR, purchase rate) are null. - **0% rates** mean there _were_ queries but no [click or conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started) were received.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTopSearches - The getTopSearches object.\n * @param getTopSearches.index - Index name.\n * @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.\n * @param getTopSearches.revenueAnalytics - Whether to include metrics related to revenue events in the response.\n * @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.\n * @param getTopSearches.direction - Sorting direction of the results: ascending or descending.\n * @param getTopSearches.limit - Number of items to return.\n * @param getTopSearches.offset - Position of the first item to return.\n * @param getTopSearches.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopSearches({\n index,\n clickAnalytics,\n revenueAnalytics,\n startDate,\n endDate,\n orderBy,\n direction,\n limit,\n offset,\n tags\n }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getTopSearches`.\");\n }\n const requestPath = \"/2/searches\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (clickAnalytics !== void 0) {\n queryParameters[\"clickAnalytics\"] = clickAnalytics.toString();\n }\n if (revenueAnalytics !== void 0) {\n queryParameters[\"revenueAnalytics\"] = revenueAnalytics.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (orderBy !== void 0) {\n queryParameters[\"orderBy\"] = orderBy.toString();\n }\n if (direction !== void 0) {\n queryParameters[\"direction\"] = direction.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the number of unique users within a time range, including a daily breakdown. Since it returns the number of unique users, the sum of the daily values might be different from the total number. By default: - Algolia distinguishes search users by their IP address, _unless_ you include a pseudonymous user identifier in your search requests with the `userToken` API parameter or `x-algolia-usertoken` request header. - The analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getUsersCount - The getUsersCount object.\n * @param getUsersCount.index - Index name.\n * @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getUsersCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getUsersCount({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getUsersCount`.\");\n }\n const requestPath = \"/2/users/count\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction analyticsClient(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createAnalyticsClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n analyticsClient,\n apiClientVersion\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/insightsClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nvar REGIONS = [\"de\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = !region ? \"insights.algolia.io\" : \"insights.{region}.algolia.io\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createInsightsClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Insights\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see `Delete a user profile` in the Personalization API.\n *\n * Required API Key ACLs:\n * - deleteObject\n * @param deleteUserToken - The deleteUserToken object.\n * @param deleteUserToken.userToken - User token for which to delete all associated events.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteUserToken({ userToken }, requestOptions) {\n if (!userToken) {\n throw new Error(\"Parameter `userToken` is required when calling `deleteUserToken`.\");\n }\n const requestPath = \"/1/usertokens/{userToken}\".replace(\"{userToken}\", encodeURIComponent(userToken));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Sends a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2 MB.\n *\n * Required API Key ACLs:\n * - search\n * @param insightsEvents - The insightsEvents object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n pushEvents(insightsEvents, requestOptions) {\n if (!insightsEvents) {\n throw new Error(\"Parameter `insightsEvents` is required when calling `pushEvents`.\");\n }\n if (!insightsEvents.events) {\n throw new Error(\"Parameter `insightsEvents.events` is required when calling `pushEvents`.\");\n }\n const requestPath = \"/1/events\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: insightsEvents\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction insightsClient(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createInsightsClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n insightsClient\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/personalizationClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nvar REGIONS = [\"eu\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = \"personalization.{region}.algolia.com\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createPersonalizationClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Personalization\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a user profile. The response includes a date and time when the user profile can safely be considered deleted.\n *\n * Required API Key ACLs:\n * - recommendation\n * @param deleteUserProfile - The deleteUserProfile object.\n * @param deleteUserProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteUserProfile({ userToken }, requestOptions) {\n if (!userToken) {\n throw new Error(\"Parameter `userToken` is required when calling `deleteUserProfile`.\");\n }\n const requestPath = \"/1/profiles/{userToken}\".replace(\"{userToken}\", encodeURIComponent(userToken));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the current personalization strategy.\n *\n * Required API Key ACLs:\n * - recommendation\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getPersonalizationStrategy(requestOptions) {\n const requestPath = \"/1/strategies/personalization\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a user profile and their affinities for different facets.\n *\n * Required API Key ACLs:\n * - recommendation\n * @param getUserTokenProfile - The getUserTokenProfile object.\n * @param getUserTokenProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getUserTokenProfile({ userToken }, requestOptions) {\n if (!userToken) {\n throw new Error(\"Parameter `userToken` is required when calling `getUserTokenProfile`.\");\n }\n const requestPath = \"/1/profiles/personalization/{userToken}\".replace(\n \"{userToken}\",\n encodeURIComponent(userToken)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new personalization strategy.\n *\n * Required API Key ACLs:\n * - recommendation\n * @param personalizationStrategyParams - The personalizationStrategyParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n setPersonalizationStrategy(personalizationStrategyParams, requestOptions) {\n if (!personalizationStrategyParams) {\n throw new Error(\n \"Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.\"\n );\n }\n if (!personalizationStrategyParams.eventsScoring) {\n throw new Error(\n \"Parameter `personalizationStrategyParams.eventsScoring` is required when calling `setPersonalizationStrategy`.\"\n );\n }\n if (!personalizationStrategyParams.facetsScoring) {\n throw new Error(\n \"Parameter `personalizationStrategyParams.facetsScoring` is required when calling `setPersonalizationStrategy`.\"\n );\n }\n if (!personalizationStrategyParams.personalizationImpact) {\n throw new Error(\n \"Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.\"\n );\n }\n const requestPath = \"/1/strategies/personalization\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: personalizationStrategyParams\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction personalizationClient(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (!region || region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` is required and must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createPersonalizationClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n personalizationClient\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/querySuggestionsClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nvar REGIONS = [\"eu\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = \"query-suggestions.{region}.algolia.com\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createQuerySuggestionsClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"QuerySuggestions\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param configurationWithIndex - The configurationWithIndex object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createConfig(configurationWithIndex, requestOptions) {\n if (!configurationWithIndex) {\n throw new Error(\"Parameter `configurationWithIndex` is required when calling `createConfig`.\");\n }\n const requestPath = \"/1/configs\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: configurationWithIndex\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. To delete the Query Suggestions index itself, use the Search API and the `Delete an index` operation.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteConfig - The deleteConfig object.\n * @param deleteConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteConfig({ indexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteConfig`.\");\n }\n const requestPath = \"/1/configs/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves all Query Suggestions configurations of your Algolia application.\n *\n * Required API Key ACLs:\n * - settings\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAllConfigs(requestOptions) {\n const requestPath = \"/1/configs\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a single Query Suggestions configuration by its index name.\n *\n * Required API Key ACLs:\n * - settings\n * @param getConfig - The getConfig object.\n * @param getConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConfig({ indexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getConfig`.\");\n }\n const requestPath = \"/1/configs/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Reports the status of a Query Suggestions index.\n *\n * Required API Key ACLs:\n * - settings\n * @param getConfigStatus - The getConfigStatus object.\n * @param getConfigStatus.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConfigStatus({ indexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getConfigStatus`.\");\n }\n const requestPath = \"/1/configs/{indexName}/status\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the logs for a single Query Suggestions index.\n *\n * Required API Key ACLs:\n * - settings\n * @param getLogFile - The getLogFile object.\n * @param getLogFile.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLogFile({ indexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getLogFile`.\");\n }\n const requestPath = \"/1/logs/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates a QuerySuggestions configuration.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param updateConfig - The updateConfig object.\n * @param updateConfig.indexName - Query Suggestions index name.\n * @param updateConfig.configuration - The configuration object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateConfig({ indexName, configuration }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `updateConfig`.\");\n }\n if (!configuration) {\n throw new Error(\"Parameter `configuration` is required when calling `updateConfig`.\");\n }\n if (!configuration.sourceIndices) {\n throw new Error(\"Parameter `configuration.sourceIndices` is required when calling `updateConfig`.\");\n }\n const requestPath = \"/1/configs/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: configuration\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction querySuggestionsClient(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (!region || region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` is required and must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createQuerySuggestionsClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n querySuggestionsClient\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/searchClient.ts\nimport {\n ApiError,\n createAuth,\n createIterablePromise,\n createTransporter,\n getAlgoliaAgent,\n shuffle\n} from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nfunction getDefaultHosts(appId) {\n return [\n {\n url: `${appId}-dsn.algolia.net`,\n accept: \"read\",\n protocol: \"https\"\n },\n {\n url: `${appId}.algolia.net`,\n accept: \"write\",\n protocol: \"https\"\n }\n ].concat(\n shuffle([\n {\n url: `${appId}-1.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n },\n {\n url: `${appId}-2.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n },\n {\n url: `${appId}-3.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n }\n ])\n );\n}\nfunction createSearchClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Search\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Helper: Wait for a task to be published (completed) for a given `indexName` and `taskID`.\n *\n * @summary Helper method that waits for a task to be published (completed).\n * @param waitForTaskOptions - The `waitForTaskOptions` object.\n * @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.\n * @param waitForTaskOptions.taskID - The `taskID` returned in the method response.\n * @param waitForTaskOptions.maxRetries - The maximum number of retries. 50 by default.\n * @param waitForTaskOptions.timeout - The function to decide how long to wait between retries.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.\n */\n waitForTask({\n indexName,\n taskID,\n maxRetries = 50,\n timeout = (retryCount) => Math.min(retryCount * 200, 5e3)\n }, requestOptions) {\n let retryCount = 0;\n return createIterablePromise({\n func: () => this.getTask({ indexName, taskID }, requestOptions),\n validate: (response) => response.status === \"published\",\n aggregator: () => retryCount += 1,\n error: {\n validate: () => retryCount >= maxRetries,\n message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`\n },\n timeout: () => timeout(retryCount)\n });\n },\n /**\n * Helper: Wait for an application-level task to complete for a given `taskID`.\n *\n * @summary Helper method that waits for a task to be published (completed).\n * @param waitForAppTaskOptions - The `waitForTaskOptions` object.\n * @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.\n * @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.\n * @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.\n */\n waitForAppTask({\n taskID,\n maxRetries = 50,\n timeout = (retryCount) => Math.min(retryCount * 200, 5e3)\n }, requestOptions) {\n let retryCount = 0;\n return createIterablePromise({\n func: () => this.getAppTask({ taskID }, requestOptions),\n validate: (response) => response.status === \"published\",\n aggregator: () => retryCount += 1,\n error: {\n validate: () => retryCount >= maxRetries,\n message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`\n },\n timeout: () => timeout(retryCount)\n });\n },\n /**\n * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.\n *\n * @summary Helper method that waits for an API key task to be processed.\n * @param waitForApiKeyOptions - The `waitForApiKeyOptions` object.\n * @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.\n * @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.\n * @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.\n * @param waitForApiKeyOptions.maxRetries - The maximum number of retries. 50 by default.\n * @param waitForApiKeyOptions.timeout - The function to decide how long to wait between retries.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getApikey` method and merged with the transporter requestOptions.\n */\n waitForApiKey({\n operation,\n key,\n apiKey,\n maxRetries = 50,\n timeout = (retryCount) => Math.min(retryCount * 200, 5e3)\n }, requestOptions) {\n let retryCount = 0;\n const baseIteratorOptions = {\n aggregator: () => retryCount += 1,\n error: {\n validate: () => retryCount >= maxRetries,\n message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`\n },\n timeout: () => timeout(retryCount)\n };\n if (operation === \"update\") {\n if (!apiKey) {\n throw new Error(\"`apiKey` is required when waiting for an `update` operation.\");\n }\n return createIterablePromise({\n ...baseIteratorOptions,\n func: () => this.getApiKey({ key }, requestOptions),\n validate: (response) => {\n for (const field of Object.keys(apiKey)) {\n const value = apiKey[field];\n const resValue = response[field];\n if (Array.isArray(value) && Array.isArray(resValue)) {\n if (value.length !== resValue.length || value.some((v, index) => v !== resValue[index])) {\n return false;\n }\n } else if (value !== resValue) {\n return false;\n }\n }\n return true;\n }\n });\n }\n return createIterablePromise({\n ...baseIteratorOptions,\n func: () => this.getApiKey({ key }, requestOptions).catch((error) => {\n if (error.status === 404) {\n return void 0;\n }\n throw error;\n }),\n validate: (response) => operation === \"add\" ? response !== void 0 : response === void 0\n });\n },\n /**\n * Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.\n *\n * @summary Helper method that iterates on the `browse` method.\n * @param browseObjects - The `browseObjects` object.\n * @param browseObjects.indexName - The index in which to perform the request.\n * @param browseObjects.browseParams - The `browse` parameters.\n * @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.\n * @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.\n */\n browseObjects({ indexName, browseParams, ...browseObjectsOptions }, requestOptions) {\n return createIterablePromise({\n func: (previousResponse) => {\n return this.browse(\n {\n indexName,\n browseParams: {\n cursor: previousResponse ? previousResponse.cursor : void 0,\n hitsPerPage: 1e3,\n ...browseParams\n }\n },\n requestOptions\n );\n },\n validate: (response) => response.cursor === void 0,\n ...browseObjectsOptions\n });\n },\n /**\n * Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index.\n *\n * @summary Helper method that iterates on the `searchRules` method.\n * @param browseRules - The `browseRules` object.\n * @param browseRules.indexName - The index in which to perform the request.\n * @param browseRules.searchRulesParams - The `searchRules` method parameters.\n * @param browseRules.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).\n * @param browseRules.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.\n */\n browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {\n const params = {\n ...searchRulesParams,\n hitsPerPage: searchRulesParams?.hitsPerPage || 1e3\n };\n return createIterablePromise({\n func: (previousResponse) => {\n return this.searchRules(\n {\n indexName,\n searchRulesParams: {\n ...params,\n page: previousResponse ? previousResponse.page + 1 : params.page || 0\n }\n },\n requestOptions\n );\n },\n validate: (response) => response.hits.length < params.hitsPerPage,\n ...browseRulesOptions\n });\n },\n /**\n * Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating rules of an index.\n *\n * @summary Helper method that iterates on the `searchSynonyms` method.\n * @param browseSynonyms - The `browseSynonyms` object.\n * @param browseSynonyms.indexName - The index in which to perform the request.\n * @param browseSynonyms.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).\n * @param browseSynonyms.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.\n * @param browseSynonyms.searchSynonymsParams - The `searchSynonyms` method parameters.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.\n */\n browseSynonyms({\n indexName,\n searchSynonymsParams,\n ...browseSynonymsOptions\n }, requestOptions) {\n const params = {\n ...searchSynonymsParams,\n page: searchSynonymsParams?.page || 0,\n hitsPerPage: 1e3\n };\n return createIterablePromise({\n func: (_) => {\n const resp = this.searchSynonyms(\n {\n indexName,\n searchSynonymsParams: {\n ...params,\n page: params.page\n }\n },\n requestOptions\n );\n params.page += 1;\n return resp;\n },\n validate: (response) => response.hits.length < params.hitsPerPage,\n ...browseSynonymsOptions\n });\n },\n /**\n * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.\n *\n * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.\n * @param chunkedBatch - The `chunkedBatch` object.\n * @param chunkedBatch.indexName - The `indexName` to replace `objects` in.\n * @param chunkedBatch.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param chunkedBatch.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.\n * @param chunkedBatch.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param chunkedBatch.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.\n */\n async chunkedBatch({ indexName, objects, action = \"addObject\", waitForTasks, batchSize = 1e3 }, requestOptions) {\n let requests = [];\n const responses = [];\n const objectEntries = objects.entries();\n for (const [i, obj] of objectEntries) {\n requests.push({ action, body: obj });\n if (requests.length === batchSize || i === objects.length - 1) {\n responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));\n requests = [];\n }\n }\n if (waitForTasks) {\n for (const resp of responses) {\n await this.waitForTask({ indexName, taskID: resp.taskID });\n }\n }\n return responses;\n },\n /**\n * Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.\n *\n * @summary Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.\n * @param saveObjects - The `saveObjects` object.\n * @param saveObjects.indexName - The `indexName` to save `objects` in.\n * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.\n */\n async saveObjects({ indexName, objects, waitForTasks, batchSize }, requestOptions) {\n return await this.chunkedBatch(\n { indexName, objects, action: \"addObject\", waitForTasks, batchSize },\n requestOptions\n );\n },\n /**\n * Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.\n *\n * @summary Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.\n * @param deleteObjects - The `deleteObjects` object.\n * @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.\n * @param deleteObjects.objectIDs - The objectIDs to delete.\n * @param deleteObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param deleteObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.\n */\n async deleteObjects({ indexName, objectIDs, waitForTasks, batchSize }, requestOptions) {\n return await this.chunkedBatch(\n {\n indexName,\n objects: objectIDs.map((objectID) => ({ objectID })),\n action: \"deleteObject\",\n waitForTasks,\n batchSize\n },\n requestOptions\n );\n },\n /**\n * Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.\n *\n * @summary Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.\n * @param partialUpdateObjects - The `partialUpdateObjects` object.\n * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.\n * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.\n * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.\n * @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.\n */\n async partialUpdateObjects({ indexName, objects, createIfNotExists, waitForTasks, batchSize }, requestOptions) {\n return await this.chunkedBatch(\n {\n indexName,\n objects,\n action: createIfNotExists ? \"partialUpdateObject\" : \"partialUpdateObjectNoCreate\",\n batchSize,\n waitForTasks\n },\n requestOptions\n );\n },\n /**\n * Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.\n * See https://api-clients-automation.netlify.app/docs/custom-helpers/#replaceallobjects for implementation details.\n *\n * @summary Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.\n * @param replaceAllObjects - The `replaceAllObjects` object.\n * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.\n * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.\n * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.\n */\n async replaceAllObjects({ indexName, objects, batchSize, scopes }, requestOptions) {\n const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;\n const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;\n if (scopes === void 0) {\n scopes = [\"settings\", \"rules\", \"synonyms\"];\n }\n try {\n let copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: \"copy\",\n destination: tmpIndexName,\n scope: scopes\n }\n },\n requestOptions\n );\n const batchResponses = await this.chunkedBatch(\n { indexName: tmpIndexName, objects, waitForTasks: true, batchSize },\n requestOptions\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID\n });\n copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: \"copy\",\n destination: tmpIndexName,\n scope: scopes\n }\n },\n requestOptions\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID\n });\n const moveOperationResponse = await this.operationIndex(\n {\n indexName: tmpIndexName,\n operationIndexParams: { operation: \"move\", destination: indexName }\n },\n requestOptions\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: moveOperationResponse.taskID\n });\n return { copyOperationResponse, batchResponses, moveOperationResponse };\n } catch (error) {\n await this.deleteIndex({ indexName: tmpIndexName });\n throw error;\n }\n },\n async indexExists({ indexName }) {\n try {\n await this.getSettings({ indexName });\n } catch (error) {\n if (error instanceof ApiError && error.status === 404) {\n return false;\n }\n throw error;\n }\n return true;\n },\n /**\n * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.\n * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.\n *\n * @summary Search multiple indices for `hits`.\n * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForHits(searchMethodParams, requestOptions) {\n return this.search(searchMethodParams, requestOptions);\n },\n /**\n * Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).\n * Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.\n *\n * @summary Search multiple indices for `facets`.\n * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForFacets(searchMethodParams, requestOptions) {\n return this.search(searchMethodParams, requestOptions);\n },\n /**\n * Creates a new API key with specific permissions and restrictions.\n *\n * Required API Key ACLs:\n * - admin\n * @param apiKey - The apiKey object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n addApiKey(apiKey, requestOptions) {\n if (!apiKey) {\n throw new Error(\"Parameter `apiKey` is required when calling `addApiKey`.\");\n }\n if (!apiKey.acl) {\n throw new Error(\"Parameter `apiKey.acl` is required when calling `addApiKey`.\");\n }\n const requestPath = \"/1/keys\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: apiKey\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. If you want to use auto-generated object IDs, use the [`saveObject` operation](https://www.algolia.com/doc/rest-api/search/save-object). To update _some_ attributes of an existing record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object) instead. To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch).\n *\n * Required API Key ACLs:\n * - addObject\n * @param addOrUpdateObject - The addOrUpdateObject object.\n * @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.\n * @param addOrUpdateObject.objectID - Unique record identifier.\n * @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n addOrUpdateObject({ indexName, objectID, body }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `addOrUpdateObject`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `addOrUpdateObject`.\");\n }\n if (!body) {\n throw new Error(\"Parameter `body` is required when calling `addOrUpdateObject`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Adds a source to the list of allowed sources.\n *\n * Required API Key ACLs:\n * - admin\n * @param source - Source to add.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n appendSource(source, requestOptions) {\n if (!source) {\n throw new Error(\"Parameter `source` is required when calling `appendSource`.\");\n }\n if (!source.source) {\n throw new Error(\"Parameter `source.source` is required when calling `appendSource`.\");\n }\n const requestPath = \"/1/security/sources/append\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: source\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param assignUserId - The assignUserId object.\n * @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.\n * @param assignUserId.assignUserIdParams - The assignUserIdParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n assignUserId({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {\n if (!xAlgoliaUserID) {\n throw new Error(\"Parameter `xAlgoliaUserID` is required when calling `assignUserId`.\");\n }\n if (!assignUserIdParams) {\n throw new Error(\"Parameter `assignUserIdParams` is required when calling `assignUserId`.\");\n }\n if (!assignUserIdParams.cluster) {\n throw new Error(\"Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.\");\n }\n const requestPath = \"/1/clusters/mapping\";\n const headers = {};\n const queryParameters = {};\n if (xAlgoliaUserID !== void 0) {\n headers[\"X-Algolia-User-ID\"] = xAlgoliaUserID.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: assignUserIdParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\\'re specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n * @param batch - The batch object.\n * @param batch.indexName - Name of the index on which to perform the operation.\n * @param batch.batchWriteParams - The batchWriteParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n batch({ indexName, batchWriteParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `batch`.\");\n }\n if (!batchWriteParams) {\n throw new Error(\"Parameter `batchWriteParams` is required when calling `batch`.\");\n }\n if (!batchWriteParams.requests) {\n throw new Error(\"Parameter `batchWriteParams.requests` is required when calling `batch`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/batch\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: batchWriteParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Assigns multiple user IDs to a cluster. **You can\\'t move users with this operation**.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param batchAssignUserIds - The batchAssignUserIds object.\n * @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.\n * @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {\n if (!xAlgoliaUserID) {\n throw new Error(\"Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.\");\n }\n if (!batchAssignUserIdsParams) {\n throw new Error(\"Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.\");\n }\n if (!batchAssignUserIdsParams.cluster) {\n throw new Error(\"Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.\");\n }\n if (!batchAssignUserIdsParams.users) {\n throw new Error(\"Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.\");\n }\n const requestPath = \"/1/clusters/mapping/batch\";\n const headers = {};\n const queryParameters = {};\n if (xAlgoliaUserID !== void 0) {\n headers[\"X-Algolia-User-ID\"] = xAlgoliaUserID.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: batchAssignUserIdsParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param batchDictionaryEntries - The batchDictionaryEntries object.\n * @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.\n * @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {\n if (!dictionaryName) {\n throw new Error(\"Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.\");\n }\n if (!batchDictionaryEntriesParams) {\n throw new Error(\"Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.\");\n }\n if (!batchDictionaryEntriesParams.requests) {\n throw new Error(\n \"Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.\"\n );\n }\n const requestPath = \"/1/dictionaries/{dictionaryName}/batch\".replace(\n \"{dictionaryName}\",\n encodeURIComponent(dictionaryName)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: batchDictionaryEntriesParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` evaluate to `true`) If you send these parameters with your browse requests, they\\'ll be ignored.\n *\n * Required API Key ACLs:\n * - browse\n * @param browse - The browse object.\n * @param browse.indexName - Name of the index on which to perform the operation.\n * @param browse.browseParams - The browseParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n browse({ indexName, browseParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `browse`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/browse\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: browseParams ? browseParams : {},\n useReadTransporter: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes only the records from an index while keeping settings, synonyms, and rules. This operation is resource-intensive and subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - deleteIndex\n * @param clearObjects - The clearObjects object.\n * @param clearObjects.indexName - Name of the index on which to perform the operation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n clearObjects({ indexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `clearObjects`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/clear\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes all rules from the index.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param clearRules - The clearRules object.\n * @param clearRules.indexName - Name of the index on which to perform the operation.\n * @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n clearRules({ indexName, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `clearRules`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/rules/clear\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes all synonyms from the index.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param clearSynonyms - The clearSynonyms object.\n * @param clearSynonyms.indexName - Name of the index on which to perform the operation.\n * @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `clearSynonyms`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/synonyms/clear\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes the API key.\n *\n * Required API Key ACLs:\n * - admin\n * @param deleteApiKey - The deleteApiKey object.\n * @param deleteApiKey.key - API key.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteApiKey({ key }, requestOptions) {\n if (!key) {\n throw new Error(\"Parameter `key` is required when calling `deleteApiKey`.\");\n }\n const requestPath = \"/1/keys/{key}\".replace(\"{key}\", encodeURIComponent(key));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This operation doesn\\'t accept empty filters. This operation is resource-intensive. You should only use it if you can\\'t get the object IDs of the records you want to delete. It\\'s more efficient to get a list of object IDs with the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse), and then delete the records using the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - deleteIndex\n * @param deleteBy - The deleteBy object.\n * @param deleteBy.indexName - Name of the index on which to perform the operation.\n * @param deleteBy.deleteByParams - The deleteByParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteBy({ indexName, deleteByParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteBy`.\");\n }\n if (!deleteByParams) {\n throw new Error(\"Parameter `deleteByParams` is required when calling `deleteBy`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/deleteByQuery\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: deleteByParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes an index and all its settings. - Deleting an index doesn\\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas).\n *\n * Required API Key ACLs:\n * - deleteIndex\n * @param deleteIndex - The deleteIndex object.\n * @param deleteIndex.indexName - Name of the index on which to perform the operation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteIndex({ indexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteIndex`.\");\n }\n const requestPath = \"/1/indexes/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). To delete records matching a query, use the [`deleteBy` operation](https://www.algolia.com/doc/rest-api/search/delete-by).\n *\n * Required API Key ACLs:\n * - deleteObject\n * @param deleteObject - The deleteObject object.\n * @param deleteObject.indexName - Name of the index on which to perform the operation.\n * @param deleteObject.objectID - Unique record identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteObject({ indexName, objectID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteObject`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `deleteObject`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteRule - The deleteRule object.\n * @param deleteRule.indexName - Name of the index on which to perform the operation.\n * @param deleteRule.objectID - Unique identifier of a rule object.\n * @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteRule({ indexName, objectID, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteRule`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `deleteRule`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/rules/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a source from the list of allowed sources.\n *\n * Required API Key ACLs:\n * - admin\n * @param deleteSource - The deleteSource object.\n * @param deleteSource.source - IP address range of the source.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteSource({ source }, requestOptions) {\n if (!source) {\n throw new Error(\"Parameter `source` is required when calling `deleteSource`.\");\n }\n const requestPath = \"/1/security/sources/{source}\".replace(\"{source}\", encodeURIComponent(source));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteSynonym - The deleteSynonym object.\n * @param deleteSynonym.indexName - Name of the index on which to perform the operation.\n * @param deleteSynonym.objectID - Unique identifier of a synonym object.\n * @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteSynonym({ indexName, objectID, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteSynonym`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `deleteSynonym`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/synonyms/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\\'s keys. When authenticating with other API keys, you can only retrieve information for that key, with the description replaced by `<redacted>`.\n * @param getApiKey - The getApiKey object.\n * @param getApiKey.key - API key.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getApiKey({ key }, requestOptions) {\n if (!key) {\n throw new Error(\"Parameter `key` is required when calling `getApiKey`.\");\n }\n const requestPath = \"/1/keys/{key}\".replace(\"{key}\", encodeURIComponent(key));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Checks the status of a given application task.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param getAppTask - The getAppTask object.\n * @param getAppTask.taskID - Unique task identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAppTask({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `getAppTask`.\");\n }\n const requestPath = \"/1/task/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists supported languages with their supported dictionary types and number of custom entries.\n *\n * Required API Key ACLs:\n * - settings\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getDictionaryLanguages(requestOptions) {\n const requestPath = \"/1/dictionaries/*/languages\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the languages for which standard dictionary entries are turned off.\n *\n * Required API Key ACLs:\n * - settings\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getDictionarySettings(requestOptions) {\n const requestPath = \"/1/dictionaries/*/settings\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/articles/17245378392977-How-does-Algolia-count-records-and-operations) but doesn\\'t appear in the logs itself.\n *\n * Required API Key ACLs:\n * - logs\n * @param getLogs - The getLogs object.\n * @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.\n * @param getLogs.length - Maximum number of entries to retrieve.\n * @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.\n * @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLogs({ offset, length, indexName, type } = {}, requestOptions = void 0) {\n const requestPath = \"/1/logs\";\n const headers = {};\n const queryParameters = {};\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (length !== void 0) {\n queryParameters[\"length\"] = length.toString();\n }\n if (indexName !== void 0) {\n queryParameters[\"indexName\"] = indexName.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](https://www.algolia.com/doc/rest-api/search/get-objects).\n *\n * Required API Key ACLs:\n * - search\n * @param getObject - The getObject object.\n * @param getObject.indexName - Name of the index on which to perform the operation.\n * @param getObject.objectID - Unique record identifier.\n * @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\\'t be retrieved unless the request is authenticated with the admin API key.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getObject({ indexName, objectID, attributesToRetrieve }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getObject`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `getObject`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n if (attributesToRetrieve !== void 0) {\n queryParameters[\"attributesToRetrieve\"] = attributesToRetrieve.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.\n *\n * Required API Key ACLs:\n * - search\n * @param getObjectsParams - Request object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getObjects(getObjectsParams, requestOptions) {\n if (!getObjectsParams) {\n throw new Error(\"Parameter `getObjectsParams` is required when calling `getObjects`.\");\n }\n if (!getObjectsParams.requests) {\n throw new Error(\"Parameter `getObjectsParams.requests` is required when calling `getObjects`.\");\n }\n const requestPath = \"/1/indexes/*/objects\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: getObjectsParams,\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).\n *\n * Required API Key ACLs:\n * - settings\n * @param getRule - The getRule object.\n * @param getRule.indexName - Name of the index on which to perform the operation.\n * @param getRule.objectID - Unique identifier of a rule object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRule({ indexName, objectID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getRule`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `getRule`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/rules/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves an object with non-null index settings.\n *\n * Required API Key ACLs:\n * - settings\n * @param getSettings - The getSettings object.\n * @param getSettings.indexName - Name of the index on which to perform the operation.\n * @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSettings({ indexName, getVersion }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getSettings`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/settings\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (getVersion !== void 0) {\n queryParameters[\"getVersion\"] = getVersion.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves all allowed IP addresses with access to your application.\n *\n * Required API Key ACLs:\n * - admin\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSources(requestOptions) {\n const requestPath = \"/1/security/sources\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).\n *\n * Required API Key ACLs:\n * - settings\n * @param getSynonym - The getSynonym object.\n * @param getSynonym.indexName - Name of the index on which to perform the operation.\n * @param getSynonym.objectID - Unique identifier of a synonym object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSynonym({ indexName, objectID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getSynonym`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `getSynonym`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/synonyms/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks\\' responses include a task ID that you can use to check the status.\n *\n * Required API Key ACLs:\n * - addObject\n * @param getTask - The getTask object.\n * @param getTask.indexName - Name of the index on which to perform the operation.\n * @param getTask.taskID - Unique task identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTask({ indexName, taskID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getTask`.\");\n }\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `getTask`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/task/{taskID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn\\'t real-time.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopUserIds(requestOptions) {\n const requestPath = \"/1/clusters/mapping/top\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\\'t real-time.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param getUserId - The getUserId object.\n * @param getUserId.userID - Unique identifier of the user who makes the search request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getUserId({ userID }, requestOptions) {\n if (!userID) {\n throw new Error(\"Parameter `userID` is required when calling `getUserId`.\");\n }\n const requestPath = \"/1/clusters/mapping/{userID}\".replace(\"{userID}\", encodeURIComponent(userID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param hasPendingMappings - The hasPendingMappings object.\n * @param hasPendingMappings.getClusters - Whether to include the cluster\\'s pending mapping state in the response.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n hasPendingMappings({ getClusters } = {}, requestOptions = void 0) {\n const requestPath = \"/1/clusters/mapping/pending\";\n const headers = {};\n const queryParameters = {};\n if (getClusters !== void 0) {\n queryParameters[\"getClusters\"] = getClusters.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists all API keys associated with your Algolia application, including their permissions and restrictions.\n *\n * Required API Key ACLs:\n * - admin\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listApiKeys(requestOptions) {\n const requestPath = \"/1/keys\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists the available clusters in a multi-cluster setup.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listClusters(requestOptions) {\n const requestPath = \"/1/clusters\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.\n *\n * Required API Key ACLs:\n * - listIndexes\n * @param listIndices - The listIndices object.\n * @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.\n * @param listIndices.hitsPerPage - Number of hits per page.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listIndices({ page, hitsPerPage } = {}, requestOptions = void 0) {\n const requestPath = \"/1/indexes\";\n const headers = {};\n const queryParameters = {};\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (hitsPerPage !== void 0) {\n queryParameters[\"hitsPerPage\"] = hitsPerPage.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\\'t real-time.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param listUserIds - The listUserIds object.\n * @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.\n * @param listUserIds.hitsPerPage - Number of hits per page.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listUserIds({ page, hitsPerPage } = {}, requestOptions = void 0) {\n const requestPath = \"/1/clusters/mapping\";\n const headers = {};\n const queryParameters = {};\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (hitsPerPage !== void 0) {\n queryParameters[\"hitsPerPage\"] = hitsPerPage.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n * @param batchParams - The batchParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n multipleBatch(batchParams, requestOptions) {\n if (!batchParams) {\n throw new Error(\"Parameter `batchParams` is required when calling `multipleBatch`.\");\n }\n if (!batchParams.requests) {\n throw new Error(\"Parameter `batchParams.requests` is required when calling `multipleBatch`.\");\n }\n const requestPath = \"/1/indexes/*/batch\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: batchParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\\'t exist yet, it\\'ll be created. - This operation is resource-intensive. **Copy** - Copying a source index that doesn\\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices) **Move** - Moving a source index that doesn\\'t exist is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - addObject\n * @param operationIndex - The operationIndex object.\n * @param operationIndex.indexName - Name of the index on which to perform the operation.\n * @param operationIndex.operationIndexParams - The operationIndexParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n operationIndex({ indexName, operationIndexParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `operationIndex`.\");\n }\n if (!operationIndexParams) {\n throw new Error(\"Parameter `operationIndexParams` is required when calling `operationIndex`.\");\n }\n if (!operationIndexParams.operation) {\n throw new Error(\"Parameter `operationIndexParams.operation` is required when calling `operationIndex`.\");\n }\n if (!operationIndexParams.destination) {\n throw new Error(\"Parameter `operationIndexParams.destination` is required when calling `operationIndex`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/operation\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: operationIndexParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Adds new attributes to a record, or updates existing ones. - If a record with the specified object ID doesn\\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, this operation replaces its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don\\'t have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it\\'s not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn\\'t exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn\\'t exist yet, the engine only creates it if you pass an IncrementSet value greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove. When updating multiple attributes or using multiple operations targeting the same record, you should use a single partial update for faster processing. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - addObject\n * @param partialUpdateObject - The partialUpdateObject object.\n * @param partialUpdateObject.indexName - Name of the index on which to perform the operation.\n * @param partialUpdateObject.objectID - Unique record identifier.\n * @param partialUpdateObject.attributesToUpdate - Attributes with their values.\n * @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\\'t exist.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `partialUpdateObject`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `partialUpdateObject`.\");\n }\n if (!attributesToUpdate) {\n throw new Error(\"Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{objectID}/partial\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n if (createIfNotExists !== void 0) {\n queryParameters[\"createIfNotExists\"] = createIfNotExists.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: attributesToUpdate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a user ID and its associated data from the clusters.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param removeUserId - The removeUserId object.\n * @param removeUserId.userID - Unique identifier of the user who makes the search request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n removeUserId({ userID }, requestOptions) {\n if (!userID) {\n throw new Error(\"Parameter `userID` is required when calling `removeUserId`.\");\n }\n const requestPath = \"/1/clusters/mapping/{userID}\".replace(\"{userID}\", encodeURIComponent(userID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Replaces the list of allowed sources.\n *\n * Required API Key ACLs:\n * - admin\n * @param replaceSources - The replaceSources object.\n * @param replaceSources.source - Allowed sources.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n replaceSources({ source }, requestOptions) {\n if (!source) {\n throw new Error(\"Parameter `source` is required when calling `replaceSources`.\");\n }\n const requestPath = \"/1/security/sources\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: source\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\\'t be restored.\n *\n * Required API Key ACLs:\n * - admin\n * @param restoreApiKey - The restoreApiKey object.\n * @param restoreApiKey.key - API key.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n restoreApiKey({ key }, requestOptions) {\n if (!key) {\n throw new Error(\"Parameter `key` is required when calling `restoreApiKey`.\");\n }\n const requestPath = \"/1/keys/{key}/restore\".replace(\"{key}\", encodeURIComponent(key));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Adds a record to an index or replaces it. - If the record doesn\\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\\'t exist, a new record is added to your index. - If you add a record to an index that doesn\\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object). To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - addObject\n * @param saveObject - The saveObject object.\n * @param saveObject.indexName - Name of the index on which to perform the operation.\n * @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n saveObject({ indexName, body }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `saveObject`.\");\n }\n if (!body) {\n throw new Error(\"Parameter `body` is required when calling `saveObject`.\");\n }\n const requestPath = \"/1/indexes/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * If a rule with the specified object ID doesn\\'t exist, it\\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-rules).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param saveRule - The saveRule object.\n * @param saveRule.indexName - Name of the index on which to perform the operation.\n * @param saveRule.objectID - Unique identifier of a rule object.\n * @param saveRule.rule - The rule object.\n * @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n saveRule({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `saveRule`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `saveRule`.\");\n }\n if (!rule) {\n throw new Error(\"Parameter `rule` is required when calling `saveRule`.\");\n }\n if (!rule.objectID) {\n throw new Error(\"Parameter `rule.objectID` is required when calling `saveRule`.\");\n }\n if (!rule.consequence) {\n throw new Error(\"Parameter `rule.consequence` is required when calling `saveRule`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/rules/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: rule\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Create or update multiple rules. If a rule with the specified object ID doesn\\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param saveRules - The saveRules object.\n * @param saveRules.indexName - Name of the index on which to perform the operation.\n * @param saveRules.rules - The rules object.\n * @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.\n * @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n saveRules({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `saveRules`.\");\n }\n if (!rules) {\n throw new Error(\"Parameter `rules` is required when calling `saveRules`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/rules/batch\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n if (clearExistingRules !== void 0) {\n queryParameters[\"clearExistingRules\"] = clearExistingRules.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: rules\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * If a synonym with the specified object ID doesn\\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-synonyms).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param saveSynonym - The saveSynonym object.\n * @param saveSynonym.indexName - Name of the index on which to perform the operation.\n * @param saveSynonym.objectID - Unique identifier of a synonym object.\n * @param saveSynonym.synonymHit - The synonymHit object.\n * @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `saveSynonym`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `saveSynonym`.\");\n }\n if (!synonymHit) {\n throw new Error(\"Parameter `synonymHit` is required when calling `saveSynonym`.\");\n }\n if (!synonymHit.objectID) {\n throw new Error(\"Parameter `synonymHit.objectID` is required when calling `saveSynonym`.\");\n }\n if (!synonymHit.type) {\n throw new Error(\"Parameter `synonymHit.type` is required when calling `saveSynonym`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/synonyms/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: synonymHit\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * If a synonym with the `objectID` doesn\\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param saveSynonyms - The saveSynonyms object.\n * @param saveSynonyms.indexName - Name of the index on which to perform the operation.\n * @param saveSynonyms.synonymHit - The synonymHit object.\n * @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.\n * @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `saveSynonyms`.\");\n }\n if (!synonymHit) {\n throw new Error(\"Parameter `synonymHit` is required when calling `saveSynonyms`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/synonyms/batch\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n if (replaceExistingSynonyms !== void 0) {\n queryParameters[\"replaceExistingSynonyms\"] = replaceExistingSynonyms.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: synonymHit\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. Use the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.\n *\n * Required API Key ACLs:\n * - search\n * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n search(searchMethodParams, requestOptions) {\n if (searchMethodParams && Array.isArray(searchMethodParams)) {\n const newSignatureRequest = {\n requests: searchMethodParams.map(({ params, ...legacyRequest }) => {\n if (legacyRequest.type === \"facet\") {\n return {\n ...legacyRequest,\n ...params,\n type: \"facet\"\n };\n }\n return {\n ...legacyRequest,\n ...params,\n facet: void 0,\n maxFacetHits: void 0,\n facetQuery: void 0\n };\n })\n };\n searchMethodParams = newSignatureRequest;\n }\n if (!searchMethodParams) {\n throw new Error(\"Parameter `searchMethodParams` is required when calling `search`.\");\n }\n if (!searchMethodParams.requests) {\n throw new Error(\"Parameter `searchMethodParams.requests` is required when calling `search`.\");\n }\n const requestPath = \"/1/indexes/*/queries\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchMethodParams,\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for standard and custom dictionary entries.\n *\n * Required API Key ACLs:\n * - settings\n * @param searchDictionaryEntries - The searchDictionaryEntries object.\n * @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.\n * @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {\n if (!dictionaryName) {\n throw new Error(\"Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.\");\n }\n if (!searchDictionaryEntriesParams) {\n throw new Error(\n \"Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.\"\n );\n }\n if (!searchDictionaryEntriesParams.query) {\n throw new Error(\n \"Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.\"\n );\n }\n const requestPath = \"/1/dictionaries/{dictionaryName}/search\".replace(\n \"{dictionaryName}\",\n encodeURIComponent(dictionaryName)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchDictionaryEntriesParams,\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\\'t work if you have **more than 65 searchable facets and searchable attributes combined**.\n *\n * Required API Key ACLs:\n * - search\n * @param searchForFacetValues - The searchForFacetValues object.\n * @param searchForFacetValues.indexName - Name of the index on which to perform the operation.\n * @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.\n * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `searchForFacetValues`.\");\n }\n if (!facetName) {\n throw new Error(\"Parameter `facetName` is required when calling `searchForFacetValues`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/facets/{facetName}/query\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{facetName}\", encodeURIComponent(facetName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for rules in your index.\n *\n * Required API Key ACLs:\n * - settings\n * @param searchRules - The searchRules object.\n * @param searchRules.indexName - Name of the index on which to perform the operation.\n * @param searchRules.searchRulesParams - The searchRulesParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchRules({ indexName, searchRulesParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `searchRules`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/rules/search\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchRulesParams ? searchRulesParams : {},\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches a single index and returns matching search results as hits. This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse) or increase the `paginatedLimitedTo` index setting.\n *\n * Required API Key ACLs:\n * - search\n * @param searchSingleIndex - The searchSingleIndex object.\n * @param searchSingleIndex.indexName - Name of the index on which to perform the operation.\n * @param searchSingleIndex.searchParams - The searchParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchSingleIndex({ indexName, searchParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `searchSingleIndex`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/query\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchParams ? searchParams : {},\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for synonyms in your index.\n *\n * Required API Key ACLs:\n * - settings\n * @param searchSynonyms - The searchSynonyms object.\n * @param searchSynonyms.indexName - Name of the index on which to perform the operation.\n * @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchSynonyms({ indexName, searchSynonymsParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `searchSynonyms`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/synonyms/search\".replace(\n \"{indexName}\",\n encodeURIComponent(indexName)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchSynonymsParams ? searchSynonymsParams : {},\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Since it can take a few seconds to get the data from the different clusters, the response isn\\'t real-time. To ensure rapid updates, the user IDs index isn\\'t built at the same time as the mapping. Instead, it\\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param searchUserIdsParams - The searchUserIdsParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchUserIds(searchUserIdsParams, requestOptions) {\n if (!searchUserIdsParams) {\n throw new Error(\"Parameter `searchUserIdsParams` is required when calling `searchUserIds`.\");\n }\n if (!searchUserIdsParams.query) {\n throw new Error(\"Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.\");\n }\n const requestPath = \"/1/clusters/mapping/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchUserIdsParams,\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Turns standard stop word dictionary entries on or off for a given language.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param dictionarySettingsParams - The dictionarySettingsParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n setDictionarySettings(dictionarySettingsParams, requestOptions) {\n if (!dictionarySettingsParams) {\n throw new Error(\"Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.\");\n }\n if (!dictionarySettingsParams.disableStandardEntries) {\n throw new Error(\n \"Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.\"\n );\n }\n const requestPath = \"/1/dictionaries/*/settings\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: dictionarySettingsParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Update the specified index settings. Index settings that you don\\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param setSettings - The setSettings object.\n * @param setSettings.indexName - Name of the index on which to perform the operation.\n * @param setSettings.indexSettings - The indexSettings object.\n * @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n setSettings({ indexName, indexSettings, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `setSettings`.\");\n }\n if (!indexSettings) {\n throw new Error(\"Parameter `indexSettings` is required when calling `setSettings`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/settings\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: indexSettings\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.\n *\n * Required API Key ACLs:\n * - admin\n * @param updateApiKey - The updateApiKey object.\n * @param updateApiKey.key - API key.\n * @param updateApiKey.apiKey - The apiKey object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateApiKey({ key, apiKey }, requestOptions) {\n if (!key) {\n throw new Error(\"Parameter `key` is required when calling `updateApiKey`.\");\n }\n if (!apiKey) {\n throw new Error(\"Parameter `apiKey` is required when calling `updateApiKey`.\");\n }\n if (!apiKey.acl) {\n throw new Error(\"Parameter `apiKey.acl` is required when calling `updateApiKey`.\");\n }\n const requestPath = \"/1/keys/{key}\".replace(\"{key}\", encodeURIComponent(key));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: apiKey\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction searchClient(appId, apiKey, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n return createSearchClient({\n appId,\n apiKey,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n searchClient\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/ingestionClient.ts\nimport { createAuth, createIterablePromise, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"1.41.0\";\nvar REGIONS = [\"eu\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = \"data.{region}.algolia.com\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction isOnDemandTrigger(trigger) {\n return trigger.type === \"onDemand\";\n}\nfunction isScheduleTrigger(trigger) {\n return trigger.type === \"schedule\";\n}\nfunction isSubscriptionTrigger(trigger) {\n return trigger.type === \"subscription\";\n}\nfunction createIngestionClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Ingestion\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `push` requests by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n *\n * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.\n * @param chunkedPush - The `chunkedPush` object.\n * @param chunkedPush.indexName - The `indexName` to replace `objects` in.\n * @param chunkedPush.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param chunkedPush.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.\n * @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param chunkedPush.referenceIndexName - This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index's transformation to it (e.g. the source index name).\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions.\n */\n async chunkedPush({\n indexName,\n objects,\n action = \"addObject\",\n waitForTasks,\n batchSize = 1e3,\n referenceIndexName\n }, requestOptions) {\n let records = [];\n let offset = 0;\n const responses = [];\n const waitBatchSize = Math.floor(batchSize / 10) || batchSize;\n const objectEntries = objects.entries();\n for (const [i, obj] of objectEntries) {\n records.push(obj);\n if (records.length === batchSize || i === objects.length - 1) {\n responses.push(\n await this.push({ indexName, pushTaskPayload: { action, records }, referenceIndexName }, requestOptions)\n );\n records = [];\n }\n if (waitForTasks && responses.length > 0 && (responses.length % waitBatchSize === 0 || i === objects.length - 1)) {\n for (const resp of responses.slice(offset, offset + waitBatchSize)) {\n if (!resp.eventID) {\n throw new Error(\"received unexpected response from the push endpoint, eventID must not be undefined\");\n }\n let retryCount = 0;\n await createIterablePromise({\n func: async () => {\n if (resp.eventID === void 0 || !resp.eventID) {\n throw new Error(\"received unexpected response from the push endpoint, eventID must not be undefined\");\n }\n return this.getEvent({ runID: resp.runID, eventID: resp.eventID }).catch((error) => {\n if (error.status === 404) {\n return void 0;\n }\n throw error;\n });\n },\n validate: (response) => response !== void 0,\n aggregator: () => retryCount += 1,\n error: {\n validate: () => retryCount >= 50,\n message: () => `The maximum number of retries exceeded. (${retryCount}/${50})`\n },\n timeout: () => Math.min(retryCount * 500, 5e3)\n });\n }\n offset += waitBatchSize;\n }\n }\n return responses;\n },\n /**\n * Creates a new authentication resource.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param authenticationCreate -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createAuthentication(authenticationCreate, requestOptions) {\n if (!authenticationCreate) {\n throw new Error(\"Parameter `authenticationCreate` is required when calling `createAuthentication`.\");\n }\n if (!authenticationCreate.type) {\n throw new Error(\"Parameter `authenticationCreate.type` is required when calling `createAuthentication`.\");\n }\n if (!authenticationCreate.name) {\n throw new Error(\"Parameter `authenticationCreate.name` is required when calling `createAuthentication`.\");\n }\n if (!authenticationCreate.input) {\n throw new Error(\"Parameter `authenticationCreate.input` is required when calling `createAuthentication`.\");\n }\n const requestPath = \"/1/authentications\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: authenticationCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new destination.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param destinationCreate -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createDestination(destinationCreate, requestOptions) {\n if (!destinationCreate) {\n throw new Error(\"Parameter `destinationCreate` is required when calling `createDestination`.\");\n }\n if (!destinationCreate.type) {\n throw new Error(\"Parameter `destinationCreate.type` is required when calling `createDestination`.\");\n }\n if (!destinationCreate.name) {\n throw new Error(\"Parameter `destinationCreate.name` is required when calling `createDestination`.\");\n }\n if (!destinationCreate.input) {\n throw new Error(\"Parameter `destinationCreate.input` is required when calling `createDestination`.\");\n }\n const requestPath = \"/1/destinations\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: destinationCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new source.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param sourceCreate -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createSource(sourceCreate, requestOptions) {\n if (!sourceCreate) {\n throw new Error(\"Parameter `sourceCreate` is required when calling `createSource`.\");\n }\n if (!sourceCreate.type) {\n throw new Error(\"Parameter `sourceCreate.type` is required when calling `createSource`.\");\n }\n if (!sourceCreate.name) {\n throw new Error(\"Parameter `sourceCreate.name` is required when calling `createSource`.\");\n }\n const requestPath = \"/1/sources\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: sourceCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new task.\n * @param taskCreate - Request body for creating a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createTask(taskCreate, requestOptions) {\n if (!taskCreate) {\n throw new Error(\"Parameter `taskCreate` is required when calling `createTask`.\");\n }\n if (!taskCreate.sourceID) {\n throw new Error(\"Parameter `taskCreate.sourceID` is required when calling `createTask`.\");\n }\n if (!taskCreate.destinationID) {\n throw new Error(\"Parameter `taskCreate.destinationID` is required when calling `createTask`.\");\n }\n if (!taskCreate.action) {\n throw new Error(\"Parameter `taskCreate.action` is required when calling `createTask`.\");\n }\n const requestPath = \"/2/tasks\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new task using the v1 endpoint, please use `createTask` instead.\n *\n * @deprecated\n * @param taskCreate - Request body for creating a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createTaskV1(taskCreate, requestOptions) {\n if (!taskCreate) {\n throw new Error(\"Parameter `taskCreate` is required when calling `createTaskV1`.\");\n }\n if (!taskCreate.sourceID) {\n throw new Error(\"Parameter `taskCreate.sourceID` is required when calling `createTaskV1`.\");\n }\n if (!taskCreate.destinationID) {\n throw new Error(\"Parameter `taskCreate.destinationID` is required when calling `createTaskV1`.\");\n }\n if (!taskCreate.trigger) {\n throw new Error(\"Parameter `taskCreate.trigger` is required when calling `createTaskV1`.\");\n }\n if (!taskCreate.action) {\n throw new Error(\"Parameter `taskCreate.action` is required when calling `createTaskV1`.\");\n }\n const requestPath = \"/1/tasks\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new transformation.\n * @param transformationCreate - Request body for creating a transformation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createTransformation(transformationCreate, requestOptions) {\n if (!transformationCreate) {\n throw new Error(\"Parameter `transformationCreate` is required when calling `createTransformation`.\");\n }\n if (!transformationCreate.name) {\n throw new Error(\"Parameter `transformationCreate.name` is required when calling `createTransformation`.\");\n }\n const requestPath = \"/1/transformations\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: transformationCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes an authentication resource. You can\\'t delete authentication resources that are used by a source or a destination.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param deleteAuthentication - The deleteAuthentication object.\n * @param deleteAuthentication.authenticationID - Unique identifier of an authentication resource.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteAuthentication({ authenticationID }, requestOptions) {\n if (!authenticationID) {\n throw new Error(\"Parameter `authenticationID` is required when calling `deleteAuthentication`.\");\n }\n const requestPath = \"/1/authentications/{authenticationID}\".replace(\n \"{authenticationID}\",\n encodeURIComponent(authenticationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a destination by its ID. You can\\'t delete destinations that are referenced in tasks.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param deleteDestination - The deleteDestination object.\n * @param deleteDestination.destinationID - Unique identifier of a destination.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteDestination({ destinationID }, requestOptions) {\n if (!destinationID) {\n throw new Error(\"Parameter `destinationID` is required when calling `deleteDestination`.\");\n }\n const requestPath = \"/1/destinations/{destinationID}\".replace(\n \"{destinationID}\",\n encodeURIComponent(destinationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a source by its ID. You can\\'t delete sources that are referenced in tasks.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param deleteSource - The deleteSource object.\n * @param deleteSource.sourceID - Unique identifier of a source.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteSource({ sourceID }, requestOptions) {\n if (!sourceID) {\n throw new Error(\"Parameter `sourceID` is required when calling `deleteSource`.\");\n }\n const requestPath = \"/1/sources/{sourceID}\".replace(\"{sourceID}\", encodeURIComponent(sourceID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a task by its ID.\n * @param deleteTask - The deleteTask object.\n * @param deleteTask.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteTask({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `deleteTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a task by its ID using the v1 endpoint, please use `deleteTask` instead.\n *\n * @deprecated\n * @param deleteTaskV1 - The deleteTaskV1 object.\n * @param deleteTaskV1.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteTaskV1({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `deleteTaskV1`.\");\n }\n const requestPath = \"/1/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a transformation by its ID.\n * @param deleteTransformation - The deleteTransformation object.\n * @param deleteTransformation.transformationID - Unique identifier of a transformation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteTransformation({ transformationID }, requestOptions) {\n if (!transformationID) {\n throw new Error(\"Parameter `transformationID` is required when calling `deleteTransformation`.\");\n }\n const requestPath = \"/1/transformations/{transformationID}\".replace(\n \"{transformationID}\",\n encodeURIComponent(transformationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Disables a task.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param disableTask - The disableTask object.\n * @param disableTask.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n disableTask({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `disableTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}/disable\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Disables a task using the v1 endpoint, please use `disableTask` instead.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n *\n * @deprecated\n * @param disableTaskV1 - The disableTaskV1 object.\n * @param disableTaskV1.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n disableTaskV1({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `disableTaskV1`.\");\n }\n const requestPath = \"/1/tasks/{taskID}/disable\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Enables a task.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param enableTask - The enableTask object.\n * @param enableTask.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n enableTask({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `enableTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}/enable\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Enables a task using the v1 endpoint, please use `enableTask` instead.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n *\n * @deprecated\n * @param enableTaskV1 - The enableTaskV1 object.\n * @param enableTaskV1.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n enableTaskV1({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `enableTaskV1`.\");\n }\n const requestPath = \"/1/tasks/{taskID}/enable\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves an authentication resource by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getAuthentication - The getAuthentication object.\n * @param getAuthentication.authenticationID - Unique identifier of an authentication resource.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAuthentication({ authenticationID }, requestOptions) {\n if (!authenticationID) {\n throw new Error(\"Parameter `authenticationID` is required when calling `getAuthentication`.\");\n }\n const requestPath = \"/1/authentications/{authenticationID}\".replace(\n \"{authenticationID}\",\n encodeURIComponent(authenticationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a destination by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getDestination - The getDestination object.\n * @param getDestination.destinationID - Unique identifier of a destination.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getDestination({ destinationID }, requestOptions) {\n if (!destinationID) {\n throw new Error(\"Parameter `destinationID` is required when calling `getDestination`.\");\n }\n const requestPath = \"/1/destinations/{destinationID}\".replace(\n \"{destinationID}\",\n encodeURIComponent(destinationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a single task run event by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getEvent - The getEvent object.\n * @param getEvent.runID - Unique identifier of a task run.\n * @param getEvent.eventID - Unique identifier of an event.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getEvent({ runID, eventID }, requestOptions) {\n if (!runID) {\n throw new Error(\"Parameter `runID` is required when calling `getEvent`.\");\n }\n if (!eventID) {\n throw new Error(\"Parameter `eventID` is required when calling `getEvent`.\");\n }\n const requestPath = \"/1/runs/{runID}/events/{eventID}\".replace(\"{runID}\", encodeURIComponent(runID)).replace(\"{eventID}\", encodeURIComponent(eventID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieve a single task run by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getRun - The getRun object.\n * @param getRun.runID - Unique identifier of a task run.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRun({ runID }, requestOptions) {\n if (!runID) {\n throw new Error(\"Parameter `runID` is required when calling `getRun`.\");\n }\n const requestPath = \"/1/runs/{runID}\".replace(\"{runID}\", encodeURIComponent(runID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieve a source by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getSource - The getSource object.\n * @param getSource.sourceID - Unique identifier of a source.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSource({ sourceID }, requestOptions) {\n if (!sourceID) {\n throw new Error(\"Parameter `sourceID` is required when calling `getSource`.\");\n }\n const requestPath = \"/1/sources/{sourceID}\".replace(\"{sourceID}\", encodeURIComponent(sourceID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a task by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getTask - The getTask object.\n * @param getTask.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTask({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `getTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a task by its ID using the v1 endpoint, please use `getTask` instead.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n *\n * @deprecated\n * @param getTaskV1 - The getTaskV1 object.\n * @param getTaskV1.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTaskV1({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `getTaskV1`.\");\n }\n const requestPath = \"/1/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a transformation by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getTransformation - The getTransformation object.\n * @param getTransformation.transformationID - Unique identifier of a transformation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTransformation({ transformationID }, requestOptions) {\n if (!transformationID) {\n throw new Error(\"Parameter `transformationID` is required when calling `getTransformation`.\");\n }\n const requestPath = \"/1/transformations/{transformationID}\".replace(\n \"{transformationID}\",\n encodeURIComponent(transformationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of all authentication resources.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listAuthentications - The listAuthentications object.\n * @param listAuthentications.itemsPerPage - Number of items per page.\n * @param listAuthentications.page - Page number of the paginated API response.\n * @param listAuthentications.type - Type of authentication resource to retrieve.\n * @param listAuthentications.platform - Ecommerce platform for which to retrieve authentications.\n * @param listAuthentications.sort - Property by which to sort the list of authentications.\n * @param listAuthentications.order - Sort order of the response, ascending or descending.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listAuthentications({ itemsPerPage, page, type, platform, sort, order } = {}, requestOptions = void 0) {\n const requestPath = \"/1/authentications\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n if (platform !== void 0) {\n queryParameters[\"platform\"] = platform.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of destinations.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listDestinations - The listDestinations object.\n * @param listDestinations.itemsPerPage - Number of items per page.\n * @param listDestinations.page - Page number of the paginated API response.\n * @param listDestinations.type - Destination type.\n * @param listDestinations.authenticationID - Authentication ID used by destinations.\n * @param listDestinations.transformationID - Get the list of destinations used by a transformation.\n * @param listDestinations.sort - Property by which to sort the destinations.\n * @param listDestinations.order - Sort order of the response, ascending or descending.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listDestinations({ itemsPerPage, page, type, authenticationID, transformationID, sort, order } = {}, requestOptions = void 0) {\n const requestPath = \"/1/destinations\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n if (authenticationID !== void 0) {\n queryParameters[\"authenticationID\"] = authenticationID.toString();\n }\n if (transformationID !== void 0) {\n queryParameters[\"transformationID\"] = transformationID.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of events for a task run, identified by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listEvents - The listEvents object.\n * @param listEvents.runID - Unique identifier of a task run.\n * @param listEvents.itemsPerPage - Number of items per page.\n * @param listEvents.page - Page number of the paginated API response.\n * @param listEvents.status - Event status for filtering the list of task runs.\n * @param listEvents.type - Event type for filtering the list of task runs.\n * @param listEvents.sort - Property by which to sort the list of task run events.\n * @param listEvents.order - Sort order of the response, ascending or descending.\n * @param listEvents.startDate - Date and time in RFC 3339 format for the earliest events to retrieve. By default, the current time minus three hours is used.\n * @param listEvents.endDate - Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listEvents({ runID, itemsPerPage, page, status, type, sort, order, startDate, endDate }, requestOptions) {\n if (!runID) {\n throw new Error(\"Parameter `runID` is required when calling `listEvents`.\");\n }\n const requestPath = \"/1/runs/{runID}/events\".replace(\"{runID}\", encodeURIComponent(runID));\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (status !== void 0) {\n queryParameters[\"status\"] = status.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieve a list of task runs.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listRuns - The listRuns object.\n * @param listRuns.itemsPerPage - Number of items per page.\n * @param listRuns.page - Page number of the paginated API response.\n * @param listRuns.status - Run status for filtering the list of task runs.\n * @param listRuns.type - Run type for filtering the list of task runs.\n * @param listRuns.taskID - Task ID for filtering the list of task runs.\n * @param listRuns.sort - Property by which to sort the list of task runs.\n * @param listRuns.order - Sort order of the response, ascending or descending.\n * @param listRuns.startDate - Date in RFC 3339 format for the earliest run to retrieve. By default, the current day minus seven days is used.\n * @param listRuns.endDate - Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listRuns({ itemsPerPage, page, status, type, taskID, sort, order, startDate, endDate } = {}, requestOptions = void 0) {\n const requestPath = \"/1/runs\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (status !== void 0) {\n queryParameters[\"status\"] = status.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n if (taskID !== void 0) {\n queryParameters[\"taskID\"] = taskID.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of sources.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listSources - The listSources object.\n * @param listSources.itemsPerPage - Number of items per page.\n * @param listSources.page - Page number of the paginated API response.\n * @param listSources.type - Source type. Some sources require authentication.\n * @param listSources.authenticationID - Authentication IDs of the sources to retrieve. \\'none\\' returns sources that doesn\\'t have an authentication.\n * @param listSources.sort - Property by which to sort the list of sources.\n * @param listSources.order - Sort order of the response, ascending or descending.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listSources({ itemsPerPage, page, type, authenticationID, sort, order } = {}, requestOptions = void 0) {\n const requestPath = \"/1/sources\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n if (authenticationID !== void 0) {\n queryParameters[\"authenticationID\"] = authenticationID.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of tasks.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listTasks - The listTasks object.\n * @param listTasks.itemsPerPage - Number of items per page.\n * @param listTasks.page - Page number of the paginated API response.\n * @param listTasks.action - Actions for filtering the list of tasks.\n * @param listTasks.enabled - Whether to filter the list of tasks by the `enabled` status.\n * @param listTasks.sourceID - Source IDs for filtering the list of tasks.\n * @param listTasks.sourceType - Filters the tasks with the specified source type.\n * @param listTasks.destinationID - Destination IDs for filtering the list of tasks.\n * @param listTasks.triggerType - Type of task trigger for filtering the list of tasks.\n * @param listTasks.withEmailNotifications - If specified, the response only includes tasks with notifications.email.enabled set to this value.\n * @param listTasks.sort - Property by which to sort the list of tasks.\n * @param listTasks.order - Sort order of the response, ascending or descending.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listTasks({\n itemsPerPage,\n page,\n action,\n enabled,\n sourceID,\n sourceType,\n destinationID,\n triggerType,\n withEmailNotifications,\n sort,\n order\n } = {}, requestOptions = void 0) {\n const requestPath = \"/2/tasks\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (action !== void 0) {\n queryParameters[\"action\"] = action.toString();\n }\n if (enabled !== void 0) {\n queryParameters[\"enabled\"] = enabled.toString();\n }\n if (sourceID !== void 0) {\n queryParameters[\"sourceID\"] = sourceID.toString();\n }\n if (sourceType !== void 0) {\n queryParameters[\"sourceType\"] = sourceType.toString();\n }\n if (destinationID !== void 0) {\n queryParameters[\"destinationID\"] = destinationID.toString();\n }\n if (triggerType !== void 0) {\n queryParameters[\"triggerType\"] = triggerType.toString();\n }\n if (withEmailNotifications !== void 0) {\n queryParameters[\"withEmailNotifications\"] = withEmailNotifications.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n *\n * @deprecated\n * @param listTasksV1 - The listTasksV1 object.\n * @param listTasksV1.itemsPerPage - Number of items per page.\n * @param listTasksV1.page - Page number of the paginated API response.\n * @param listTasksV1.action - Actions for filtering the list of tasks.\n * @param listTasksV1.enabled - Whether to filter the list of tasks by the `enabled` status.\n * @param listTasksV1.sourceID - Source IDs for filtering the list of tasks.\n * @param listTasksV1.destinationID - Destination IDs for filtering the list of tasks.\n * @param listTasksV1.triggerType - Type of task trigger for filtering the list of tasks.\n * @param listTasksV1.sort - Property by which to sort the list of tasks.\n * @param listTasksV1.order - Sort order of the response, ascending or descending.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listTasksV1({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order } = {}, requestOptions = void 0) {\n const requestPath = \"/1/tasks\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (action !== void 0) {\n queryParameters[\"action\"] = action.toString();\n }\n if (enabled !== void 0) {\n queryParameters[\"enabled\"] = enabled.toString();\n }\n if (sourceID !== void 0) {\n queryParameters[\"sourceID\"] = sourceID.toString();\n }\n if (destinationID !== void 0) {\n queryParameters[\"destinationID\"] = destinationID.toString();\n }\n if (triggerType !== void 0) {\n queryParameters[\"triggerType\"] = triggerType.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of transformations.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listTransformations - The listTransformations object.\n * @param listTransformations.itemsPerPage - Number of items per page.\n * @param listTransformations.page - Page number of the paginated API response.\n * @param listTransformations.sort - Property by which to sort the list of transformations.\n * @param listTransformations.order - Sort order of the response, ascending or descending.\n * @param listTransformations.type - Whether to filter the list of transformations by the type of transformation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listTransformations({ itemsPerPage, page, sort, order, type } = {}, requestOptions = void 0) {\n const requestPath = \"/1/transformations\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Pushes records through the Pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints and/or debugger dashboard to see the status of your task. If you want to leverage the [pre-indexing data transformation](https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/how-to/transform-your-data), this is the recommended way of ingesting your records. This method is similar to `pushTask`, but requires an `indexName` instead of a `taskID`. If zero or many tasks are found, an error will be returned.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param push - The push object.\n * @param push.indexName - Name of the index on which to perform the operation.\n * @param push.pushTaskPayload - The pushTaskPayload object.\n * @param push.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.\n * @param push.referenceIndexName - This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index\\'s transformation to it (e.g. the source index name).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n push({ indexName, pushTaskPayload, watch, referenceIndexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `push`.\");\n }\n if (!pushTaskPayload) {\n throw new Error(\"Parameter `pushTaskPayload` is required when calling `push`.\");\n }\n if (!pushTaskPayload.action) {\n throw new Error(\"Parameter `pushTaskPayload.action` is required when calling `push`.\");\n }\n if (!pushTaskPayload.records) {\n throw new Error(\"Parameter `pushTaskPayload.records` is required when calling `push`.\");\n }\n const requestPath = \"/1/push/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (watch !== void 0) {\n queryParameters[\"watch\"] = watch.toString();\n }\n if (referenceIndexName !== void 0) {\n queryParameters[\"referenceIndexName\"] = referenceIndexName.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: pushTaskPayload\n };\n requestOptions = {\n timeouts: {\n connect: 18e4,\n read: 18e4,\n write: 18e4,\n ...requestOptions?.timeouts\n }\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Pushes records through the pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints or the debugger dashboard to see the status of your task. If you want to transform your data before indexing, this is the recommended way of ingesting your records. This method is similar to `push`, but requires a `taskID` instead of a `indexName`, which is useful when many `destinations` target the same `indexName`.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param pushTask - The pushTask object.\n * @param pushTask.taskID - Unique identifier of a task.\n * @param pushTask.pushTaskPayload - The pushTaskPayload object.\n * @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n pushTask({ taskID, pushTaskPayload, watch }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `pushTask`.\");\n }\n if (!pushTaskPayload) {\n throw new Error(\"Parameter `pushTaskPayload` is required when calling `pushTask`.\");\n }\n if (!pushTaskPayload.action) {\n throw new Error(\"Parameter `pushTaskPayload.action` is required when calling `pushTask`.\");\n }\n if (!pushTaskPayload.records) {\n throw new Error(\"Parameter `pushTaskPayload.records` is required when calling `pushTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}/push\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n if (watch !== void 0) {\n queryParameters[\"watch\"] = watch.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: pushTaskPayload\n };\n requestOptions = {\n timeouts: {\n connect: 18e4,\n read: 18e4,\n write: 18e4,\n ...requestOptions?.timeouts\n }\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Fully updates a task by its ID, use partialUpdateTask if you only want to update a subset of fields.\n * @param replaceTask - The replaceTask object.\n * @param replaceTask.taskID - Unique identifier of a task.\n * @param replaceTask.taskReplace - The taskReplace object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n replaceTask({ taskID, taskReplace }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `replaceTask`.\");\n }\n if (!taskReplace) {\n throw new Error(\"Parameter `taskReplace` is required when calling `replaceTask`.\");\n }\n if (!taskReplace.destinationID) {\n throw new Error(\"Parameter `taskReplace.destinationID` is required when calling `replaceTask`.\");\n }\n if (!taskReplace.action) {\n throw new Error(\"Parameter `taskReplace.action` is required when calling `replaceTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskReplace\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Runs all tasks linked to a source, only available for Shopify, BigCommerce and commercetools sources. Creates one run per task.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param runSource - The runSource object.\n * @param runSource.sourceID - Unique identifier of a source.\n * @param runSource.runSourcePayload -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n runSource({ sourceID, runSourcePayload }, requestOptions) {\n if (!sourceID) {\n throw new Error(\"Parameter `sourceID` is required when calling `runSource`.\");\n }\n const requestPath = \"/1/sources/{sourceID}/run\".replace(\"{sourceID}\", encodeURIComponent(sourceID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: runSourcePayload ? runSourcePayload : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Runs a task. You can check the status of task runs with the observability endpoints.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param runTask - The runTask object.\n * @param runTask.taskID - Unique identifier of a task.\n * @param runTask.runTaskPayload -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n runTask({ taskID, runTaskPayload }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `runTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}/run\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: runTaskPayload ? runTaskPayload : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n *\n * @deprecated\n * @param runTaskV1 - The runTaskV1 object.\n * @param runTaskV1.taskID - Unique identifier of a task.\n * @param runTaskV1.runTaskPayload -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n runTaskV1({ taskID, runTaskPayload }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `runTaskV1`.\");\n }\n const requestPath = \"/1/tasks/{taskID}/run\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: runTaskPayload ? runTaskPayload : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for authentication resources.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param authenticationSearch - The authenticationSearch object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchAuthentications(authenticationSearch, requestOptions) {\n if (!authenticationSearch) {\n throw new Error(\"Parameter `authenticationSearch` is required when calling `searchAuthentications`.\");\n }\n if (!authenticationSearch.authenticationIDs) {\n throw new Error(\n \"Parameter `authenticationSearch.authenticationIDs` is required when calling `searchAuthentications`.\"\n );\n }\n const requestPath = \"/1/authentications/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: authenticationSearch\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for destinations.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param destinationSearch - The destinationSearch object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchDestinations(destinationSearch, requestOptions) {\n if (!destinationSearch) {\n throw new Error(\"Parameter `destinationSearch` is required when calling `searchDestinations`.\");\n }\n if (!destinationSearch.destinationIDs) {\n throw new Error(\"Parameter `destinationSearch.destinationIDs` is required when calling `searchDestinations`.\");\n }\n const requestPath = \"/1/destinations/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: destinationSearch\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for sources.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param sourceSearch - The sourceSearch object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchSources(sourceSearch, requestOptions) {\n if (!sourceSearch) {\n throw new Error(\"Parameter `sourceSearch` is required when calling `searchSources`.\");\n }\n if (!sourceSearch.sourceIDs) {\n throw new Error(\"Parameter `sourceSearch.sourceIDs` is required when calling `searchSources`.\");\n }\n const requestPath = \"/1/sources/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: sourceSearch\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for tasks.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param taskSearch - The taskSearch object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchTasks(taskSearch, requestOptions) {\n if (!taskSearch) {\n throw new Error(\"Parameter `taskSearch` is required when calling `searchTasks`.\");\n }\n if (!taskSearch.taskIDs) {\n throw new Error(\"Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.\");\n }\n const requestPath = \"/2/tasks/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskSearch\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for tasks using the v1 endpoint, please use `searchTasks` instead.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n *\n * @deprecated\n * @param taskSearch - The taskSearch object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchTasksV1(taskSearch, requestOptions) {\n if (!taskSearch) {\n throw new Error(\"Parameter `taskSearch` is required when calling `searchTasksV1`.\");\n }\n if (!taskSearch.taskIDs) {\n throw new Error(\"Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.\");\n }\n const requestPath = \"/1/tasks/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskSearch\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for transformations.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param transformationSearch - The transformationSearch object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchTransformations(transformationSearch, requestOptions) {\n if (!transformationSearch) {\n throw new Error(\"Parameter `transformationSearch` is required when calling `searchTransformations`.\");\n }\n if (!transformationSearch.transformationIDs) {\n throw new Error(\n \"Parameter `transformationSearch.transformationIDs` is required when calling `searchTransformations`.\"\n );\n }\n const requestPath = \"/1/transformations/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: transformationSearch\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: airbyte`.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param triggerDockerSourceDiscover - The triggerDockerSourceDiscover object.\n * @param triggerDockerSourceDiscover.sourceID - Unique identifier of a source.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n triggerDockerSourceDiscover({ sourceID }, requestOptions) {\n if (!sourceID) {\n throw new Error(\"Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.\");\n }\n const requestPath = \"/1/sources/{sourceID}/discover\".replace(\"{sourceID}\", encodeURIComponent(sourceID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n requestOptions = {\n timeouts: {\n connect: 18e4,\n read: 18e4,\n write: 18e4,\n ...requestOptions?.timeouts\n }\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Try a transformation before creating it.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param transformationTry - The transformationTry object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n tryTransformation(transformationTry, requestOptions) {\n if (!transformationTry) {\n throw new Error(\"Parameter `transformationTry` is required when calling `tryTransformation`.\");\n }\n if (!transformationTry.sampleRecord) {\n throw new Error(\"Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.\");\n }\n const requestPath = \"/1/transformations/try\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: transformationTry\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Try a transformation before updating it.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param tryTransformationBeforeUpdate - The tryTransformationBeforeUpdate object.\n * @param tryTransformationBeforeUpdate.transformationID - Unique identifier of a transformation.\n * @param tryTransformationBeforeUpdate.transformationTry - The transformationTry object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n tryTransformationBeforeUpdate({ transformationID, transformationTry }, requestOptions) {\n if (!transformationID) {\n throw new Error(\"Parameter `transformationID` is required when calling `tryTransformationBeforeUpdate`.\");\n }\n if (!transformationTry) {\n throw new Error(\"Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.\");\n }\n if (!transformationTry.sampleRecord) {\n throw new Error(\n \"Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`.\"\n );\n }\n const requestPath = \"/1/transformations/{transformationID}/try\".replace(\n \"{transformationID}\",\n encodeURIComponent(transformationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: transformationTry\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates an authentication resource.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param updateAuthentication - The updateAuthentication object.\n * @param updateAuthentication.authenticationID - Unique identifier of an authentication resource.\n * @param updateAuthentication.authenticationUpdate - The authenticationUpdate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateAuthentication({ authenticationID, authenticationUpdate }, requestOptions) {\n if (!authenticationID) {\n throw new Error(\"Parameter `authenticationID` is required when calling `updateAuthentication`.\");\n }\n if (!authenticationUpdate) {\n throw new Error(\"Parameter `authenticationUpdate` is required when calling `updateAuthentication`.\");\n }\n const requestPath = \"/1/authentications/{authenticationID}\".replace(\n \"{authenticationID}\",\n encodeURIComponent(authenticationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PATCH\",\n path: requestPath,\n queryParameters,\n headers,\n data: authenticationUpdate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates the destination by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param updateDestination - The updateDestination object.\n * @param updateDestination.destinationID - Unique identifier of a destination.\n * @param updateDestination.destinationUpdate - The destinationUpdate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateDestination({ destinationID, destinationUpdate }, requestOptions) {\n if (!destinationID) {\n throw new Error(\"Parameter `destinationID` is required when calling `updateDestination`.\");\n }\n if (!destinationUpdate) {\n throw new Error(\"Parameter `destinationUpdate` is required when calling `updateDestination`.\");\n }\n const requestPath = \"/1/destinations/{destinationID}\".replace(\n \"{destinationID}\",\n encodeURIComponent(destinationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PATCH\",\n path: requestPath,\n queryParameters,\n headers,\n data: destinationUpdate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates a source by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param updateSource - The updateSource object.\n * @param updateSource.sourceID - Unique identifier of a source.\n * @param updateSource.sourceUpdate - The sourceUpdate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateSource({ sourceID, sourceUpdate }, requestOptions) {\n if (!sourceID) {\n throw new Error(\"Parameter `sourceID` is required when calling `updateSource`.\");\n }\n if (!sourceUpdate) {\n throw new Error(\"Parameter `sourceUpdate` is required when calling `updateSource`.\");\n }\n const requestPath = \"/1/sources/{sourceID}\".replace(\"{sourceID}\", encodeURIComponent(sourceID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PATCH\",\n path: requestPath,\n queryParameters,\n headers,\n data: sourceUpdate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Partially updates a task by its ID.\n * @param updateTask - The updateTask object.\n * @param updateTask.taskID - Unique identifier of a task.\n * @param updateTask.taskUpdate - The taskUpdate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateTask({ taskID, taskUpdate }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `updateTask`.\");\n }\n if (!taskUpdate) {\n throw new Error(\"Parameter `taskUpdate` is required when calling `updateTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PATCH\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskUpdate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates a task by its ID using the v1 endpoint, please use `updateTask` instead.\n *\n * @deprecated\n * @param updateTaskV1 - The updateTaskV1 object.\n * @param updateTaskV1.taskID - Unique identifier of a task.\n * @param updateTaskV1.taskUpdate - The taskUpdate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateTaskV1({ taskID, taskUpdate }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `updateTaskV1`.\");\n }\n if (!taskUpdate) {\n throw new Error(\"Parameter `taskUpdate` is required when calling `updateTaskV1`.\");\n }\n const requestPath = \"/1/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PATCH\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskUpdate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates a transformation by its ID.\n * @param updateTransformation - The updateTransformation object.\n * @param updateTransformation.transformationID - Unique identifier of a transformation.\n * @param updateTransformation.transformationCreate - The transformationCreate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateTransformation({ transformationID, transformationCreate }, requestOptions) {\n if (!transformationID) {\n throw new Error(\"Parameter `transformationID` is required when calling `updateTransformation`.\");\n }\n if (!transformationCreate) {\n throw new Error(\"Parameter `transformationCreate` is required when calling `updateTransformation`.\");\n }\n if (!transformationCreate.name) {\n throw new Error(\"Parameter `transformationCreate.name` is required when calling `updateTransformation`.\");\n }\n const requestPath = \"/1/transformations/{transformationID}\".replace(\n \"{transformationID}\",\n encodeURIComponent(transformationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: transformationCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Validates a source payload to ensure it can be created and that the data source can be reached by Algolia.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param sourceCreate -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n validateSource(sourceCreate, requestOptions = void 0) {\n const requestPath = \"/1/sources/validate\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: sourceCreate ? sourceCreate : {}\n };\n requestOptions = {\n timeouts: {\n connect: 18e4,\n read: 18e4,\n write: 18e4,\n ...requestOptions?.timeouts\n }\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param validateSourceBeforeUpdate - The validateSourceBeforeUpdate object.\n * @param validateSourceBeforeUpdate.sourceID - Unique identifier of a source.\n * @param validateSourceBeforeUpdate.sourceUpdate - The sourceUpdate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n validateSourceBeforeUpdate({ sourceID, sourceUpdate }, requestOptions) {\n if (!sourceID) {\n throw new Error(\"Parameter `sourceID` is required when calling `validateSourceBeforeUpdate`.\");\n }\n if (!sourceUpdate) {\n throw new Error(\"Parameter `sourceUpdate` is required when calling `validateSourceBeforeUpdate`.\");\n }\n const requestPath = \"/1/sources/{sourceID}/validate\".replace(\"{sourceID}\", encodeURIComponent(sourceID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: sourceUpdate\n };\n requestOptions = {\n timeouts: {\n connect: 18e4,\n read: 18e4,\n write: 18e4,\n ...requestOptions?.timeouts\n }\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction ingestionClient(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (!region || region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` is required and must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createIngestionClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 25e3,\n read: 25e3,\n write: 25e3\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n ingestionClient,\n isOnDemandTrigger,\n isScheduleTrigger,\n isSubscriptionTrigger\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/monitoringClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"1.41.0\";\nfunction getDefaultHosts() {\n return [{ url: \"status.algolia.com\", accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createMonitoringClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Monitoring\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves known incidents for the selected clusters.\n * @param getClusterIncidents - The getClusterIncidents object.\n * @param getClusterIncidents.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClusterIncidents({ clusters }, requestOptions) {\n if (!clusters) {\n throw new Error(\"Parameter `clusters` is required when calling `getClusterIncidents`.\");\n }\n const requestPath = \"/1/incidents/{clusters}\".replace(\"{clusters}\", encodeURIComponent(clusters));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the status of selected clusters.\n * @param getClusterStatus - The getClusterStatus object.\n * @param getClusterStatus.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClusterStatus({ clusters }, requestOptions) {\n if (!clusters) {\n throw new Error(\"Parameter `clusters` is required when calling `getClusterStatus`.\");\n }\n const requestPath = \"/1/status/{clusters}\".replace(\"{clusters}\", encodeURIComponent(clusters));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves known incidents for all clusters.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getIncidents(requestOptions) {\n const requestPath = \"/1/incidents\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves average times for indexing operations for selected clusters.\n * @param getIndexingTime - The getIndexingTime object.\n * @param getIndexingTime.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getIndexingTime({ clusters }, requestOptions) {\n if (!clusters) {\n throw new Error(\"Parameter `clusters` is required when calling `getIndexingTime`.\");\n }\n const requestPath = \"/1/indexing/{clusters}\".replace(\"{clusters}\", encodeURIComponent(clusters));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the average latency for search requests for selected clusters.\n * @param getLatency - The getLatency object.\n * @param getLatency.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLatency({ clusters }, requestOptions) {\n if (!clusters) {\n throw new Error(\"Parameter `clusters` is required when calling `getLatency`.\");\n }\n const requestPath = \"/1/latency/{clusters}\".replace(\"{clusters}\", encodeURIComponent(clusters));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves metrics related to your Algolia infrastructure, aggregated over a selected time window. Access to this API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing). You must authenticate requests with the `x-algolia-application-id` and `x-algolia-api-key` headers (using the Monitoring API key).\n * @param getMetrics - The getMetrics object.\n * @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.\n * @param getMetrics.period - Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getMetrics({ metric, period }, requestOptions) {\n if (!metric) {\n throw new Error(\"Parameter `metric` is required when calling `getMetrics`.\");\n }\n if (!period) {\n throw new Error(\"Parameter `period` is required when calling `getMetrics`.\");\n }\n const requestPath = \"/1/infrastructure/{metric}/period/{period}\".replace(\"{metric}\", encodeURIComponent(metric)).replace(\"{period}\", encodeURIComponent(period));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Test whether clusters are reachable or not.\n * @param getReachability - The getReachability object.\n * @param getReachability.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getReachability({ clusters }, requestOptions) {\n if (!clusters) {\n throw new Error(\"Parameter `clusters` is required when calling `getReachability`.\");\n }\n const requestPath = \"/1/reachability/{clusters}/probes\".replace(\"{clusters}\", encodeURIComponent(clusters));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the servers that belong to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application\\'s cluster. - Without authentication, the response lists the servers for all Algolia clusters.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getServers(requestOptions) {\n const requestPath = \"/1/inventory/servers\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the status of all Algolia clusters and instances.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getStatus(requestOptions) {\n const requestPath = \"/1/status\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction monitoringClient(appId, apiKey, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n return createMonitoringClient({\n appId,\n apiKey,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n monitoringClient\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/recommendClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent, shuffle } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nfunction getDefaultHosts(appId) {\n return [\n {\n url: `${appId}-dsn.algolia.net`,\n accept: \"read\",\n protocol: \"https\"\n },\n {\n url: `${appId}.algolia.net`,\n accept: \"write\",\n protocol: \"https\"\n }\n ].concat(\n shuffle([\n {\n url: `${appId}-1.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n },\n {\n url: `${appId}-2.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n },\n {\n url: `${appId}-3.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n }\n ])\n );\n}\nfunction createRecommendClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Recommend\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Create or update a batch of Recommend Rules Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions `pattern` and `anchoring` are unavailable. - Condition `filters` triggers if the source item matches the specified filters. - Condition `filters` accepts numeric filters. - Consequence `params` only covers filtering parameters. - Consequence `automaticFacetFilters` doesn\\'t require a facet value placeholder (it tries to match the data source item\\'s attributes instead).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param batchRecommendRules - The batchRecommendRules object.\n * @param batchRecommendRules.indexName - Name of the index on which to perform the operation.\n * @param batchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).\n * @param batchRecommendRules.recommendRule - The recommendRule object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n batchRecommendRules({ indexName, model, recommendRule }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `batchRecommendRules`.\");\n }\n if (!model) {\n throw new Error(\"Parameter `model` is required when calling `batchRecommendRules`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{model}/recommend/rules/batch\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{model}\", encodeURIComponent(model));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: recommendRule ? recommendRule : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a Recommend rule from a recommendation scenario.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteRecommendRule - The deleteRecommendRule object.\n * @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.\n * @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).\n * @param deleteRecommendRule.objectID - Unique record identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteRecommendRule({ indexName, model, objectID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteRecommendRule`.\");\n }\n if (!model) {\n throw new Error(\"Parameter `model` is required when calling `deleteRecommendRule`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `deleteRecommendRule`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{model}\", encodeURIComponent(model)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a Recommend rule that you previously created in the Algolia dashboard.\n *\n * Required API Key ACLs:\n * - settings\n * @param getRecommendRule - The getRecommendRule object.\n * @param getRecommendRule.indexName - Name of the index on which to perform the operation.\n * @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).\n * @param getRecommendRule.objectID - Unique record identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRecommendRule({ indexName, model, objectID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getRecommendRule`.\");\n }\n if (!model) {\n throw new Error(\"Parameter `model` is required when calling `getRecommendRule`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `getRecommendRule`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{model}\", encodeURIComponent(model)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Checks the status of a given task. Deleting a Recommend rule is asynchronous. When you delete a rule, a task is created on a queue and completed depending on the load on the server. The API response includes a task ID that you can use to check the status.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param getRecommendStatus - The getRecommendStatus object.\n * @param getRecommendStatus.indexName - Name of the index on which to perform the operation.\n * @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).\n * @param getRecommendStatus.taskID - Unique task identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRecommendStatus({ indexName, model, taskID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getRecommendStatus`.\");\n }\n if (!model) {\n throw new Error(\"Parameter `model` is required when calling `getRecommendStatus`.\");\n }\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `getRecommendStatus`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{model}/task/{taskID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{model}\", encodeURIComponent(model)).replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves recommendations from selected AI models.\n *\n * Required API Key ACLs:\n * - search\n * @param getRecommendationsParams - The getRecommendationsParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRecommendations(getRecommendationsParams, requestOptions) {\n if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {\n const newSignatureRequest = {\n requests: getRecommendationsParams\n };\n getRecommendationsParams = newSignatureRequest;\n }\n if (!getRecommendationsParams) {\n throw new Error(\"Parameter `getRecommendationsParams` is required when calling `getRecommendations`.\");\n }\n if (!getRecommendationsParams.requests) {\n throw new Error(\"Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.\");\n }\n const requestPath = \"/1/indexes/*/recommendations\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: getRecommendationsParams,\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.\n *\n * Required API Key ACLs:\n * - settings\n * @param searchRecommendRules - The searchRecommendRules object.\n * @param searchRecommendRules.indexName - Name of the index on which to perform the operation.\n * @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).\n * @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchRecommendRules({ indexName, model, searchRecommendRulesParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `searchRecommendRules`.\");\n }\n if (!model) {\n throw new Error(\"Parameter `model` is required when calling `searchRecommendRules`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{model}/recommend/rules/search\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{model}\", encodeURIComponent(model));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchRecommendRulesParams ? searchRecommendRulesParams : {},\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction recommendClient(appId, apiKey, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n return createRecommendClient({\n appId,\n apiKey,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n recommendClient\n};\n//# sourceMappingURL=browser.js.map","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\n\n// builds/browser.ts\nvar browser_exports = {};\n__export(browser_exports, {\n algoliasearch: () => algoliasearch,\n apiClientVersion: () => apiClientVersion\n});\nimport { abtestingV3Client } from \"@algolia/abtesting\";\nimport { abtestingClient } from \"@algolia/client-abtesting\";\nimport { analyticsClient } from \"@algolia/client-analytics\";\nimport { insightsClient } from \"@algolia/client-insights\";\nimport { personalizationClient } from \"@algolia/client-personalization\";\nimport { querySuggestionsClient } from \"@algolia/client-query-suggestions\";\nimport { searchClient } from \"@algolia/client-search\";\nimport { ingestionClient } from \"@algolia/ingestion\";\nimport { monitoringClient } from \"@algolia/monitoring\";\nimport { recommendClient } from \"@algolia/recommend\";\n\n// builds/models.ts\nvar models_exports = {};\n__export(models_exports, {\n apiClientVersion: () => apiClientVersion\n});\n__reExport(models_exports, abtesting_star);\n__reExport(models_exports, client_abtesting_star);\n__reExport(models_exports, client_analytics_star);\n__reExport(models_exports, client_insights_star);\n__reExport(models_exports, client_personalization_star);\n__reExport(models_exports, client_query_suggestions_star);\n__reExport(models_exports, client_search_star);\n__reExport(models_exports, ingestion_star);\n__reExport(models_exports, monitoring_star);\n__reExport(models_exports, recommend_star);\nimport { apiClientVersion } from \"@algolia/client-search\";\nimport * as abtesting_star from \"@algolia/abtesting\";\nimport * as client_abtesting_star from \"@algolia/client-abtesting\";\nimport * as client_analytics_star from \"@algolia/client-analytics\";\nimport * as client_insights_star from \"@algolia/client-insights\";\nimport * as client_personalization_star from \"@algolia/client-personalization\";\nimport * as client_query_suggestions_star from \"@algolia/client-query-suggestions\";\nimport * as client_search_star from \"@algolia/client-search\";\nimport * as ingestion_star from \"@algolia/ingestion\";\nimport * as monitoring_star from \"@algolia/monitoring\";\nimport * as recommend_star from \"@algolia/recommend\";\n\n// builds/browser.ts\n__reExport(browser_exports, models_exports);\nfunction algoliasearch(appId, apiKey, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n const client = searchClient(appId, apiKey, options);\n let ingestionTransporter;\n if (options?.transformation) {\n if (!options.transformation.region) {\n throw new Error(\"`region` must be provided when leveraging the transformation pipeline\");\n }\n ingestionTransporter = ingestionClient(appId, apiKey, options.transformation.region, options);\n }\n return {\n ...client,\n async saveObjectsWithTransformation({ indexName, objects, waitForTasks }, requestOptions) {\n if (!ingestionTransporter) {\n throw new Error(\"`transformation.region` must be provided at client instantiation before calling this method.\");\n }\n if (!options?.transformation?.region) {\n throw new Error(\"`region` must be provided when leveraging the transformation pipeline\");\n }\n return ingestionTransporter.chunkedPush(\n { indexName, objects, action: \"addObject\", waitForTasks },\n requestOptions\n );\n },\n async partialUpdateObjectsWithTransformation({ indexName, objects, createIfNotExists, waitForTasks }, requestOptions) {\n if (!ingestionTransporter) {\n throw new Error(\"`transformation.region` must be provided at client instantiation before calling this method.\");\n }\n if (!options?.transformation?.region) {\n throw new Error(\"`region` must be provided when leveraging the transformation pipeline\");\n }\n return ingestionTransporter.chunkedPush(\n {\n indexName,\n objects,\n action: createIfNotExists ? \"partialUpdateObject\" : \"partialUpdateObjectNoCreate\",\n waitForTasks\n },\n requestOptions\n );\n },\n async replaceAllObjectsWithTransformation({ indexName, objects, batchSize, scopes }, requestOptions) {\n if (!ingestionTransporter) {\n throw new Error(\"`transformation.region` must be provided at client instantiation before calling this method.\");\n }\n if (!options?.transformation?.region) {\n throw new Error(\"`region` must be provided when leveraging the transformation pipeline\");\n }\n const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;\n const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;\n if (scopes === void 0) {\n scopes = [\"settings\", \"rules\", \"synonyms\"];\n }\n try {\n let copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: \"copy\",\n destination: tmpIndexName,\n scope: scopes\n }\n },\n requestOptions\n );\n const watchResponses = await ingestionTransporter.chunkedPush(\n { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, referenceIndexName: indexName },\n requestOptions\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID\n });\n copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: \"copy\",\n destination: tmpIndexName,\n scope: scopes\n }\n },\n requestOptions\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID\n });\n const moveOperationResponse = await this.operationIndex(\n {\n indexName: tmpIndexName,\n operationIndexParams: { operation: \"move\", destination: indexName }\n },\n requestOptions\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: moveOperationResponse.taskID\n });\n return { copyOperationResponse, watchResponses, moveOperationResponse };\n } catch (error) {\n await this.deleteIndex({ indexName: tmpIndexName });\n throw error;\n }\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return client.transporter.algoliaAgent.value;\n },\n initAbtesting: (initOptions) => {\n return abtestingClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initAbtestingV3: (initOptions) => {\n return abtestingV3Client(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initAnalytics: (initOptions) => {\n return analyticsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initIngestion: (initOptions) => {\n return ingestionClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initInsights: (initOptions) => {\n return insightsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initMonitoring: (initOptions = {}) => {\n return monitoringClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n },\n initPersonalization: (initOptions) => {\n return personalizationClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initQuerySuggestions: (initOptions) => {\n return querySuggestionsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initRecommend: (initOptions = {}) => {\n return recommendClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n }\n };\n}\nexport {\n algoliasearch,\n apiClientVersion\n};\n//# sourceMappingURL=browser.js.map","import { algoliasearch } from 'algoliasearch'\nimport { getEnv } from '../../config/env'\nimport { algoliaClient } from '../../services/blogClient'\nimport type { SearchResult } from '../../shared/blog/types/blog.domain'\nimport { resolveAssetUrl, resolveEntrySlug } from '../blog/blog.helpers'\nimport type { AlgoliaHit, SearchBlogPostsParams, SearchBlogPostsResponse, SearchBlogResult } from './search.types'\n\nconst algoliaAppId = getEnv('ALGOLIA_APP_ID') || ''\nconst algoliaApiKey = getEnv('ALGOLIA_API_KEY') || ''\nconst algoliaIndex = getEnv('ALGOLIA_BLOG_INDEX') || 'decentraland-blog'\n\nconst searchClient = algoliaClient.injectEndpoints({\n endpoints: build => ({\n searchBlogPosts: build.query<SearchBlogPostsResponse, SearchBlogPostsParams>({\n queryFn: async ({ query, hitsPerPage = 10, page = 0 }) => {\n try {\n if (query.length < 3) {\n return {\n data: {\n results: [],\n total: 0,\n hasMore: false\n }\n }\n }\n\n const client = algoliasearch(algoliaAppId, algoliaApiKey)\n const searchResponse = await client.searchSingleIndex({\n indexName: algoliaIndex,\n searchParams: {\n query,\n hitsPerPage,\n page\n }\n })\n\n const hits = (searchResponse.hits || []) as AlgoliaHit[]\n\n // Resolve all assets and categories in parallel\n const searchResults: SearchResult[] = await Promise.all(\n hits.map(async (hit: AlgoliaHit) => {\n // Get asset ID from imageObject reference\n const imgObj = hit.imageObject as { sys?: { id?: string } } | undefined\n const assetId = imgObj?.sys?.id || ''\n\n // Get category ID from categoryObject reference\n const catObj = hit.categoryObject as { sys?: { id?: string } } | undefined\n const categoryId = catObj?.sys?.id || ''\n\n // Resolve asset URL and category slug in parallel\n const [imageUrl, categorySlug] = await Promise.all([resolveAssetUrl(assetId), resolveEntrySlug(categoryId)])\n\n return {\n url: `/blog/${categorySlug}/${hit.id}`,\n image: imageUrl,\n title: hit._highlightResult?.title?.value || hit.title,\n description: hit._highlightResult?.description?.value || hit.description\n }\n })\n )\n\n return {\n data: {\n results: searchResults,\n total: (searchResponse.nbHits as number) || 0,\n hasMore: (page + 1) * hitsPerPage < ((searchResponse.nbHits as number) || 0)\n }\n }\n } catch (error) {\n return {\n error: {\n status: 'CUSTOM_ERROR',\n error: error instanceof Error ? error.message : 'Unknown error'\n }\n }\n }\n },\n providesTags: (_result, _error, arg) => [{ type: 'SearchResults', id: arg.query }]\n }),\n searchBlog: build.query<SearchBlogResult[], SearchBlogPostsParams>({\n queryFn: async ({ query, hitsPerPage = 10, page = 0 }) => {\n try {\n if (query.length < 3) {\n return { data: [] }\n }\n\n const client = algoliasearch(algoliaAppId, algoliaApiKey)\n const searchResponse = await client.searchSingleIndex({\n indexName: algoliaIndex,\n searchParams: {\n query,\n hitsPerPage,\n page\n }\n })\n\n const hits = (searchResponse.hits || []) as AlgoliaHit[]\n\n const searchResults: SearchBlogResult[] = await Promise.all(\n hits.map(async (hit: AlgoliaHit) => {\n const imgObj = hit.imageObject as { sys?: { id?: string } } | undefined\n const assetId = imgObj?.sys?.id || ''\n\n const catObj = hit.categoryObject as { sys?: { id?: string } } | undefined\n const categoryId = catObj?.sys?.id || ''\n\n const [imageUrl, categorySlug] = await Promise.all([resolveAssetUrl(assetId), resolveEntrySlug(categoryId)])\n\n return {\n id: hit.id,\n categoryId: categorySlug,\n url: `/blog/${categorySlug}/${hit.id}`,\n image: imageUrl,\n highlightedTitle: hit._highlightResult?.title?.value || hit.title,\n highlightedDescription: hit._highlightResult?.description?.value || hit.description\n }\n })\n )\n\n return { data: searchResults }\n } catch (error) {\n return {\n error: {\n status: 'CUSTOM_ERROR',\n error: error instanceof Error ? error.message : 'Unknown error'\n }\n }\n }\n },\n providesTags: (_result, _error, arg) => [{ type: 'SearchResults', id: arg.query }]\n })\n }),\n overrideExisting: false\n})\n\nconst { useLazySearchBlogPostsQuery, useSearchBlogPostsQuery, useSearchBlogQuery } = searchClient\n\nexport { searchClient, useLazySearchBlogPostsQuery, useSearchBlogPostsQuery, useSearchBlogQuery }\n","/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */\n\nconst {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n} = Object;\nlet {\n freeze,\n seal,\n create\n} = Object; // eslint-disable-line import/no-mutable-exports\nlet {\n apply,\n construct\n} = typeof Reflect !== 'undefined' && Reflect;\nif (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n}\nif (!seal) {\n seal = function seal(x) {\n return x;\n };\n}\nif (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n}\nif (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n}\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySplice = unapply(Array.prototype.splice);\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param func - The function to be wrapped and called.\n * @returns A new function that calls the given function with a specified thisArg and arguments.\n */\nfunction unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return apply(func, thisArg, args);\n };\n}\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param func - The constructor function to be wrapped and called.\n * @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n */\nfunction unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return construct(func, args);\n };\n}\n/**\n * Add properties to a lookup table\n *\n * @param set - The set to which elements will be added.\n * @param array - The array containing elements to be added to the set.\n * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns The modified set with added elements.\n */\nfunction addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n element = lcElement;\n }\n }\n set[element] = true;\n }\n return set;\n}\n/**\n * Clean up an array to harden against CSPP\n *\n * @param array - The array to be cleaned.\n * @returns The cleaned version of the array\n */\nfunction cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n return array;\n}\n/**\n * Shallow clone an object\n *\n * @param object - The object to be cloned.\n * @returns A new object that copies the original.\n */\nfunction clone(object) {\n const newObject = create(null);\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n if (isPropertyExist) {\n if (Array.isArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (value && typeof value === 'object' && value.constructor === Object) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n return newObject;\n}\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param object - The object to look up the getter function in its prototype chain.\n * @param prop - The property name for which to find the getter function.\n * @returns The getter function found in the prototype chain or a fallback function.\n */\nfunction lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n object = getPrototypeOf(object);\n }\n function fallbackValue() {\n return null;\n }\n return fallbackValue;\n}\n\nconst html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\nconst svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\nconst svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nconst svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\nconst mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nconst mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\nconst text = freeze(['#text']);\n\nconst html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);\nconst svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\nconst mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\nconst xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n// eslint-disable-next-line unicorn/better-regex\nconst MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\nconst ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\nconst TMPLIT_EXPR = seal(/\\$\\{[\\w\\W]*/gm); // eslint-disable-line unicorn/better-regex\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nconst DOCTYPE_NAME = seal(/^html$/i);\nconst CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\nvar EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n ARIA_ATTR: ARIA_ATTR,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n CUSTOM_ELEMENT: CUSTOM_ELEMENT,\n DATA_ATTR: DATA_ATTR,\n DOCTYPE_NAME: DOCTYPE_NAME,\n ERB_EXPR: ERB_EXPR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR\n});\n\n/* eslint-disable @typescript-eslint/indent */\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\nconst NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5,\n // Deprecated\n entityNode: 6,\n // Deprecated\n progressingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12 // Deprecated\n};\nconst getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n};\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param trustedTypes The policy factory.\n * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n};\nconst _createHooksMap = function _createHooksMap() {\n return {\n afterSanitizeAttributes: [],\n afterSanitizeElements: [],\n afterSanitizeShadowDOM: [],\n beforeSanitizeAttributes: [],\n beforeSanitizeElements: [],\n beforeSanitizeShadowDOM: [],\n uponSanitizeAttribute: [],\n uponSanitizeElement: [],\n uponSanitizeShadowNode: []\n };\n};\nfunction createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n const DOMPurify = root => createDOMPurify(root);\n DOMPurify.version = '3.2.4';\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const remove = lookupGetter(ElementPrototype, 'remove');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = _createHooksMap();\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n /*\n * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n /* Decide if document with <html>... should be returned */\n let WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n const formElement = document.createElement('form');\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n /* Set configuration parameters */\n ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;\n HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, text);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n }\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n // Sign local variables required by `sanitize`.\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n }\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n CONFIG = cfg;\n };\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n /**\n * @param element a DOM element whose namespace is being checked\n * @returns Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element);\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via <svg>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n // The only way to switch from MathML to SVG is via`\n // svg if parent is either <annotation-xml> or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via <math>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n // The only way to switch from SVG to MathML is via\n // <math> and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n // For XHTML and XML documents that support custom namespaces\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n }\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n /**\n * _forceRemove\n *\n * @param node a DOM node\n */\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n getParentNode(node).removeChild(node);\n } catch (_) {\n remove(node);\n }\n };\n /**\n * _removeAttribute\n *\n * @param name an Attribute name\n * @param element a DOM node\n */\n const _removeAttribute = function _removeAttribute(name, element) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: element.getAttributeNode(name),\n from: element\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: element\n });\n }\n element.removeAttribute(name);\n // We void attribute values for unremovable \"is\" attributes\n if (name === 'is') {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(element);\n } catch (_) {}\n } else {\n try {\n element.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n /**\n * _initDocument\n *\n * @param dirty - a string of dirty markup\n * @return a DOM, filled with the dirty markup\n */\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n if (FORCE_BODY) {\n dirty = '<remove></remove>' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n }\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n const body = doc.body || doc.documentElement;\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param root The root element or node to start traversing on.\n * @return The created NodeIterator\n */\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n };\n /**\n * _isClobbered\n *\n * @param element element to check for clobbering attacks\n * @return true if clobbered, false if safe\n */\n const _isClobbered = function _isClobbered(element) {\n return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');\n };\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param value object to check whether it's a DOM node\n * @return true is object is a DOM node\n */\n const _isNode = function _isNode(value) {\n return typeof Node === 'function' && value instanceof Node;\n };\n function _executeHooks(hooks, currentNode, data) {\n arrayForEach(hooks, hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n }\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n * @param currentNode to check for permission to exist\n * @return true if node was killed, false if left alive\n */\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n /* Execute a hook if present */\n _executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n /* Execute a hook if present */\n _executeHooks(hooks.uponSanitizeElement, currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* Detect mXSS attempts abusing namespace confusion */\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Remove any occurrence of processing instructions */\n if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n _forceRemove(currentNode);\n return true;\n }\n /* Remove any kind of possibly harmful comments */\n if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\\w]/g, currentNode.data)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n for (let i = childCount - 1; i >= 0; --i) {\n const childClone = cloneNode(childNodes[i], true);\n childClone.__removalCount = (currentNode.__removalCount || 0) + 1;\n parentNode.insertBefore(childClone, getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n }\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n /* Execute a hook if present */\n _executeHooks(hooks.afterSanitizeElements, currentNode, null);\n return false;\n };\n /**\n * _isValidAttribute\n *\n * @param lcTag Lowercase tag name of containing element.\n * @param lcName Lowercase attribute name.\n * @param value Attribute value.\n * @return Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if (\n // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||\n // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n return false;\n } else ;\n return true;\n };\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param tagName name of the tag of the node to sanitize\n * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n };\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param currentNode to sanitize\n */\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n const {\n attributes\n } = currentNode;\n /* Check if we have attributes; if not we might have a text node */\n if (!attributes || _isClobbered(currentNode)) {\n return;\n }\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR,\n forceKeepAttr: undefined\n };\n let l = attributes.length;\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode);\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n /* Work around a security issue with comments inside attributes */\n if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|title)/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n /* Is `value` valid for this attribute? */\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n /* Handle attributes that require Trusted Types */\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n } else {\n arrayPop(DOMPurify.removed);\n }\n } catch (_) {}\n }\n /* Execute a hook if present */\n _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n };\n /**\n * _sanitizeShadowDOM\n *\n * @param fragment to iterate over recursively\n */\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n /* Execute a hook if present */\n _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n /* Sanitize tags and elements */\n _sanitizeElements(shadowNode);\n /* Check attributes next */\n _sanitizeAttributes(shadowNode);\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n }\n /* Execute a hook if present */\n _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n };\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '<!-->';\n }\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n /* Clean up removed elements */\n DOMPurify.removed = [];\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('<!---->');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n /* Get node iterator */\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n _sanitizeElements(currentNode);\n /* Check attributes next */\n _sanitizeAttributes(currentNode);\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n }\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n return returnNode;\n }\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n /* Serialize doctype if allowed */\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n }\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n arrayPush(hooks[entryPoint], hookFunction);\n };\n DOMPurify.removeHook = function (entryPoint, hookFunction) {\n if (hookFunction !== undefined) {\n const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];\n }\n return arrayPop(hooks[entryPoint]);\n };\n DOMPurify.removeHooks = function (entryPoint) {\n hooks[entryPoint] = [];\n };\n DOMPurify.removeAllHooks = function () {\n hooks = _createHooksMap();\n };\n return DOMPurify;\n}\nvar purify = createDOMPurify();\n\nexport { purify as default };\n//# sourceMappingURL=purify.es.mjs.map\n","/* eslint-disable @typescript-eslint/naming-convention */\nimport DOMPurify from 'dompurify'\n\nconst sanitizeHighlight = (value: string): string =>\n DOMPurify.sanitize(value, {\n ALLOWED_TAGS: ['em', 'mark'],\n ALLOWED_ATTR: []\n })\n\nexport { sanitizeHighlight }\n","/**\n * Returns a CSS-safe url() value for use in backgroundImage.\n * Only allows https URLs; double-quotes are percent-encoded to prevent\n * CSS injection via a URL containing `\")` sequences.\n */\nconst safeCssUrl = (url: string): string => {\n try {\n const parsed = new URL(url)\n if (parsed.protocol !== 'https:') return ''\n return parsed.toString().replace(/\"/g, '%22')\n } catch {\n return ''\n }\n}\n\nexport { safeCssUrl }\n","/* eslint-disable @typescript-eslint/naming-convention */\nimport { Link } from 'react-router-dom'\nimport { Box, dclColors, styled } from 'decentraland-ui2'\nimport { safeCssUrl } from '../utils/safeCssUrl'\n\nconst SearchContainer = styled(Box, {\n shouldForwardProp: prop => prop !== '$hasResults'\n})<{ $hasResults: boolean }>(({ theme, $hasResults }) => ({\n position: 'relative',\n width: 'auto',\n zIndex: $hasResults ? theme.zIndex.modal : 1,\n [theme.breakpoints.down('sm')]: {\n width: '100%'\n }\n}))\n\nconst SearchOverlay = styled(Box)(({ theme }) => ({\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n zIndex: theme.zIndex.modal - 1\n}))\n\nconst SearchInputContent = styled(Box)(() => ({\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n width: '100%'\n}))\n\nconst SearchInput = styled(Box)(({ theme }) => ({\n width: '300px',\n padding: `${theme.spacing(1.5)} ${theme.spacing(5)} ${theme.spacing(1.5)} ${theme.spacing(2)}`,\n border: '1px solid rgba(255, 255, 255, 0.15)',\n borderRadius: theme.spacing(1),\n backgroundColor: 'rgba(255, 255, 255, 0.05)',\n color: theme.palette.text.primary,\n fontSize: '15px',\n outline: 'none',\n transition: 'all 200ms ease',\n\n '&::placeholder': {\n color: 'rgba(255, 255, 255, 0.5)'\n },\n\n '&:focus': {\n backgroundColor: 'rgba(255, 255, 255, 0.08)',\n borderColor: 'rgba(255, 255, 255, 0.25)'\n },\n\n '@media (max-width: 1450px)': {\n width: '100%',\n marginBottom: theme.spacing(2)\n }\n})).withComponent('input')\n\nconst SearchCloseButton = styled(Box)(({ theme }) => ({\n position: 'absolute',\n right: theme.spacing(1.5),\n top: '50%',\n transform: 'translateY(-50%)',\n background: 'none',\n border: 'none',\n color: 'rgba(255, 255, 255, 0.5)',\n fontSize: '24px',\n cursor: 'pointer',\n padding: theme.spacing(0.5),\n lineHeight: 1,\n transition: 'color 200ms ease',\n\n '&:hover': {\n color: theme.palette.text.primary\n }\n})).withComponent('button')\n\nconst SearchResults = styled(Box)(({ theme }) => ({\n position: 'absolute',\n top: `calc(100% + ${theme.spacing(1)})`,\n right: 0,\n width: '500px',\n maxWidth: '90vw',\n backgroundColor: theme.palette.background.paper,\n borderRadius: theme.spacing(1.5),\n boxShadow: '0 8px 24px rgba(0, 0, 0, 0.4)',\n listStyleType: 'none',\n margin: 0,\n padding: theme.spacing(1),\n maxHeight: '600px',\n overflowY: 'auto',\n zIndex: theme.zIndex.modal + 1,\n\n '@media (max-width: 1450px)': {\n width: `calc(100vw - ${theme.spacing(6)})`,\n left: 0,\n right: 'auto'\n }\n})).withComponent('ul')\n\nconst SearchResultItem = styled(Box, {\n shouldForwardProp: prop => prop !== '$selected'\n})<{ $selected: boolean }>(({ theme, $selected }) => ({\n borderRadius: theme.spacing(1),\n backgroundColor: $selected ? theme.palette.action.hover : 'transparent',\n transition: 'background-color 200ms ease',\n marginBottom: theme.spacing(0.5),\n\n '&:last-child': {\n marginBottom: 0\n }\n})).withComponent('li')\n\nconst SearchResultLink = styled(Link)(({ theme }) => ({\n display: 'flex',\n padding: theme.spacing(1.5),\n textDecoration: 'none',\n color: 'inherit',\n gap: theme.spacing(1.5)\n}))\n\nconst SearchResultImage = styled(Box, {\n shouldForwardProp: prop => prop !== '$image'\n})<{ $image?: string }>(({ theme, $image }) => ({\n width: '80px',\n height: '80px',\n flexShrink: 0,\n borderRadius: theme.spacing(1),\n backgroundColor: 'rgba(255, 255, 255, 0.05)',\n backgroundImage: $image ? `url(\"${safeCssUrl($image)}\")` : 'none',\n backgroundSize: 'cover',\n backgroundPosition: 'center'\n}))\n\nconst SearchResultText = styled(Box)(({ theme }) => ({\n flex: 1,\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n overflow: 'hidden'\n}))\n\nconst SearchResultTitle = styled(Box)(({ theme }) => ({\n color: theme.palette.text.primary,\n fontSize: '15px',\n fontWeight: 600,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n\n '& em': {\n fontStyle: 'normal',\n color: dclColors.base.primary\n }\n}))\n\nconst SearchResultDescription = styled(Box)(({ theme }) => ({\n color: theme.palette.text.secondary,\n fontSize: '13px',\n lineHeight: '1.5',\n overflow: 'hidden',\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n\n '& em': {\n fontStyle: 'normal',\n color: dclColors.base.primary\n }\n}))\n\nconst NoResults = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n padding: `${theme.spacing(5)} ${theme.spacing(2.5)}`,\n textAlign: 'center',\n color: theme.palette.text.secondary,\n\n '& strong': {\n color: theme.palette.text.primary,\n fontSize: '17px',\n marginBottom: theme.spacing(1)\n },\n\n '& span': {\n fontSize: '15px'\n }\n})).withComponent('li')\n\nconst NoResultsImage = styled(Box)(({ theme }) => ({\n fontSize: '48px',\n marginBottom: theme.spacing(2),\n opacity: 0.5\n}))\n\nconst MoreResultsItem = styled(Box, {\n shouldForwardProp: prop => prop !== '$selected'\n})<{ $selected: boolean }>(({ theme, $selected }) => ({\n borderRadius: theme.spacing(1),\n backgroundColor: $selected ? theme.palette.action.hover : 'transparent',\n transition: 'background-color 200ms ease',\n marginTop: theme.spacing(0.5)\n})).withComponent('li')\n\nconst MoreResultsLink = styled(Link)(({ theme }) => ({\n display: 'block',\n padding: theme.spacing(1.5),\n textAlign: 'center',\n color: dclColors.base.primary,\n fontSize: '15px',\n fontWeight: 500,\n textDecoration: 'none',\n transition: 'opacity 200ms ease',\n\n '&:hover': {\n opacity: 0.8\n }\n}))\n\nexport {\n MoreResultsItem,\n MoreResultsLink,\n NoResults,\n NoResultsImage,\n SearchCloseButton,\n SearchContainer,\n SearchInput,\n SearchInputContent,\n SearchOverlay,\n SearchResultDescription,\n SearchResultImage,\n SearchResultItem,\n SearchResultLink,\n SearchResultText,\n SearchResultTitle,\n SearchResults\n}\n","import { useCallback, useEffect, useState } from 'react'\nimport { useNavigate } from 'react-router-dom'\nimport { useTranslation } from '@dcl/hooks'\nimport { useSearchBlogQuery } from '../../../features/search/search.client'\nimport { sanitizeHighlight } from './sanitizeHighlight'\nimport type { SearchProps } from './Search.types'\nimport {\n MoreResultsItem,\n MoreResultsLink,\n NoResults,\n NoResultsImage,\n SearchCloseButton,\n SearchContainer,\n SearchInput,\n SearchInputContent,\n SearchOverlay,\n SearchResultDescription,\n SearchResultImage,\n SearchResultItem,\n SearchResultLink,\n SearchResultText,\n SearchResultTitle,\n SearchResults\n} from './Search.styled'\n\nfunction getErrorMessage(error: unknown, fallback: string): string {\n if (typeof error === 'object' && error !== null && 'error' in error) {\n const errorValue = error.error\n if (typeof errorValue === 'string') {\n return errorValue\n }\n }\n return fallback\n}\n\nconst Search = ({ placeholder, onClose }: SearchProps) => {\n const { t } = useTranslation()\n const navigate = useNavigate()\n const [searchValue, setSearchValue] = useState('')\n const [selectedIndex, setSelectedIndex] = useState(-1)\n const [debouncedValue, setDebouncedValue] = useState('')\n\n // Debounce search value\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedValue(searchValue)\n }, 300)\n\n return () => clearTimeout(timer)\n }, [searchValue])\n\n const {\n data: searchResults = [],\n isLoading,\n error,\n isError\n } = useSearchBlogQuery({ query: debouncedValue, hitsPerPage: 5, page: 0 }, { skip: debouncedValue.trim().length <= 2 })\n\n const handleClose = useCallback(() => {\n setSearchValue('')\n setSelectedIndex(-1)\n onClose?.()\n }, [onClose])\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n const maxLength = searchResults.length > 3 ? 4 : searchResults.length\n\n if (e.key === 'ArrowUp') {\n e.preventDefault()\n setSelectedIndex(prev => (prev <= 0 ? maxLength : prev - 1))\n } else if (e.key === 'ArrowDown') {\n e.preventDefault()\n setSelectedIndex(prev => (prev >= maxLength ? 0 : prev + 1))\n } else if (e.key === 'Enter') {\n e.preventDefault()\n if (selectedIndex === 4 || selectedIndex === -1) {\n navigate(`/blog/search?q=${encodeURIComponent(searchValue)}`)\n } else if (selectedIndex >= 0 && searchResults[selectedIndex]) {\n const result = searchResults[selectedIndex]\n navigate(`/blog/${result.categoryId}/${result.id}`)\n }\n handleClose()\n } else if (e.key === 'Escape') {\n handleClose()\n }\n },\n [searchValue, selectedIndex, searchResults, navigate, handleClose]\n )\n\n const showResults = searchValue.trim().length > 2\n const hasResults = searchResults.length > 0\n\n return (\n <SearchContainer $hasResults={showResults}>\n {showResults && <SearchOverlay onClick={handleClose} />}\n <SearchInputContent>\n <SearchInput\n type=\"text\"\n value={searchValue}\n onChange={e => setSearchValue((e.target as HTMLInputElement).value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder || t('search.placeholder')}\n />\n {searchValue && (\n <SearchCloseButton onClick={handleClose} aria-label={t('search.clear')}>\n ×\n </SearchCloseButton>\n )}\n </SearchInputContent>\n\n {showResults && (\n <SearchResults>\n {isLoading && (\n <NoResults>\n <span>{t('search.searching')}</span>\n </NoResults>\n )}\n\n {!isLoading && isError && (\n <NoResults>\n <NoResultsImage>⚠️</NoResultsImage>\n <strong>{t('search.error')}</strong>\n <span>{getErrorMessage(error, t('error.generic'))}</span>\n </NoResults>\n )}\n\n {!isLoading && !isError && !hasResults && (\n <NoResults>\n <NoResultsImage>🔍</NoResultsImage>\n <strong>{t('search.no_matches')}</strong>\n <span>{t('search.try_something_else')}</span>\n </NoResults>\n )}\n\n {!isLoading &&\n !isError &&\n hasResults &&\n searchResults.slice(0, 4).map((result, index) => (\n <SearchResultItem key={result.id} $selected={index === selectedIndex} onMouseEnter={() => setSelectedIndex(index)}>\n <SearchResultLink to={`/blog/${result.categoryId}/${result.id}`} onClick={handleClose}>\n <SearchResultImage $image={result.image} />\n <SearchResultText>\n {/* eslint-disable-next-line @typescript-eslint/naming-convention */}\n <SearchResultTitle dangerouslySetInnerHTML={{ __html: sanitizeHighlight(result.highlightedTitle) }} />\n {/* eslint-disable-next-line @typescript-eslint/naming-convention */}\n <SearchResultDescription dangerouslySetInnerHTML={{ __html: sanitizeHighlight(result.highlightedDescription) }} />\n </SearchResultText>\n </SearchResultLink>\n </SearchResultItem>\n ))}\n\n {!isLoading && !isError && searchResults.length > 4 && (\n <MoreResultsItem $selected={selectedIndex === 4} onMouseEnter={() => setSelectedIndex(4)}>\n <MoreResultsLink to={`/blog/search?q=${encodeURIComponent(searchValue)}`} onClick={handleClose}>\n {t('search.see_more_results')}\n </MoreResultsLink>\n </MoreResultsItem>\n )}\n </SearchResults>\n )}\n </SearchContainer>\n )\n}\n\nexport { Search }\n","/* eslint-disable @typescript-eslint/naming-convention */\nimport { Link } from 'react-router-dom'\nimport { Box, dclColors, styled } from 'decentraland-ui2'\n\nconst HOST_NAVBAR_HEIGHT = '96px'\n\nconst NavbarContainer = styled(Box, {\n shouldForwardProp: prop => prop !== '$embedded'\n})<{ $embedded?: boolean }>(({ $embedded }) => ({\n width: '100%',\n ...($embedded && { marginTop: HOST_NAVBAR_HEIGHT })\n}))\n\nconst NavbarContent = styled(Box)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n height: '84px',\n position: 'relative',\n borderBottom: '1px solid',\n borderColor: theme.palette.divider,\n display: 'flex',\n '@media (max-width: 1450px)': {\n height: 'auto'\n }\n}))\n\nconst NavbarWrapper = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n width: '100%',\n margin: '0 auto',\n padding: `0 ${theme.spacing(3)}`,\n '@media (max-width: 1450px)': {\n flexDirection: 'column-reverse',\n alignItems: 'flex-start'\n }\n}))\n\nconst NavbarCategories = styled(Box)(({ theme }) => ({\n overflowX: 'auto',\n overflowY: 'hidden',\n width: 'auto',\n '@media (max-width: 1450px)': {\n width: '100%',\n paddingBottom: theme.spacing(1)\n }\n})).withComponent('nav')\n\nconst CategoryList = styled(Box)(() => ({\n display: 'flex',\n flexDirection: 'row',\n listStyleType: 'none',\n margin: 0,\n padding: 0,\n minWidth: '210px'\n})).withComponent('ul')\n\nconst CategoryItem = styled(Box)(({ theme }) => ({\n marginRight: theme.spacing(4),\n whiteSpace: 'nowrap'\n})).withComponent('li')\n\nconst CategoryLink = styled(Link, {\n shouldForwardProp: prop => prop !== '$active'\n})<{ $active: boolean }>(({ theme, $active }) => ({\n color: theme.palette.text.primary,\n display: 'flex',\n alignItems: 'center',\n fontSize: '17px',\n fontWeight: $active ? 700 : 400,\n height: '64px',\n padding: 0,\n position: 'relative',\n textDecoration: 'none',\n WebkitTapHighlightColor: 'transparent',\n\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n height: '1px',\n backgroundColor: dclColors.base.primary,\n left: 0,\n right: 0,\n bottom: 0,\n opacity: $active ? 1 : 0,\n transition: 'opacity 250ms ease'\n },\n\n '&:hover::after': {\n opacity: 1\n }\n}))\n\nexport { CategoryItem, CategoryLink, CategoryList, NavbarCategories, NavbarContainer, NavbarContent, NavbarWrapper }\n","import { useCallback, useMemo } from 'react'\nimport { useLocation } from 'react-router-dom'\nimport { useTranslation } from '@dcl/hooks'\nimport { useGetBlogCategoriesQuery } from '../../../features/blog/blog.client'\nimport { Search } from '../Search'\nimport type { BlogNavigationProps } from './BlogNavigation.types'\nimport {\n CategoryItem,\n CategoryLink,\n CategoryList,\n NavbarCategories,\n NavbarContainer,\n NavbarContent,\n NavbarWrapper\n} from './BlogNavigation.styled'\n\nconst BlogNavigation = ({ active, embedded }: BlogNavigationProps) => {\n const { t } = useTranslation()\n const location = useLocation()\n const { data: allCategories = [] } = useGetBlogCategoriesQuery()\n\n const categories = useMemo(() => {\n return allCategories.filter(category => category.isShownInMenu)\n }, [allCategories])\n\n const isActive = useCallback(\n (path: string) => {\n if (active) {\n if (active === 'all_articles' && path === '/blog') {\n return true\n }\n return `/blog/${active}` === path\n }\n return location.pathname === path\n },\n [active, location.pathname]\n )\n\n return (\n <NavbarContainer $embedded={embedded}>\n <NavbarContent>\n <NavbarWrapper>\n <NavbarCategories>\n <CategoryList>\n <CategoryItem>\n <CategoryLink to=\"/blog\" $active={isActive('/blog') || active === 'all_articles'}>\n {t('blog.all_articles')}\n </CategoryLink>\n </CategoryItem>\n {categories.map(category => (\n <CategoryItem key={category.id}>\n <CategoryLink to={`/blog/${category.slug}`} $active={isActive(`/blog/${category.slug}`)}>\n {category.title}\n </CategoryLink>\n </CategoryItem>\n ))}\n </CategoryList>\n </NavbarCategories>\n <Search />\n </NavbarWrapper>\n </NavbarContent>\n </NavbarContainer>\n )\n}\n\nexport { BlogNavigation }\n","import { Box, styled } from 'decentraland-ui2'\n\nconst BlogLayoutContainer = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n paddingTop: 64, // mobile navbar height (px)\n [theme.breakpoints.up('md')]: {\n paddingTop: 96 // desktop navbar height 92px + 4px buffer\n }\n}))\n\nconst BlogContentWrapper = styled(Box)(({ theme }) => ({\n flex: 1,\n padding: theme.spacing(5, 0, 2, 0),\n maxWidth: theme.spacing(133),\n margin: '0 auto',\n [theme.breakpoints.down('md')]: {\n padding: theme.spacing(5, 2, 2, 2)\n }\n}))\n\nexport { BlogContentWrapper, BlogLayoutContainer }\n","import type { ReactNode } from 'react'\nimport { HelmetProvider } from 'react-helmet-async'\nimport { BlogNavigation } from './BlogNavigation/BlogNavigation'\nimport { BlogContentWrapper, BlogLayoutContainer } from './BlogLayout.styled'\n\ninterface BlogLayoutProps {\n children: ReactNode\n activeCategory?: string\n banner?: ReactNode\n showBlogNavigation?: boolean\n relatedPosts?: ReactNode\n}\n\nfunction BlogLayout({ children, activeCategory, banner, showBlogNavigation = true, relatedPosts }: BlogLayoutProps) {\n return (\n <HelmetProvider>\n <BlogLayoutContainer>\n {showBlogNavigation && <BlogNavigation active={activeCategory} />}\n {banner}\n <BlogContentWrapper component=\"main\">{children}</BlogContentWrapper>\n {relatedPosts}\n </BlogLayoutContainer>\n </HelmetProvider>\n )\n}\n\nexport { BlogLayout }\n"],"names":["exports","BLOCKS","INLINES","MARKS","_export","target","all","name","CONTAINERS","HEADINGS","LIST_ITEM_BLOCKS","TABLE_BLOCKS","TEXT_CONTAINERS","TOP_LEVEL_BLOCKS","V1_MARKS","V1_NODE_TYPES","VOID_BLOCKS","_blocks","require$$0","_inlines","require$$1","_marks","require$$2","_array_like_to_array","arr","len","i","arr2","_array_without_holes","_define_property","obj","key","value","_iterable_to_array","iter","_non_iterable_spread","_to_consumable_array","_unsupported_iterable_to_array","o","minLen","n","_obj","types","nodeTypes","EMPTY_DOCUMENT","isBlock","isEmptyParagraph","isInline","isText","stripEmptyTrailingParagraphFromDocument","_object_spread","source","ownKeys","sym","object","enumerableOnly","keys","symbols","_object_spread_props","_type_of","hasValue","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","_step","err","node","textNode","isValidDocument","document","MIN_NODES_FOR_STRIPPING","lastNode","isPlainObj","prototype","enumError","maxSizeError","minSizeError","requiredPropertyError","typeMismatchError","unknownPropertyError","param","path","property","typeName","min","max","expected","ObjectAssertion","_isplainobj","_interop_require_default","_errors","_class_call_check","instance","Constructor","_defineProperties","props","descriptor","_create_class","protoProps","staticProps","_this","_this1","_len","errors","_key","_this__errors","_$path","_ref","optional","properties","unknowns","assert","foundErrors","item","index","serializeError","error","step","EntityLinkAssertion","HyperLinkAssertion","NodeAssertion","VOID_CONTENT","assertLink","_assert","_assert_this_initialized","self","_call_super","derived","args","_get_prototype_of","_possible_constructor_return","_is_native_reflect_construct","_inherits","subClass","superClass","_set_prototype_of","call","p","result","contentRule","validateData","$","_ref_min","item$","_$","_this_validateData","_this_validateData1","dataErrors","linkType","contentNodeTypes","data","sys$","Path","element","assertText","text","mark","mark$","validateRichTextDocument","_schemaConstraints","require$$3","_node","require$$4","_path","require$$5","_text","require$$6","assertInlineOrText","assertList","assertVoidEntryLink","assertTableCell","nodeValidator","validateNode","_emptyDocument","_helpers","_index","_export_star","_interop_require_wildcard","require$$7","require$$8","from","to","k","_getRequireWildcardCache","nodeInterop","cacheBabelInterop","cacheNodeInterop","cache","newObj","hasPropertyDescriptor","desc","hasElementType","hasMap","hasSet","hasArrayBuffer","equal","a","b","length","it","reactFastCompare","invariant","condition","format","c","d","e","f","argIndex","browser","shallowequal","objA","objB","compare","compareContext","ret","keysA","keysB","bHasOwnProperty","idx","valueA","valueB","TAG_NAMES","TAG_NAMES2","SEO_PRIORITY_TAGS","VALID_TAG_NAMES","REACT_TAG_MAP","HTML_TAG_MAP","carry","HELMET_ATTRIBUTE","HELMET_PROPS","getInnermostProperty","propsList","getTitleFromPropsList","innermostTitle","innermostTemplate","innermostDefaultTitle","getOnChangeClientState","getAttributesFromPropsList","tagType","tagAttrs","current","getBaseTagFromPropsList","primaryAttributes","innermostBaseTag","tag","lowerCaseAttributeKey","warn","msg","getTagsFromPropsList","tagName","approvedSeenTags","approvedTags","instanceTags","instanceSeenTags","primaryAttributeKey","keys2","attributeKey","tagUnion","getAnyTrueFromPropsList","checkedTag","reducePropsToState","flattenArray","possibleArray","checkIfPropsMatch","toMatch","prioritizer","elementsList","propsToMatch","acc","elementAttrs","without","SELF_CLOSING_TAGS","encodeSpecialCharacters","str","encode","generateElementAttributesAsString","attributes","attr","generateTitleAsString","type","title","attributeString","flattenedTitle","generateTagsAsString","tags","t","attributeHtml","attribute","string","tagContent","isSelfClosing","convertElementAttributesToReactProps","initProps","mapped","generateTitleAsReactComponent","_type","React","generateTagsAsReactComponent","mappedTag","mappedAttribute","content","getMethodsForTag","getPriorityMethods","metaTags","linkTags","scriptTags","meta","link","script","mapStateOnServer","baseTag","bodyAttributes","htmlAttributes","noscriptTags","styleTags","titleAttributes","prioritizeSeoTags","priorityMethods","server_default","instances","isDocument","HelmetData","serverState","context","canUseDOM","defaultValue","Context","React2","HelmetProvider","_HelmetProvider","Component","updateTags","headElement","tagNodes","oldTags","newTags","indexToDelete","newElement","existingTag","updateAttributes","elementTag","helmetAttributeString","helmetAttributes","attributesToRemove","attributeKeys","indexToSave","updateTitle","commitTagChanges","newState","cb","onChangeClientState","tagUpdates","addedTags","removedTags","_helmetCallback","handleStateChangeOnClient","client_default","HelmetDispatcher","Component2","nextProps","shallowEqual","helmetInstances","setHelmet","state","Helmet","Component3","fastCompare","child","nestedChildren","arrayTypeChildren","newChildProps","newProps","newFlattenedProps","arrayChildName","nestedChild","children","React3","childProps","helmetData","getEntrySlug","fields","sysId","fetchFromCMS","endpoint","params","baseUrl","cmsBaseUrl","url","response","assetsCache","assetsCachePromises","entriesCache","entriesCachePromises","resolveAssetLink","assetId","assetPromise","asset","cmsAsset","resolvedCategoriesCache","resolvedAuthorsCache","fetchAndCacheEntry","entryId","entryPromise","fetched","cmsEntry","resolveCategoryLink","entry","resolveAuthorLink","resolveAssetUrl","resolveEntrySlug","formatUtcDate","raw","date","BASE_URL","locations","categorySlug","postSlug","authorSlug","query","post","slugify","mapContentfulAsset","mapBlogCategory","slug","image","createDefaultCategory","createDefaultImage","createDefaultAuthor","mapBlogAuthor","mapBlogPost","category","author","publishedDate","body","getPostFromStore","postId","store","resolveEntryReferences","resolvedEntry","resolveImageOnly","normalizeCmsError","extractEmbeddedAssetIds","ids","resolveBodyAssets","assetIds","uniqueIds","resolvedAssets","id","resolved","assetsMap","blogClient","cmsClient","build","queryArgs","currentCache","newItems","arg","existingIds","newPosts","currentArg","previousArg","limit","skip","getCmsBaseUrl","listResponse","_meta","totalAvailable","validPosts","cachedPost","nextCmsSkip","hasMore","_arg","dispatch","queryFulfilled","postsUpserted","_error","cat","categoryEntry","postEntry","auth","authorEntry","env","token","previewBaseUrl","spaceId","previewUrl","useGetBlogPostsQuery","useGetBlogCategoriesQuery","useGetBlogCategoryBySlugQuery","useGetBlogPostBySlugQuery","useGetBlogAuthorBySlugQuery","useGetBlogPostPreviewQuery","m","r","u","createBrowserLocalStorageCache","options","storage","namespaceKey","getStorage","getNamespace","setNamespace","namespace","removeOutdatedCacheItems","timeToLive","filteredNamespaceWithoutOldFormattedCacheItems","cacheItem","filteredNamespaceWithoutExpiredItems","currentTimestamp","events","exists","createNullCache","createFallbackableCache","caches","createMemoryCache","keyAsString","promise","createAlgoliaAgent","version","algoliaAgent","addedAlgoliaAgent","createAuth","appId","apiKey","authMode","credentials","createIterablePromise","func","validate","aggregator","timeout","retry","previousResponse","resolve","reject","getAlgoliaAgent","algoliaAgents","client","defaultAlgoliaAgent","createNullLogger","_message","_args","EXPIRATION_DELAY","createStatefulHost","host","status","lastUpdate","isUp","isTimedOut","AlgoliaError","message","ErrorWithStackTrace","stackTrace","RetryError","ApiError","DeserializationError","DetailedApiError","shuffle","array","shuffledArray","serializeUrl","queryParameters","queryParametersAsString","serializeQueryParameters","parameters","serializeData","request","requestOptions","serializeHeaders","baseHeaders","requestHeaders","requestOptionsHeaders","headers","serializedHeaders","header","deserializeSuccess","deserializeFailure","stackFrame","parsed","isNetworkError","isRetryable","isSuccess","stackTraceWithoutCredentials","stackFrameWithoutCredentials","modifiedHeaders","createTransporter","hosts","hostsCache","logger","baseQueryParameters","timeouts","requester","requestsCache","responsesCache","createRetryableOptions","compatibleHosts","statefulHosts","compatibleHost","hostsUp","hostsTimedOut","hostsAvailable","timeoutsCount","baseTimeout","retryableRequest","isRead","dataQueryParameters","retryableHosts","getTimeout","payload","pushToStackTrace","response2","createRequest","createRetryableRequest","_","apiClientVersion","REGIONS","getDefaultHosts","region","createAbtestingV3Client","appIdOption","apiKeyOption","regionOption","transporter","segment","addABTestsRequest","estimateABTestRequest","startDate","endDate","metric","requestPath","offset","indexPrefix","indexSuffix","direction","scheduleABTestsRequest","abtestingV3Client","createXhrRequester","createAbtestingClient","abtestingClient","createAnalyticsClient","search","clickAnalytics","revenueAnalytics","orderBy","analyticsClient","createInsightsClient","userToken","insightsEvents","insightsClient","createPersonalizationClient","personalizationStrategyParams","personalizationClient","createQuerySuggestionsClient","configurationWithIndex","indexName","configuration","querySuggestionsClient","createSearchClient","taskID","maxRetries","retryCount","operation","baseIteratorOptions","field","resValue","v","browseParams","browseObjectsOptions","searchRulesParams","browseRulesOptions","searchSynonymsParams","browseSynonymsOptions","resp","objects","action","waitForTasks","batchSize","requests","responses","objectEntries","objectIDs","objectID","createIfNotExists","scopes","randomSuffix","tmpIndexName","copyOperationResponse","batchResponses","moveOperationResponse","searchMethodParams","xAlgoliaUserID","assignUserIdParams","batchWriteParams","batchAssignUserIdsParams","dictionaryName","batchDictionaryEntriesParams","forwardToReplicas","deleteByParams","attributesToRetrieve","getObjectsParams","getVersion","userID","getClusters","page","hitsPerPage","batchParams","operationIndexParams","attributesToUpdate","rule","rules","clearExistingRules","synonymHit","replaceExistingSynonyms","legacyRequest","searchDictionaryEntriesParams","facetName","searchForFacetValuesRequest","searchParams","searchUserIdsParams","dictionarySettingsParams","indexSettings","searchClient","isOnDemandTrigger","trigger","isScheduleTrigger","isSubscriptionTrigger","createIngestionClient","referenceIndexName","records","waitBatchSize","authenticationCreate","destinationCreate","sourceCreate","taskCreate","transformationCreate","authenticationID","destinationID","sourceID","transformationID","runID","eventID","itemsPerPage","platform","sort","order","enabled","sourceType","triggerType","withEmailNotifications","pushTaskPayload","watch","taskReplace","runSourcePayload","runTaskPayload","authenticationSearch","destinationSearch","sourceSearch","taskSearch","transformationSearch","transformationTry","authenticationUpdate","destinationUpdate","sourceUpdate","taskUpdate","ingestionClient","createMonitoringClient","clusters","period","monitoringClient","createRecommendClient","model","recommendRule","getRecommendationsParams","searchRecommendRulesParams","recommendClient","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","except","__reExport","mod","secondTarget","browser_exports","algoliasearch","models_exports","abtesting_star","client_abtesting_star","client_analytics_star","client_insights_star","client_personalization_star","client_query_suggestions_star","client_search_star","ingestion_star","monitoring_star","recommend_star","ingestionTransporter","watchResponses","initOptions","algoliaAppId","getEnv","algoliaApiKey","algoliaIndex","algoliaClient","searchResponse","hits","hit","categoryId","imageUrl","_result","useSearchBlogPostsQuery","useSearchBlogQuery","entries","setPrototypeOf","isFrozen","getPrototypeOf","getOwnPropertyDescriptor","freeze","seal","create","apply","construct","x","fun","thisValue","Func","arrayForEach","unapply","arrayLastIndexOf","arrayPop","arrayPush","arraySplice","stringToLowerCase","stringToString","stringMatch","stringReplace","stringIndexOf","stringTrim","objectHasOwnProperty","regExpTest","typeErrorCreate","unconstruct","thisArg","_len2","_key2","addToSet","set","transformCaseFunc","lcElement","cleanArray","clone","newObject","lookupGetter","prop","fallbackValue","html$1","svg$1","svgFilters","svgDisallowed","mathMl$1","mathMlDisallowed","html","svg","mathMl","xml","MUSTACHE_EXPR","ERB_EXPR","TMPLIT_EXPR","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","DOCTYPE_NAME","CUSTOM_ELEMENT","EXPRESSIONS","NODE_TYPE","getGlobal","_createTrustedTypesPolicy","trustedTypes","purifyHostElement","suffix","ATTR_NAME","policyName","scriptUrl","_createHooksMap","createDOMPurify","window","DOMPurify","root","originalDocument","currentScript","DocumentFragment","HTMLTemplateElement","Node","Element","NodeFilter","NamedNodeMap","HTMLFormElement","DOMParser","ElementPrototype","cloneNode","remove","getNextSibling","getChildNodes","getParentNode","template","trustedTypesPolicy","emptyHTML","implementation","createNodeIterator","createDocumentFragment","getElementsByTagName","importNode","hooks","IS_ALLOWED_URI$1","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","CUSTOM_ELEMENT_HANDLING","FORBID_TAGS","FORBID_ATTR","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","ALLOW_SELF_CLOSE_IN_ATTR","SAFE_FOR_TEMPLATES","SAFE_FOR_XML","WHOLE_DOCUMENT","SET_CONFIG","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_TRUSTED_TYPE","SANITIZE_DOM","SANITIZE_NAMED_PROPS","SANITIZE_NAMED_PROPS_PREFIX","KEEP_CONTENT","IN_PLACE","USE_PROFILES","FORBID_CONTENTS","DEFAULT_FORBID_CONTENTS","DATA_URI_TAGS","DEFAULT_DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","DEFAULT_URI_SAFE_ATTRIBUTES","MATHML_NAMESPACE","SVG_NAMESPACE","HTML_NAMESPACE","NAMESPACE","IS_EMPTY_INPUT","ALLOWED_NAMESPACES","DEFAULT_ALLOWED_NAMESPACES","MATHML_TEXT_INTEGRATION_POINTS","HTML_INTEGRATION_POINTS","COMMON_SVG_AND_HTML_ELEMENTS","PARSER_MEDIA_TYPE","SUPPORTED_PARSER_MEDIA_TYPES","DEFAULT_PARSER_MEDIA_TYPE","CONFIG","formElement","isRegexOrFunction","testValue","_parseConfig","cfg","ALL_SVG_TAGS","ALL_MATHML_TAGS","_checkValidNamespace","parent","parentTagName","_forceRemove","_removeAttribute","_initDocument","dirty","doc","leadingWhitespace","matches","dirtyPayload","_createNodeIterator","_isClobbered","_isNode","_executeHooks","currentNode","hook","_sanitizeElements","_isBasicCustomElement","parentNode","childNodes","childCount","childClone","expr","_isValidAttribute","lcTag","lcName","_sanitizeAttributes","hookEvent","l","namespaceURI","attrValue","_sanitizeShadowDOM","fragment","shadowNode","shadowIterator","importedNode","returnNode","nodeIterator","serializedHTML","entryPoint","hookFunction","purify","sanitizeHighlight","safeCssUrl","SearchContainer","styled","Box","theme","$hasResults","SearchOverlay","SearchInputContent","SearchInput","SearchCloseButton","SearchResults","SearchResultItem","$selected","SearchResultLink","Link","SearchResultImage","$image","SearchResultText","SearchResultTitle","dclColors.base","SearchResultDescription","NoResults","NoResultsImage","MoreResultsItem","MoreResultsLink","getErrorMessage","fallback","errorValue","Search","placeholder","onClose","useTranslation","navigate","useNavigate","searchValue","setSearchValue","useState","selectedIndex","setSelectedIndex","debouncedValue","setDebouncedValue","useEffect","timer","searchResults","isLoading","isError","handleClose","useCallback","handleKeyDown","maxLength","prev","showResults","hasResults","jsxs","jsx","HOST_NAVBAR_HEIGHT","NavbarContainer","$embedded","NavbarContent","NavbarWrapper","NavbarCategories","CategoryList","CategoryItem","CategoryLink","$active","BlogNavigation","active","embedded","location","useLocation","allCategories","categories","useMemo","isActive","BlogLayoutContainer","BlogContentWrapper","BlogLayout","activeCategory","banner","showBlogNavigation","relatedPosts"],"mappings":"sTACA,OAAO,eAAcA,EAAU,aAAc,CACzC,MAAO,EACX,CAAC,EACD,OAAO,eAAeA,EAAS,SAAU,CACrC,WAAY,GACZ,IAAK,UAAW,CACZ,OAAOC,CACf,CACA,CAAC,EACD,IAAIA,EAAuB,SAASA,EAAQ,CACxC,OAAAA,EAAO,SAAc,WACrBA,EAAO,UAAe,YACtBA,EAAO,UAAe,YACtBA,EAAO,UAAe,YACtBA,EAAO,UAAe,YACtBA,EAAO,UAAe,YACtBA,EAAO,UAAe,YACtBA,EAAO,UAAe,YACtBA,EAAO,QAAa,eACpBA,EAAO,QAAa,iBACpBA,EAAO,UAAe,YACtBA,EAAO,GAAQ,KACfA,EAAO,MAAW,aAClBA,EAAO,eAAoB,uBAC3BA,EAAO,eAAoB,uBAC3BA,EAAO,kBAAuB,0BAC9BA,EAAO,MAAW,QAClBA,EAAO,UAAe,YACtBA,EAAO,WAAgB,aACvBA,EAAO,kBAAuB,oBACvBA,CACX,EAAE,CAAA,CAAE,+BC/BJ,OAAO,eAAcD,EAAU,aAAc,CACzC,MAAO,EACX,CAAC,EACD,OAAO,eAAeA,EAAS,UAAW,CACtC,WAAY,GACZ,IAAK,UAAW,CACZ,OAAOE,CACf,CACA,CAAC,EACD,IAAIA,EAAwB,SAASA,EAAS,CAC1C,OAAAA,EAAQ,gBAAqB,kBAC7BA,EAAQ,eAAoB,wBAC5BA,EAAQ,kBAAuB,2BAC/BA,EAAQ,gBAAqB,kBAC7BA,EAAQ,UAAe,YACvBA,EAAQ,mBAAwB,qBACzBA,CACX,EAAE,CAAA,CAAE,+BCjBJ,OAAO,eAAcF,EAAU,aAAc,CACzC,MAAO,EACX,CAAC,EACD,OAAO,eAAeA,EAAS,QAAS,CACpC,WAAY,GACZ,IAAK,UAAW,CACZ,OAAOG,CACf,CACA,CAAC,EACD,IAAIA,EAAsB,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S,IAAI,GAAI,QAASipB,EAAS,SAASjpB,EAAS,IAAI,EAAE,EACnF,WAAS,KAAA,CACZ,CAAA,EAHiBA,EAAS,EAI5B,CACD,CAAA,CAAA,CACH,CAAA,CACF,QACComB,GAAA,CAAA,CAAO,CAAA,CAAA,CACV,EACF,EACF,CAEJ,EC7DM8C,GAAsBxE,EAAOC,CAAG,EAAE,CAAC,CAAE,MAAAC,MAAa,CACtD,QAAS,OACT,cAAe,SACf,MAAO,OACP,WAAY,GACZ,CAACA,EAAM,YAAY,GAAG,IAAI,CAAC,EAAG,CAC5B,WAAY,EAAA,CAEhB,EAAE,EAEIuE,GAAqBzE,EAAOC,CAAG,EAAE,CAAC,CAAE,MAAAC,MAAa,CACrD,KAAM,EACN,QAASA,EAAM,QAAQ,EAAG,EAAG,EAAG,CAAC,EACjC,SAAUA,EAAM,QAAQ,GAAG,EAC3B,OAAQ,SACR,CAACA,EAAM,YAAY,KAAK,IAAI,CAAC,EAAG,CAC9B,QAASA,EAAM,QAAQ,EAAG,EAAG,EAAG,CAAC,CAAA,CAErC,EAAE,ECPF,SAASwE,GAAW,CAAE,SAAA3sB,EAAU,eAAA4sB,EAAgB,OAAAC,EAAQ,mBAAAC,EAAqB,GAAM,aAAAC,GAAiC,CAClH,OACE1B,EAAAA,IAACpuB,GAAA,CACC,SAAAmuB,EAAAA,KAACqB,GAAA,CACE,SAAA,CAAAK,GAAsBzB,EAAAA,IAACW,GAAA,CAAe,OAAQY,CAAA,CAAgB,EAC9DC,EACDxB,EAAAA,IAACqB,GAAA,CAAmB,UAAU,OAAQ,SAAA1sB,CAAA,CAAS,EAC9C+sB,CAAA,CAAA,CACH,CAAA,CACF,CAEJ","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,26,27,28,29,30,31,32,33,34,35,36,37,38,40]}
|
|
1
|
+
{"version":3,"file":"BlogLayout-zeqeF6P_.js","sources":["../../node_modules/@contentful/rich-text-types/dist/cjs/blocks.js","../../node_modules/@contentful/rich-text-types/dist/cjs/inlines.js","../../node_modules/@contentful/rich-text-types/dist/cjs/marks.js","../../node_modules/@contentful/rich-text-types/dist/cjs/schemaConstraints.js","../../node_modules/@contentful/rich-text-types/dist/cjs/types.js","../../node_modules/@contentful/rich-text-types/dist/cjs/nodeTypes.js","../../node_modules/@contentful/rich-text-types/dist/cjs/emptyDocument.js","../../node_modules/@contentful/rich-text-types/dist/cjs/helpers.js","../../node_modules/is-plain-obj/index.js","../../node_modules/@contentful/rich-text-types/dist/cjs/validator/errors.js","../../node_modules/@contentful/rich-text-types/dist/cjs/validator/assert.js","../../node_modules/@contentful/rich-text-types/dist/cjs/validator/node.js","../../node_modules/@contentful/rich-text-types/dist/cjs/validator/path.js","../../node_modules/@contentful/rich-text-types/dist/cjs/validator/text.js","../../node_modules/@contentful/rich-text-types/dist/cjs/validator/index.js","../../node_modules/@contentful/rich-text-types/dist/cjs/index.js","../../node_modules/react-fast-compare/index.js","../../node_modules/invariant/browser.js","../../node_modules/shallowequal/index.js","../../node_modules/react-helmet-async/lib/index.esm.js","../../src/features/blog/blog.helpers.ts","../../src/shared/blog/utils/date.ts","../../src/shared/blog/utils/locations.ts","../../src/shared/blog/utils/string.ts","../../src/features/blog/blog.mappers.ts","../../src/features/blog/blog.client.ts","../../node_modules/@algolia/requester-browser-xhr/dist/requester.xhr.js","../../node_modules/@algolia/client-common/dist/common.js","../../node_modules/@algolia/abtesting/dist/builds/browser.js","../../node_modules/@algolia/client-abtesting/dist/builds/browser.js","../../node_modules/@algolia/client-analytics/dist/builds/browser.js","../../node_modules/@algolia/client-insights/dist/builds/browser.js","../../node_modules/@algolia/client-personalization/dist/builds/browser.js","../../node_modules/@algolia/client-query-suggestions/dist/builds/browser.js","../../node_modules/@algolia/client-search/dist/builds/browser.js","../../node_modules/@algolia/ingestion/dist/builds/browser.js","../../node_modules/@algolia/monitoring/dist/builds/browser.js","../../node_modules/@algolia/recommend/dist/builds/browser.js","../../node_modules/algoliasearch/dist/browser.js","../../src/features/search/search.client.ts","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/blog/Search/sanitizeHighlight.ts","../../src/components/blog/utils/safeCssUrl.ts","../../src/components/blog/Search/Search.styled.ts","../../src/components/blog/Search/Search.tsx","../../src/components/blog/BlogNavigation/BlogNavigation.styled.ts","../../src/components/blog/BlogNavigation/BlogNavigation.tsx","../../src/components/blog/BlogLayout.styled.ts","../../src/components/blog/BlogLayout.tsx"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"BLOCKS\", {\n enumerable: true,\n get: function() {\n return BLOCKS;\n }\n});\nvar BLOCKS = /*#__PURE__*/ function(BLOCKS) {\n BLOCKS[\"DOCUMENT\"] = \"document\";\n BLOCKS[\"PARAGRAPH\"] = \"paragraph\";\n BLOCKS[\"HEADING_1\"] = \"heading-1\";\n BLOCKS[\"HEADING_2\"] = \"heading-2\";\n BLOCKS[\"HEADING_3\"] = \"heading-3\";\n BLOCKS[\"HEADING_4\"] = \"heading-4\";\n BLOCKS[\"HEADING_5\"] = \"heading-5\";\n BLOCKS[\"HEADING_6\"] = \"heading-6\";\n BLOCKS[\"OL_LIST\"] = \"ordered-list\";\n BLOCKS[\"UL_LIST\"] = \"unordered-list\";\n BLOCKS[\"LIST_ITEM\"] = \"list-item\";\n BLOCKS[\"HR\"] = \"hr\";\n BLOCKS[\"QUOTE\"] = \"blockquote\";\n BLOCKS[\"EMBEDDED_ENTRY\"] = \"embedded-entry-block\";\n BLOCKS[\"EMBEDDED_ASSET\"] = \"embedded-asset-block\";\n BLOCKS[\"EMBEDDED_RESOURCE\"] = \"embedded-resource-block\";\n BLOCKS[\"TABLE\"] = \"table\";\n BLOCKS[\"TABLE_ROW\"] = \"table-row\";\n BLOCKS[\"TABLE_CELL\"] = \"table-cell\";\n BLOCKS[\"TABLE_HEADER_CELL\"] = \"table-header-cell\";\n return BLOCKS;\n}({});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"INLINES\", {\n enumerable: true,\n get: function() {\n return INLINES;\n }\n});\nvar INLINES = /*#__PURE__*/ function(INLINES) {\n INLINES[\"ASSET_HYPERLINK\"] = \"asset-hyperlink\";\n INLINES[\"EMBEDDED_ENTRY\"] = \"embedded-entry-inline\";\n INLINES[\"EMBEDDED_RESOURCE\"] = \"embedded-resource-inline\";\n INLINES[\"ENTRY_HYPERLINK\"] = \"entry-hyperlink\";\n INLINES[\"HYPERLINK\"] = \"hyperlink\";\n INLINES[\"RESOURCE_HYPERLINK\"] = \"resource-hyperlink\";\n return INLINES;\n}({});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"MARKS\", {\n enumerable: true,\n get: function() {\n return MARKS;\n }\n});\nvar MARKS = /*#__PURE__*/ function(MARKS) {\n MARKS[\"BOLD\"] = \"bold\";\n MARKS[\"ITALIC\"] = \"italic\";\n MARKS[\"UNDERLINE\"] = \"underline\";\n MARKS[\"CODE\"] = \"code\";\n MARKS[\"SUPERSCRIPT\"] = \"superscript\";\n MARKS[\"SUBSCRIPT\"] = \"subscript\";\n MARKS[\"STRIKETHROUGH\"] = \"strikethrough\";\n return MARKS;\n}({});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get CONTAINERS () {\n return CONTAINERS;\n },\n get HEADINGS () {\n return HEADINGS;\n },\n get LIST_ITEM_BLOCKS () {\n return LIST_ITEM_BLOCKS;\n },\n get TABLE_BLOCKS () {\n return TABLE_BLOCKS;\n },\n get TEXT_CONTAINERS () {\n return TEXT_CONTAINERS;\n },\n get TOP_LEVEL_BLOCKS () {\n return TOP_LEVEL_BLOCKS;\n },\n get V1_MARKS () {\n return V1_MARKS;\n },\n get V1_NODE_TYPES () {\n return V1_NODE_TYPES;\n },\n get VOID_BLOCKS () {\n return VOID_BLOCKS;\n }\n});\nvar _blocks = require(\"./blocks.js\");\nvar _inlines = require(\"./inlines.js\");\nvar _marks = require(\"./marks.js\");\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar TOP_LEVEL_BLOCKS = [\n _blocks.BLOCKS.PARAGRAPH,\n _blocks.BLOCKS.HEADING_1,\n _blocks.BLOCKS.HEADING_2,\n _blocks.BLOCKS.HEADING_3,\n _blocks.BLOCKS.HEADING_4,\n _blocks.BLOCKS.HEADING_5,\n _blocks.BLOCKS.HEADING_6,\n _blocks.BLOCKS.OL_LIST,\n _blocks.BLOCKS.UL_LIST,\n _blocks.BLOCKS.HR,\n _blocks.BLOCKS.QUOTE,\n _blocks.BLOCKS.EMBEDDED_ENTRY,\n _blocks.BLOCKS.EMBEDDED_ASSET,\n _blocks.BLOCKS.EMBEDDED_RESOURCE,\n _blocks.BLOCKS.TABLE\n];\nvar LIST_ITEM_BLOCKS = [\n _blocks.BLOCKS.PARAGRAPH,\n _blocks.BLOCKS.HEADING_1,\n _blocks.BLOCKS.HEADING_2,\n _blocks.BLOCKS.HEADING_3,\n _blocks.BLOCKS.HEADING_4,\n _blocks.BLOCKS.HEADING_5,\n _blocks.BLOCKS.HEADING_6,\n _blocks.BLOCKS.OL_LIST,\n _blocks.BLOCKS.UL_LIST,\n _blocks.BLOCKS.HR,\n _blocks.BLOCKS.QUOTE,\n _blocks.BLOCKS.EMBEDDED_ENTRY,\n _blocks.BLOCKS.EMBEDDED_ASSET,\n _blocks.BLOCKS.EMBEDDED_RESOURCE\n];\nvar TABLE_BLOCKS = [\n _blocks.BLOCKS.TABLE,\n _blocks.BLOCKS.TABLE_ROW,\n _blocks.BLOCKS.TABLE_CELL,\n _blocks.BLOCKS.TABLE_HEADER_CELL\n];\nvar VOID_BLOCKS = [\n _blocks.BLOCKS.HR,\n _blocks.BLOCKS.EMBEDDED_ENTRY,\n _blocks.BLOCKS.EMBEDDED_ASSET,\n _blocks.BLOCKS.EMBEDDED_RESOURCE\n];\nvar _obj;\nvar CONTAINERS = (_obj = {}, _define_property(_obj, _blocks.BLOCKS.OL_LIST, [\n _blocks.BLOCKS.LIST_ITEM\n]), _define_property(_obj, _blocks.BLOCKS.UL_LIST, [\n _blocks.BLOCKS.LIST_ITEM\n]), _define_property(_obj, _blocks.BLOCKS.LIST_ITEM, LIST_ITEM_BLOCKS), _define_property(_obj, _blocks.BLOCKS.QUOTE, [\n _blocks.BLOCKS.PARAGRAPH\n]), _define_property(_obj, _blocks.BLOCKS.TABLE, [\n _blocks.BLOCKS.TABLE_ROW\n]), _define_property(_obj, _blocks.BLOCKS.TABLE_ROW, [\n _blocks.BLOCKS.TABLE_CELL,\n _blocks.BLOCKS.TABLE_HEADER_CELL\n]), _define_property(_obj, _blocks.BLOCKS.TABLE_CELL, [\n _blocks.BLOCKS.PARAGRAPH,\n _blocks.BLOCKS.UL_LIST,\n _blocks.BLOCKS.OL_LIST\n]), _define_property(_obj, _blocks.BLOCKS.TABLE_HEADER_CELL, [\n _blocks.BLOCKS.PARAGRAPH\n]), _obj);\nvar HEADINGS = [\n _blocks.BLOCKS.HEADING_1,\n _blocks.BLOCKS.HEADING_2,\n _blocks.BLOCKS.HEADING_3,\n _blocks.BLOCKS.HEADING_4,\n _blocks.BLOCKS.HEADING_5,\n _blocks.BLOCKS.HEADING_6\n];\nvar TEXT_CONTAINERS = [\n _blocks.BLOCKS.PARAGRAPH\n].concat(_to_consumable_array(HEADINGS));\nvar V1_NODE_TYPES = [\n _blocks.BLOCKS.DOCUMENT,\n _blocks.BLOCKS.PARAGRAPH,\n _blocks.BLOCKS.HEADING_1,\n _blocks.BLOCKS.HEADING_2,\n _blocks.BLOCKS.HEADING_3,\n _blocks.BLOCKS.HEADING_4,\n _blocks.BLOCKS.HEADING_5,\n _blocks.BLOCKS.HEADING_6,\n _blocks.BLOCKS.OL_LIST,\n _blocks.BLOCKS.UL_LIST,\n _blocks.BLOCKS.LIST_ITEM,\n _blocks.BLOCKS.HR,\n _blocks.BLOCKS.QUOTE,\n _blocks.BLOCKS.EMBEDDED_ENTRY,\n _blocks.BLOCKS.EMBEDDED_ASSET,\n _inlines.INLINES.HYPERLINK,\n _inlines.INLINES.ENTRY_HYPERLINK,\n _inlines.INLINES.ASSET_HYPERLINK,\n _inlines.INLINES.EMBEDDED_ENTRY,\n 'text'\n];\nvar V1_MARKS = [\n _marks.MARKS.BOLD,\n _marks.MARKS.CODE,\n _marks.MARKS.ITALIC,\n _marks.MARKS.UNDERLINE\n];\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"EMPTY_DOCUMENT\", {\n enumerable: true,\n get: function() {\n return EMPTY_DOCUMENT;\n }\n});\nvar _blocks = require(\"./blocks.js\");\nvar EMPTY_DOCUMENT = {\n nodeType: _blocks.BLOCKS.DOCUMENT,\n data: {},\n content: [\n {\n nodeType: _blocks.BLOCKS.PARAGRAPH,\n data: {},\n content: [\n {\n nodeType: 'text',\n value: '',\n marks: [],\n data: {}\n }\n ]\n }\n ]\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get isBlock () {\n return isBlock;\n },\n get isEmptyParagraph () {\n return isEmptyParagraph;\n },\n get isInline () {\n return isInline;\n },\n get isText () {\n return isText;\n },\n get stripEmptyTrailingParagraphFromDocument () {\n return stripEmptyTrailingParagraphFromDocument;\n }\n});\nvar _blocks = require(\"./blocks.js\");\nvar _inlines = require(\"./inlines.js\");\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction hasValue(obj, value) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;\n try {\n for(var _iterator = Object.keys(obj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){\n var key = _step.value;\n if (value === obj[key]) {\n return true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally{\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally{\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return false;\n}\nfunction isInline(node) {\n return hasValue(_inlines.INLINES, node.nodeType);\n}\nfunction isBlock(node) {\n return hasValue(_blocks.BLOCKS, node.nodeType);\n}\nfunction isText(node) {\n return node.nodeType === 'text';\n}\nfunction isEmptyParagraph(node) {\n if (node.nodeType !== _blocks.BLOCKS.PARAGRAPH) {\n return false;\n }\n if (node.content.length !== 1) {\n return false;\n }\n var textNode = node.content[0];\n return textNode.nodeType === 'text' && textNode.value === '';\n}\nfunction isValidDocument(document) {\n return document != null && (typeof document === \"undefined\" ? \"undefined\" : _type_of(document)) === 'object' && 'content' in document && Array.isArray(document.content);\n}\nvar MIN_NODES_FOR_STRIPPING = 2;\nfunction stripEmptyTrailingParagraphFromDocument(document) {\n if (!isValidDocument(document) || document.content.length < MIN_NODES_FOR_STRIPPING) {\n return document;\n }\n var lastNode = document.content[document.content.length - 1];\n if (isEmptyParagraph(lastNode)) {\n return _object_spread_props(_object_spread({}, document), {\n content: document.content.slice(0, -1)\n });\n }\n return document;\n}\n","'use strict';\n\nmodule.exports = value => {\n\tif (Object.prototype.toString.call(value) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === null || prototype === Object.prototype;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get enumError () {\n return enumError;\n },\n get maxSizeError () {\n return maxSizeError;\n },\n get minSizeError () {\n return minSizeError;\n },\n get requiredPropertyError () {\n return requiredPropertyError;\n },\n get typeMismatchError () {\n return typeMismatchError;\n },\n get unknownPropertyError () {\n return unknownPropertyError;\n }\n});\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar typeMismatchError = function(param) {\n var path = param.path, property = param.property, typeName = param.typeName, value = param.value;\n return {\n details: 'The type of \"'.concat(property, '\" is incorrect, expected type: ').concat(typeName),\n name: 'type',\n path: path.toArray(),\n type: typeName,\n value: value\n };\n};\nvar minSizeError = function(param) {\n var min = param.min, value = param.value, path = param.path;\n return {\n name: 'size',\n min: min,\n path: path.toArray(),\n details: \"Size must be at least \".concat(min),\n value: value\n };\n};\nvar maxSizeError = function(param) {\n var max = param.max, value = param.value, path = param.path;\n return {\n name: 'size',\n max: max,\n path: path.toArray(),\n details: \"Size must be at most \".concat(max),\n value: value\n };\n};\nvar enumError = function(param) {\n var expected = param.expected, value = param.value, path = param.path;\n return {\n details: \"Value must be one of expected values\",\n name: 'in',\n expected: _to_consumable_array(expected).sort(),\n path: path.toArray(),\n value: value\n };\n};\nvar unknownPropertyError = function(param) {\n var property = param.property, path = param.path;\n return {\n details: 'The property \"'.concat(property, '\" is not expected'),\n name: 'unexpected',\n path: path.toArray()\n };\n};\nvar requiredPropertyError = function(param) {\n var property = param.property, path = param.path;\n return {\n details: 'The property \"'.concat(property, '\" is required here'),\n name: 'required',\n path: path.toArray()\n };\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"ObjectAssertion\", {\n enumerable: true,\n get: function() {\n return ObjectAssertion;\n }\n});\nvar _isplainobj = /*#__PURE__*/ _interop_require_default(require(\"is-plain-obj\"));\nvar _errors = require(\"./errors.js\");\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _create_class(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar ObjectAssertion = /*#__PURE__*/ function() {\n \"use strict\";\n function ObjectAssertion(obj, path) {\n var _this = this;\n var _this1 = this;\n _class_call_check(this, ObjectAssertion);\n _define_property(this, \"obj\", void 0);\n _define_property(this, \"path\", void 0);\n _define_property(this, \"_errors\", void 0);\n _define_property(this, \"catch\", void 0);\n _define_property(this, \"exists\", void 0);\n _define_property(this, \"object\", void 0);\n _define_property(this, \"string\", void 0);\n _define_property(this, \"number\", void 0);\n _define_property(this, \"array\", void 0);\n _define_property(this, \"enum\", void 0);\n _define_property(this, \"empty\", void 0);\n _define_property(this, \"minLength\", void 0);\n _define_property(this, \"noAdditionalProperties\", void 0);\n _define_property(this, \"each\", void 0);\n this.obj = obj;\n this.path = path;\n this._errors = [];\n this.catch = function() {\n for(var _len = arguments.length, errors = new Array(_len), _key = 0; _key < _len; _key++){\n errors[_key] = arguments[_key];\n }\n var _this__errors;\n (_this__errors = _this1._errors).push.apply(_this__errors, _to_consumable_array(errors));\n };\n this.exists = function(key) {\n if (key in _this.obj) {\n return true;\n }\n _this.catch((0, _errors.requiredPropertyError)({\n property: key,\n path: _this.path.of(key)\n }));\n return false;\n };\n this.object = function(key) {\n var value = key ? _this.obj[key] : _this.obj;\n if (key) {\n if (!_this.exists(key)) {\n return false;\n }\n }\n if ((0, _isplainobj.default)(value)) {\n return true;\n }\n var _$path = key ? _this.path.of(key) : _this.path;\n var _ref;\n var property = (_ref = key !== null && key !== void 0 ? key : _this.path.last()) !== null && _ref !== void 0 ? _ref : 'value';\n _this.catch((0, _errors.typeMismatchError)({\n typeName: 'Object',\n property: property,\n path: _$path,\n value: value\n }));\n return false;\n };\n this.string = function(key) {\n var value = _this.obj[key];\n if (key && !_this.exists(key)) {\n return false;\n }\n if (typeof value === 'string') {\n return true;\n }\n _this.catch((0, _errors.typeMismatchError)({\n typeName: 'String',\n property: key,\n path: _this.path.of(key),\n value: value\n }));\n return false;\n };\n this.number = function(key, optional) {\n var value = _this.obj[key];\n if (optional && !(key in _this.obj)) {\n return true;\n }\n if (!_this.exists(key)) {\n return false;\n }\n if (typeof value === 'number' && !Number.isNaN(value)) {\n return true;\n }\n _this.catch((0, _errors.typeMismatchError)({\n typeName: 'Number',\n property: key,\n path: _this.path.of(key),\n value: value\n }));\n return false;\n };\n this.array = function(key) {\n var value = _this.obj[key];\n if (key && !_this.exists(key)) {\n return false;\n }\n if (Array.isArray(value)) {\n return true;\n }\n _this.catch((0, _errors.typeMismatchError)({\n typeName: 'Array',\n property: key,\n path: _this.path.of(key),\n value: value\n }));\n return false;\n };\n this.enum = function(key, expected) {\n var value = _this.obj[key];\n if (typeof value === 'string' && expected.includes(value)) {\n return true;\n }\n _this.catch((0, _errors.enumError)({\n expected: expected,\n value: value,\n path: _this.path.of(key)\n }));\n return false;\n };\n this.empty = function(key) {\n if (!_this.array(key)) {\n return false;\n }\n var value = _this.obj[key];\n if (value.length === 0) {\n return true;\n }\n _this.catch((0, _errors.maxSizeError)({\n max: 0,\n value: value,\n path: _this.path.of(key)\n }));\n return false;\n };\n this.minLength = function(key, min) {\n if (!_this.array(key)) {\n return false;\n }\n var value = _this.obj[key];\n if (value.length >= min) {\n return true;\n }\n _this.catch((0, _errors.minSizeError)({\n min: min,\n value: value,\n path: _this.path.of(key)\n }));\n return false;\n };\n this.noAdditionalProperties = function(properties) {\n var unknowns = Object.keys(_this.obj).sort().filter(function(key) {\n return !properties.includes(key);\n });\n unknowns.forEach(function(property) {\n return _this.catch((0, _errors.unknownPropertyError)({\n property: property,\n path: _this.path.of(property)\n }));\n });\n return unknowns.length === 0;\n };\n this.each = function(key, assert) {\n if (!_this.array(key)) {\n return;\n }\n var value = _this.obj[key];\n var foundErrors = false;\n value.forEach(function(item, index) {\n if (foundErrors) {\n return;\n }\n var errors = assert(item, _this.path.of(key).of(index));\n if (errors.length > 0) {\n foundErrors = true;\n }\n _this.catch.apply(_this, _to_consumable_array(errors));\n });\n };\n }\n _create_class(ObjectAssertion, [\n {\n key: \"errors\",\n get: function get() {\n var _this = this;\n var serializeError = function(error) {\n return JSON.stringify({\n details: error.details,\n path: error.path\n });\n };\n return this._errors.filter(function(error, index) {\n return _this._errors.findIndex(function(step) {\n return serializeError(error) === serializeError(step);\n }) === index;\n });\n }\n }\n ]);\n return ObjectAssertion;\n}();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get EntityLinkAssertion () {\n return EntityLinkAssertion;\n },\n get HyperLinkAssertion () {\n return HyperLinkAssertion;\n },\n get NodeAssertion () {\n return NodeAssertion;\n },\n get VOID_CONTENT () {\n return VOID_CONTENT;\n },\n get assert () {\n return assert;\n },\n get assertLink () {\n return assertLink;\n }\n});\nvar _assert = require(\"./assert.js\");\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _assert_this_initialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _call_super(_this, derived, args) {\n derived = _get_prototype_of(derived);\n return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _create_class(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _get_prototype_of(o) {\n _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _get_prototype_of(o);\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _set_prototype_of(subClass, superClass);\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _possible_constructor_return(self, call) {\n if (call && (_type_of(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assert_this_initialized(self);\n}\nfunction _set_prototype_of(o, p) {\n _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _set_prototype_of(o, p);\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nfunction _is_native_reflect_construct() {\n try {\n var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));\n } catch (_) {}\n return (_is_native_reflect_construct = function() {\n return !!result;\n })();\n}\nvar VOID_CONTENT = [];\nvar NodeAssertion = /*#__PURE__*/ function() {\n \"use strict\";\n function NodeAssertion(contentRule, validateData) {\n _class_call_check(this, NodeAssertion);\n _define_property(this, \"contentRule\", void 0);\n _define_property(this, \"validateData\", void 0);\n this.contentRule = contentRule;\n this.validateData = validateData;\n }\n _create_class(NodeAssertion, [\n {\n key: \"assert\",\n value: function assert(node, path) {\n var $ = new _assert.ObjectAssertion(node, path);\n if (!$.object()) {\n return $.errors;\n }\n $.noAdditionalProperties([\n 'nodeType',\n 'data',\n 'content'\n ]);\n var _ref = Array.isArray(this.contentRule) ? {\n nodeTypes: this.contentRule\n } : this.contentRule(node, path), nodeTypes = _ref.nodeTypes, _ref_min = _ref.min, min = _ref_min === void 0 ? 0 : _ref_min;\n if (nodeTypes.length === 0 && min > 0) {\n throw new Error(\"Invalid content rule. Cannot have enforce a 'min' of \".concat(min, \" with no nodeTypes\"));\n }\n $.minLength('content', min);\n if (nodeTypes.length === 0) {\n $.empty('content');\n } else {\n $.each('content', function(item, path) {\n var item$ = new _assert.ObjectAssertion(item, path);\n if (!item$.object()) {\n return item$.errors;\n }\n item$.enum('nodeType', nodeTypes);\n return item$.errors;\n });\n }\n if ($.object('data')) {\n var _$;\n var _this_validateData, _this;\n var _this_validateData1;\n var dataErrors = (_this_validateData1 = (_this_validateData = (_this = this).validateData) === null || _this_validateData === void 0 ? void 0 : _this_validateData.call(_this, node.data, path.of('data'))) !== null && _this_validateData1 !== void 0 ? _this_validateData1 : [];\n (_$ = $).catch.apply(_$, _to_consumable_array(dataErrors));\n }\n return $.errors;\n }\n }\n ]);\n return NodeAssertion;\n}();\nvar EntityLinkAssertion = /*#__PURE__*/ function(NodeAssertion) {\n \"use strict\";\n _inherits(EntityLinkAssertion, NodeAssertion);\n function EntityLinkAssertion(linkType, contentNodeTypes) {\n _class_call_check(this, EntityLinkAssertion);\n var _this;\n _this = _call_super(this, EntityLinkAssertion, [\n contentNodeTypes,\n function(data, path) {\n return _assert_this_initialized(_this).assertLink(data, path);\n }\n ]), _define_property(_this, \"linkType\", void 0), _define_property(_this, \"type\", void 0), _define_property(_this, \"assertLink\", void 0), _this.linkType = linkType, _this.assertLink = function(data, path) {\n var $ = new _assert.ObjectAssertion(data, path);\n if ($.object('target')) {\n var _$;\n var sys$ = new _assert.ObjectAssertion(data.target.sys, path.of('target').of('sys'));\n if (sys$.object()) {\n sys$.enum('type', [\n _this.type\n ]);\n sys$.enum('linkType', [\n _this.linkType\n ]);\n if (_this.type === 'Link') {\n sys$.string('id');\n sys$.noAdditionalProperties([\n 'type',\n 'linkType',\n 'id'\n ]);\n } else if (_this.type === 'ResourceLink') {\n sys$.string('urn');\n sys$.noAdditionalProperties([\n 'type',\n 'linkType',\n 'urn'\n ]);\n }\n }\n (_$ = $).catch.apply(_$, _to_consumable_array(sys$.errors));\n }\n $.noAdditionalProperties([\n 'target'\n ]);\n return $.errors;\n };\n _this.type = _this.linkType.startsWith('Contentful:') ? 'ResourceLink' : 'Link';\n return _this;\n }\n return EntityLinkAssertion;\n}(NodeAssertion);\nvar HyperLinkAssertion = /*#__PURE__*/ function(NodeAssertion) {\n \"use strict\";\n _inherits(HyperLinkAssertion, NodeAssertion);\n function HyperLinkAssertion() {\n _class_call_check(this, HyperLinkAssertion);\n var _this;\n _this = _call_super(this, HyperLinkAssertion, [\n [\n 'text'\n ],\n function(data, path) {\n return _assert_this_initialized(_this).assertLink(data, path);\n }\n ]), _define_property(_this, \"assertLink\", function(data, path) {\n var $ = new _assert.ObjectAssertion(data, path);\n $.string('uri');\n $.noAdditionalProperties([\n 'uri'\n ]);\n return $.errors;\n });\n return _this;\n }\n return HyperLinkAssertion;\n}(NodeAssertion);\nvar assert = function(contentRule, validateData) {\n return new NodeAssertion(contentRule, validateData);\n};\nvar assertLink = function(linkType, contentRule) {\n return new EntityLinkAssertion(linkType, contentRule);\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Path\", {\n enumerable: true,\n get: function() {\n return Path;\n }\n});\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar Path = function Path() {\n \"use strict\";\n var _this = this;\n var path = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];\n _class_call_check(this, Path);\n _define_property(this, \"path\", void 0);\n _define_property(this, \"of\", void 0);\n _define_property(this, \"isRoot\", void 0);\n _define_property(this, \"last\", void 0);\n _define_property(this, \"toArray\", void 0);\n this.path = path;\n this.of = function(element) {\n return new Path(_to_consumable_array(_this.path).concat([\n element\n ]));\n };\n this.isRoot = function() {\n return _this.path.length === 0;\n };\n this.last = function() {\n return _this.path[_this.path.length - 1];\n };\n this.toArray = function() {\n return _this.path;\n };\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"assertText\", {\n enumerable: true,\n get: function() {\n return assertText;\n }\n});\nvar _assert = require(\"./assert.js\");\nfunction assertText(text, path) {\n var $ = new _assert.ObjectAssertion(text, path);\n if (!$.object()) {\n return $.errors;\n }\n $.noAdditionalProperties([\n 'nodeType',\n 'data',\n 'value',\n 'marks'\n ]);\n $.object('data');\n $.each('marks', function(mark, path) {\n var mark$ = new _assert.ObjectAssertion(mark, path);\n if (!mark$.object()) {\n return mark$.errors;\n }\n mark$.string('type');\n return mark$.errors;\n });\n $.string('value');\n return $.errors;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"validateRichTextDocument\", {\n enumerable: true,\n get: function() {\n return validateRichTextDocument;\n }\n});\nvar _blocks = require(\"../blocks.js\");\nvar _inlines = require(\"../inlines.js\");\nvar _schemaConstraints = require(\"../schemaConstraints.js\");\nvar _assert = require(\"./assert.js\");\nvar _node = require(\"./node.js\");\nvar _path = require(\"./path.js\");\nvar _text = require(\"./text.js\");\nfunction _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_without_holes(arr) {\n if (Array.isArray(arr)) return _array_like_to_array(arr);\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _iterable_to_array(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _non_iterable_spread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _to_consumable_array(arr) {\n return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar assertInlineOrText = (0, _node.assert)(_to_consumable_array(Object.values(_inlines.INLINES)).concat([\n 'text'\n]).sort());\nvar assertList = (0, _node.assert)([\n _blocks.BLOCKS.LIST_ITEM\n]);\nvar assertVoidEntryLink = (0, _node.assertLink)('Entry', _node.VOID_CONTENT);\nvar assertTableCell = (0, _node.assert)(function() {\n return {\n nodeTypes: [\n _blocks.BLOCKS.PARAGRAPH\n ],\n min: 1\n };\n}, function(data, path) {\n var $ = new _assert.ObjectAssertion(data, path);\n $.noAdditionalProperties([\n 'colspan',\n 'rowspan'\n ]);\n $.number('colspan', true);\n $.number('rowspan', true);\n return $.errors;\n});\nvar _obj;\nvar nodeValidator = (_obj = {}, _define_property(_obj, _blocks.BLOCKS.DOCUMENT, (0, _node.assert)(_schemaConstraints.TOP_LEVEL_BLOCKS)), _define_property(_obj, _blocks.BLOCKS.PARAGRAPH, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_1, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_2, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_3, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_4, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_5, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.HEADING_6, assertInlineOrText), _define_property(_obj, _blocks.BLOCKS.QUOTE, (0, _node.assert)(_schemaConstraints.CONTAINERS[_blocks.BLOCKS.QUOTE])), _define_property(_obj, _blocks.BLOCKS.EMBEDDED_ENTRY, assertVoidEntryLink), _define_property(_obj, _blocks.BLOCKS.EMBEDDED_ASSET, (0, _node.assertLink)('Asset', _node.VOID_CONTENT)), _define_property(_obj, _blocks.BLOCKS.EMBEDDED_RESOURCE, (0, _node.assertLink)('Contentful:Entry', _node.VOID_CONTENT)), _define_property(_obj, _blocks.BLOCKS.HR, (0, _node.assert)(_node.VOID_CONTENT)), _define_property(_obj, _blocks.BLOCKS.OL_LIST, assertList), _define_property(_obj, _blocks.BLOCKS.UL_LIST, assertList), _define_property(_obj, _blocks.BLOCKS.LIST_ITEM, (0, _node.assert)(_to_consumable_array(_schemaConstraints.LIST_ITEM_BLOCKS).sort())), _define_property(_obj, _blocks.BLOCKS.TABLE, (0, _node.assert)(function() {\n return {\n nodeTypes: [\n _blocks.BLOCKS.TABLE_ROW\n ],\n min: 1\n };\n})), _define_property(_obj, _blocks.BLOCKS.TABLE_ROW, (0, _node.assert)(function() {\n return {\n nodeTypes: [\n _blocks.BLOCKS.TABLE_CELL,\n _blocks.BLOCKS.TABLE_HEADER_CELL\n ],\n min: 1\n };\n})), _define_property(_obj, _blocks.BLOCKS.TABLE_CELL, assertTableCell), _define_property(_obj, _blocks.BLOCKS.TABLE_HEADER_CELL, assertTableCell), _define_property(_obj, _inlines.INLINES.HYPERLINK, new _node.HyperLinkAssertion()), _define_property(_obj, _inlines.INLINES.EMBEDDED_ENTRY, assertVoidEntryLink), _define_property(_obj, _inlines.INLINES.EMBEDDED_RESOURCE, (0, _node.assertLink)('Contentful:Entry', _node.VOID_CONTENT)), _define_property(_obj, _inlines.INLINES.ENTRY_HYPERLINK, (0, _node.assertLink)('Entry', [\n 'text'\n])), _define_property(_obj, _inlines.INLINES.ASSET_HYPERLINK, (0, _node.assertLink)('Asset', [\n 'text'\n])), _define_property(_obj, _inlines.INLINES.RESOURCE_HYPERLINK, (0, _node.assertLink)('Contentful:Entry', [\n 'text'\n])), _obj);\nfunction validateNode(node, path) {\n if (node.nodeType === 'text') {\n return (0, _text.assertText)(node, path);\n }\n var errors = nodeValidator[node.nodeType].assert(node, path);\n if (errors.length > 0) {\n return errors;\n }\n var $ = new _assert.ObjectAssertion(node, path);\n $.each('content', function(item, path) {\n return validateNode(item, path);\n });\n return $.errors;\n}\nvar validateRichTextDocument = function(document) {\n var path = new _path.Path();\n var $ = new _assert.ObjectAssertion(document, path);\n if ($.object()) {\n $.enum('nodeType', [\n _blocks.BLOCKS.DOCUMENT\n ]);\n }\n if ($.errors.length > 0) {\n return $.errors;\n }\n return validateNode(document, path);\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: Object.getOwnPropertyDescriptor(all, name).get\n });\n}\n_export(exports, {\n get BLOCKS () {\n return _blocks.BLOCKS;\n },\n get EMPTY_DOCUMENT () {\n return _emptyDocument.EMPTY_DOCUMENT;\n },\n get INLINES () {\n return _inlines.INLINES;\n },\n get MARKS () {\n return _marks.MARKS;\n },\n get helpers () {\n return _helpers;\n },\n get validateRichTextDocument () {\n return _index.validateRichTextDocument;\n }\n});\nvar _blocks = require(\"./blocks.js\");\nvar _inlines = require(\"./inlines.js\");\nvar _marks = require(\"./marks.js\");\n_export_star(require(\"./schemaConstraints.js\"), exports);\n_export_star(require(\"./types.js\"), exports);\n_export_star(require(\"./nodeTypes.js\"), exports);\nvar _emptyDocument = require(\"./emptyDocument.js\");\nvar _helpers = /*#__PURE__*/ _interop_require_wildcard(require(\"./helpers.js\"));\nvar _index = require(\"./validator/index.js\");\nfunction _export_star(from, to) {\n Object.keys(from).forEach(function(k) {\n if (k !== \"default\" && !Object.prototype.hasOwnProperty.call(to, k)) {\n Object.defineProperty(to, k, {\n enumerable: true,\n get: function() {\n return from[k];\n }\n });\n }\n });\n return from;\n}\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interop_require_wildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n var cache = _getRequireWildcardCache(nodeInterop);\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {\n __proto__: null\n };\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for(var key in obj){\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\n","/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.3\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n // START: Modifications:\n // Apply guards for `Object.create(null)` handling. See:\n // - https://github.com/FormidableLabs/react-fast-compare/issues/64\n // - https://github.com/epoberezkin/fast-deep-equal/issues/49\n if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();\n // END: Modifications\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","//\n\nmodule.exports = function shallowEqual(objA, objB, compare, compareContext) {\n var ret = compare ? compare.call(compareContext, objA, objB) : void 0;\n\n if (ret !== void 0) {\n return !!ret;\n }\n\n if (objA === objB) {\n return true;\n }\n\n if (typeof objA !== \"object\" || !objA || typeof objB !== \"object\" || !objB) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n\n // Test for A's keys different from B.\n for (var idx = 0; idx < keysA.length; idx++) {\n var key = keysA[idx];\n\n if (!bHasOwnProperty(key)) {\n return false;\n }\n\n var valueA = objA[key];\n var valueB = objB[key];\n\n ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;\n\n if (ret === false || (ret === void 0 && valueA !== valueB)) {\n return false;\n }\n }\n\n return true;\n};\n","// src/index.tsx\nimport React3, { Component as Component3 } from \"react\";\nimport fastCompare from \"react-fast-compare\";\nimport invariant from \"invariant\";\n\n// src/Provider.tsx\nimport React2, { Component } from \"react\";\n\n// src/server.ts\nimport React from \"react\";\n\n// src/constants.ts\nvar TAG_NAMES = /* @__PURE__ */ ((TAG_NAMES2) => {\n TAG_NAMES2[\"BASE\"] = \"base\";\n TAG_NAMES2[\"BODY\"] = \"body\";\n TAG_NAMES2[\"HEAD\"] = \"head\";\n TAG_NAMES2[\"HTML\"] = \"html\";\n TAG_NAMES2[\"LINK\"] = \"link\";\n TAG_NAMES2[\"META\"] = \"meta\";\n TAG_NAMES2[\"NOSCRIPT\"] = \"noscript\";\n TAG_NAMES2[\"SCRIPT\"] = \"script\";\n TAG_NAMES2[\"STYLE\"] = \"style\";\n TAG_NAMES2[\"TITLE\"] = \"title\";\n TAG_NAMES2[\"FRAGMENT\"] = \"Symbol(react.fragment)\";\n return TAG_NAMES2;\n})(TAG_NAMES || {});\nvar SEO_PRIORITY_TAGS = {\n link: { rel: [\"amphtml\", \"canonical\", \"alternate\"] },\n script: { type: [\"application/ld+json\"] },\n meta: {\n charset: \"\",\n name: [\"generator\", \"robots\", \"description\"],\n property: [\n \"og:type\",\n \"og:title\",\n \"og:url\",\n \"og:image\",\n \"og:image:alt\",\n \"og:description\",\n \"twitter:url\",\n \"twitter:title\",\n \"twitter:description\",\n \"twitter:image\",\n \"twitter:image:alt\",\n \"twitter:card\",\n \"twitter:site\"\n ]\n }\n};\nvar VALID_TAG_NAMES = Object.values(TAG_NAMES);\nvar REACT_TAG_MAP = {\n accesskey: \"accessKey\",\n charset: \"charSet\",\n class: \"className\",\n contenteditable: \"contentEditable\",\n contextmenu: \"contextMenu\",\n \"http-equiv\": \"httpEquiv\",\n itemprop: \"itemProp\",\n tabindex: \"tabIndex\"\n};\nvar HTML_TAG_MAP = Object.entries(REACT_TAG_MAP).reduce(\n (carry, [key, value]) => {\n carry[value] = key;\n return carry;\n },\n {}\n);\nvar HELMET_ATTRIBUTE = \"data-rh\";\n\n// src/utils.ts\nvar HELMET_PROPS = {\n DEFAULT_TITLE: \"defaultTitle\",\n DEFER: \"defer\",\n ENCODE_SPECIAL_CHARACTERS: \"encodeSpecialCharacters\",\n ON_CHANGE_CLIENT_STATE: \"onChangeClientState\",\n TITLE_TEMPLATE: \"titleTemplate\",\n PRIORITIZE_SEO_TAGS: \"prioritizeSeoTags\"\n};\nvar getInnermostProperty = (propsList, property) => {\n for (let i = propsList.length - 1; i >= 0; i -= 1) {\n const props = propsList[i];\n if (Object.prototype.hasOwnProperty.call(props, property)) {\n return props[property];\n }\n }\n return null;\n};\nvar getTitleFromPropsList = (propsList) => {\n let innermostTitle = getInnermostProperty(propsList, \"title\" /* TITLE */);\n const innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);\n if (Array.isArray(innermostTitle)) {\n innermostTitle = innermostTitle.join(\"\");\n }\n if (innermostTemplate && innermostTitle) {\n return innermostTemplate.replace(/%s/g, () => innermostTitle);\n }\n const innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);\n return innermostTitle || innermostDefaultTitle || void 0;\n};\nvar getOnChangeClientState = (propsList) => getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || (() => {\n});\nvar getAttributesFromPropsList = (tagType, propsList) => propsList.filter((props) => typeof props[tagType] !== \"undefined\").map((props) => props[tagType]).reduce((tagAttrs, current) => ({ ...tagAttrs, ...current }), {});\nvar getBaseTagFromPropsList = (primaryAttributes, propsList) => propsList.filter((props) => typeof props[\"base\" /* BASE */] !== \"undefined\").map((props) => props[\"base\" /* BASE */]).reverse().reduce((innermostBaseTag, tag) => {\n if (!innermostBaseTag.length) {\n const keys = Object.keys(tag);\n for (let i = 0; i < keys.length; i += 1) {\n const attributeKey = keys[i];\n const lowerCaseAttributeKey = attributeKey.toLowerCase();\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {\n return innermostBaseTag.concat(tag);\n }\n }\n }\n return innermostBaseTag;\n}, []);\nvar warn = (msg) => console && typeof console.warn === \"function\" && console.warn(msg);\nvar getTagsFromPropsList = (tagName, primaryAttributes, propsList) => {\n const approvedSeenTags = {};\n return propsList.filter((props) => {\n if (Array.isArray(props[tagName])) {\n return true;\n }\n if (typeof props[tagName] !== \"undefined\") {\n warn(\n `Helmet: ${tagName} should be of type \"Array\". Instead found type \"${typeof props[tagName]}\"`\n );\n }\n return false;\n }).map((props) => props[tagName]).reverse().reduce((approvedTags, instanceTags) => {\n const instanceSeenTags = {};\n instanceTags.filter((tag) => {\n let primaryAttributeKey;\n const keys2 = Object.keys(tag);\n for (let i = 0; i < keys2.length; i += 1) {\n const attributeKey = keys2[i];\n const lowerCaseAttributeKey = attributeKey.toLowerCase();\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === \"rel\" /* REL */ && tag[primaryAttributeKey].toLowerCase() === \"canonical\") && !(lowerCaseAttributeKey === \"rel\" /* REL */ && tag[lowerCaseAttributeKey].toLowerCase() === \"stylesheet\")) {\n primaryAttributeKey = lowerCaseAttributeKey;\n }\n if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === \"innerHTML\" /* INNER_HTML */ || attributeKey === \"cssText\" /* CSS_TEXT */ || attributeKey === \"itemprop\" /* ITEM_PROP */)) {\n primaryAttributeKey = attributeKey;\n }\n }\n if (!primaryAttributeKey || !tag[primaryAttributeKey]) {\n return false;\n }\n const value = tag[primaryAttributeKey].toLowerCase();\n if (!approvedSeenTags[primaryAttributeKey]) {\n approvedSeenTags[primaryAttributeKey] = {};\n }\n if (!instanceSeenTags[primaryAttributeKey]) {\n instanceSeenTags[primaryAttributeKey] = {};\n }\n if (!approvedSeenTags[primaryAttributeKey][value]) {\n instanceSeenTags[primaryAttributeKey][value] = true;\n return true;\n }\n return false;\n }).reverse().forEach((tag) => approvedTags.push(tag));\n const keys = Object.keys(instanceSeenTags);\n for (let i = 0; i < keys.length; i += 1) {\n const attributeKey = keys[i];\n const tagUnion = {\n ...approvedSeenTags[attributeKey],\n ...instanceSeenTags[attributeKey]\n };\n approvedSeenTags[attributeKey] = tagUnion;\n }\n return approvedTags;\n }, []).reverse();\n};\nvar getAnyTrueFromPropsList = (propsList, checkedTag) => {\n if (Array.isArray(propsList) && propsList.length) {\n for (let index = 0; index < propsList.length; index += 1) {\n const prop = propsList[index];\n if (prop[checkedTag]) {\n return true;\n }\n }\n }\n return false;\n};\nvar reducePropsToState = (propsList) => ({\n baseTag: getBaseTagFromPropsList([\"href\" /* HREF */], propsList),\n bodyAttributes: getAttributesFromPropsList(\"bodyAttributes\" /* BODY */, propsList),\n defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),\n encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),\n htmlAttributes: getAttributesFromPropsList(\"htmlAttributes\" /* HTML */, propsList),\n linkTags: getTagsFromPropsList(\n \"link\" /* LINK */,\n [\"rel\" /* REL */, \"href\" /* HREF */],\n propsList\n ),\n metaTags: getTagsFromPropsList(\n \"meta\" /* META */,\n [\n \"name\" /* NAME */,\n \"charset\" /* CHARSET */,\n \"http-equiv\" /* HTTPEQUIV */,\n \"property\" /* PROPERTY */,\n \"itemprop\" /* ITEM_PROP */\n ],\n propsList\n ),\n noscriptTags: getTagsFromPropsList(\"noscript\" /* NOSCRIPT */, [\"innerHTML\" /* INNER_HTML */], propsList),\n onChangeClientState: getOnChangeClientState(propsList),\n scriptTags: getTagsFromPropsList(\n \"script\" /* SCRIPT */,\n [\"src\" /* SRC */, \"innerHTML\" /* INNER_HTML */],\n propsList\n ),\n styleTags: getTagsFromPropsList(\"style\" /* STYLE */, [\"cssText\" /* CSS_TEXT */], propsList),\n title: getTitleFromPropsList(propsList),\n titleAttributes: getAttributesFromPropsList(\"titleAttributes\" /* TITLE */, propsList),\n prioritizeSeoTags: getAnyTrueFromPropsList(propsList, HELMET_PROPS.PRIORITIZE_SEO_TAGS)\n});\nvar flattenArray = (possibleArray) => Array.isArray(possibleArray) ? possibleArray.join(\"\") : possibleArray;\nvar checkIfPropsMatch = (props, toMatch) => {\n const keys = Object.keys(props);\n for (let i = 0; i < keys.length; i += 1) {\n if (toMatch[keys[i]] && toMatch[keys[i]].includes(props[keys[i]])) {\n return true;\n }\n }\n return false;\n};\nvar prioritizer = (elementsList, propsToMatch) => {\n if (Array.isArray(elementsList)) {\n return elementsList.reduce(\n (acc, elementAttrs) => {\n if (checkIfPropsMatch(elementAttrs, propsToMatch)) {\n acc.priority.push(elementAttrs);\n } else {\n acc.default.push(elementAttrs);\n }\n return acc;\n },\n { priority: [], default: [] }\n );\n }\n return { default: elementsList, priority: [] };\n};\nvar without = (obj, key) => {\n return {\n ...obj,\n [key]: void 0\n };\n};\n\n// src/server.ts\nvar SELF_CLOSING_TAGS = [\"noscript\" /* NOSCRIPT */, \"script\" /* SCRIPT */, \"style\" /* STYLE */];\nvar encodeSpecialCharacters = (str, encode = true) => {\n if (encode === false) {\n return String(str);\n }\n return String(str).replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\");\n};\nvar generateElementAttributesAsString = (attributes) => Object.keys(attributes).reduce((str, key) => {\n const attr = typeof attributes[key] !== \"undefined\" ? `${key}=\"${attributes[key]}\"` : `${key}`;\n return str ? `${str} ${attr}` : attr;\n}, \"\");\nvar generateTitleAsString = (type, title, attributes, encode) => {\n const attributeString = generateElementAttributesAsString(attributes);\n const flattenedTitle = flattenArray(title);\n return attributeString ? `<${type} ${HELMET_ATTRIBUTE}=\"true\" ${attributeString}>${encodeSpecialCharacters(\n flattenedTitle,\n encode\n )}</${type}>` : `<${type} ${HELMET_ATTRIBUTE}=\"true\">${encodeSpecialCharacters(\n flattenedTitle,\n encode\n )}</${type}>`;\n};\nvar generateTagsAsString = (type, tags, encode = true) => tags.reduce((str, t) => {\n const tag = t;\n const attributeHtml = Object.keys(tag).filter(\n (attribute) => !(attribute === \"innerHTML\" /* INNER_HTML */ || attribute === \"cssText\" /* CSS_TEXT */)\n ).reduce((string, attribute) => {\n const attr = typeof tag[attribute] === \"undefined\" ? attribute : `${attribute}=\"${encodeSpecialCharacters(tag[attribute], encode)}\"`;\n return string ? `${string} ${attr}` : attr;\n }, \"\");\n const tagContent = tag.innerHTML || tag.cssText || \"\";\n const isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;\n return `${str}<${type} ${HELMET_ATTRIBUTE}=\"true\" ${attributeHtml}${isSelfClosing ? `/>` : `>${tagContent}</${type}>`}`;\n}, \"\");\nvar convertElementAttributesToReactProps = (attributes, initProps = {}) => Object.keys(attributes).reduce((obj, key) => {\n const mapped = REACT_TAG_MAP[key];\n obj[mapped || key] = attributes[key];\n return obj;\n}, initProps);\nvar generateTitleAsReactComponent = (_type, title, attributes) => {\n const initProps = {\n key: title,\n [HELMET_ATTRIBUTE]: true\n };\n const props = convertElementAttributesToReactProps(attributes, initProps);\n return [React.createElement(\"title\" /* TITLE */, props, title)];\n};\nvar generateTagsAsReactComponent = (type, tags) => tags.map((tag, i) => {\n const mappedTag = {\n key: i,\n [HELMET_ATTRIBUTE]: true\n };\n Object.keys(tag).forEach((attribute) => {\n const mapped = REACT_TAG_MAP[attribute];\n const mappedAttribute = mapped || attribute;\n if (mappedAttribute === \"innerHTML\" /* INNER_HTML */ || mappedAttribute === \"cssText\" /* CSS_TEXT */) {\n const content = tag.innerHTML || tag.cssText;\n mappedTag.dangerouslySetInnerHTML = { __html: content };\n } else {\n mappedTag[mappedAttribute] = tag[attribute];\n }\n });\n return React.createElement(type, mappedTag);\n});\nvar getMethodsForTag = (type, tags, encode = true) => {\n switch (type) {\n case \"title\" /* TITLE */:\n return {\n toComponent: () => generateTitleAsReactComponent(type, tags.title, tags.titleAttributes),\n toString: () => generateTitleAsString(type, tags.title, tags.titleAttributes, encode)\n };\n case \"bodyAttributes\" /* BODY */:\n case \"htmlAttributes\" /* HTML */:\n return {\n toComponent: () => convertElementAttributesToReactProps(tags),\n toString: () => generateElementAttributesAsString(tags)\n };\n default:\n return {\n toComponent: () => generateTagsAsReactComponent(type, tags),\n toString: () => generateTagsAsString(type, tags, encode)\n };\n }\n};\nvar getPriorityMethods = ({ metaTags, linkTags, scriptTags, encode }) => {\n const meta = prioritizer(metaTags, SEO_PRIORITY_TAGS.meta);\n const link = prioritizer(linkTags, SEO_PRIORITY_TAGS.link);\n const script = prioritizer(scriptTags, SEO_PRIORITY_TAGS.script);\n const priorityMethods = {\n toComponent: () => [\n ...generateTagsAsReactComponent(\"meta\" /* META */, meta.priority),\n ...generateTagsAsReactComponent(\"link\" /* LINK */, link.priority),\n ...generateTagsAsReactComponent(\"script\" /* SCRIPT */, script.priority)\n ],\n toString: () => (\n // generate all the tags as strings and concatenate them\n `${getMethodsForTag(\"meta\" /* META */, meta.priority, encode)} ${getMethodsForTag(\n \"link\" /* LINK */,\n link.priority,\n encode\n )} ${getMethodsForTag(\"script\" /* SCRIPT */, script.priority, encode)}`\n )\n };\n return {\n priorityMethods,\n metaTags: meta.default,\n linkTags: link.default,\n scriptTags: script.default\n };\n};\nvar mapStateOnServer = (props) => {\n const {\n baseTag,\n bodyAttributes,\n encode = true,\n htmlAttributes,\n noscriptTags,\n styleTags,\n title = \"\",\n titleAttributes,\n prioritizeSeoTags\n } = props;\n let { linkTags, metaTags, scriptTags } = props;\n let priorityMethods = {\n toComponent: () => {\n },\n toString: () => \"\"\n };\n if (prioritizeSeoTags) {\n ({ priorityMethods, linkTags, metaTags, scriptTags } = getPriorityMethods(props));\n }\n return {\n priority: priorityMethods,\n base: getMethodsForTag(\"base\" /* BASE */, baseTag, encode),\n bodyAttributes: getMethodsForTag(\"bodyAttributes\" /* BODY */, bodyAttributes, encode),\n htmlAttributes: getMethodsForTag(\"htmlAttributes\" /* HTML */, htmlAttributes, encode),\n link: getMethodsForTag(\"link\" /* LINK */, linkTags, encode),\n meta: getMethodsForTag(\"meta\" /* META */, metaTags, encode),\n noscript: getMethodsForTag(\"noscript\" /* NOSCRIPT */, noscriptTags, encode),\n script: getMethodsForTag(\"script\" /* SCRIPT */, scriptTags, encode),\n style: getMethodsForTag(\"style\" /* STYLE */, styleTags, encode),\n title: getMethodsForTag(\"title\" /* TITLE */, { title, titleAttributes }, encode)\n };\n};\nvar server_default = mapStateOnServer;\n\n// src/HelmetData.ts\nvar instances = [];\nvar isDocument = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nvar HelmetData = class {\n instances = [];\n canUseDOM = isDocument;\n context;\n value = {\n setHelmet: (serverState) => {\n this.context.helmet = serverState;\n },\n helmetInstances: {\n get: () => this.canUseDOM ? instances : this.instances,\n add: (instance) => {\n (this.canUseDOM ? instances : this.instances).push(instance);\n },\n remove: (instance) => {\n const index = (this.canUseDOM ? instances : this.instances).indexOf(instance);\n (this.canUseDOM ? instances : this.instances).splice(index, 1);\n }\n }\n };\n constructor(context, canUseDOM) {\n this.context = context;\n this.canUseDOM = canUseDOM || false;\n if (!canUseDOM) {\n context.helmet = server_default({\n baseTag: [],\n bodyAttributes: {},\n encodeSpecialCharacters: true,\n htmlAttributes: {},\n linkTags: [],\n metaTags: [],\n noscriptTags: [],\n scriptTags: [],\n styleTags: [],\n title: \"\",\n titleAttributes: {}\n });\n }\n }\n};\n\n// src/Provider.tsx\nvar defaultValue = {};\nvar Context = React2.createContext(defaultValue);\nvar HelmetProvider = class _HelmetProvider extends Component {\n static canUseDOM = isDocument;\n helmetData;\n constructor(props) {\n super(props);\n this.helmetData = new HelmetData(this.props.context || {}, _HelmetProvider.canUseDOM);\n }\n render() {\n return /* @__PURE__ */ React2.createElement(Context.Provider, { value: this.helmetData.value }, this.props.children);\n }\n};\n\n// src/Dispatcher.tsx\nimport { Component as Component2 } from \"react\";\nimport shallowEqual from \"shallowequal\";\n\n// src/client.ts\nvar updateTags = (type, tags) => {\n const headElement = document.head || document.querySelector(\"head\" /* HEAD */);\n const tagNodes = headElement.querySelectorAll(`${type}[${HELMET_ATTRIBUTE}]`);\n const oldTags = [].slice.call(tagNodes);\n const newTags = [];\n let indexToDelete;\n if (tags && tags.length) {\n tags.forEach((tag) => {\n const newElement = document.createElement(type);\n for (const attribute in tag) {\n if (Object.prototype.hasOwnProperty.call(tag, attribute)) {\n if (attribute === \"innerHTML\" /* INNER_HTML */) {\n newElement.innerHTML = tag.innerHTML;\n } else if (attribute === \"cssText\" /* CSS_TEXT */) {\n if (newElement.styleSheet) {\n newElement.styleSheet.cssText = tag.cssText;\n } else {\n newElement.appendChild(document.createTextNode(tag.cssText));\n }\n } else {\n const attr = attribute;\n const value = typeof tag[attr] === \"undefined\" ? \"\" : tag[attr];\n newElement.setAttribute(attribute, value);\n }\n }\n }\n newElement.setAttribute(HELMET_ATTRIBUTE, \"true\");\n if (oldTags.some((existingTag, index) => {\n indexToDelete = index;\n return newElement.isEqualNode(existingTag);\n })) {\n oldTags.splice(indexToDelete, 1);\n } else {\n newTags.push(newElement);\n }\n });\n }\n oldTags.forEach((tag) => tag.parentNode?.removeChild(tag));\n newTags.forEach((tag) => headElement.appendChild(tag));\n return {\n oldTags,\n newTags\n };\n};\nvar updateAttributes = (tagName, attributes) => {\n const elementTag = document.getElementsByTagName(tagName)[0];\n if (!elementTag) {\n return;\n }\n const helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);\n const helmetAttributes = helmetAttributeString ? helmetAttributeString.split(\",\") : [];\n const attributesToRemove = [...helmetAttributes];\n const attributeKeys = Object.keys(attributes);\n for (const attribute of attributeKeys) {\n const value = attributes[attribute] || \"\";\n if (elementTag.getAttribute(attribute) !== value) {\n elementTag.setAttribute(attribute, value);\n }\n if (helmetAttributes.indexOf(attribute) === -1) {\n helmetAttributes.push(attribute);\n }\n const indexToSave = attributesToRemove.indexOf(attribute);\n if (indexToSave !== -1) {\n attributesToRemove.splice(indexToSave, 1);\n }\n }\n for (let i = attributesToRemove.length - 1; i >= 0; i -= 1) {\n elementTag.removeAttribute(attributesToRemove[i]);\n }\n if (helmetAttributes.length === attributesToRemove.length) {\n elementTag.removeAttribute(HELMET_ATTRIBUTE);\n } else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(\",\")) {\n elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(\",\"));\n }\n};\nvar updateTitle = (title, attributes) => {\n if (typeof title !== \"undefined\" && document.title !== title) {\n document.title = flattenArray(title);\n }\n updateAttributes(\"title\" /* TITLE */, attributes);\n};\nvar commitTagChanges = (newState, cb) => {\n const {\n baseTag,\n bodyAttributes,\n htmlAttributes,\n linkTags,\n metaTags,\n noscriptTags,\n onChangeClientState,\n scriptTags,\n styleTags,\n title,\n titleAttributes\n } = newState;\n updateAttributes(\"body\" /* BODY */, bodyAttributes);\n updateAttributes(\"html\" /* HTML */, htmlAttributes);\n updateTitle(title, titleAttributes);\n const tagUpdates = {\n baseTag: updateTags(\"base\" /* BASE */, baseTag),\n linkTags: updateTags(\"link\" /* LINK */, linkTags),\n metaTags: updateTags(\"meta\" /* META */, metaTags),\n noscriptTags: updateTags(\"noscript\" /* NOSCRIPT */, noscriptTags),\n scriptTags: updateTags(\"script\" /* SCRIPT */, scriptTags),\n styleTags: updateTags(\"style\" /* STYLE */, styleTags)\n };\n const addedTags = {};\n const removedTags = {};\n Object.keys(tagUpdates).forEach((tagType) => {\n const { newTags, oldTags } = tagUpdates[tagType];\n if (newTags.length) {\n addedTags[tagType] = newTags;\n }\n if (oldTags.length) {\n removedTags[tagType] = tagUpdates[tagType].oldTags;\n }\n });\n if (cb) {\n cb();\n }\n onChangeClientState(newState, addedTags, removedTags);\n};\nvar _helmetCallback = null;\nvar handleStateChangeOnClient = (newState) => {\n if (_helmetCallback) {\n cancelAnimationFrame(_helmetCallback);\n }\n if (newState.defer) {\n _helmetCallback = requestAnimationFrame(() => {\n commitTagChanges(newState, () => {\n _helmetCallback = null;\n });\n });\n } else {\n commitTagChanges(newState);\n _helmetCallback = null;\n }\n};\nvar client_default = handleStateChangeOnClient;\n\n// src/Dispatcher.tsx\nvar HelmetDispatcher = class extends Component2 {\n rendered = false;\n shouldComponentUpdate(nextProps) {\n return !shallowEqual(nextProps, this.props);\n }\n componentDidUpdate() {\n this.emitChange();\n }\n componentWillUnmount() {\n const { helmetInstances } = this.props.context;\n helmetInstances.remove(this);\n this.emitChange();\n }\n emitChange() {\n const { helmetInstances, setHelmet } = this.props.context;\n let serverState = null;\n const state = reducePropsToState(\n helmetInstances.get().map((instance) => {\n const props = { ...instance.props };\n delete props.context;\n return props;\n })\n );\n if (HelmetProvider.canUseDOM) {\n client_default(state);\n } else if (server_default) {\n serverState = server_default(state);\n }\n setHelmet(serverState);\n }\n // componentWillMount will be deprecated\n // for SSR, initialize on first render\n // constructor is also unsafe in StrictMode\n init() {\n if (this.rendered) {\n return;\n }\n this.rendered = true;\n const { helmetInstances } = this.props.context;\n helmetInstances.add(this);\n this.emitChange();\n }\n render() {\n this.init();\n return null;\n }\n};\n\n// src/index.tsx\nvar Helmet = class extends Component3 {\n static defaultProps = {\n defer: true,\n encodeSpecialCharacters: true,\n prioritizeSeoTags: false\n };\n shouldComponentUpdate(nextProps) {\n return !fastCompare(without(this.props, \"helmetData\"), without(nextProps, \"helmetData\"));\n }\n mapNestedChildrenToProps(child, nestedChildren) {\n if (!nestedChildren) {\n return null;\n }\n switch (child.type) {\n case \"script\" /* SCRIPT */:\n case \"noscript\" /* NOSCRIPT */:\n return {\n innerHTML: nestedChildren\n };\n case \"style\" /* STYLE */:\n return {\n cssText: nestedChildren\n };\n default:\n throw new Error(\n `<${child.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`\n );\n }\n }\n flattenArrayTypeChildren(child, arrayTypeChildren, newChildProps, nestedChildren) {\n return {\n ...arrayTypeChildren,\n [child.type]: [\n ...arrayTypeChildren[child.type] || [],\n {\n ...newChildProps,\n ...this.mapNestedChildrenToProps(child, nestedChildren)\n }\n ]\n };\n }\n mapObjectTypeChildren(child, newProps, newChildProps, nestedChildren) {\n switch (child.type) {\n case \"title\" /* TITLE */:\n return {\n ...newProps,\n [child.type]: nestedChildren,\n titleAttributes: { ...newChildProps }\n };\n case \"body\" /* BODY */:\n return {\n ...newProps,\n bodyAttributes: { ...newChildProps }\n };\n case \"html\" /* HTML */:\n return {\n ...newProps,\n htmlAttributes: { ...newChildProps }\n };\n default:\n return {\n ...newProps,\n [child.type]: { ...newChildProps }\n };\n }\n }\n mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {\n let newFlattenedProps = { ...newProps };\n Object.keys(arrayTypeChildren).forEach((arrayChildName) => {\n newFlattenedProps = {\n ...newFlattenedProps,\n [arrayChildName]: arrayTypeChildren[arrayChildName]\n };\n });\n return newFlattenedProps;\n }\n warnOnInvalidChildren(child, nestedChildren) {\n invariant(\n VALID_TAG_NAMES.some((name) => child.type === name),\n typeof child.type === \"function\" ? `You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.` : `Only elements types ${VALID_TAG_NAMES.join(\n \", \"\n )} are allowed. Helmet does not support rendering <${child.type}> elements. Refer to our API for more information.`\n );\n invariant(\n !nestedChildren || typeof nestedChildren === \"string\" || Array.isArray(nestedChildren) && !nestedChildren.some((nestedChild) => typeof nestedChild !== \"string\"),\n `Helmet expects a string as a child of <${child.type}>. Did you forget to wrap your children in braces? ( <${child.type}>{\\`\\`}</${child.type}> ) Refer to our API for more information.`\n );\n return true;\n }\n mapChildrenToProps(children, newProps) {\n let arrayTypeChildren = {};\n React3.Children.forEach(children, (child) => {\n if (!child || !child.props) {\n return;\n }\n const { children: nestedChildren, ...childProps } = child.props;\n const newChildProps = Object.keys(childProps).reduce((obj, key) => {\n obj[HTML_TAG_MAP[key] || key] = childProps[key];\n return obj;\n }, {});\n let { type } = child;\n if (typeof type === \"symbol\") {\n type = type.toString();\n } else {\n this.warnOnInvalidChildren(child, nestedChildren);\n }\n switch (type) {\n case \"Symbol(react.fragment)\" /* FRAGMENT */:\n newProps = this.mapChildrenToProps(nestedChildren, newProps);\n break;\n case \"link\" /* LINK */:\n case \"meta\" /* META */:\n case \"noscript\" /* NOSCRIPT */:\n case \"script\" /* SCRIPT */:\n case \"style\" /* STYLE */:\n arrayTypeChildren = this.flattenArrayTypeChildren(\n child,\n arrayTypeChildren,\n newChildProps,\n nestedChildren\n );\n break;\n default:\n newProps = this.mapObjectTypeChildren(child, newProps, newChildProps, nestedChildren);\n break;\n }\n });\n return this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);\n }\n render() {\n const { children, ...props } = this.props;\n let newProps = { ...props };\n let { helmetData } = props;\n if (children) {\n newProps = this.mapChildrenToProps(children, newProps);\n }\n if (helmetData && !(helmetData instanceof HelmetData)) {\n const data = helmetData;\n helmetData = new HelmetData(data.context, true);\n delete newProps.helmetData;\n }\n return helmetData ? /* @__PURE__ */ React3.createElement(HelmetDispatcher, { ...newProps, context: helmetData.value }) : /* @__PURE__ */ React3.createElement(Context.Consumer, null, (context) => /* @__PURE__ */ React3.createElement(HelmetDispatcher, { ...newProps, context }));\n }\n};\nexport {\n Helmet,\n HelmetData,\n HelmetProvider\n};\n","import { cmsBaseUrl } from '../../services/blogClient'\nimport type { SlugFields } from './blog.types'\nimport type { CMSEntry, CMSQueryParams, CMSReference } from './cms.types'\n\n// ============================================================================\n// SLUG EXTRACTION - Unified logic for getting slug from CMS entries\n// ============================================================================\n\n/**\n * Extracts slug from CMS entry fields.\n */\nconst getEntrySlug = (fields: SlugFields, sysId?: string): string => {\n return fields.id || sysId || ''\n}\n\n// Helper function to fetch from CMS API\nconst fetchFromCMS = async (endpoint: string, params?: CMSQueryParams): Promise<unknown> => {\n const baseUrl = cmsBaseUrl\n const url = new URL(`${baseUrl}${endpoint}`, window.location.origin)\n\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n url.searchParams.append(key, String(value))\n }\n })\n }\n\n const response = await fetch(url.toString())\n\n if (!response.ok) {\n throw new Error(`CMS API error: ${response.status} ${response.statusText}`)\n }\n\n return response.json()\n}\n\n// ============================================================================\n// ENTRY CACHES - For assets, categories, authors, and resolved posts\n// Prevents duplicate requests when resolving references\n// TODO: These module-level Maps are unbounded. If the blog grows to thousands of entries,\n// replace with a capped LRU cache (e.g. lru-cache or a tiny custom implementation).\n// ============================================================================\n\nconst assetsCache = new Map<string, CMSEntry>()\nconst assetsCachePromises = new Map<string, Promise<CMSEntry>>()\n\nconst entriesCache = new Map<string, CMSEntry>()\nconst entriesCachePromises = new Map<string, Promise<CMSEntry>>()\n\nconst resolveAssetLink = async (value: unknown): Promise<unknown> => {\n const link = value as CMSReference\n if (link?.sys?.type === 'Link' && link.sys.linkType === 'Asset') {\n const assetId = link.sys.id\n\n // Return from cache if available\n if (assetsCache.has(assetId)) {\n return assetsCache.get(assetId)\n }\n\n // If already fetching, wait for that promise\n if (assetsCachePromises.has(assetId)) {\n return assetsCachePromises.get(assetId)\n }\n\n // Start fetching\n const assetPromise = fetchFromCMS(`/assets/${assetId}`)\n .then(asset => {\n const cmsAsset = asset as CMSEntry\n assetsCache.set(assetId, cmsAsset)\n assetsCachePromises.delete(assetId)\n return cmsAsset\n })\n .catch(() => {\n assetsCachePromises.delete(assetId)\n return value as CMSEntry\n })\n\n assetsCachePromises.set(assetId, assetPromise)\n return assetPromise\n }\n\n return value\n}\n\n// ============================================================================\n// CATEGORY RESOLVER - Uses module-level caches for resolved entries\n// ============================================================================\n\n// NOTE: initializeHelpers/storeRef were removed — the RTK cache-lookup shortcut was dead\n// code (initializeHelpers was never called, storeRef was always null). Entry resolution\n// falls through to fetchAndCacheEntry which has its own module-level dedup Map.\n\n// Local cache for resolved categories/authors with their images\nconst resolvedCategoriesCache = new Map<string, CMSEntry>()\nconst resolvedAuthorsCache = new Map<string, CMSEntry>()\n\n// TODO: Optimize — replace per-post reference resolution with Contentful `include` param\n// on the original query (resolves references server-side). Current implementation fires\n// 3 parallel requests per post; first load of 7 posts = 21+ requests.\n\n// Helper to fetch and cache an entry by ID\nconst fetchAndCacheEntry = async (entryId: string): Promise<CMSEntry> => {\n // Return from cache if available\n if (entriesCache.has(entryId)) {\n return entriesCache.get(entryId)!\n }\n\n // If already fetching, wait for that promise\n if (entriesCachePromises.has(entryId)) {\n return entriesCachePromises.get(entryId)!\n }\n\n // Start fetching\n const entryPromise = fetchFromCMS(`/entries/${entryId}`)\n .then(async fetched => {\n const cmsEntry = fetched as CMSEntry\n if (cmsEntry.fields?.image) {\n cmsEntry.fields.image = await resolveAssetLink(cmsEntry.fields.image)\n }\n entriesCache.set(entryId, cmsEntry)\n entriesCachePromises.delete(entryId)\n return cmsEntry\n })\n .catch(() => {\n entriesCachePromises.delete(entryId)\n throw new Error(`Failed to fetch entry ${entryId}`)\n })\n\n entriesCachePromises.set(entryId, entryPromise)\n return entryPromise\n}\n\nconst resolveCategoryLink = async (value: unknown): Promise<unknown> => {\n const link = value as CMSReference\n const entry = value as CMSEntry\n\n // If it's a Link reference, resolve via module-level entry cache\n if (link?.sys?.type === 'Link' && link.sys.linkType === 'Entry') {\n const entryId = link.sys.id\n\n // Check resolved cache first (already has image resolved)\n if (resolvedCategoriesCache.has(entryId)) {\n return resolvedCategoriesCache.get(entryId)!\n }\n\n try {\n const fetched = await fetchAndCacheEntry(entryId)\n resolvedCategoriesCache.set(entryId, fetched)\n return fetched\n } catch {\n return value\n }\n }\n\n // If it already has fields, it's already resolved\n if (entry?.sys?.id && entry?.fields) {\n if (resolvedCategoriesCache.has(entry.sys.id)) {\n return resolvedCategoriesCache.get(entry.sys.id)!\n }\n if (entry.fields.image) {\n entry.fields.image = await resolveAssetLink(entry.fields.image)\n }\n resolvedCategoriesCache.set(entry.sys.id, entry)\n return entry\n }\n\n return value\n}\n\n// ============================================================================\n// AUTHOR RESOLVER - Uses module-level caches\n// ============================================================================\n\nconst resolveAuthorLink = async (value: unknown): Promise<unknown> => {\n const link = value as CMSReference\n const entry = value as CMSEntry\n\n // If it's a Link reference, resolve via module-level entry cache\n if (link?.sys?.type === 'Link' && link.sys.linkType === 'Entry') {\n const entryId = link.sys.id\n\n if (resolvedAuthorsCache.has(entryId)) {\n return resolvedAuthorsCache.get(entryId)!\n }\n\n try {\n const fetched = await fetchAndCacheEntry(entryId)\n resolvedAuthorsCache.set(entryId, fetched)\n return fetched\n } catch {\n return value\n }\n }\n\n // If it already has fields, just resolve the image if needed\n if (entry?.sys?.id && entry?.fields) {\n if (resolvedAuthorsCache.has(entry.sys.id)) {\n return resolvedAuthorsCache.get(entry.sys.id)!\n }\n if (entry.fields.image) {\n entry.fields.image = await resolveAssetLink(entry.fields.image)\n }\n resolvedAuthorsCache.set(entry.sys.id, entry)\n return entry\n }\n\n return value\n}\n\n// ============================================================================\n// URL RESOLVERS - Simple functions that return just URLs/slugs from references\n// ============================================================================\n\nconst resolveAssetUrl = async (assetId: string): Promise<string> => {\n if (!assetId) return ''\n\n const resolved = await resolveAssetLink({ sys: { type: 'Link', linkType: 'Asset', id: assetId } })\n const asset = resolved as CMSEntry\n const url = (asset?.fields?.file as { url?: string })?.url || ''\n return url.startsWith('//') ? `https:${url}` : url\n}\n\nconst resolveEntrySlug = async (entryId: string): Promise<string> => {\n if (!entryId) return ''\n\n // Return from cache if available\n if (entriesCache.has(entryId)) {\n const entry = entriesCache.get(entryId)\n return entry?.fields?.id as string\n }\n\n // If already fetching, wait for that promise\n if (entriesCachePromises.has(entryId)) {\n const entry = await entriesCachePromises.get(entryId)\n return entry?.fields?.id as string\n }\n\n try {\n const entryPromise = fetchFromCMS(`/entries/${entryId}`)\n entriesCachePromises.set(entryId, entryPromise as Promise<CMSEntry>)\n\n const entry = (await entryPromise) as CMSEntry\n entriesCache.set(entryId, entry)\n entriesCachePromises.delete(entryId)\n\n return entry?.fields?.id as string\n } catch {\n entriesCachePromises.delete(entryId)\n return ''\n }\n}\n\nexport { fetchFromCMS, getEntrySlug, resolveAssetLink, resolveAssetUrl, resolveAuthorLink, resolveCategoryLink, resolveEntrySlug }\n","function formatUtcDate(value?: string): string {\n if (!value) return ''\n const raw = value\n const date = new Date(raw.includes('T') ? raw : `${raw}T00:00:00Z`)\n if (Number.isNaN(date.getTime())) {\n return raw\n }\n return new Intl.DateTimeFormat('en-US', {\n timeZone: 'UTC',\n month: 'short',\n day: '2-digit',\n year: 'numeric'\n }).format(date)\n}\n\nexport { formatUtcDate }\n","import type { BlogPost } from '../types/blog.domain'\n\nconst BASE_URL = '/blog'\n\nexport const locations = {\n home: () => '/',\n blogs: () => BASE_URL,\n category: (categorySlug: string) => `${BASE_URL}/${categorySlug}`,\n blog: (categorySlug: string, postSlug: string) => `${BASE_URL}/${categorySlug}/${postSlug}`,\n author: (authorSlug: string) => `${BASE_URL}/author/${authorSlug}`,\n search: (query: string) => `${BASE_URL}/search?q=${encodeURIComponent(query)}`,\n twitter: (post: BlogPost) => {\n const url = `${window.location.origin}${post.url}`\n return `https://x.com/intent/post?text=${encodeURIComponent(post.title)}&url=${encodeURIComponent(url)}`\n },\n facebook: (post: BlogPost) => {\n const url = `${window.location.origin}${post.url}`\n return `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`\n }\n}\n","export const slugify = (str: string | undefined | null): string => {\n if (!str) {\n return ''\n }\n return str\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, '')\n .replace(/[\\s_-]+/g, '-')\n .replace(/^-+|-+$/g, '')\n}\n","import { Document } from '@contentful/rich-text-types'\nimport type { BlogAuthor, BlogCategory, BlogPost, ContentfulAsset } from '../../shared/blog/types/blog.domain'\nimport { formatUtcDate } from '../../shared/blog/utils/date'\nimport { locations } from '../../shared/blog/utils/locations'\nimport { slugify } from '../../shared/blog/utils/string'\nimport type { CMSEntry } from './cms.types'\n\ninterface ContentfulAssetEntry {\n sys: {\n id: string\n type: string\n }\n fields: {\n file?: {\n url?: string\n contentType?: string\n details?: {\n image?: {\n width?: number\n height?: number\n }\n }\n }\n }\n}\n\nfunction mapContentfulAsset(asset: ContentfulAssetEntry | null | undefined): ContentfulAsset | null {\n if (!asset || !asset.sys || !asset.fields || !asset.fields.file) {\n return null\n }\n\n const url = asset.fields.file.url\n if (!url) {\n return null\n }\n\n return {\n id: asset.sys.id,\n url: url.startsWith('//') ? `https:${url}` : url,\n width: asset.fields.file.details?.image?.width || 0,\n height: asset.fields.file.details?.image?.height || 0,\n mimeType: asset.fields.file.contentType || 'image/jpeg'\n }\n}\n\nfunction mapBlogCategory(entry: CMSEntry | null | undefined): BlogCategory | null {\n if (!entry || !entry.sys || !entry.fields) {\n return null\n }\n\n const slug = (entry.fields.id as string | undefined) || slugify((entry.fields.title as string | undefined) || '')\n if (!slug) {\n return null\n }\n\n const image = mapContentfulAsset(entry.fields.image as ContentfulAssetEntry | null | undefined)\n if (!image) {\n return null\n }\n\n return {\n id: entry.sys.id,\n slug,\n title: (entry.fields.title as string | undefined) || '',\n description: (entry.fields.description as string | undefined) || '',\n image,\n isShownInMenu: (entry.fields.isShownInMenu as boolean | undefined) ?? true,\n url: locations.category(slug)\n }\n}\n\nfunction createDefaultCategory(entryId?: string): BlogCategory {\n return {\n id: entryId || 'uncategorized',\n slug: 'uncategorized',\n title: 'Uncategorized',\n description: 'Posts without a valid category',\n image: {\n id: 'default-category-image',\n url: 'https://decentraland.org/logos/png/color.png',\n width: 200,\n height: 200,\n mimeType: 'image/png'\n },\n isShownInMenu: false,\n url: locations.category('uncategorized')\n }\n}\n\nfunction createDefaultImage(entryId?: string): ContentfulAsset {\n return {\n id: entryId || 'default-image',\n url: 'https://decentraland.org/logos/png/color.png',\n width: 1200,\n height: 630,\n mimeType: 'image/png'\n }\n}\n\nfunction createDefaultAuthor(entryId?: string): BlogAuthor {\n const slug = entryId || 'decentraland'\n return {\n id: entryId || 'unknown',\n slug,\n title: 'Decentraland',\n description: 'Decentraland Team',\n image: {\n id: 'default-avatar',\n url: 'https://decentraland.org/logos/png/color.png',\n width: 200,\n height: 200,\n mimeType: 'image/png'\n },\n url: locations.author(slug)\n }\n}\n\nfunction mapBlogAuthor(entry: CMSEntry | null | undefined): BlogAuthor {\n if (!entry || !entry.sys || !entry.fields) {\n return createDefaultAuthor(entry?.sys?.id)\n }\n\n // Check if fields object is empty\n const fieldKeys = Object.keys(entry.fields)\n if (fieldKeys.length === 0) {\n return createDefaultAuthor(entry.sys.id)\n }\n\n // Extract title and slug BEFORE checking image\n const title = (entry.fields.title as string | undefined) || ''\n const slug = (entry.fields.id as string | undefined) || slugify(title) || entry.sys.id\n\n const image = mapContentfulAsset(entry.fields.image as ContentfulAssetEntry | null | undefined)\n if (!image) {\n // Use the actual author data but with a default image\n return {\n id: entry.sys.id,\n slug,\n title: title || 'Decentraland',\n description: (entry.fields.description as string | undefined) || '',\n image: {\n id: 'default-avatar',\n url: 'https://decentraland.org/logos/png/color.png',\n width: 200,\n height: 200,\n mimeType: 'image/png'\n },\n url: locations.author(slug)\n }\n }\n\n return {\n id: entry.sys.id,\n slug,\n title,\n description: (entry.fields.description as string | undefined) || '',\n image,\n url: locations.author(slug)\n }\n}\n\nfunction mapBlogPost(entry: CMSEntry | null | undefined): BlogPost | null {\n if (!entry || !entry.sys || !entry.fields) {\n return null\n }\n\n // Try to map category, fall back to default if it fails\n let category = mapBlogCategory(entry.fields.category as CMSEntry | null | undefined)\n if (!category) {\n category = createDefaultCategory(entry.sys.id)\n }\n\n // mapBlogAuthor now always returns a valid author (falls back to default if needed)\n const author = mapBlogAuthor(entry.fields.author as CMSEntry | null | undefined)\n\n // Try to map image, fall back to default if it fails\n let image = mapContentfulAsset(entry.fields.image as ContentfulAssetEntry | null | undefined)\n if (!image) {\n image = createDefaultImage(entry.sys.id)\n }\n\n const title = (entry.fields.title as string | undefined) || ''\n const slug = entry.fields.id as string\n const publishedDate = entry.fields.publishedDate as string | undefined\n const body = entry.fields.body as Document | undefined\n\n return {\n id: entry.sys.id,\n slug,\n title,\n description: (entry.fields.description as string | undefined) || '',\n publishedDate: formatUtcDate(publishedDate),\n body: body || ({} as Document),\n bodyAssets: {},\n image,\n category,\n author,\n url: locations.blog(category.slug, slug)\n }\n}\n\nexport { mapBlogAuthor, mapBlogCategory, mapBlogPost, mapContentfulAsset }\n","import { BLOCKS } from '@contentful/rich-text-types'\nimport { cmsClient, getCmsBaseUrl } from '../../services/blogClient'\nimport type { BlogAuthor, BlogCategory, BlogPost, ContentfulAsset, PaginatedBlogPosts } from '../../shared/blog/types/blog.domain'\n// NOTE: store is imported here only for getPostFromStore (normalized-cache read optimization).\n// Dispatches use onQueryStarted so transformResponse stays a pure data transformer.\nimport { store } from '../../shells/store'\nimport { getEntrySlug, resolveAssetLink, resolveAuthorLink, resolveCategoryLink } from './blog.helpers'\nimport { mapBlogAuthor, mapBlogCategory, mapBlogPost, mapContentfulAsset } from './blog.mappers'\nimport { postsUpserted } from './blog.slice'\nimport type {\n GetBlogAuthorBySlugParams,\n GetBlogAuthorParams,\n GetBlogCategoryBySlugParams,\n GetBlogPostBySlugParams,\n GetBlogPostParams,\n GetBlogPostPreviewParams,\n GetBlogPostsParams,\n SlugFields\n} from './blog.types'\nimport type { CMSEntry, CMSListResponse } from './cms.types'\n\n// Helper to check if a post is already in the normalized store\nconst getPostFromStore = (postId: string): BlogPost | undefined => {\n const state = store.getState()\n return state.blog.entities[postId]\n}\n\n// Helper to resolve all references (category, author, image) in a CMS entry\nconst resolveEntryReferences = async (entry: CMSEntry): Promise<CMSEntry> => {\n const resolvedEntry = { ...entry, fields: { ...entry.fields } }\n\n // Resolve all references in parallel for better performance\n const [category, author, image] = await Promise.all([\n resolvedEntry.fields.category ? resolveCategoryLink(resolvedEntry.fields.category) : undefined,\n resolvedEntry.fields.author ? resolveAuthorLink(resolvedEntry.fields.author) : undefined,\n resolvedEntry.fields.image ? resolveAssetLink(resolvedEntry.fields.image) : undefined\n ])\n\n if (category) resolvedEntry.fields.category = category\n if (author) resolvedEntry.fields.author = author\n if (image) resolvedEntry.fields.image = image\n\n return resolvedEntry\n}\n\n// Helper to resolve only image references (for categories/authors that don't have nested refs)\nconst resolveImageOnly = async (entry: CMSEntry): Promise<CMSEntry> => {\n const resolvedEntry = { ...entry, fields: { ...entry.fields } }\n\n if (resolvedEntry.fields.image) {\n resolvedEntry.fields.image = await resolveAssetLink(resolvedEntry.fields.image)\n }\n\n return resolvedEntry\n}\n\nconst normalizeCmsError = (error: unknown): string => {\n if (error instanceof Error) {\n return error.message\n }\n if (typeof error === 'object' && error !== null && 'error' in error) {\n const msg = (error as { error?: unknown }).error\n if (typeof msg === 'string') {\n return msg\n }\n }\n return 'Unknown error'\n}\n\ninterface DocumentNode {\n nodeType: string\n data?: { target?: { sys?: { id?: string } } }\n content?: DocumentNode[]\n}\n\n// Extract all embedded asset IDs from a rich text document\nconst extractEmbeddedAssetIds = (node: DocumentNode): string[] => {\n const ids: string[] = []\n\n if (node.nodeType === BLOCKS.EMBEDDED_ASSET && node.data?.target?.sys?.id) {\n ids.push(node.data.target.sys.id)\n }\n\n if (node.content) {\n for (const child of node.content) {\n ids.push(...extractEmbeddedAssetIds(child))\n }\n }\n\n return ids\n}\n\n// Resolve body assets and return a map of id -> ContentfulAsset\nconst resolveBodyAssets = async (body: DocumentNode): Promise<Record<string, ContentfulAsset>> => {\n const assetIds = extractEmbeddedAssetIds(body)\n const uniqueIds = [...new Set(assetIds)]\n\n if (uniqueIds.length === 0) {\n return {}\n }\n\n const resolvedAssets = await Promise.all(\n uniqueIds.map(async id => {\n const resolved = await resolveAssetLink({ sys: { type: 'Link', linkType: 'Asset', id } })\n const asset = mapContentfulAsset(resolved as CMSEntry)\n return { id, asset }\n })\n )\n\n const assetsMap: Record<string, ContentfulAsset> = {}\n for (const { id, asset } of resolvedAssets) {\n if (asset) {\n assetsMap[id] = asset\n }\n }\n\n return assetsMap\n}\n\nconst blogClient = cmsClient.injectEndpoints({\n endpoints: build => ({\n getBlogPosts: build.query<PaginatedBlogPosts, GetBlogPostsParams>({\n serializeQueryArgs: ({ queryArgs }) => {\n // Cache by category/author only - pagination is handled via merge\n return `posts-${queryArgs.category || 'all'}-${queryArgs.author || 'all'}`\n },\n merge: (currentCache, newItems, { arg }) => {\n // For skip=0, only replace if cache is empty or we're explicitly refreshing\n if (arg.skip === 0) {\n // If we have more posts in cache than what came back, keep the accumulated cache\n if (currentCache.posts.length > newItems.posts.length) {\n return currentCache\n }\n return newItems\n }\n\n // Merge new posts, avoiding duplicates\n const existingIds = new Set(currentCache.posts.map(p => p.id))\n const newPosts = newItems.posts.filter(p => !existingIds.has(p.id))\n\n return {\n posts: [...currentCache.posts, ...newPosts],\n total: newItems.total,\n hasMore: newItems.hasMore,\n nextCmsSkip: newItems.nextCmsSkip // Always use the latest CMS skip\n }\n },\n forceRefetch: ({ currentArg, previousArg }) => {\n // Only refetch if skip changed AND we're requesting more data\n if (!previousArg) return true\n return currentArg?.skip !== previousArg?.skip && (currentArg?.skip ?? 0) > (previousArg?.skip ?? 0)\n },\n query: ({ category, author, limit = 20, skip = 0 }) => ({\n url: getCmsBaseUrl() + '/blog/posts',\n params: { category, author, limit, skip }\n }),\n transformResponse: async (listResponse: CMSListResponse, _meta, { skip = 0 }) => {\n try {\n const totalAvailable = listResponse.total\n\n // Map each entry, using cached posts from normalized store when available\n const batchPosts = await Promise.all(\n listResponse.items.map(async item => {\n const postId = item.sys?.id\n if (postId) {\n // Check if post already exists in normalized store\n const cachedPost = getPostFromStore(postId)\n if (cachedPost) {\n return cachedPost\n }\n }\n\n // Post not in store, resolve references and map\n try {\n const resolvedEntry = await resolveEntryReferences(item)\n return mapBlogPost(resolvedEntry)\n } catch {\n return null\n }\n })\n )\n\n const validPosts = batchPosts.filter((post): post is BlogPost => post !== null)\n\n // Backend handles category/author filtering — total reflects the filtered set\n const nextCmsSkip = skip + listResponse.items.length\n const hasMore = listResponse.items.length === 0 ? false : nextCmsSkip < totalAvailable\n\n return {\n posts: validPosts,\n total: totalAvailable,\n hasMore,\n nextCmsSkip\n }\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: normalizeCmsError(error)\n }\n }\n },\n async onQueryStarted(_arg, { dispatch, queryFulfilled }) {\n try {\n const { data } = await queryFulfilled\n // Upsert fetched posts into the normalized entity store\n if (data.posts.length > 0) {\n dispatch(postsUpserted(data.posts))\n }\n } catch {\n // query failed — nothing to upsert\n }\n },\n keepUnusedDataFor: 60,\n providesTags: result =>\n result\n ? [\n ...result.posts.map(({ id }) => ({\n type: 'BlogPosts' as const,\n id\n })),\n { type: 'BlogPosts', id: 'LIST' }\n ]\n : [{ type: 'BlogPosts', id: 'LIST' }]\n }),\n\n getBlogPost: build.query<BlogPost, GetBlogPostParams>({\n query: ({ id }) => ({ url: getCmsBaseUrl() + `/entries/${id}` }),\n transformResponse: async (response: CMSEntry, _meta, { id }) => {\n try {\n // Check if post already exists in normalized store (with body assets)\n const cachedPost = getPostFromStore(id)\n if (cachedPost && cachedPost.bodyAssets && Object.keys(cachedPost.bodyAssets).length > 0) {\n return cachedPost\n }\n\n const resolvedEntry = await resolveEntryReferences(response)\n const post = mapBlogPost(resolvedEntry)\n\n if (!post) {\n throw {\n status: 'CUSTOM_ERROR',\n error: 'Failed to map blog post: missing required fields'\n }\n }\n\n // Resolve embedded assets in the body\n if (post.body) {\n post.bodyAssets = await resolveBodyAssets(post.body as unknown as DocumentNode)\n }\n\n return post\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: normalizeCmsError(error)\n }\n }\n },\n async onQueryStarted(_arg, { dispatch, queryFulfilled }) {\n try {\n const { data } = await queryFulfilled\n dispatch(postsUpserted([data]))\n } catch {\n // query failed — nothing to upsert\n }\n },\n providesTags: (result, _error, arg) => (result ? [{ type: 'BlogPost', id: arg.id }] : [])\n }),\n\n getBlogCategories: build.query<BlogCategory[], void>({\n query: () => ({ url: getCmsBaseUrl() + '/blog/categories' }),\n transformResponse: async (listResponse: CMSListResponse) => {\n try {\n // Categories only have image references, resolve them in parallel\n const resolvedEntries = await Promise.all(listResponse.items.map(item => resolveImageOnly(item)))\n return resolvedEntries.map(entry => mapBlogCategory(entry)).filter((cat): cat is BlogCategory => cat !== null)\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: normalizeCmsError(error)\n }\n }\n },\n providesTags: ['Categories']\n }),\n\n getBlogCategoryBySlug: build.query<BlogCategory, GetBlogCategoryBySlugParams>({\n query: () => ({ url: getCmsBaseUrl() + '/blog/categories' }),\n transformResponse: async (listResponse: CMSListResponse, _meta, { slug }) => {\n try {\n const categoryEntry = listResponse.items.find(item => {\n const fields = item.fields as unknown as SlugFields\n return getEntrySlug(fields, item.sys.id) === slug\n })\n\n if (!categoryEntry) {\n throw {\n status: 'CUSTOM_ERROR',\n error: `Category with slug \"${slug}\" not found`\n }\n }\n\n // The API response already includes all fields, just resolve the image\n const resolvedEntry = await resolveImageOnly(categoryEntry)\n const category = mapBlogCategory(resolvedEntry)\n\n if (!category) {\n throw {\n status: 'CUSTOM_ERROR',\n error: 'Failed to map category: missing required fields'\n }\n }\n\n return category\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: normalizeCmsError(error)\n }\n }\n },\n providesTags: (result, _error, arg) => (result ? [{ type: 'Categories', id: arg.slug }] : [])\n }),\n\n getBlogPostBySlug: build.query<BlogPost, GetBlogPostBySlugParams>({\n query: ({ postSlug }) => ({\n url: getCmsBaseUrl() + '/blog/posts',\n params: { slug: postSlug }\n }),\n transformResponse: async (listResponse: CMSListResponse, _meta, { postSlug }) => {\n try {\n // Find the post with matching slug in the response\n const postEntry = listResponse.items.find(item => item.fields.id === postSlug)\n\n if (!postEntry) {\n throw {\n status: 'CUSTOM_ERROR',\n error: `Post with slug \"${postSlug}\" not found`\n }\n }\n\n const postId = postEntry.sys?.id\n\n // Check if post already exists in normalized store (with body assets)\n if (postId) {\n const cachedPost = getPostFromStore(postId)\n if (cachedPost && cachedPost.bodyAssets && Object.keys(cachedPost.bodyAssets).length > 0) {\n return cachedPost\n }\n }\n\n // Resolve references and map\n const resolvedEntry = await resolveEntryReferences(postEntry)\n const post = mapBlogPost(resolvedEntry)\n\n if (!post) {\n throw {\n status: 'CUSTOM_ERROR',\n error: 'Failed to map post: missing required fields'\n }\n }\n\n // Resolve embedded assets in the body\n if (post.body) {\n post.bodyAssets = await resolveBodyAssets(post.body as unknown as DocumentNode)\n }\n\n return post\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: normalizeCmsError(error)\n }\n }\n },\n async onQueryStarted(_arg, { dispatch, queryFulfilled }) {\n try {\n const { data } = await queryFulfilled\n dispatch(postsUpserted([data]))\n } catch {\n // query failed — nothing to upsert\n }\n },\n providesTags: (result, _error, arg) => (result ? [{ type: 'BlogPost', id: `${arg.categorySlug}/${arg.postSlug}` }] : [])\n }),\n\n getBlogAuthors: build.query<BlogAuthor[], void>({\n query: () => ({ url: getCmsBaseUrl() + '/blog/authors' }),\n transformResponse: async (listResponse: CMSListResponse) => {\n try {\n // Authors only have image references, resolve them in parallel\n const resolvedEntries = await Promise.all(listResponse.items.map(item => resolveImageOnly(item)))\n return resolvedEntries.map(entry => mapBlogAuthor(entry)).filter((auth): auth is BlogAuthor => auth !== null)\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: error instanceof Error ? error.message : 'Unknown error'\n }\n }\n },\n providesTags: ['Authors']\n }),\n\n getBlogAuthor: build.query<BlogAuthor, GetBlogAuthorParams>({\n query: ({ id }) => ({ url: getCmsBaseUrl() + `/entries/${id}` }),\n transformResponse: (response: CMSEntry) => {\n const author = mapBlogAuthor(response)\n\n if (!author) {\n throw {\n status: 'CUSTOM_ERROR',\n error: 'Failed to map author: missing required fields'\n }\n }\n\n return author\n },\n providesTags: (result, _error, arg) => (result ? [{ type: 'Authors', id: arg.id }] : [])\n }),\n\n getBlogAuthorBySlug: build.query<BlogAuthor, GetBlogAuthorBySlugParams>({\n query: () => ({ url: getCmsBaseUrl() + '/blog/authors' }),\n transformResponse: async (listResponse: CMSListResponse, _meta, { slug }) => {\n try {\n const authorEntry = listResponse.items.find(item => {\n const fields = item.fields as unknown as SlugFields\n return getEntrySlug(fields, item.sys.id) === slug\n })\n\n if (!authorEntry) {\n throw {\n status: 'CUSTOM_ERROR',\n error: `Author with slug \"${slug}\" not found`\n }\n }\n\n // The API response already includes all fields, just resolve the image\n const resolvedEntry = await resolveImageOnly(authorEntry)\n const author = mapBlogAuthor(resolvedEntry)\n\n if (!author) {\n throw {\n status: 'CUSTOM_ERROR',\n error: 'Failed to map author: missing required fields'\n }\n }\n\n return author\n } catch (error) {\n throw {\n status: 'CUSTOM_ERROR',\n error: normalizeCmsError(error)\n }\n }\n },\n providesTags: (result, _error, arg) => (result ? [{ type: 'Authors', id: arg.slug }] : [])\n }),\n\n getBlogPostPreview: build.query<BlogPost, GetBlogPostPreviewParams>({\n queryFn: async ({ id, env, token, previewBaseUrl, spaceId }) => {\n try {\n const previewUrl = `${previewBaseUrl}/spaces/${spaceId}/environments/${env}/entries?content_type=blog_post&fields.id=${id}&access_token=${token}`\n\n const response = await fetch(previewUrl)\n if (!response.ok) {\n return { error: { status: response.status, data: `Failed to fetch preview: ${response.statusText}` } as const }\n }\n\n const data = (await response.json()) as CMSListResponse\n if (!data.items || data.items.length === 0) {\n return { error: { status: 'CUSTOM_ERROR', error: `Preview post with id \"${id}\" not found` } as const }\n }\n\n const entry = data.items[0]\n const resolvedEntry = await resolveEntryReferences(entry)\n const post = mapBlogPost(resolvedEntry)\n\n if (!post) {\n return { error: { status: 'CUSTOM_ERROR', error: 'Failed to map preview post: missing required fields' } as const }\n }\n\n if (post.body) {\n post.bodyAssets = await resolveBodyAssets(post.body as unknown as DocumentNode)\n }\n\n return { data: post }\n } catch (error) {\n return { error: { status: 'CUSTOM_ERROR', error: normalizeCmsError(error) } as const }\n }\n },\n providesTags: (result, _error, arg) => (result ? [{ type: 'BlogPost', id: `preview-${arg.id}` }] : [])\n })\n }),\n overrideExisting: false\n})\n\nconst {\n useGetBlogPostsQuery,\n useGetBlogPostQuery,\n useGetBlogCategoriesQuery,\n useGetBlogCategoryBySlugQuery,\n useGetBlogPostBySlugQuery,\n useGetBlogAuthorsQuery,\n useGetBlogAuthorQuery,\n useGetBlogAuthorBySlugQuery,\n useGetBlogPostPreviewQuery\n} = blogClient\n\nexport {\n blogClient,\n useGetBlogAuthorBySlugQuery,\n useGetBlogAuthorQuery,\n useGetBlogAuthorsQuery,\n useGetBlogCategoriesQuery,\n useGetBlogCategoryBySlugQuery,\n useGetBlogPostBySlugQuery,\n useGetBlogPostPreviewQuery,\n useGetBlogPostQuery,\n useGetBlogPostsQuery\n}\n","function m(){function r(t){return new Promise(s=>{let e=new XMLHttpRequest;e.open(t.method,t.url,!0),Object.keys(t.headers).forEach(n=>e.setRequestHeader(n,t.headers[n]));let i=(n,a)=>setTimeout(()=>{e.abort(),s({status:0,content:a,isTimedOut:!0})},n),u=i(t.connectTimeout,\"Connection timeout\"),o;e.onreadystatechange=()=>{e.readyState>e.OPENED&&o===void 0&&(clearTimeout(u),o=i(t.responseTimeout,\"Socket timeout\"))},e.onerror=()=>{e.status===0&&(clearTimeout(u),clearTimeout(o),s({content:e.responseText||\"Network request failed\",status:e.status,isTimedOut:!1}))},e.onload=()=>{clearTimeout(u),clearTimeout(o),s({content:e.responseText,status:e.status,isTimedOut:!1})},e.send(t.data)})}return{send:r}}export{m as createXhrRequester};\n//# sourceMappingURL=requester.xhr.js.map","// src/cache/createBrowserLocalStorageCache.ts\nfunction createBrowserLocalStorageCache(options) {\n let storage;\n const namespaceKey = `algolia-client-js-${options.key}`;\n function getStorage() {\n if (storage === void 0) {\n storage = options.localStorage || window.localStorage;\n }\n return storage;\n }\n function getNamespace() {\n return JSON.parse(getStorage().getItem(namespaceKey) || \"{}\");\n }\n function setNamespace(namespace) {\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\n }\n function removeOutdatedCacheItems() {\n const timeToLive = options.timeToLive ? options.timeToLive * 1e3 : null;\n const namespace = getNamespace();\n const filteredNamespaceWithoutOldFormattedCacheItems = Object.fromEntries(\n Object.entries(namespace).filter(([, cacheItem]) => {\n return cacheItem.timestamp !== void 0;\n })\n );\n setNamespace(filteredNamespaceWithoutOldFormattedCacheItems);\n if (!timeToLive) {\n return;\n }\n const filteredNamespaceWithoutExpiredItems = Object.fromEntries(\n Object.entries(filteredNamespaceWithoutOldFormattedCacheItems).filter(([, cacheItem]) => {\n const currentTimestamp = (/* @__PURE__ */ new Date()).getTime();\n const isExpired = cacheItem.timestamp + timeToLive < currentTimestamp;\n return !isExpired;\n })\n );\n setNamespace(filteredNamespaceWithoutExpiredItems);\n }\n return {\n get(key, defaultValue, events = {\n miss: () => Promise.resolve()\n }) {\n return Promise.resolve().then(() => {\n removeOutdatedCacheItems();\n return getNamespace()[JSON.stringify(key)];\n }).then((value) => {\n return Promise.all([value ? value.value : defaultValue(), value !== void 0]);\n }).then(([value, exists]) => {\n return Promise.all([value, exists || events.miss(value)]);\n }).then(([value]) => value);\n },\n set(key, value) {\n return Promise.resolve().then(() => {\n const namespace = getNamespace();\n namespace[JSON.stringify(key)] = {\n timestamp: (/* @__PURE__ */ new Date()).getTime(),\n value\n };\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\n return value;\n });\n },\n delete(key) {\n return Promise.resolve().then(() => {\n const namespace = getNamespace();\n delete namespace[JSON.stringify(key)];\n getStorage().setItem(namespaceKey, JSON.stringify(namespace));\n });\n },\n clear() {\n return Promise.resolve().then(() => {\n getStorage().removeItem(namespaceKey);\n });\n }\n };\n}\n\n// src/cache/createNullCache.ts\nfunction createNullCache() {\n return {\n get(_key, defaultValue, events = {\n miss: () => Promise.resolve()\n }) {\n const value = defaultValue();\n return value.then((result) => Promise.all([result, events.miss(result)])).then(([result]) => result);\n },\n set(_key, value) {\n return Promise.resolve(value);\n },\n delete(_key) {\n return Promise.resolve();\n },\n clear() {\n return Promise.resolve();\n }\n };\n}\n\n// src/cache/createFallbackableCache.ts\nfunction createFallbackableCache(options) {\n const caches = [...options.caches];\n const current = caches.shift();\n if (current === void 0) {\n return createNullCache();\n }\n return {\n get(key, defaultValue, events = {\n miss: () => Promise.resolve()\n }) {\n return current.get(key, defaultValue, events).catch(() => {\n return createFallbackableCache({ caches }).get(key, defaultValue, events);\n });\n },\n set(key, value) {\n return current.set(key, value).catch(() => {\n return createFallbackableCache({ caches }).set(key, value);\n });\n },\n delete(key) {\n return current.delete(key).catch(() => {\n return createFallbackableCache({ caches }).delete(key);\n });\n },\n clear() {\n return current.clear().catch(() => {\n return createFallbackableCache({ caches }).clear();\n });\n }\n };\n}\n\n// src/cache/createMemoryCache.ts\nfunction createMemoryCache(options = { serializable: true }) {\n let cache = {};\n return {\n get(key, defaultValue, events = {\n miss: () => Promise.resolve()\n }) {\n const keyAsString = JSON.stringify(key);\n if (keyAsString in cache) {\n return Promise.resolve(options.serializable ? JSON.parse(cache[keyAsString]) : cache[keyAsString]);\n }\n const promise = defaultValue();\n return promise.then((value) => events.miss(value)).then(() => promise);\n },\n set(key, value) {\n cache[JSON.stringify(key)] = options.serializable ? JSON.stringify(value) : value;\n return Promise.resolve(value);\n },\n delete(key) {\n delete cache[JSON.stringify(key)];\n return Promise.resolve();\n },\n clear() {\n cache = {};\n return Promise.resolve();\n }\n };\n}\n\n// src/constants.ts\nvar DEFAULT_CONNECT_TIMEOUT_BROWSER = 1e3;\nvar DEFAULT_READ_TIMEOUT_BROWSER = 2e3;\nvar DEFAULT_WRITE_TIMEOUT_BROWSER = 3e4;\nvar DEFAULT_CONNECT_TIMEOUT_NODE = 2e3;\nvar DEFAULT_READ_TIMEOUT_NODE = 5e3;\nvar DEFAULT_WRITE_TIMEOUT_NODE = 3e4;\n\n// src/createAlgoliaAgent.ts\nfunction createAlgoliaAgent(version) {\n const algoliaAgent = {\n value: `Algolia for JavaScript (${version})`,\n add(options) {\n const addedAlgoliaAgent = `; ${options.segment}${options.version !== void 0 ? ` (${options.version})` : \"\"}`;\n if (algoliaAgent.value.indexOf(addedAlgoliaAgent) === -1) {\n algoliaAgent.value = `${algoliaAgent.value}${addedAlgoliaAgent}`;\n }\n return algoliaAgent;\n }\n };\n return algoliaAgent;\n}\n\n// src/createAuth.ts\nfunction createAuth(appId, apiKey, authMode = \"WithinHeaders\") {\n const credentials = {\n \"x-algolia-api-key\": apiKey,\n \"x-algolia-application-id\": appId\n };\n return {\n headers() {\n return authMode === \"WithinHeaders\" ? credentials : {};\n },\n queryParameters() {\n return authMode === \"WithinQueryParameters\" ? credentials : {};\n }\n };\n}\n\n// src/createIterablePromise.ts\nfunction createIterablePromise({\n func,\n validate,\n aggregator,\n error,\n timeout = () => 0\n}) {\n const retry = (previousResponse) => {\n return new Promise((resolve, reject) => {\n func(previousResponse).then(async (response) => {\n if (aggregator) {\n await aggregator(response);\n }\n if (await validate(response)) {\n return resolve(response);\n }\n if (error && await error.validate(response)) {\n return reject(new Error(await error.message(response)));\n }\n return setTimeout(\n () => {\n retry(response).then(resolve).catch(reject);\n },\n await timeout()\n );\n }).catch((err) => {\n reject(err);\n });\n });\n };\n return retry();\n}\n\n// src/getAlgoliaAgent.ts\nfunction getAlgoliaAgent({ algoliaAgents, client, version }) {\n const defaultAlgoliaAgent = createAlgoliaAgent(version).add({\n segment: client,\n version\n });\n algoliaAgents.forEach((algoliaAgent) => defaultAlgoliaAgent.add(algoliaAgent));\n return defaultAlgoliaAgent;\n}\n\n// src/logger/createNullLogger.ts\nfunction createNullLogger() {\n return {\n debug(_message, _args) {\n return Promise.resolve();\n },\n info(_message, _args) {\n return Promise.resolve();\n },\n error(_message, _args) {\n return Promise.resolve();\n }\n };\n}\n\n// src/transporter/createStatefulHost.ts\nvar EXPIRATION_DELAY = 2 * 60 * 1e3;\nfunction createStatefulHost(host, status = \"up\") {\n const lastUpdate = Date.now();\n function isUp() {\n return status === \"up\" || Date.now() - lastUpdate > EXPIRATION_DELAY;\n }\n function isTimedOut() {\n return status === \"timed out\" && Date.now() - lastUpdate <= EXPIRATION_DELAY;\n }\n return { ...host, status, lastUpdate, isUp, isTimedOut };\n}\n\n// src/transporter/errors.ts\nvar AlgoliaError = class extends Error {\n name = \"AlgoliaError\";\n constructor(message, name) {\n super(message);\n if (name) {\n this.name = name;\n }\n }\n};\nvar IndexNotFoundError = class extends AlgoliaError {\n constructor(indexName) {\n super(`${indexName} does not exist`, \"IndexNotFoundError\");\n }\n};\nvar IndicesInSameAppError = class extends AlgoliaError {\n constructor() {\n super(\"Indices are in the same application. Use operationIndex instead.\", \"IndicesInSameAppError\");\n }\n};\nvar IndexAlreadyExistsError = class extends AlgoliaError {\n constructor(indexName) {\n super(`${indexName} index already exists.`, \"IndexAlreadyExistsError\");\n }\n};\nvar ErrorWithStackTrace = class extends AlgoliaError {\n stackTrace;\n constructor(message, stackTrace, name) {\n super(message, name);\n this.stackTrace = stackTrace;\n }\n};\nvar RetryError = class extends ErrorWithStackTrace {\n constructor(stackTrace) {\n super(\n \"Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support\",\n stackTrace,\n \"RetryError\"\n );\n }\n};\nvar ApiError = class extends ErrorWithStackTrace {\n status;\n constructor(message, status, stackTrace, name = \"ApiError\") {\n super(message, stackTrace, name);\n this.status = status;\n }\n};\nvar DeserializationError = class extends AlgoliaError {\n response;\n constructor(message, response) {\n super(message, \"DeserializationError\");\n this.response = response;\n }\n};\nvar DetailedApiError = class extends ApiError {\n error;\n constructor(message, status, error, stackTrace) {\n super(message, status, stackTrace, \"DetailedApiError\");\n this.error = error;\n }\n};\n\n// src/transporter/helpers.ts\nfunction shuffle(array) {\n const shuffledArray = array;\n for (let c = array.length - 1; c > 0; c--) {\n const b = Math.floor(Math.random() * (c + 1));\n const a = array[c];\n shuffledArray[c] = array[b];\n shuffledArray[b] = a;\n }\n return shuffledArray;\n}\nfunction serializeUrl(host, path, queryParameters) {\n const queryParametersAsString = serializeQueryParameters(queryParameters);\n let url = `${host.protocol}://${host.url}${host.port ? `:${host.port}` : \"\"}/${path.charAt(0) === \"/\" ? path.substring(1) : path}`;\n if (queryParametersAsString.length) {\n url += `?${queryParametersAsString}`;\n }\n return url;\n}\nfunction serializeQueryParameters(parameters) {\n return Object.keys(parameters).filter((key) => parameters[key] !== void 0).sort().map(\n (key) => `${key}=${encodeURIComponent(\n Object.prototype.toString.call(parameters[key]) === \"[object Array]\" ? parameters[key].join(\",\") : parameters[key]\n ).replace(/\\+/g, \"%20\")}`\n ).join(\"&\");\n}\nfunction serializeData(request, requestOptions) {\n if (request.method === \"GET\" || request.data === void 0 && requestOptions.data === void 0) {\n return void 0;\n }\n const data = Array.isArray(request.data) ? request.data : { ...request.data, ...requestOptions.data };\n return JSON.stringify(data);\n}\nfunction serializeHeaders(baseHeaders, requestHeaders, requestOptionsHeaders) {\n const headers = {\n Accept: \"application/json\",\n ...baseHeaders,\n ...requestHeaders,\n ...requestOptionsHeaders\n };\n const serializedHeaders = {};\n Object.keys(headers).forEach((header) => {\n const value = headers[header];\n serializedHeaders[header.toLowerCase()] = value;\n });\n return serializedHeaders;\n}\nfunction deserializeSuccess(response) {\n try {\n return JSON.parse(response.content);\n } catch (e) {\n throw new DeserializationError(e.message, response);\n }\n}\nfunction deserializeFailure({ content, status }, stackFrame) {\n try {\n const parsed = JSON.parse(content);\n if (\"error\" in parsed) {\n return new DetailedApiError(parsed.message, status, parsed.error, stackFrame);\n }\n return new ApiError(parsed.message, status, stackFrame);\n } catch {\n }\n return new ApiError(content, status, stackFrame);\n}\n\n// src/transporter/responses.ts\nfunction isNetworkError({ isTimedOut, status }) {\n return !isTimedOut && ~~status === 0;\n}\nfunction isRetryable({ isTimedOut, status }) {\n return isTimedOut || isNetworkError({ isTimedOut, status }) || ~~(status / 100) !== 2 && ~~(status / 100) !== 4;\n}\nfunction isSuccess({ status }) {\n return ~~(status / 100) === 2;\n}\n\n// src/transporter/stackTrace.ts\nfunction stackTraceWithoutCredentials(stackTrace) {\n return stackTrace.map((stackFrame) => stackFrameWithoutCredentials(stackFrame));\n}\nfunction stackFrameWithoutCredentials(stackFrame) {\n const modifiedHeaders = stackFrame.request.headers[\"x-algolia-api-key\"] ? { \"x-algolia-api-key\": \"*****\" } : {};\n return {\n ...stackFrame,\n request: {\n ...stackFrame.request,\n headers: {\n ...stackFrame.request.headers,\n ...modifiedHeaders\n }\n }\n };\n}\n\n// src/transporter/createTransporter.ts\nfunction createTransporter({\n hosts,\n hostsCache,\n baseHeaders,\n logger,\n baseQueryParameters,\n algoliaAgent,\n timeouts,\n requester,\n requestsCache,\n responsesCache\n}) {\n async function createRetryableOptions(compatibleHosts) {\n const statefulHosts = await Promise.all(\n compatibleHosts.map((compatibleHost) => {\n return hostsCache.get(compatibleHost, () => {\n return Promise.resolve(createStatefulHost(compatibleHost));\n });\n })\n );\n const hostsUp = statefulHosts.filter((host) => host.isUp());\n const hostsTimedOut = statefulHosts.filter((host) => host.isTimedOut());\n const hostsAvailable = [...hostsUp, ...hostsTimedOut];\n const compatibleHostsAvailable = hostsAvailable.length > 0 ? hostsAvailable : compatibleHosts;\n return {\n hosts: compatibleHostsAvailable,\n getTimeout(timeoutsCount, baseTimeout) {\n const timeoutMultiplier = hostsTimedOut.length === 0 && timeoutsCount === 0 ? 1 : hostsTimedOut.length + 3 + timeoutsCount;\n return timeoutMultiplier * baseTimeout;\n }\n };\n }\n async function retryableRequest(request, requestOptions, isRead = true) {\n const stackTrace = [];\n const data = serializeData(request, requestOptions);\n const headers = serializeHeaders(baseHeaders, request.headers, requestOptions.headers);\n const dataQueryParameters = request.method === \"GET\" ? {\n ...request.data,\n ...requestOptions.data\n } : {};\n const queryParameters = {\n ...baseQueryParameters,\n ...request.queryParameters,\n ...dataQueryParameters\n };\n if (algoliaAgent.value) {\n queryParameters[\"x-algolia-agent\"] = algoliaAgent.value;\n }\n if (requestOptions && requestOptions.queryParameters) {\n for (const key of Object.keys(requestOptions.queryParameters)) {\n if (!requestOptions.queryParameters[key] || Object.prototype.toString.call(requestOptions.queryParameters[key]) === \"[object Object]\") {\n queryParameters[key] = requestOptions.queryParameters[key];\n } else {\n queryParameters[key] = requestOptions.queryParameters[key].toString();\n }\n }\n }\n let timeoutsCount = 0;\n const retry = async (retryableHosts, getTimeout) => {\n const host = retryableHosts.pop();\n if (host === void 0) {\n throw new RetryError(stackTraceWithoutCredentials(stackTrace));\n }\n const timeout = { ...timeouts, ...requestOptions.timeouts };\n const payload = {\n data,\n headers,\n method: request.method,\n url: serializeUrl(host, request.path, queryParameters),\n connectTimeout: getTimeout(timeoutsCount, timeout.connect),\n responseTimeout: getTimeout(timeoutsCount, isRead ? timeout.read : timeout.write)\n };\n const pushToStackTrace = (response2) => {\n const stackFrame = {\n request: payload,\n response: response2,\n host,\n triesLeft: retryableHosts.length\n };\n stackTrace.push(stackFrame);\n return stackFrame;\n };\n const response = await requester.send(payload);\n if (isRetryable(response)) {\n const stackFrame = pushToStackTrace(response);\n if (response.isTimedOut) {\n timeoutsCount++;\n }\n logger.info(\"Retryable failure\", stackFrameWithoutCredentials(stackFrame));\n await hostsCache.set(host, createStatefulHost(host, response.isTimedOut ? \"timed out\" : \"down\"));\n return retry(retryableHosts, getTimeout);\n }\n if (isSuccess(response)) {\n return deserializeSuccess(response);\n }\n pushToStackTrace(response);\n throw deserializeFailure(response, stackTrace);\n };\n const compatibleHosts = hosts.filter(\n (host) => host.accept === \"readWrite\" || (isRead ? host.accept === \"read\" : host.accept === \"write\")\n );\n const options = await createRetryableOptions(compatibleHosts);\n return retry([...options.hosts].reverse(), options.getTimeout);\n }\n function createRequest(request, requestOptions = {}) {\n const isRead = request.useReadTransporter || request.method === \"GET\";\n if (!isRead) {\n return retryableRequest(request, requestOptions, isRead);\n }\n const createRetryableRequest = () => {\n return retryableRequest(request, requestOptions);\n };\n const cacheable = requestOptions.cacheable || request.cacheable;\n if (cacheable !== true) {\n return createRetryableRequest();\n }\n const key = {\n request,\n requestOptions,\n transporter: {\n queryParameters: baseQueryParameters,\n headers: baseHeaders\n }\n };\n return responsesCache.get(\n key,\n () => {\n return requestsCache.get(\n key,\n () => (\n /**\n * Finally, if there is no request in progress with the same key,\n * this `createRetryableRequest()` will actually trigger the\n * retryable request.\n */\n requestsCache.set(key, createRetryableRequest()).then(\n (response) => Promise.all([requestsCache.delete(key), response]),\n (err) => Promise.all([requestsCache.delete(key), Promise.reject(err)])\n ).then(([_, response]) => response)\n )\n );\n },\n {\n /**\n * Of course, once we get this response back from the server, we\n * tell response cache to actually store the received response\n * to be used later.\n */\n miss: (response) => responsesCache.set(key, response)\n }\n );\n }\n return {\n hostsCache,\n requester,\n timeouts,\n logger,\n algoliaAgent,\n baseHeaders,\n baseQueryParameters,\n hosts,\n request: createRequest,\n requestsCache,\n responsesCache\n };\n}\n\n// src/types/logger.ts\nvar LogLevelEnum = {\n Debug: 1,\n Info: 2,\n Error: 3\n};\nexport {\n AlgoliaError,\n ApiError,\n DEFAULT_CONNECT_TIMEOUT_BROWSER,\n DEFAULT_CONNECT_TIMEOUT_NODE,\n DEFAULT_READ_TIMEOUT_BROWSER,\n DEFAULT_READ_TIMEOUT_NODE,\n DEFAULT_WRITE_TIMEOUT_BROWSER,\n DEFAULT_WRITE_TIMEOUT_NODE,\n DeserializationError,\n DetailedApiError,\n ErrorWithStackTrace,\n IndexAlreadyExistsError,\n IndexNotFoundError,\n IndicesInSameAppError,\n LogLevelEnum,\n RetryError,\n createAlgoliaAgent,\n createAuth,\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createIterablePromise,\n createMemoryCache,\n createNullCache,\n createNullLogger,\n createStatefulHost,\n createTransporter,\n deserializeFailure,\n deserializeSuccess,\n getAlgoliaAgent,\n isNetworkError,\n isRetryable,\n isSuccess,\n serializeData,\n serializeHeaders,\n serializeQueryParameters,\n serializeUrl,\n shuffle,\n stackFrameWithoutCredentials,\n stackTraceWithoutCredentials\n};\n//# sourceMappingURL=common.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/abtestingV3Client.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"1.7.0\";\nvar REGIONS = [\"de\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = !region ? \"analytics.algolia.com\" : \"analytics.{region}.algolia.com\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createAbtestingV3Client({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"AbtestingV3\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Creates a new A/B test.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param addABTestsRequest - The addABTestsRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n addABTests(addABTestsRequest, requestOptions) {\n if (!addABTestsRequest) {\n throw new Error(\"Parameter `addABTestsRequest` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.name) {\n throw new Error(\"Parameter `addABTestsRequest.name` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.variants) {\n throw new Error(\"Parameter `addABTestsRequest.variants` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.metrics) {\n throw new Error(\"Parameter `addABTestsRequest.metrics` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.endAt) {\n throw new Error(\"Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.\");\n }\n const requestPath = \"/3/abtests\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: addABTestsRequest\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes an A/B test by its ID.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteABTest - The deleteABTest object.\n * @param deleteABTest.id - Unique A/B test identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteABTest({ id }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `deleteABTest`.\");\n }\n const requestPath = \"/3/abtests/{id}\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic.\n *\n * Required API Key ACLs:\n * - analytics\n * @param estimateABTestRequest - The estimateABTestRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n estimateABTest(estimateABTestRequest, requestOptions) {\n if (!estimateABTestRequest) {\n throw new Error(\"Parameter `estimateABTestRequest` is required when calling `estimateABTest`.\");\n }\n if (!estimateABTestRequest.configuration) {\n throw new Error(\"Parameter `estimateABTestRequest.configuration` is required when calling `estimateABTest`.\");\n }\n if (!estimateABTestRequest.variants) {\n throw new Error(\"Parameter `estimateABTestRequest.variants` is required when calling `estimateABTest`.\");\n }\n const requestPath = \"/3/abtests/estimate\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: estimateABTestRequest\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the details for an A/B test by its ID.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getABTest - The getABTest object.\n * @param getABTest.id - Unique A/B test identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getABTest({ id }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `getABTest`.\");\n }\n const requestPath = \"/3/abtests/{id}\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves timeseries for an A/B test by its ID.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTimeseries - The getTimeseries object.\n * @param getTimeseries.id - Unique A/B test identifier.\n * @param getTimeseries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTimeseries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTimeseries.metric - List of metrics to retrieve. If not specified, all metrics are returned.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTimeseries({ id, startDate, endDate, metric }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `getTimeseries`.\");\n }\n const requestPath = \"/3/abtests/{id}/timeseries\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (metric !== void 0) {\n queryParameters[\"metric\"] = metric.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists all A/B tests you configured for this application.\n *\n * Required API Key ACLs:\n * - analytics\n * @param listABTests - The listABTests object.\n * @param listABTests.offset - Position of the first item to return.\n * @param listABTests.limit - Number of items to return.\n * @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.\n * @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.\n * @param listABTests.direction - Sort order for A/B tests by start date. Use \\'asc\\' for ascending or \\'desc\\' for descending. Active A/B tests are always listed first.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listABTests({ offset, limit, indexPrefix, indexSuffix, direction } = {}, requestOptions = void 0) {\n const requestPath = \"/3/abtests\";\n const headers = {};\n const queryParameters = {};\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (indexPrefix !== void 0) {\n queryParameters[\"indexPrefix\"] = indexPrefix.toString();\n }\n if (indexSuffix !== void 0) {\n queryParameters[\"indexSuffix\"] = indexSuffix.toString();\n }\n if (direction !== void 0) {\n queryParameters[\"direction\"] = direction.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Schedule an A/B test to be started at a later time.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param scheduleABTestsRequest - The scheduleABTestsRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n scheduleABTest(scheduleABTestsRequest, requestOptions) {\n if (!scheduleABTestsRequest) {\n throw new Error(\"Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.name) {\n throw new Error(\"Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.variants) {\n throw new Error(\"Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.metrics) {\n throw new Error(\"Parameter `scheduleABTestsRequest.metrics` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.scheduledAt) {\n throw new Error(\"Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.endAt) {\n throw new Error(\"Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.\");\n }\n const requestPath = \"/3/abtests/schedule\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: scheduleABTestsRequest\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Stops an A/B test by its ID. You can\\'t restart stopped A/B tests.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param stopABTest - The stopABTest object.\n * @param stopABTest.id - Unique A/B test identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n stopABTest({ id }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `stopABTest`.\");\n }\n const requestPath = \"/3/abtests/{id}/stop\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction abtestingV3Client(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createAbtestingV3Client({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n abtestingV3Client,\n apiClientVersion\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/abtestingClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nvar REGIONS = [\"de\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = !region ? \"analytics.algolia.com\" : \"analytics.{region}.algolia.com\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createAbtestingClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Abtesting\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Creates a new A/B test.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param addABTestsRequest - The addABTestsRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n addABTests(addABTestsRequest, requestOptions) {\n if (!addABTestsRequest) {\n throw new Error(\"Parameter `addABTestsRequest` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.name) {\n throw new Error(\"Parameter `addABTestsRequest.name` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.variants) {\n throw new Error(\"Parameter `addABTestsRequest.variants` is required when calling `addABTests`.\");\n }\n if (!addABTestsRequest.endAt) {\n throw new Error(\"Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.\");\n }\n const requestPath = \"/2/abtests\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: addABTestsRequest\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes an A/B test by its ID.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteABTest - The deleteABTest object.\n * @param deleteABTest.id - Unique A/B test identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteABTest({ id }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `deleteABTest`.\");\n }\n const requestPath = \"/2/abtests/{id}\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic.\n *\n * Required API Key ACLs:\n * - analytics\n * @param estimateABTestRequest - The estimateABTestRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n estimateABTest(estimateABTestRequest, requestOptions) {\n if (!estimateABTestRequest) {\n throw new Error(\"Parameter `estimateABTestRequest` is required when calling `estimateABTest`.\");\n }\n if (!estimateABTestRequest.configuration) {\n throw new Error(\"Parameter `estimateABTestRequest.configuration` is required when calling `estimateABTest`.\");\n }\n if (!estimateABTestRequest.variants) {\n throw new Error(\"Parameter `estimateABTestRequest.variants` is required when calling `estimateABTest`.\");\n }\n const requestPath = \"/2/abtests/estimate\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: estimateABTestRequest\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the details for an A/B test by its ID.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getABTest - The getABTest object.\n * @param getABTest.id - Unique A/B test identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getABTest({ id }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `getABTest`.\");\n }\n const requestPath = \"/2/abtests/{id}\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists all A/B tests you configured for this application.\n *\n * Required API Key ACLs:\n * - analytics\n * @param listABTests - The listABTests object.\n * @param listABTests.offset - Position of the first item to return.\n * @param listABTests.limit - Number of items to return.\n * @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.\n * @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listABTests({ offset, limit, indexPrefix, indexSuffix } = {}, requestOptions = void 0) {\n const requestPath = \"/2/abtests\";\n const headers = {};\n const queryParameters = {};\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (indexPrefix !== void 0) {\n queryParameters[\"indexPrefix\"] = indexPrefix.toString();\n }\n if (indexSuffix !== void 0) {\n queryParameters[\"indexSuffix\"] = indexSuffix.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Schedule an A/B test to be started at a later time.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param scheduleABTestsRequest - The scheduleABTestsRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n scheduleABTest(scheduleABTestsRequest, requestOptions) {\n if (!scheduleABTestsRequest) {\n throw new Error(\"Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.name) {\n throw new Error(\"Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.variants) {\n throw new Error(\"Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.scheduledAt) {\n throw new Error(\"Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.\");\n }\n if (!scheduleABTestsRequest.endAt) {\n throw new Error(\"Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.\");\n }\n const requestPath = \"/2/abtests/schedule\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: scheduleABTestsRequest\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Stops an A/B test by its ID. You can\\'t restart stopped A/B tests.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param stopABTest - The stopABTest object.\n * @param stopABTest.id - Unique A/B test identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n stopABTest({ id }, requestOptions) {\n if (!id) {\n throw new Error(\"Parameter `id` is required when calling `stopABTest`.\");\n }\n const requestPath = \"/2/abtests/{id}/stop\".replace(\"{id}\", encodeURIComponent(id));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction abtestingClient(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createAbtestingClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n abtestingClient,\n apiClientVersion\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/analyticsClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nvar REGIONS = [\"de\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = !region ? \"analytics.algolia.com\" : \"analytics.{region}.algolia.com\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createAnalyticsClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Analytics\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the add-to-cart rate for all your searches with at least one add-to-cart event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. The rate is the number of add-to-cart conversion events divided by the number of tracked searches. A search is tracked if it returns a queryID (`clickAnalytics` is `true`). This differs from the response\\'s `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`. **There\\'s a difference between a 0 and null add-to-cart rate when `clickAnalytics` is enabled:** - **Null** means there were no queries: since Algolia didn\\'t receive any events, the add-to-cart rate is null. - **0** mean there _were_ queries but no [add-to-cart events](https://www.algolia.com/doc/guides/sending-events/getting-started) were received.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getAddToCartRate - The getAddToCartRate object.\n * @param getAddToCartRate.index - Index name.\n * @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getAddToCartRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getAddToCartRate`.\");\n }\n const requestPath = \"/2/conversions/addToCartRate\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the average click position of your search results, including a daily breakdown. The average click position is the average of all clicked search result positions. For example, if users only ever click on the first result for any search, the average click position is 1. By default, the analyzed period includes the last eight days including the current day. An average of `null` when `clickAnalytics` is enabled means Algolia didn\\'t receive any [click events](https://www.algolia.com/doc/guides/sending-events/getting-started) for the queries. The average is `null` until Algolia receives at least one click event.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getAverageClickPosition - The getAverageClickPosition object.\n * @param getAverageClickPosition.index - Index name.\n * @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getAverageClickPosition.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getAverageClickPosition`.\");\n }\n const requestPath = \"/2/clicks/averageClickPosition\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the positions in the search results and their associated number of clicks. This lets you check how many clicks the first, second, or tenth search results receive. An average of `0` when `clickAnalytics` is enabled means Algolia didn\\'t receive any [click events](https://www.algolia.com/doc/guides/sending-events/getting-started) for the queries.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getClickPositions - The getClickPositions object.\n * @param getClickPositions.index - Index name.\n * @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getClickPositions.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClickPositions({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getClickPositions`.\");\n }\n const requestPath = \"/2/clicks/positions\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the click-through rate (CTR) for all your searches with at least one click event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. **There\\'s a difference between a 0 and null CTR when `clickAnalytics` is enabled:** - **Null** means there were no queries: since Algolia didn\\'t receive any events, CTR is null. - **0** mean there _were_ queries but no [click events](https://www.algolia.com/doc/guides/sending-events/getting-started) were received.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getClickThroughRate - The getClickThroughRate object.\n * @param getClickThroughRate.index - Index name.\n * @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getClickThroughRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getClickThroughRate`.\");\n }\n const requestPath = \"/2/clicks/clickThroughRate\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the conversion rate (CR) for all your searches with at least one conversion event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. **There\\'s a difference between a 0 and null CR when `clickAnalytics` is enabled:** - **Null** means there were no queries: since Algolia didn\\'t receive any events, CR is null. - **0** mean there _were_ queries but no [conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started) were received.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getConversionRate - The getConversionRate object.\n * @param getConversionRate.index - Index name.\n * @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getConversionRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConversionRate({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getConversionRate`.\");\n }\n const requestPath = \"/2/conversions/conversionRate\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the fraction of searches that didn\\'t lead to any click within a time range, including a daily breakdown. It also returns the number of tracked searches and tracked searches without clicks. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getNoClickRate - The getNoClickRate object.\n * @param getNoClickRate.index - Index name.\n * @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getNoClickRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getNoClickRate`.\");\n }\n const requestPath = \"/2/searches/noClickRate\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the fraction of searches that didn\\'t return any results within a time range, including a daily breakdown. It also returns the count of searches and searches without results used to compute the rates. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getNoResultsRate - The getNoResultsRate object.\n * @param getNoResultsRate.index - Index name.\n * @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getNoResultsRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getNoResultsRate`.\");\n }\n const requestPath = \"/2/searches/noResultRate\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the purchase rate for all your searches with at least one purchase event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. The rate is the number of purchase conversion events divided by the number of tracked searches. A search is tracked if it returns a query ID (`clickAnalytics` is `true`). This differs from the response\\'s `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`. **There\\'s a difference between a 0 and null purchase rate when `clickAnalytics` is enabled:** - **Null** means there were no queries: since Algolia didn\\'t receive any events, the purchase rate is null. - **0** mean there _were_ queries but no [purchase conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started) were received.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getPurchaseRate - The getPurchaseRate object.\n * @param getPurchaseRate.index - Index name.\n * @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getPurchaseRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getPurchaseRate`.\");\n }\n const requestPath = \"/2/conversions/purchaseRate\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves revenue-related metrics, such as the total revenue or the average order value. To retrieve revenue-related metrics, send purchase events. By default, the analyzed period includes the last eight days including the current day. Revenue is based on purchase conversion events (a conversion event with an `eventSubtype` attribute of `purchase`). The revenue is the `price` attribute multiplied by the `quantity` attribute for each object in the event\\'s `objectData` array.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getRevenue - The getRevenue object.\n * @param getRevenue.index - Index name.\n * @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getRevenue.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRevenue({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getRevenue`.\");\n }\n const requestPath = \"/2/conversions/revenue\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the number of searches within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getSearchesCount - The getSearchesCount object.\n * @param getSearchesCount.index - Index name.\n * @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getSearchesCount`.\");\n }\n const requestPath = \"/2/searches/count\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the most popular searches that didn\\'t lead to any clicks, from the 1,000 most frequent searches. For each search, it also returns the number of displayed search results that remained unclicked.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getSearchesNoClicks - The getSearchesNoClicks object.\n * @param getSearchesNoClicks.index - Index name.\n * @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesNoClicks.limit - Number of items to return.\n * @param getSearchesNoClicks.offset - Position of the first item to return.\n * @param getSearchesNoClicks.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getSearchesNoClicks`.\");\n }\n const requestPath = \"/2/searches/noClicks\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the 1,000 most frequent searches that produced zero results.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getSearchesNoResults - The getSearchesNoResults object.\n * @param getSearchesNoResults.index - Index name.\n * @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesNoResults.limit - Number of items to return.\n * @param getSearchesNoResults.offset - Position of the first item to return.\n * @param getSearchesNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSearchesNoResults({ index, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getSearchesNoResults`.\");\n }\n const requestPath = \"/2/searches/noResults\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the time when the Analytics data for the specified index was last updated. If the index has been recently created or no search has been performed yet the updated time is `null`. The Analytics data is updated every 5 minutes.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getStatus - The getStatus object.\n * @param getStatus.index - Index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getStatus({ index }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getStatus`.\");\n }\n const requestPath = \"/2/status\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the countries with the most searches in your index.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTopCountries - The getTopCountries object.\n * @param getTopCountries.index - Index name.\n * @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopCountries.limit - Number of items to return.\n * @param getTopCountries.offset - Position of the first item to return.\n * @param getTopCountries.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getTopCountries`.\");\n }\n const requestPath = \"/2/countries\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the 1,000 most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTopFilterAttributes - The getTopFilterAttributes object.\n * @param getTopFilterAttributes.index - Index name.\n * @param getTopFilterAttributes.search - Search query.\n * @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFilterAttributes.limit - Number of items to return.\n * @param getTopFilterAttributes.offset - Position of the first item to return.\n * @param getTopFilterAttributes.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getTopFilterAttributes`.\");\n }\n const requestPath = \"/2/filters\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (search !== void 0) {\n queryParameters[\"search\"] = search.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the 1,000 most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTopFilterForAttribute - The getTopFilterForAttribute object.\n * @param getTopFilterForAttribute.attribute - Attribute name.\n * @param getTopFilterForAttribute.index - Index name.\n * @param getTopFilterForAttribute.search - Search query.\n * @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFilterForAttribute.limit - Number of items to return.\n * @param getTopFilterForAttribute.offset - Position of the first item to return.\n * @param getTopFilterForAttribute.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!attribute) {\n throw new Error(\"Parameter `attribute` is required when calling `getTopFilterForAttribute`.\");\n }\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getTopFilterForAttribute`.\");\n }\n const requestPath = \"/2/filters/{attribute}\".replace(\"{attribute}\", encodeURIComponent(attribute));\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (search !== void 0) {\n queryParameters[\"search\"] = search.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the 1,000 most frequently used filters for a search that didn\\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](https://www.algolia.com/doc/rest-api/analytics/get-searches-no-results) operation.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTopFiltersNoResults - The getTopFiltersNoResults object.\n * @param getTopFiltersNoResults.index - Index name.\n * @param getTopFiltersNoResults.search - Search query.\n * @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFiltersNoResults.limit - Number of items to return.\n * @param getTopFiltersNoResults.offset - Position of the first item to return.\n * @param getTopFiltersNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getTopFiltersNoResults`.\");\n }\n const requestPath = \"/2/filters/noResults\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (search !== void 0) {\n queryParameters[\"search\"] = search.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the object IDs of the 1,000 most frequent search results. If you set the `clickAnalytics` query parameter to true, the response also includes: - Tracked searches count. Tracked searches are Search API requests with the `clickAnalytics` parameter set to `true`. This differs from the response\\'s `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`. - Click count - Click-through rate (CTR) - Conversion count - Conversion rate (CR) - Average click position If you set the `revenueAnalytics` parameter to `true`, the response also includes: - Add-to-cart count - Add-to-cart rate (ATCR) - Purchase count - Purchase rate - Revenue details for each currency **There\\'s a difference between 0% rates and null rates:** - **Null** means there were no queries: since Algolia didn\\'t receive any events, the rates (CTR, CR, ATCR, purchase rate) are null. - **0% rates** mean there _were_ queries but no [click or conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started) were received.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTopHits - The getTopHits object.\n * @param getTopHits.index - Index name.\n * @param getTopHits.search - Search query.\n * @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.\n * @param getTopHits.revenueAnalytics - Whether to include metrics related to revenue events in the response.\n * @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopHits.limit - Number of items to return.\n * @param getTopHits.offset - Position of the first item to return.\n * @param getTopHits.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getTopHits`.\");\n }\n const requestPath = \"/2/hits\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (search !== void 0) {\n queryParameters[\"search\"] = search.toString();\n }\n if (clickAnalytics !== void 0) {\n queryParameters[\"clickAnalytics\"] = clickAnalytics.toString();\n }\n if (revenueAnalytics !== void 0) {\n queryParameters[\"revenueAnalytics\"] = revenueAnalytics.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Returns the most popular searches. For each search, it also includes the average number of hits. If you set the `clickAnalytics` query parameter to `true`, the response also includes - Tracked searches count. Tracked searches are Search API requests with the `clickAnalytics` parameter set to `true`. This differs from the response\\'s `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`. - Click count - Click-through rate (CTR) - Conversion count - Conversion rate (CR) - Average click position If you set the `revenueAnalytics` query parameter to `true`, the response also includes: - Add-to-cart count - Add-to-cart rate (ATCR) - Purchase count - Purchase rate - Revenue details for each currency **There\\'s a difference between 0% rates and null rates:** - **Null** means there were no queries: since Algolia didn\\'t receive any events, the rates (CTR, CR, ATCR, purchase rate) are null. - **0% rates** mean there _were_ queries but no [click or conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started) were received.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getTopSearches - The getTopSearches object.\n * @param getTopSearches.index - Index name.\n * @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.\n * @param getTopSearches.revenueAnalytics - Whether to include metrics related to revenue events in the response.\n * @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.\n * @param getTopSearches.direction - Sorting direction of the results: ascending or descending.\n * @param getTopSearches.limit - Number of items to return.\n * @param getTopSearches.offset - Position of the first item to return.\n * @param getTopSearches.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopSearches({\n index,\n clickAnalytics,\n revenueAnalytics,\n startDate,\n endDate,\n orderBy,\n direction,\n limit,\n offset,\n tags\n }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getTopSearches`.\");\n }\n const requestPath = \"/2/searches\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (clickAnalytics !== void 0) {\n queryParameters[\"clickAnalytics\"] = clickAnalytics.toString();\n }\n if (revenueAnalytics !== void 0) {\n queryParameters[\"revenueAnalytics\"] = revenueAnalytics.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (orderBy !== void 0) {\n queryParameters[\"orderBy\"] = orderBy.toString();\n }\n if (direction !== void 0) {\n queryParameters[\"direction\"] = direction.toString();\n }\n if (limit !== void 0) {\n queryParameters[\"limit\"] = limit.toString();\n }\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the number of unique users within a time range, including a daily breakdown. Since it returns the number of unique users, the sum of the daily values might be different from the total number. By default: - Algolia distinguishes search users by their IP address, _unless_ you include a pseudonymous user identifier in your search requests with the `userToken` API parameter or `x-algolia-usertoken` request header. - The analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics\n * @param getUsersCount - The getUsersCount object.\n * @param getUsersCount.index - Index name.\n * @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getUsersCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getUsersCount({ index, startDate, endDate, tags }, requestOptions) {\n if (!index) {\n throw new Error(\"Parameter `index` is required when calling `getUsersCount`.\");\n }\n const requestPath = \"/2/users/count\";\n const headers = {};\n const queryParameters = {};\n if (index !== void 0) {\n queryParameters[\"index\"] = index.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n if (tags !== void 0) {\n queryParameters[\"tags\"] = tags.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction analyticsClient(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createAnalyticsClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n analyticsClient,\n apiClientVersion\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/insightsClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nvar REGIONS = [\"de\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = !region ? \"insights.algolia.io\" : \"insights.{region}.algolia.io\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createInsightsClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Insights\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see `Delete a user profile` in the Personalization API.\n *\n * Required API Key ACLs:\n * - deleteObject\n * @param deleteUserToken - The deleteUserToken object.\n * @param deleteUserToken.userToken - User token for which to delete all associated events.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteUserToken({ userToken }, requestOptions) {\n if (!userToken) {\n throw new Error(\"Parameter `userToken` is required when calling `deleteUserToken`.\");\n }\n const requestPath = \"/1/usertokens/{userToken}\".replace(\"{userToken}\", encodeURIComponent(userToken));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Sends a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2 MB.\n *\n * Required API Key ACLs:\n * - search\n * @param insightsEvents - The insightsEvents object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n pushEvents(insightsEvents, requestOptions) {\n if (!insightsEvents) {\n throw new Error(\"Parameter `insightsEvents` is required when calling `pushEvents`.\");\n }\n if (!insightsEvents.events) {\n throw new Error(\"Parameter `insightsEvents.events` is required when calling `pushEvents`.\");\n }\n const requestPath = \"/1/events\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: insightsEvents\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction insightsClient(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createInsightsClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n insightsClient\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/personalizationClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nvar REGIONS = [\"eu\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = \"personalization.{region}.algolia.com\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createPersonalizationClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Personalization\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a user profile. The response includes a date and time when the user profile can safely be considered deleted.\n *\n * Required API Key ACLs:\n * - recommendation\n * @param deleteUserProfile - The deleteUserProfile object.\n * @param deleteUserProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteUserProfile({ userToken }, requestOptions) {\n if (!userToken) {\n throw new Error(\"Parameter `userToken` is required when calling `deleteUserProfile`.\");\n }\n const requestPath = \"/1/profiles/{userToken}\".replace(\"{userToken}\", encodeURIComponent(userToken));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the current personalization strategy.\n *\n * Required API Key ACLs:\n * - recommendation\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getPersonalizationStrategy(requestOptions) {\n const requestPath = \"/1/strategies/personalization\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a user profile and their affinities for different facets.\n *\n * Required API Key ACLs:\n * - recommendation\n * @param getUserTokenProfile - The getUserTokenProfile object.\n * @param getUserTokenProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getUserTokenProfile({ userToken }, requestOptions) {\n if (!userToken) {\n throw new Error(\"Parameter `userToken` is required when calling `getUserTokenProfile`.\");\n }\n const requestPath = \"/1/profiles/personalization/{userToken}\".replace(\n \"{userToken}\",\n encodeURIComponent(userToken)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new personalization strategy.\n *\n * Required API Key ACLs:\n * - recommendation\n * @param personalizationStrategyParams - The personalizationStrategyParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n setPersonalizationStrategy(personalizationStrategyParams, requestOptions) {\n if (!personalizationStrategyParams) {\n throw new Error(\n \"Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.\"\n );\n }\n if (!personalizationStrategyParams.eventsScoring) {\n throw new Error(\n \"Parameter `personalizationStrategyParams.eventsScoring` is required when calling `setPersonalizationStrategy`.\"\n );\n }\n if (!personalizationStrategyParams.facetsScoring) {\n throw new Error(\n \"Parameter `personalizationStrategyParams.facetsScoring` is required when calling `setPersonalizationStrategy`.\"\n );\n }\n if (!personalizationStrategyParams.personalizationImpact) {\n throw new Error(\n \"Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.\"\n );\n }\n const requestPath = \"/1/strategies/personalization\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: personalizationStrategyParams\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction personalizationClient(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (!region || region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` is required and must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createPersonalizationClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n personalizationClient\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/querySuggestionsClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nvar REGIONS = [\"eu\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = \"query-suggestions.{region}.algolia.com\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createQuerySuggestionsClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"QuerySuggestions\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param configurationWithIndex - The configurationWithIndex object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createConfig(configurationWithIndex, requestOptions) {\n if (!configurationWithIndex) {\n throw new Error(\"Parameter `configurationWithIndex` is required when calling `createConfig`.\");\n }\n const requestPath = \"/1/configs\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: configurationWithIndex\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. To delete the Query Suggestions index itself, use the Search API and the `Delete an index` operation.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteConfig - The deleteConfig object.\n * @param deleteConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteConfig({ indexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteConfig`.\");\n }\n const requestPath = \"/1/configs/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves all Query Suggestions configurations of your Algolia application.\n *\n * Required API Key ACLs:\n * - settings\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAllConfigs(requestOptions) {\n const requestPath = \"/1/configs\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a single Query Suggestions configuration by its index name.\n *\n * Required API Key ACLs:\n * - settings\n * @param getConfig - The getConfig object.\n * @param getConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConfig({ indexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getConfig`.\");\n }\n const requestPath = \"/1/configs/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Reports the status of a Query Suggestions index.\n *\n * Required API Key ACLs:\n * - settings\n * @param getConfigStatus - The getConfigStatus object.\n * @param getConfigStatus.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConfigStatus({ indexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getConfigStatus`.\");\n }\n const requestPath = \"/1/configs/{indexName}/status\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the logs for a single Query Suggestions index.\n *\n * Required API Key ACLs:\n * - settings\n * @param getLogFile - The getLogFile object.\n * @param getLogFile.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLogFile({ indexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getLogFile`.\");\n }\n const requestPath = \"/1/logs/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates a QuerySuggestions configuration.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param updateConfig - The updateConfig object.\n * @param updateConfig.indexName - Query Suggestions index name.\n * @param updateConfig.configuration - The configuration object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateConfig({ indexName, configuration }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `updateConfig`.\");\n }\n if (!configuration) {\n throw new Error(\"Parameter `configuration` is required when calling `updateConfig`.\");\n }\n if (!configuration.sourceIndices) {\n throw new Error(\"Parameter `configuration.sourceIndices` is required when calling `updateConfig`.\");\n }\n const requestPath = \"/1/configs/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: configuration\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction querySuggestionsClient(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (!region || region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` is required and must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createQuerySuggestionsClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n querySuggestionsClient\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/searchClient.ts\nimport {\n ApiError,\n createAuth,\n createIterablePromise,\n createTransporter,\n getAlgoliaAgent,\n shuffle\n} from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nfunction getDefaultHosts(appId) {\n return [\n {\n url: `${appId}-dsn.algolia.net`,\n accept: \"read\",\n protocol: \"https\"\n },\n {\n url: `${appId}.algolia.net`,\n accept: \"write\",\n protocol: \"https\"\n }\n ].concat(\n shuffle([\n {\n url: `${appId}-1.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n },\n {\n url: `${appId}-2.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n },\n {\n url: `${appId}-3.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n }\n ])\n );\n}\nfunction createSearchClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Search\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Helper: Wait for a task to be published (completed) for a given `indexName` and `taskID`.\n *\n * @summary Helper method that waits for a task to be published (completed).\n * @param waitForTaskOptions - The `waitForTaskOptions` object.\n * @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.\n * @param waitForTaskOptions.taskID - The `taskID` returned in the method response.\n * @param waitForTaskOptions.maxRetries - The maximum number of retries. 50 by default.\n * @param waitForTaskOptions.timeout - The function to decide how long to wait between retries.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.\n */\n waitForTask({\n indexName,\n taskID,\n maxRetries = 50,\n timeout = (retryCount) => Math.min(retryCount * 200, 5e3)\n }, requestOptions) {\n let retryCount = 0;\n return createIterablePromise({\n func: () => this.getTask({ indexName, taskID }, requestOptions),\n validate: (response) => response.status === \"published\",\n aggregator: () => retryCount += 1,\n error: {\n validate: () => retryCount >= maxRetries,\n message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`\n },\n timeout: () => timeout(retryCount)\n });\n },\n /**\n * Helper: Wait for an application-level task to complete for a given `taskID`.\n *\n * @summary Helper method that waits for a task to be published (completed).\n * @param waitForAppTaskOptions - The `waitForTaskOptions` object.\n * @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.\n * @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.\n * @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.\n */\n waitForAppTask({\n taskID,\n maxRetries = 50,\n timeout = (retryCount) => Math.min(retryCount * 200, 5e3)\n }, requestOptions) {\n let retryCount = 0;\n return createIterablePromise({\n func: () => this.getAppTask({ taskID }, requestOptions),\n validate: (response) => response.status === \"published\",\n aggregator: () => retryCount += 1,\n error: {\n validate: () => retryCount >= maxRetries,\n message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`\n },\n timeout: () => timeout(retryCount)\n });\n },\n /**\n * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.\n *\n * @summary Helper method that waits for an API key task to be processed.\n * @param waitForApiKeyOptions - The `waitForApiKeyOptions` object.\n * @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.\n * @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.\n * @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.\n * @param waitForApiKeyOptions.maxRetries - The maximum number of retries. 50 by default.\n * @param waitForApiKeyOptions.timeout - The function to decide how long to wait between retries.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getApikey` method and merged with the transporter requestOptions.\n */\n waitForApiKey({\n operation,\n key,\n apiKey,\n maxRetries = 50,\n timeout = (retryCount) => Math.min(retryCount * 200, 5e3)\n }, requestOptions) {\n let retryCount = 0;\n const baseIteratorOptions = {\n aggregator: () => retryCount += 1,\n error: {\n validate: () => retryCount >= maxRetries,\n message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`\n },\n timeout: () => timeout(retryCount)\n };\n if (operation === \"update\") {\n if (!apiKey) {\n throw new Error(\"`apiKey` is required when waiting for an `update` operation.\");\n }\n return createIterablePromise({\n ...baseIteratorOptions,\n func: () => this.getApiKey({ key }, requestOptions),\n validate: (response) => {\n for (const field of Object.keys(apiKey)) {\n const value = apiKey[field];\n const resValue = response[field];\n if (Array.isArray(value) && Array.isArray(resValue)) {\n if (value.length !== resValue.length || value.some((v, index) => v !== resValue[index])) {\n return false;\n }\n } else if (value !== resValue) {\n return false;\n }\n }\n return true;\n }\n });\n }\n return createIterablePromise({\n ...baseIteratorOptions,\n func: () => this.getApiKey({ key }, requestOptions).catch((error) => {\n if (error.status === 404) {\n return void 0;\n }\n throw error;\n }),\n validate: (response) => operation === \"add\" ? response !== void 0 : response === void 0\n });\n },\n /**\n * Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.\n *\n * @summary Helper method that iterates on the `browse` method.\n * @param browseObjects - The `browseObjects` object.\n * @param browseObjects.indexName - The index in which to perform the request.\n * @param browseObjects.browseParams - The `browse` parameters.\n * @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.\n * @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.\n */\n browseObjects({ indexName, browseParams, ...browseObjectsOptions }, requestOptions) {\n return createIterablePromise({\n func: (previousResponse) => {\n return this.browse(\n {\n indexName,\n browseParams: {\n cursor: previousResponse ? previousResponse.cursor : void 0,\n hitsPerPage: 1e3,\n ...browseParams\n }\n },\n requestOptions\n );\n },\n validate: (response) => response.cursor === void 0,\n ...browseObjectsOptions\n });\n },\n /**\n * Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index.\n *\n * @summary Helper method that iterates on the `searchRules` method.\n * @param browseRules - The `browseRules` object.\n * @param browseRules.indexName - The index in which to perform the request.\n * @param browseRules.searchRulesParams - The `searchRules` method parameters.\n * @param browseRules.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).\n * @param browseRules.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.\n */\n browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {\n const params = {\n ...searchRulesParams,\n hitsPerPage: searchRulesParams?.hitsPerPage || 1e3\n };\n return createIterablePromise({\n func: (previousResponse) => {\n return this.searchRules(\n {\n indexName,\n searchRulesParams: {\n ...params,\n page: previousResponse ? previousResponse.page + 1 : params.page || 0\n }\n },\n requestOptions\n );\n },\n validate: (response) => response.hits.length < params.hitsPerPage,\n ...browseRulesOptions\n });\n },\n /**\n * Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating rules of an index.\n *\n * @summary Helper method that iterates on the `searchSynonyms` method.\n * @param browseSynonyms - The `browseSynonyms` object.\n * @param browseSynonyms.indexName - The index in which to perform the request.\n * @param browseSynonyms.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).\n * @param browseSynonyms.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.\n * @param browseSynonyms.searchSynonymsParams - The `searchSynonyms` method parameters.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.\n */\n browseSynonyms({\n indexName,\n searchSynonymsParams,\n ...browseSynonymsOptions\n }, requestOptions) {\n const params = {\n ...searchSynonymsParams,\n page: searchSynonymsParams?.page || 0,\n hitsPerPage: 1e3\n };\n return createIterablePromise({\n func: (_) => {\n const resp = this.searchSynonyms(\n {\n indexName,\n searchSynonymsParams: {\n ...params,\n page: params.page\n }\n },\n requestOptions\n );\n params.page += 1;\n return resp;\n },\n validate: (response) => response.hits.length < params.hitsPerPage,\n ...browseSynonymsOptions\n });\n },\n /**\n * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.\n *\n * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.\n * @param chunkedBatch - The `chunkedBatch` object.\n * @param chunkedBatch.indexName - The `indexName` to replace `objects` in.\n * @param chunkedBatch.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param chunkedBatch.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.\n * @param chunkedBatch.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param chunkedBatch.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.\n */\n async chunkedBatch({ indexName, objects, action = \"addObject\", waitForTasks, batchSize = 1e3 }, requestOptions) {\n let requests = [];\n const responses = [];\n const objectEntries = objects.entries();\n for (const [i, obj] of objectEntries) {\n requests.push({ action, body: obj });\n if (requests.length === batchSize || i === objects.length - 1) {\n responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));\n requests = [];\n }\n }\n if (waitForTasks) {\n for (const resp of responses) {\n await this.waitForTask({ indexName, taskID: resp.taskID });\n }\n }\n return responses;\n },\n /**\n * Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.\n *\n * @summary Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.\n * @param saveObjects - The `saveObjects` object.\n * @param saveObjects.indexName - The `indexName` to save `objects` in.\n * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.\n */\n async saveObjects({ indexName, objects, waitForTasks, batchSize }, requestOptions) {\n return await this.chunkedBatch(\n { indexName, objects, action: \"addObject\", waitForTasks, batchSize },\n requestOptions\n );\n },\n /**\n * Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.\n *\n * @summary Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.\n * @param deleteObjects - The `deleteObjects` object.\n * @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.\n * @param deleteObjects.objectIDs - The objectIDs to delete.\n * @param deleteObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param deleteObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.\n */\n async deleteObjects({ indexName, objectIDs, waitForTasks, batchSize }, requestOptions) {\n return await this.chunkedBatch(\n {\n indexName,\n objects: objectIDs.map((objectID) => ({ objectID })),\n action: \"deleteObject\",\n waitForTasks,\n batchSize\n },\n requestOptions\n );\n },\n /**\n * Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.\n *\n * @summary Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.\n * @param partialUpdateObjects - The `partialUpdateObjects` object.\n * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.\n * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.\n * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.\n * @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.\n */\n async partialUpdateObjects({ indexName, objects, createIfNotExists, waitForTasks, batchSize }, requestOptions) {\n return await this.chunkedBatch(\n {\n indexName,\n objects,\n action: createIfNotExists ? \"partialUpdateObject\" : \"partialUpdateObjectNoCreate\",\n batchSize,\n waitForTasks\n },\n requestOptions\n );\n },\n /**\n * Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.\n * See https://api-clients-automation.netlify.app/docs/custom-helpers/#replaceallobjects for implementation details.\n *\n * @summary Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.\n * @param replaceAllObjects - The `replaceAllObjects` object.\n * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.\n * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.\n * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.\n */\n async replaceAllObjects({ indexName, objects, batchSize, scopes }, requestOptions) {\n const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;\n const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;\n if (scopes === void 0) {\n scopes = [\"settings\", \"rules\", \"synonyms\"];\n }\n try {\n let copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: \"copy\",\n destination: tmpIndexName,\n scope: scopes\n }\n },\n requestOptions\n );\n const batchResponses = await this.chunkedBatch(\n { indexName: tmpIndexName, objects, waitForTasks: true, batchSize },\n requestOptions\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID\n });\n copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: \"copy\",\n destination: tmpIndexName,\n scope: scopes\n }\n },\n requestOptions\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID\n });\n const moveOperationResponse = await this.operationIndex(\n {\n indexName: tmpIndexName,\n operationIndexParams: { operation: \"move\", destination: indexName }\n },\n requestOptions\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: moveOperationResponse.taskID\n });\n return { copyOperationResponse, batchResponses, moveOperationResponse };\n } catch (error) {\n await this.deleteIndex({ indexName: tmpIndexName });\n throw error;\n }\n },\n async indexExists({ indexName }) {\n try {\n await this.getSettings({ indexName });\n } catch (error) {\n if (error instanceof ApiError && error.status === 404) {\n return false;\n }\n throw error;\n }\n return true;\n },\n /**\n * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.\n * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.\n *\n * @summary Search multiple indices for `hits`.\n * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForHits(searchMethodParams, requestOptions) {\n return this.search(searchMethodParams, requestOptions);\n },\n /**\n * Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).\n * Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.\n *\n * @summary Search multiple indices for `facets`.\n * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForFacets(searchMethodParams, requestOptions) {\n return this.search(searchMethodParams, requestOptions);\n },\n /**\n * Creates a new API key with specific permissions and restrictions.\n *\n * Required API Key ACLs:\n * - admin\n * @param apiKey - The apiKey object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n addApiKey(apiKey, requestOptions) {\n if (!apiKey) {\n throw new Error(\"Parameter `apiKey` is required when calling `addApiKey`.\");\n }\n if (!apiKey.acl) {\n throw new Error(\"Parameter `apiKey.acl` is required when calling `addApiKey`.\");\n }\n const requestPath = \"/1/keys\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: apiKey\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. If you want to use auto-generated object IDs, use the [`saveObject` operation](https://www.algolia.com/doc/rest-api/search/save-object). To update _some_ attributes of an existing record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object) instead. To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch).\n *\n * Required API Key ACLs:\n * - addObject\n * @param addOrUpdateObject - The addOrUpdateObject object.\n * @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.\n * @param addOrUpdateObject.objectID - Unique record identifier.\n * @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n addOrUpdateObject({ indexName, objectID, body }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `addOrUpdateObject`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `addOrUpdateObject`.\");\n }\n if (!body) {\n throw new Error(\"Parameter `body` is required when calling `addOrUpdateObject`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Adds a source to the list of allowed sources.\n *\n * Required API Key ACLs:\n * - admin\n * @param source - Source to add.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n appendSource(source, requestOptions) {\n if (!source) {\n throw new Error(\"Parameter `source` is required when calling `appendSource`.\");\n }\n if (!source.source) {\n throw new Error(\"Parameter `source.source` is required when calling `appendSource`.\");\n }\n const requestPath = \"/1/security/sources/append\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: source\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param assignUserId - The assignUserId object.\n * @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.\n * @param assignUserId.assignUserIdParams - The assignUserIdParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n assignUserId({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {\n if (!xAlgoliaUserID) {\n throw new Error(\"Parameter `xAlgoliaUserID` is required when calling `assignUserId`.\");\n }\n if (!assignUserIdParams) {\n throw new Error(\"Parameter `assignUserIdParams` is required when calling `assignUserId`.\");\n }\n if (!assignUserIdParams.cluster) {\n throw new Error(\"Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.\");\n }\n const requestPath = \"/1/clusters/mapping\";\n const headers = {};\n const queryParameters = {};\n if (xAlgoliaUserID !== void 0) {\n headers[\"X-Algolia-User-ID\"] = xAlgoliaUserID.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: assignUserIdParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\\'re specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n * @param batch - The batch object.\n * @param batch.indexName - Name of the index on which to perform the operation.\n * @param batch.batchWriteParams - The batchWriteParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n batch({ indexName, batchWriteParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `batch`.\");\n }\n if (!batchWriteParams) {\n throw new Error(\"Parameter `batchWriteParams` is required when calling `batch`.\");\n }\n if (!batchWriteParams.requests) {\n throw new Error(\"Parameter `batchWriteParams.requests` is required when calling `batch`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/batch\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: batchWriteParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Assigns multiple user IDs to a cluster. **You can\\'t move users with this operation**.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param batchAssignUserIds - The batchAssignUserIds object.\n * @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.\n * @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {\n if (!xAlgoliaUserID) {\n throw new Error(\"Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.\");\n }\n if (!batchAssignUserIdsParams) {\n throw new Error(\"Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.\");\n }\n if (!batchAssignUserIdsParams.cluster) {\n throw new Error(\"Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.\");\n }\n if (!batchAssignUserIdsParams.users) {\n throw new Error(\"Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.\");\n }\n const requestPath = \"/1/clusters/mapping/batch\";\n const headers = {};\n const queryParameters = {};\n if (xAlgoliaUserID !== void 0) {\n headers[\"X-Algolia-User-ID\"] = xAlgoliaUserID.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: batchAssignUserIdsParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param batchDictionaryEntries - The batchDictionaryEntries object.\n * @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.\n * @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {\n if (!dictionaryName) {\n throw new Error(\"Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.\");\n }\n if (!batchDictionaryEntriesParams) {\n throw new Error(\"Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.\");\n }\n if (!batchDictionaryEntriesParams.requests) {\n throw new Error(\n \"Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.\"\n );\n }\n const requestPath = \"/1/dictionaries/{dictionaryName}/batch\".replace(\n \"{dictionaryName}\",\n encodeURIComponent(dictionaryName)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: batchDictionaryEntriesParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` evaluate to `true`) If you send these parameters with your browse requests, they\\'ll be ignored.\n *\n * Required API Key ACLs:\n * - browse\n * @param browse - The browse object.\n * @param browse.indexName - Name of the index on which to perform the operation.\n * @param browse.browseParams - The browseParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n browse({ indexName, browseParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `browse`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/browse\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: browseParams ? browseParams : {},\n useReadTransporter: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes only the records from an index while keeping settings, synonyms, and rules. This operation is resource-intensive and subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - deleteIndex\n * @param clearObjects - The clearObjects object.\n * @param clearObjects.indexName - Name of the index on which to perform the operation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n clearObjects({ indexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `clearObjects`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/clear\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes all rules from the index.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param clearRules - The clearRules object.\n * @param clearRules.indexName - Name of the index on which to perform the operation.\n * @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n clearRules({ indexName, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `clearRules`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/rules/clear\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes all synonyms from the index.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param clearSynonyms - The clearSynonyms object.\n * @param clearSynonyms.indexName - Name of the index on which to perform the operation.\n * @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `clearSynonyms`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/synonyms/clear\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes the API key.\n *\n * Required API Key ACLs:\n * - admin\n * @param deleteApiKey - The deleteApiKey object.\n * @param deleteApiKey.key - API key.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteApiKey({ key }, requestOptions) {\n if (!key) {\n throw new Error(\"Parameter `key` is required when calling `deleteApiKey`.\");\n }\n const requestPath = \"/1/keys/{key}\".replace(\"{key}\", encodeURIComponent(key));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This operation doesn\\'t accept empty filters. This operation is resource-intensive. You should only use it if you can\\'t get the object IDs of the records you want to delete. It\\'s more efficient to get a list of object IDs with the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse), and then delete the records using the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - deleteIndex\n * @param deleteBy - The deleteBy object.\n * @param deleteBy.indexName - Name of the index on which to perform the operation.\n * @param deleteBy.deleteByParams - The deleteByParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteBy({ indexName, deleteByParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteBy`.\");\n }\n if (!deleteByParams) {\n throw new Error(\"Parameter `deleteByParams` is required when calling `deleteBy`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/deleteByQuery\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: deleteByParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes an index and all its settings. - Deleting an index doesn\\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas).\n *\n * Required API Key ACLs:\n * - deleteIndex\n * @param deleteIndex - The deleteIndex object.\n * @param deleteIndex.indexName - Name of the index on which to perform the operation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteIndex({ indexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteIndex`.\");\n }\n const requestPath = \"/1/indexes/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). To delete records matching a query, use the [`deleteBy` operation](https://www.algolia.com/doc/rest-api/search/delete-by).\n *\n * Required API Key ACLs:\n * - deleteObject\n * @param deleteObject - The deleteObject object.\n * @param deleteObject.indexName - Name of the index on which to perform the operation.\n * @param deleteObject.objectID - Unique record identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteObject({ indexName, objectID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteObject`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `deleteObject`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteRule - The deleteRule object.\n * @param deleteRule.indexName - Name of the index on which to perform the operation.\n * @param deleteRule.objectID - Unique identifier of a rule object.\n * @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteRule({ indexName, objectID, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteRule`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `deleteRule`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/rules/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a source from the list of allowed sources.\n *\n * Required API Key ACLs:\n * - admin\n * @param deleteSource - The deleteSource object.\n * @param deleteSource.source - IP address range of the source.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteSource({ source }, requestOptions) {\n if (!source) {\n throw new Error(\"Parameter `source` is required when calling `deleteSource`.\");\n }\n const requestPath = \"/1/security/sources/{source}\".replace(\"{source}\", encodeURIComponent(source));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteSynonym - The deleteSynonym object.\n * @param deleteSynonym.indexName - Name of the index on which to perform the operation.\n * @param deleteSynonym.objectID - Unique identifier of a synonym object.\n * @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteSynonym({ indexName, objectID, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteSynonym`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `deleteSynonym`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/synonyms/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\\'s keys. When authenticating with other API keys, you can only retrieve information for that key, with the description replaced by `<redacted>`.\n * @param getApiKey - The getApiKey object.\n * @param getApiKey.key - API key.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getApiKey({ key }, requestOptions) {\n if (!key) {\n throw new Error(\"Parameter `key` is required when calling `getApiKey`.\");\n }\n const requestPath = \"/1/keys/{key}\".replace(\"{key}\", encodeURIComponent(key));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Checks the status of a given application task.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param getAppTask - The getAppTask object.\n * @param getAppTask.taskID - Unique task identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAppTask({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `getAppTask`.\");\n }\n const requestPath = \"/1/task/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists supported languages with their supported dictionary types and number of custom entries.\n *\n * Required API Key ACLs:\n * - settings\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getDictionaryLanguages(requestOptions) {\n const requestPath = \"/1/dictionaries/*/languages\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the languages for which standard dictionary entries are turned off.\n *\n * Required API Key ACLs:\n * - settings\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getDictionarySettings(requestOptions) {\n const requestPath = \"/1/dictionaries/*/settings\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/articles/17245378392977-How-does-Algolia-count-records-and-operations) but doesn\\'t appear in the logs itself.\n *\n * Required API Key ACLs:\n * - logs\n * @param getLogs - The getLogs object.\n * @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.\n * @param getLogs.length - Maximum number of entries to retrieve.\n * @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.\n * @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLogs({ offset, length, indexName, type } = {}, requestOptions = void 0) {\n const requestPath = \"/1/logs\";\n const headers = {};\n const queryParameters = {};\n if (offset !== void 0) {\n queryParameters[\"offset\"] = offset.toString();\n }\n if (length !== void 0) {\n queryParameters[\"length\"] = length.toString();\n }\n if (indexName !== void 0) {\n queryParameters[\"indexName\"] = indexName.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](https://www.algolia.com/doc/rest-api/search/get-objects).\n *\n * Required API Key ACLs:\n * - search\n * @param getObject - The getObject object.\n * @param getObject.indexName - Name of the index on which to perform the operation.\n * @param getObject.objectID - Unique record identifier.\n * @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\\'t be retrieved unless the request is authenticated with the admin API key.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getObject({ indexName, objectID, attributesToRetrieve }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getObject`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `getObject`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n if (attributesToRetrieve !== void 0) {\n queryParameters[\"attributesToRetrieve\"] = attributesToRetrieve.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.\n *\n * Required API Key ACLs:\n * - search\n * @param getObjectsParams - Request object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getObjects(getObjectsParams, requestOptions) {\n if (!getObjectsParams) {\n throw new Error(\"Parameter `getObjectsParams` is required when calling `getObjects`.\");\n }\n if (!getObjectsParams.requests) {\n throw new Error(\"Parameter `getObjectsParams.requests` is required when calling `getObjects`.\");\n }\n const requestPath = \"/1/indexes/*/objects\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: getObjectsParams,\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).\n *\n * Required API Key ACLs:\n * - settings\n * @param getRule - The getRule object.\n * @param getRule.indexName - Name of the index on which to perform the operation.\n * @param getRule.objectID - Unique identifier of a rule object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRule({ indexName, objectID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getRule`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `getRule`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/rules/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves an object with non-null index settings.\n *\n * Required API Key ACLs:\n * - settings\n * @param getSettings - The getSettings object.\n * @param getSettings.indexName - Name of the index on which to perform the operation.\n * @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSettings({ indexName, getVersion }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getSettings`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/settings\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (getVersion !== void 0) {\n queryParameters[\"getVersion\"] = getVersion.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves all allowed IP addresses with access to your application.\n *\n * Required API Key ACLs:\n * - admin\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSources(requestOptions) {\n const requestPath = \"/1/security/sources\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).\n *\n * Required API Key ACLs:\n * - settings\n * @param getSynonym - The getSynonym object.\n * @param getSynonym.indexName - Name of the index on which to perform the operation.\n * @param getSynonym.objectID - Unique identifier of a synonym object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSynonym({ indexName, objectID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getSynonym`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `getSynonym`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/synonyms/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks\\' responses include a task ID that you can use to check the status.\n *\n * Required API Key ACLs:\n * - addObject\n * @param getTask - The getTask object.\n * @param getTask.indexName - Name of the index on which to perform the operation.\n * @param getTask.taskID - Unique task identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTask({ indexName, taskID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getTask`.\");\n }\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `getTask`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/task/{taskID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn\\'t real-time.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopUserIds(requestOptions) {\n const requestPath = \"/1/clusters/mapping/top\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\\'t real-time.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param getUserId - The getUserId object.\n * @param getUserId.userID - Unique identifier of the user who makes the search request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getUserId({ userID }, requestOptions) {\n if (!userID) {\n throw new Error(\"Parameter `userID` is required when calling `getUserId`.\");\n }\n const requestPath = \"/1/clusters/mapping/{userID}\".replace(\"{userID}\", encodeURIComponent(userID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param hasPendingMappings - The hasPendingMappings object.\n * @param hasPendingMappings.getClusters - Whether to include the cluster\\'s pending mapping state in the response.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n hasPendingMappings({ getClusters } = {}, requestOptions = void 0) {\n const requestPath = \"/1/clusters/mapping/pending\";\n const headers = {};\n const queryParameters = {};\n if (getClusters !== void 0) {\n queryParameters[\"getClusters\"] = getClusters.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists all API keys associated with your Algolia application, including their permissions and restrictions.\n *\n * Required API Key ACLs:\n * - admin\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listApiKeys(requestOptions) {\n const requestPath = \"/1/keys\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists the available clusters in a multi-cluster setup.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listClusters(requestOptions) {\n const requestPath = \"/1/clusters\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.\n *\n * Required API Key ACLs:\n * - listIndexes\n * @param listIndices - The listIndices object.\n * @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.\n * @param listIndices.hitsPerPage - Number of hits per page.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listIndices({ page, hitsPerPage } = {}, requestOptions = void 0) {\n const requestPath = \"/1/indexes\";\n const headers = {};\n const queryParameters = {};\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (hitsPerPage !== void 0) {\n queryParameters[\"hitsPerPage\"] = hitsPerPage.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\\'t real-time.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param listUserIds - The listUserIds object.\n * @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.\n * @param listUserIds.hitsPerPage - Number of hits per page.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listUserIds({ page, hitsPerPage } = {}, requestOptions = void 0) {\n const requestPath = \"/1/clusters/mapping\";\n const headers = {};\n const queryParameters = {};\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (hitsPerPage !== void 0) {\n queryParameters[\"hitsPerPage\"] = hitsPerPage.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n * @param batchParams - The batchParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n multipleBatch(batchParams, requestOptions) {\n if (!batchParams) {\n throw new Error(\"Parameter `batchParams` is required when calling `multipleBatch`.\");\n }\n if (!batchParams.requests) {\n throw new Error(\"Parameter `batchParams.requests` is required when calling `multipleBatch`.\");\n }\n const requestPath = \"/1/indexes/*/batch\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: batchParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\\'t exist yet, it\\'ll be created. - This operation is resource-intensive. **Copy** - Copying a source index that doesn\\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices) **Move** - Moving a source index that doesn\\'t exist is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - addObject\n * @param operationIndex - The operationIndex object.\n * @param operationIndex.indexName - Name of the index on which to perform the operation.\n * @param operationIndex.operationIndexParams - The operationIndexParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n operationIndex({ indexName, operationIndexParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `operationIndex`.\");\n }\n if (!operationIndexParams) {\n throw new Error(\"Parameter `operationIndexParams` is required when calling `operationIndex`.\");\n }\n if (!operationIndexParams.operation) {\n throw new Error(\"Parameter `operationIndexParams.operation` is required when calling `operationIndex`.\");\n }\n if (!operationIndexParams.destination) {\n throw new Error(\"Parameter `operationIndexParams.destination` is required when calling `operationIndex`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/operation\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: operationIndexParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Adds new attributes to a record, or updates existing ones. - If a record with the specified object ID doesn\\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, this operation replaces its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don\\'t have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it\\'s not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn\\'t exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn\\'t exist yet, the engine only creates it if you pass an IncrementSet value greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove. When updating multiple attributes or using multiple operations targeting the same record, you should use a single partial update for faster processing. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - addObject\n * @param partialUpdateObject - The partialUpdateObject object.\n * @param partialUpdateObject.indexName - Name of the index on which to perform the operation.\n * @param partialUpdateObject.objectID - Unique record identifier.\n * @param partialUpdateObject.attributesToUpdate - Attributes with their values.\n * @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\\'t exist.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `partialUpdateObject`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `partialUpdateObject`.\");\n }\n if (!attributesToUpdate) {\n throw new Error(\"Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{objectID}/partial\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n if (createIfNotExists !== void 0) {\n queryParameters[\"createIfNotExists\"] = createIfNotExists.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: attributesToUpdate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a user ID and its associated data from the clusters.\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param removeUserId - The removeUserId object.\n * @param removeUserId.userID - Unique identifier of the user who makes the search request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n removeUserId({ userID }, requestOptions) {\n if (!userID) {\n throw new Error(\"Parameter `userID` is required when calling `removeUserId`.\");\n }\n const requestPath = \"/1/clusters/mapping/{userID}\".replace(\"{userID}\", encodeURIComponent(userID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Replaces the list of allowed sources.\n *\n * Required API Key ACLs:\n * - admin\n * @param replaceSources - The replaceSources object.\n * @param replaceSources.source - Allowed sources.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n replaceSources({ source }, requestOptions) {\n if (!source) {\n throw new Error(\"Parameter `source` is required when calling `replaceSources`.\");\n }\n const requestPath = \"/1/security/sources\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: source\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\\'t be restored.\n *\n * Required API Key ACLs:\n * - admin\n * @param restoreApiKey - The restoreApiKey object.\n * @param restoreApiKey.key - API key.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n restoreApiKey({ key }, requestOptions) {\n if (!key) {\n throw new Error(\"Parameter `key` is required when calling `restoreApiKey`.\");\n }\n const requestPath = \"/1/keys/{key}/restore\".replace(\"{key}\", encodeURIComponent(key));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Adds a record to an index or replaces it. - If the record doesn\\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\\'t exist, a new record is added to your index. - If you add a record to an index that doesn\\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object). To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - addObject\n * @param saveObject - The saveObject object.\n * @param saveObject.indexName - Name of the index on which to perform the operation.\n * @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n saveObject({ indexName, body }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `saveObject`.\");\n }\n if (!body) {\n throw new Error(\"Parameter `body` is required when calling `saveObject`.\");\n }\n const requestPath = \"/1/indexes/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * If a rule with the specified object ID doesn\\'t exist, it\\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-rules).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param saveRule - The saveRule object.\n * @param saveRule.indexName - Name of the index on which to perform the operation.\n * @param saveRule.objectID - Unique identifier of a rule object.\n * @param saveRule.rule - The rule object.\n * @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n saveRule({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `saveRule`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `saveRule`.\");\n }\n if (!rule) {\n throw new Error(\"Parameter `rule` is required when calling `saveRule`.\");\n }\n if (!rule.objectID) {\n throw new Error(\"Parameter `rule.objectID` is required when calling `saveRule`.\");\n }\n if (!rule.consequence) {\n throw new Error(\"Parameter `rule.consequence` is required when calling `saveRule`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/rules/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: rule\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Create or update multiple rules. If a rule with the specified object ID doesn\\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param saveRules - The saveRules object.\n * @param saveRules.indexName - Name of the index on which to perform the operation.\n * @param saveRules.rules - The rules object.\n * @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.\n * @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n saveRules({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `saveRules`.\");\n }\n if (!rules) {\n throw new Error(\"Parameter `rules` is required when calling `saveRules`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/rules/batch\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n if (clearExistingRules !== void 0) {\n queryParameters[\"clearExistingRules\"] = clearExistingRules.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: rules\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * If a synonym with the specified object ID doesn\\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-synonyms).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param saveSynonym - The saveSynonym object.\n * @param saveSynonym.indexName - Name of the index on which to perform the operation.\n * @param saveSynonym.objectID - Unique identifier of a synonym object.\n * @param saveSynonym.synonymHit - The synonymHit object.\n * @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `saveSynonym`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `saveSynonym`.\");\n }\n if (!synonymHit) {\n throw new Error(\"Parameter `synonymHit` is required when calling `saveSynonym`.\");\n }\n if (!synonymHit.objectID) {\n throw new Error(\"Parameter `synonymHit.objectID` is required when calling `saveSynonym`.\");\n }\n if (!synonymHit.type) {\n throw new Error(\"Parameter `synonymHit.type` is required when calling `saveSynonym`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/synonyms/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: synonymHit\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * If a synonym with the `objectID` doesn\\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param saveSynonyms - The saveSynonyms object.\n * @param saveSynonyms.indexName - Name of the index on which to perform the operation.\n * @param saveSynonyms.synonymHit - The synonymHit object.\n * @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.\n * @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `saveSynonyms`.\");\n }\n if (!synonymHit) {\n throw new Error(\"Parameter `synonymHit` is required when calling `saveSynonyms`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/synonyms/batch\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n if (replaceExistingSynonyms !== void 0) {\n queryParameters[\"replaceExistingSynonyms\"] = replaceExistingSynonyms.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: synonymHit\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. Use the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.\n *\n * Required API Key ACLs:\n * - search\n * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n search(searchMethodParams, requestOptions) {\n if (searchMethodParams && Array.isArray(searchMethodParams)) {\n const newSignatureRequest = {\n requests: searchMethodParams.map(({ params, ...legacyRequest }) => {\n if (legacyRequest.type === \"facet\") {\n return {\n ...legacyRequest,\n ...params,\n type: \"facet\"\n };\n }\n return {\n ...legacyRequest,\n ...params,\n facet: void 0,\n maxFacetHits: void 0,\n facetQuery: void 0\n };\n })\n };\n searchMethodParams = newSignatureRequest;\n }\n if (!searchMethodParams) {\n throw new Error(\"Parameter `searchMethodParams` is required when calling `search`.\");\n }\n if (!searchMethodParams.requests) {\n throw new Error(\"Parameter `searchMethodParams.requests` is required when calling `search`.\");\n }\n const requestPath = \"/1/indexes/*/queries\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchMethodParams,\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for standard and custom dictionary entries.\n *\n * Required API Key ACLs:\n * - settings\n * @param searchDictionaryEntries - The searchDictionaryEntries object.\n * @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.\n * @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {\n if (!dictionaryName) {\n throw new Error(\"Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.\");\n }\n if (!searchDictionaryEntriesParams) {\n throw new Error(\n \"Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.\"\n );\n }\n if (!searchDictionaryEntriesParams.query) {\n throw new Error(\n \"Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.\"\n );\n }\n const requestPath = \"/1/dictionaries/{dictionaryName}/search\".replace(\n \"{dictionaryName}\",\n encodeURIComponent(dictionaryName)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchDictionaryEntriesParams,\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\\'t work if you have **more than 65 searchable facets and searchable attributes combined**.\n *\n * Required API Key ACLs:\n * - search\n * @param searchForFacetValues - The searchForFacetValues object.\n * @param searchForFacetValues.indexName - Name of the index on which to perform the operation.\n * @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.\n * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `searchForFacetValues`.\");\n }\n if (!facetName) {\n throw new Error(\"Parameter `facetName` is required when calling `searchForFacetValues`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/facets/{facetName}/query\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{facetName}\", encodeURIComponent(facetName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for rules in your index.\n *\n * Required API Key ACLs:\n * - settings\n * @param searchRules - The searchRules object.\n * @param searchRules.indexName - Name of the index on which to perform the operation.\n * @param searchRules.searchRulesParams - The searchRulesParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchRules({ indexName, searchRulesParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `searchRules`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/rules/search\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchRulesParams ? searchRulesParams : {},\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches a single index and returns matching search results as hits. This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse) or increase the `paginatedLimitedTo` index setting.\n *\n * Required API Key ACLs:\n * - search\n * @param searchSingleIndex - The searchSingleIndex object.\n * @param searchSingleIndex.indexName - Name of the index on which to perform the operation.\n * @param searchSingleIndex.searchParams - The searchParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchSingleIndex({ indexName, searchParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `searchSingleIndex`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/query\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchParams ? searchParams : {},\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for synonyms in your index.\n *\n * Required API Key ACLs:\n * - settings\n * @param searchSynonyms - The searchSynonyms object.\n * @param searchSynonyms.indexName - Name of the index on which to perform the operation.\n * @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchSynonyms({ indexName, searchSynonymsParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `searchSynonyms`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/synonyms/search\".replace(\n \"{indexName}\",\n encodeURIComponent(indexName)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchSynonymsParams ? searchSynonymsParams : {},\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Since it can take a few seconds to get the data from the different clusters, the response isn\\'t real-time. To ensure rapid updates, the user IDs index isn\\'t built at the same time as the mapping. Instead, it\\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).\n *\n * Required API Key ACLs:\n * - admin\n *\n * @deprecated\n * @param searchUserIdsParams - The searchUserIdsParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchUserIds(searchUserIdsParams, requestOptions) {\n if (!searchUserIdsParams) {\n throw new Error(\"Parameter `searchUserIdsParams` is required when calling `searchUserIds`.\");\n }\n if (!searchUserIdsParams.query) {\n throw new Error(\"Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.\");\n }\n const requestPath = \"/1/clusters/mapping/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchUserIdsParams,\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Turns standard stop word dictionary entries on or off for a given language.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param dictionarySettingsParams - The dictionarySettingsParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n setDictionarySettings(dictionarySettingsParams, requestOptions) {\n if (!dictionarySettingsParams) {\n throw new Error(\"Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.\");\n }\n if (!dictionarySettingsParams.disableStandardEntries) {\n throw new Error(\n \"Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.\"\n );\n }\n const requestPath = \"/1/dictionaries/*/settings\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: dictionarySettingsParams\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Update the specified index settings. Index settings that you don\\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param setSettings - The setSettings object.\n * @param setSettings.indexName - Name of the index on which to perform the operation.\n * @param setSettings.indexSettings - The indexSettings object.\n * @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n setSettings({ indexName, indexSettings, forwardToReplicas }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `setSettings`.\");\n }\n if (!indexSettings) {\n throw new Error(\"Parameter `indexSettings` is required when calling `setSettings`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/settings\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (forwardToReplicas !== void 0) {\n queryParameters[\"forwardToReplicas\"] = forwardToReplicas.toString();\n }\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: indexSettings\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.\n *\n * Required API Key ACLs:\n * - admin\n * @param updateApiKey - The updateApiKey object.\n * @param updateApiKey.key - API key.\n * @param updateApiKey.apiKey - The apiKey object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateApiKey({ key, apiKey }, requestOptions) {\n if (!key) {\n throw new Error(\"Parameter `key` is required when calling `updateApiKey`.\");\n }\n if (!apiKey) {\n throw new Error(\"Parameter `apiKey` is required when calling `updateApiKey`.\");\n }\n if (!apiKey.acl) {\n throw new Error(\"Parameter `apiKey.acl` is required when calling `updateApiKey`.\");\n }\n const requestPath = \"/1/keys/{key}\".replace(\"{key}\", encodeURIComponent(key));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: apiKey\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction searchClient(appId, apiKey, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n return createSearchClient({\n appId,\n apiKey,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n searchClient\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/ingestionClient.ts\nimport { createAuth, createIterablePromise, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"1.41.0\";\nvar REGIONS = [\"eu\", \"us\"];\nfunction getDefaultHosts(region) {\n const url = \"data.{region}.algolia.com\".replace(\"{region}\", region);\n return [{ url, accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction isOnDemandTrigger(trigger) {\n return trigger.type === \"onDemand\";\n}\nfunction isScheduleTrigger(trigger) {\n return trigger.type === \"schedule\";\n}\nfunction isSubscriptionTrigger(trigger) {\n return trigger.type === \"subscription\";\n}\nfunction createIngestionClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Ingestion\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `push` requests by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n *\n * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.\n * @param chunkedPush - The `chunkedPush` object.\n * @param chunkedPush.indexName - The `indexName` to replace `objects` in.\n * @param chunkedPush.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param chunkedPush.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.\n * @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param chunkedPush.referenceIndexName - This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index's transformation to it (e.g. the source index name).\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions.\n */\n async chunkedPush({\n indexName,\n objects,\n action = \"addObject\",\n waitForTasks,\n batchSize = 1e3,\n referenceIndexName\n }, requestOptions) {\n let records = [];\n let offset = 0;\n const responses = [];\n const waitBatchSize = Math.floor(batchSize / 10) || batchSize;\n const objectEntries = objects.entries();\n for (const [i, obj] of objectEntries) {\n records.push(obj);\n if (records.length === batchSize || i === objects.length - 1) {\n responses.push(\n await this.push({ indexName, pushTaskPayload: { action, records }, referenceIndexName }, requestOptions)\n );\n records = [];\n }\n if (waitForTasks && responses.length > 0 && (responses.length % waitBatchSize === 0 || i === objects.length - 1)) {\n for (const resp of responses.slice(offset, offset + waitBatchSize)) {\n if (!resp.eventID) {\n throw new Error(\"received unexpected response from the push endpoint, eventID must not be undefined\");\n }\n let retryCount = 0;\n await createIterablePromise({\n func: async () => {\n if (resp.eventID === void 0 || !resp.eventID) {\n throw new Error(\"received unexpected response from the push endpoint, eventID must not be undefined\");\n }\n return this.getEvent({ runID: resp.runID, eventID: resp.eventID }).catch((error) => {\n if (error.status === 404) {\n return void 0;\n }\n throw error;\n });\n },\n validate: (response) => response !== void 0,\n aggregator: () => retryCount += 1,\n error: {\n validate: () => retryCount >= 50,\n message: () => `The maximum number of retries exceeded. (${retryCount}/${50})`\n },\n timeout: () => Math.min(retryCount * 500, 5e3)\n });\n }\n offset += waitBatchSize;\n }\n }\n return responses;\n },\n /**\n * Creates a new authentication resource.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param authenticationCreate -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createAuthentication(authenticationCreate, requestOptions) {\n if (!authenticationCreate) {\n throw new Error(\"Parameter `authenticationCreate` is required when calling `createAuthentication`.\");\n }\n if (!authenticationCreate.type) {\n throw new Error(\"Parameter `authenticationCreate.type` is required when calling `createAuthentication`.\");\n }\n if (!authenticationCreate.name) {\n throw new Error(\"Parameter `authenticationCreate.name` is required when calling `createAuthentication`.\");\n }\n if (!authenticationCreate.input) {\n throw new Error(\"Parameter `authenticationCreate.input` is required when calling `createAuthentication`.\");\n }\n const requestPath = \"/1/authentications\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: authenticationCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new destination.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param destinationCreate -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createDestination(destinationCreate, requestOptions) {\n if (!destinationCreate) {\n throw new Error(\"Parameter `destinationCreate` is required when calling `createDestination`.\");\n }\n if (!destinationCreate.type) {\n throw new Error(\"Parameter `destinationCreate.type` is required when calling `createDestination`.\");\n }\n if (!destinationCreate.name) {\n throw new Error(\"Parameter `destinationCreate.name` is required when calling `createDestination`.\");\n }\n if (!destinationCreate.input) {\n throw new Error(\"Parameter `destinationCreate.input` is required when calling `createDestination`.\");\n }\n const requestPath = \"/1/destinations\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: destinationCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new source.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param sourceCreate -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createSource(sourceCreate, requestOptions) {\n if (!sourceCreate) {\n throw new Error(\"Parameter `sourceCreate` is required when calling `createSource`.\");\n }\n if (!sourceCreate.type) {\n throw new Error(\"Parameter `sourceCreate.type` is required when calling `createSource`.\");\n }\n if (!sourceCreate.name) {\n throw new Error(\"Parameter `sourceCreate.name` is required when calling `createSource`.\");\n }\n const requestPath = \"/1/sources\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: sourceCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new task.\n * @param taskCreate - Request body for creating a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createTask(taskCreate, requestOptions) {\n if (!taskCreate) {\n throw new Error(\"Parameter `taskCreate` is required when calling `createTask`.\");\n }\n if (!taskCreate.sourceID) {\n throw new Error(\"Parameter `taskCreate.sourceID` is required when calling `createTask`.\");\n }\n if (!taskCreate.destinationID) {\n throw new Error(\"Parameter `taskCreate.destinationID` is required when calling `createTask`.\");\n }\n if (!taskCreate.action) {\n throw new Error(\"Parameter `taskCreate.action` is required when calling `createTask`.\");\n }\n const requestPath = \"/2/tasks\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new task using the v1 endpoint, please use `createTask` instead.\n *\n * @deprecated\n * @param taskCreate - Request body for creating a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createTaskV1(taskCreate, requestOptions) {\n if (!taskCreate) {\n throw new Error(\"Parameter `taskCreate` is required when calling `createTaskV1`.\");\n }\n if (!taskCreate.sourceID) {\n throw new Error(\"Parameter `taskCreate.sourceID` is required when calling `createTaskV1`.\");\n }\n if (!taskCreate.destinationID) {\n throw new Error(\"Parameter `taskCreate.destinationID` is required when calling `createTaskV1`.\");\n }\n if (!taskCreate.trigger) {\n throw new Error(\"Parameter `taskCreate.trigger` is required when calling `createTaskV1`.\");\n }\n if (!taskCreate.action) {\n throw new Error(\"Parameter `taskCreate.action` is required when calling `createTaskV1`.\");\n }\n const requestPath = \"/1/tasks\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new transformation.\n * @param transformationCreate - Request body for creating a transformation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createTransformation(transformationCreate, requestOptions) {\n if (!transformationCreate) {\n throw new Error(\"Parameter `transformationCreate` is required when calling `createTransformation`.\");\n }\n if (!transformationCreate.name) {\n throw new Error(\"Parameter `transformationCreate.name` is required when calling `createTransformation`.\");\n }\n const requestPath = \"/1/transformations\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: transformationCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes an authentication resource. You can\\'t delete authentication resources that are used by a source or a destination.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param deleteAuthentication - The deleteAuthentication object.\n * @param deleteAuthentication.authenticationID - Unique identifier of an authentication resource.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteAuthentication({ authenticationID }, requestOptions) {\n if (!authenticationID) {\n throw new Error(\"Parameter `authenticationID` is required when calling `deleteAuthentication`.\");\n }\n const requestPath = \"/1/authentications/{authenticationID}\".replace(\n \"{authenticationID}\",\n encodeURIComponent(authenticationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a destination by its ID. You can\\'t delete destinations that are referenced in tasks.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param deleteDestination - The deleteDestination object.\n * @param deleteDestination.destinationID - Unique identifier of a destination.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteDestination({ destinationID }, requestOptions) {\n if (!destinationID) {\n throw new Error(\"Parameter `destinationID` is required when calling `deleteDestination`.\");\n }\n const requestPath = \"/1/destinations/{destinationID}\".replace(\n \"{destinationID}\",\n encodeURIComponent(destinationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a source by its ID. You can\\'t delete sources that are referenced in tasks.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param deleteSource - The deleteSource object.\n * @param deleteSource.sourceID - Unique identifier of a source.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteSource({ sourceID }, requestOptions) {\n if (!sourceID) {\n throw new Error(\"Parameter `sourceID` is required when calling `deleteSource`.\");\n }\n const requestPath = \"/1/sources/{sourceID}\".replace(\"{sourceID}\", encodeURIComponent(sourceID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a task by its ID.\n * @param deleteTask - The deleteTask object.\n * @param deleteTask.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteTask({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `deleteTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a task by its ID using the v1 endpoint, please use `deleteTask` instead.\n *\n * @deprecated\n * @param deleteTaskV1 - The deleteTaskV1 object.\n * @param deleteTaskV1.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteTaskV1({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `deleteTaskV1`.\");\n }\n const requestPath = \"/1/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a transformation by its ID.\n * @param deleteTransformation - The deleteTransformation object.\n * @param deleteTransformation.transformationID - Unique identifier of a transformation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteTransformation({ transformationID }, requestOptions) {\n if (!transformationID) {\n throw new Error(\"Parameter `transformationID` is required when calling `deleteTransformation`.\");\n }\n const requestPath = \"/1/transformations/{transformationID}\".replace(\n \"{transformationID}\",\n encodeURIComponent(transformationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Disables a task.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param disableTask - The disableTask object.\n * @param disableTask.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n disableTask({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `disableTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}/disable\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Disables a task using the v1 endpoint, please use `disableTask` instead.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n *\n * @deprecated\n * @param disableTaskV1 - The disableTaskV1 object.\n * @param disableTaskV1.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n disableTaskV1({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `disableTaskV1`.\");\n }\n const requestPath = \"/1/tasks/{taskID}/disable\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Enables a task.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param enableTask - The enableTask object.\n * @param enableTask.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n enableTask({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `enableTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}/enable\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Enables a task using the v1 endpoint, please use `enableTask` instead.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n *\n * @deprecated\n * @param enableTaskV1 - The enableTaskV1 object.\n * @param enableTaskV1.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n enableTaskV1({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `enableTaskV1`.\");\n }\n const requestPath = \"/1/tasks/{taskID}/enable\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves an authentication resource by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getAuthentication - The getAuthentication object.\n * @param getAuthentication.authenticationID - Unique identifier of an authentication resource.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAuthentication({ authenticationID }, requestOptions) {\n if (!authenticationID) {\n throw new Error(\"Parameter `authenticationID` is required when calling `getAuthentication`.\");\n }\n const requestPath = \"/1/authentications/{authenticationID}\".replace(\n \"{authenticationID}\",\n encodeURIComponent(authenticationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a destination by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getDestination - The getDestination object.\n * @param getDestination.destinationID - Unique identifier of a destination.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getDestination({ destinationID }, requestOptions) {\n if (!destinationID) {\n throw new Error(\"Parameter `destinationID` is required when calling `getDestination`.\");\n }\n const requestPath = \"/1/destinations/{destinationID}\".replace(\n \"{destinationID}\",\n encodeURIComponent(destinationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a single task run event by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getEvent - The getEvent object.\n * @param getEvent.runID - Unique identifier of a task run.\n * @param getEvent.eventID - Unique identifier of an event.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getEvent({ runID, eventID }, requestOptions) {\n if (!runID) {\n throw new Error(\"Parameter `runID` is required when calling `getEvent`.\");\n }\n if (!eventID) {\n throw new Error(\"Parameter `eventID` is required when calling `getEvent`.\");\n }\n const requestPath = \"/1/runs/{runID}/events/{eventID}\".replace(\"{runID}\", encodeURIComponent(runID)).replace(\"{eventID}\", encodeURIComponent(eventID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieve a single task run by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getRun - The getRun object.\n * @param getRun.runID - Unique identifier of a task run.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRun({ runID }, requestOptions) {\n if (!runID) {\n throw new Error(\"Parameter `runID` is required when calling `getRun`.\");\n }\n const requestPath = \"/1/runs/{runID}\".replace(\"{runID}\", encodeURIComponent(runID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieve a source by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getSource - The getSource object.\n * @param getSource.sourceID - Unique identifier of a source.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSource({ sourceID }, requestOptions) {\n if (!sourceID) {\n throw new Error(\"Parameter `sourceID` is required when calling `getSource`.\");\n }\n const requestPath = \"/1/sources/{sourceID}\".replace(\"{sourceID}\", encodeURIComponent(sourceID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a task by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getTask - The getTask object.\n * @param getTask.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTask({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `getTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a task by its ID using the v1 endpoint, please use `getTask` instead.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n *\n * @deprecated\n * @param getTaskV1 - The getTaskV1 object.\n * @param getTaskV1.taskID - Unique identifier of a task.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTaskV1({ taskID }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `getTaskV1`.\");\n }\n const requestPath = \"/1/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a transformation by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param getTransformation - The getTransformation object.\n * @param getTransformation.transformationID - Unique identifier of a transformation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTransformation({ transformationID }, requestOptions) {\n if (!transformationID) {\n throw new Error(\"Parameter `transformationID` is required when calling `getTransformation`.\");\n }\n const requestPath = \"/1/transformations/{transformationID}\".replace(\n \"{transformationID}\",\n encodeURIComponent(transformationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of all authentication resources.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listAuthentications - The listAuthentications object.\n * @param listAuthentications.itemsPerPage - Number of items per page.\n * @param listAuthentications.page - Page number of the paginated API response.\n * @param listAuthentications.type - Type of authentication resource to retrieve.\n * @param listAuthentications.platform - Ecommerce platform for which to retrieve authentications.\n * @param listAuthentications.sort - Property by which to sort the list of authentications.\n * @param listAuthentications.order - Sort order of the response, ascending or descending.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listAuthentications({ itemsPerPage, page, type, platform, sort, order } = {}, requestOptions = void 0) {\n const requestPath = \"/1/authentications\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n if (platform !== void 0) {\n queryParameters[\"platform\"] = platform.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of destinations.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listDestinations - The listDestinations object.\n * @param listDestinations.itemsPerPage - Number of items per page.\n * @param listDestinations.page - Page number of the paginated API response.\n * @param listDestinations.type - Destination type.\n * @param listDestinations.authenticationID - Authentication ID used by destinations.\n * @param listDestinations.transformationID - Get the list of destinations used by a transformation.\n * @param listDestinations.sort - Property by which to sort the destinations.\n * @param listDestinations.order - Sort order of the response, ascending or descending.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listDestinations({ itemsPerPage, page, type, authenticationID, transformationID, sort, order } = {}, requestOptions = void 0) {\n const requestPath = \"/1/destinations\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n if (authenticationID !== void 0) {\n queryParameters[\"authenticationID\"] = authenticationID.toString();\n }\n if (transformationID !== void 0) {\n queryParameters[\"transformationID\"] = transformationID.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of events for a task run, identified by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listEvents - The listEvents object.\n * @param listEvents.runID - Unique identifier of a task run.\n * @param listEvents.itemsPerPage - Number of items per page.\n * @param listEvents.page - Page number of the paginated API response.\n * @param listEvents.status - Event status for filtering the list of task runs.\n * @param listEvents.type - Event type for filtering the list of task runs.\n * @param listEvents.sort - Property by which to sort the list of task run events.\n * @param listEvents.order - Sort order of the response, ascending or descending.\n * @param listEvents.startDate - Date and time in RFC 3339 format for the earliest events to retrieve. By default, the current time minus three hours is used.\n * @param listEvents.endDate - Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listEvents({ runID, itemsPerPage, page, status, type, sort, order, startDate, endDate }, requestOptions) {\n if (!runID) {\n throw new Error(\"Parameter `runID` is required when calling `listEvents`.\");\n }\n const requestPath = \"/1/runs/{runID}/events\".replace(\"{runID}\", encodeURIComponent(runID));\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (status !== void 0) {\n queryParameters[\"status\"] = status.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieve a list of task runs.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listRuns - The listRuns object.\n * @param listRuns.itemsPerPage - Number of items per page.\n * @param listRuns.page - Page number of the paginated API response.\n * @param listRuns.status - Run status for filtering the list of task runs.\n * @param listRuns.type - Run type for filtering the list of task runs.\n * @param listRuns.taskID - Task ID for filtering the list of task runs.\n * @param listRuns.sort - Property by which to sort the list of task runs.\n * @param listRuns.order - Sort order of the response, ascending or descending.\n * @param listRuns.startDate - Date in RFC 3339 format for the earliest run to retrieve. By default, the current day minus seven days is used.\n * @param listRuns.endDate - Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listRuns({ itemsPerPage, page, status, type, taskID, sort, order, startDate, endDate } = {}, requestOptions = void 0) {\n const requestPath = \"/1/runs\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (status !== void 0) {\n queryParameters[\"status\"] = status.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n if (taskID !== void 0) {\n queryParameters[\"taskID\"] = taskID.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n if (startDate !== void 0) {\n queryParameters[\"startDate\"] = startDate.toString();\n }\n if (endDate !== void 0) {\n queryParameters[\"endDate\"] = endDate.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of sources.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listSources - The listSources object.\n * @param listSources.itemsPerPage - Number of items per page.\n * @param listSources.page - Page number of the paginated API response.\n * @param listSources.type - Source type. Some sources require authentication.\n * @param listSources.authenticationID - Authentication IDs of the sources to retrieve. \\'none\\' returns sources that doesn\\'t have an authentication.\n * @param listSources.sort - Property by which to sort the list of sources.\n * @param listSources.order - Sort order of the response, ascending or descending.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listSources({ itemsPerPage, page, type, authenticationID, sort, order } = {}, requestOptions = void 0) {\n const requestPath = \"/1/sources\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n if (authenticationID !== void 0) {\n queryParameters[\"authenticationID\"] = authenticationID.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of tasks.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listTasks - The listTasks object.\n * @param listTasks.itemsPerPage - Number of items per page.\n * @param listTasks.page - Page number of the paginated API response.\n * @param listTasks.action - Actions for filtering the list of tasks.\n * @param listTasks.enabled - Whether to filter the list of tasks by the `enabled` status.\n * @param listTasks.sourceID - Source IDs for filtering the list of tasks.\n * @param listTasks.sourceType - Filters the tasks with the specified source type.\n * @param listTasks.destinationID - Destination IDs for filtering the list of tasks.\n * @param listTasks.triggerType - Type of task trigger for filtering the list of tasks.\n * @param listTasks.withEmailNotifications - If specified, the response only includes tasks with notifications.email.enabled set to this value.\n * @param listTasks.sort - Property by which to sort the list of tasks.\n * @param listTasks.order - Sort order of the response, ascending or descending.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listTasks({\n itemsPerPage,\n page,\n action,\n enabled,\n sourceID,\n sourceType,\n destinationID,\n triggerType,\n withEmailNotifications,\n sort,\n order\n } = {}, requestOptions = void 0) {\n const requestPath = \"/2/tasks\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (action !== void 0) {\n queryParameters[\"action\"] = action.toString();\n }\n if (enabled !== void 0) {\n queryParameters[\"enabled\"] = enabled.toString();\n }\n if (sourceID !== void 0) {\n queryParameters[\"sourceID\"] = sourceID.toString();\n }\n if (sourceType !== void 0) {\n queryParameters[\"sourceType\"] = sourceType.toString();\n }\n if (destinationID !== void 0) {\n queryParameters[\"destinationID\"] = destinationID.toString();\n }\n if (triggerType !== void 0) {\n queryParameters[\"triggerType\"] = triggerType.toString();\n }\n if (withEmailNotifications !== void 0) {\n queryParameters[\"withEmailNotifications\"] = withEmailNotifications.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n *\n * @deprecated\n * @param listTasksV1 - The listTasksV1 object.\n * @param listTasksV1.itemsPerPage - Number of items per page.\n * @param listTasksV1.page - Page number of the paginated API response.\n * @param listTasksV1.action - Actions for filtering the list of tasks.\n * @param listTasksV1.enabled - Whether to filter the list of tasks by the `enabled` status.\n * @param listTasksV1.sourceID - Source IDs for filtering the list of tasks.\n * @param listTasksV1.destinationID - Destination IDs for filtering the list of tasks.\n * @param listTasksV1.triggerType - Type of task trigger for filtering the list of tasks.\n * @param listTasksV1.sort - Property by which to sort the list of tasks.\n * @param listTasksV1.order - Sort order of the response, ascending or descending.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listTasksV1({ itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order } = {}, requestOptions = void 0) {\n const requestPath = \"/1/tasks\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (action !== void 0) {\n queryParameters[\"action\"] = action.toString();\n }\n if (enabled !== void 0) {\n queryParameters[\"enabled\"] = enabled.toString();\n }\n if (sourceID !== void 0) {\n queryParameters[\"sourceID\"] = sourceID.toString();\n }\n if (destinationID !== void 0) {\n queryParameters[\"destinationID\"] = destinationID.toString();\n }\n if (triggerType !== void 0) {\n queryParameters[\"triggerType\"] = triggerType.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a list of transformations.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param listTransformations - The listTransformations object.\n * @param listTransformations.itemsPerPage - Number of items per page.\n * @param listTransformations.page - Page number of the paginated API response.\n * @param listTransformations.sort - Property by which to sort the list of transformations.\n * @param listTransformations.order - Sort order of the response, ascending or descending.\n * @param listTransformations.type - Whether to filter the list of transformations by the type of transformation.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listTransformations({ itemsPerPage, page, sort, order, type } = {}, requestOptions = void 0) {\n const requestPath = \"/1/transformations\";\n const headers = {};\n const queryParameters = {};\n if (itemsPerPage !== void 0) {\n queryParameters[\"itemsPerPage\"] = itemsPerPage.toString();\n }\n if (page !== void 0) {\n queryParameters[\"page\"] = page.toString();\n }\n if (sort !== void 0) {\n queryParameters[\"sort\"] = sort.toString();\n }\n if (order !== void 0) {\n queryParameters[\"order\"] = order.toString();\n }\n if (type !== void 0) {\n queryParameters[\"type\"] = type.toString();\n }\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Pushes records through the Pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints and/or debugger dashboard to see the status of your task. If you want to leverage the [pre-indexing data transformation](https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/how-to/transform-your-data), this is the recommended way of ingesting your records. This method is similar to `pushTask`, but requires an `indexName` instead of a `taskID`. If zero or many tasks are found, an error will be returned.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param push - The push object.\n * @param push.indexName - Name of the index on which to perform the operation.\n * @param push.pushTaskPayload - The pushTaskPayload object.\n * @param push.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.\n * @param push.referenceIndexName - This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index\\'s transformation to it (e.g. the source index name).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n push({ indexName, pushTaskPayload, watch, referenceIndexName }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `push`.\");\n }\n if (!pushTaskPayload) {\n throw new Error(\"Parameter `pushTaskPayload` is required when calling `push`.\");\n }\n if (!pushTaskPayload.action) {\n throw new Error(\"Parameter `pushTaskPayload.action` is required when calling `push`.\");\n }\n if (!pushTaskPayload.records) {\n throw new Error(\"Parameter `pushTaskPayload.records` is required when calling `push`.\");\n }\n const requestPath = \"/1/push/{indexName}\".replace(\"{indexName}\", encodeURIComponent(indexName));\n const headers = {};\n const queryParameters = {};\n if (watch !== void 0) {\n queryParameters[\"watch\"] = watch.toString();\n }\n if (referenceIndexName !== void 0) {\n queryParameters[\"referenceIndexName\"] = referenceIndexName.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: pushTaskPayload\n };\n requestOptions = {\n timeouts: {\n connect: 18e4,\n read: 18e4,\n write: 18e4,\n ...requestOptions?.timeouts\n }\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Pushes records through the pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints or the debugger dashboard to see the status of your task. If you want to transform your data before indexing, this is the recommended way of ingesting your records. This method is similar to `push`, but requires a `taskID` instead of a `indexName`, which is useful when many `destinations` target the same `indexName`.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param pushTask - The pushTask object.\n * @param pushTask.taskID - Unique identifier of a task.\n * @param pushTask.pushTaskPayload - The pushTaskPayload object.\n * @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n pushTask({ taskID, pushTaskPayload, watch }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `pushTask`.\");\n }\n if (!pushTaskPayload) {\n throw new Error(\"Parameter `pushTaskPayload` is required when calling `pushTask`.\");\n }\n if (!pushTaskPayload.action) {\n throw new Error(\"Parameter `pushTaskPayload.action` is required when calling `pushTask`.\");\n }\n if (!pushTaskPayload.records) {\n throw new Error(\"Parameter `pushTaskPayload.records` is required when calling `pushTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}/push\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n if (watch !== void 0) {\n queryParameters[\"watch\"] = watch.toString();\n }\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: pushTaskPayload\n };\n requestOptions = {\n timeouts: {\n connect: 18e4,\n read: 18e4,\n write: 18e4,\n ...requestOptions?.timeouts\n }\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Fully updates a task by its ID, use partialUpdateTask if you only want to update a subset of fields.\n * @param replaceTask - The replaceTask object.\n * @param replaceTask.taskID - Unique identifier of a task.\n * @param replaceTask.taskReplace - The taskReplace object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n replaceTask({ taskID, taskReplace }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `replaceTask`.\");\n }\n if (!taskReplace) {\n throw new Error(\"Parameter `taskReplace` is required when calling `replaceTask`.\");\n }\n if (!taskReplace.destinationID) {\n throw new Error(\"Parameter `taskReplace.destinationID` is required when calling `replaceTask`.\");\n }\n if (!taskReplace.action) {\n throw new Error(\"Parameter `taskReplace.action` is required when calling `replaceTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskReplace\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Runs all tasks linked to a source, only available for Shopify, BigCommerce and commercetools sources. Creates one run per task.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param runSource - The runSource object.\n * @param runSource.sourceID - Unique identifier of a source.\n * @param runSource.runSourcePayload -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n runSource({ sourceID, runSourcePayload }, requestOptions) {\n if (!sourceID) {\n throw new Error(\"Parameter `sourceID` is required when calling `runSource`.\");\n }\n const requestPath = \"/1/sources/{sourceID}/run\".replace(\"{sourceID}\", encodeURIComponent(sourceID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: runSourcePayload ? runSourcePayload : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Runs a task. You can check the status of task runs with the observability endpoints.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param runTask - The runTask object.\n * @param runTask.taskID - Unique identifier of a task.\n * @param runTask.runTaskPayload -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n runTask({ taskID, runTaskPayload }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `runTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}/run\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: runTaskPayload ? runTaskPayload : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n *\n * @deprecated\n * @param runTaskV1 - The runTaskV1 object.\n * @param runTaskV1.taskID - Unique identifier of a task.\n * @param runTaskV1.runTaskPayload -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n runTaskV1({ taskID, runTaskPayload }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `runTaskV1`.\");\n }\n const requestPath = \"/1/tasks/{taskID}/run\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: runTaskPayload ? runTaskPayload : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for authentication resources.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param authenticationSearch - The authenticationSearch object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchAuthentications(authenticationSearch, requestOptions) {\n if (!authenticationSearch) {\n throw new Error(\"Parameter `authenticationSearch` is required when calling `searchAuthentications`.\");\n }\n if (!authenticationSearch.authenticationIDs) {\n throw new Error(\n \"Parameter `authenticationSearch.authenticationIDs` is required when calling `searchAuthentications`.\"\n );\n }\n const requestPath = \"/1/authentications/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: authenticationSearch\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for destinations.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param destinationSearch - The destinationSearch object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchDestinations(destinationSearch, requestOptions) {\n if (!destinationSearch) {\n throw new Error(\"Parameter `destinationSearch` is required when calling `searchDestinations`.\");\n }\n if (!destinationSearch.destinationIDs) {\n throw new Error(\"Parameter `destinationSearch.destinationIDs` is required when calling `searchDestinations`.\");\n }\n const requestPath = \"/1/destinations/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: destinationSearch\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for sources.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param sourceSearch - The sourceSearch object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchSources(sourceSearch, requestOptions) {\n if (!sourceSearch) {\n throw new Error(\"Parameter `sourceSearch` is required when calling `searchSources`.\");\n }\n if (!sourceSearch.sourceIDs) {\n throw new Error(\"Parameter `sourceSearch.sourceIDs` is required when calling `searchSources`.\");\n }\n const requestPath = \"/1/sources/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: sourceSearch\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for tasks.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param taskSearch - The taskSearch object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchTasks(taskSearch, requestOptions) {\n if (!taskSearch) {\n throw new Error(\"Parameter `taskSearch` is required when calling `searchTasks`.\");\n }\n if (!taskSearch.taskIDs) {\n throw new Error(\"Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.\");\n }\n const requestPath = \"/2/tasks/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskSearch\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for tasks using the v1 endpoint, please use `searchTasks` instead.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n *\n * @deprecated\n * @param taskSearch - The taskSearch object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchTasksV1(taskSearch, requestOptions) {\n if (!taskSearch) {\n throw new Error(\"Parameter `taskSearch` is required when calling `searchTasksV1`.\");\n }\n if (!taskSearch.taskIDs) {\n throw new Error(\"Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.\");\n }\n const requestPath = \"/1/tasks/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskSearch\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for transformations.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param transformationSearch - The transformationSearch object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchTransformations(transformationSearch, requestOptions) {\n if (!transformationSearch) {\n throw new Error(\"Parameter `transformationSearch` is required when calling `searchTransformations`.\");\n }\n if (!transformationSearch.transformationIDs) {\n throw new Error(\n \"Parameter `transformationSearch.transformationIDs` is required when calling `searchTransformations`.\"\n );\n }\n const requestPath = \"/1/transformations/search\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: transformationSearch\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: airbyte`.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param triggerDockerSourceDiscover - The triggerDockerSourceDiscover object.\n * @param triggerDockerSourceDiscover.sourceID - Unique identifier of a source.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n triggerDockerSourceDiscover({ sourceID }, requestOptions) {\n if (!sourceID) {\n throw new Error(\"Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.\");\n }\n const requestPath = \"/1/sources/{sourceID}/discover\".replace(\"{sourceID}\", encodeURIComponent(sourceID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers\n };\n requestOptions = {\n timeouts: {\n connect: 18e4,\n read: 18e4,\n write: 18e4,\n ...requestOptions?.timeouts\n }\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Try a transformation before creating it.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param transformationTry - The transformationTry object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n tryTransformation(transformationTry, requestOptions) {\n if (!transformationTry) {\n throw new Error(\"Parameter `transformationTry` is required when calling `tryTransformation`.\");\n }\n if (!transformationTry.sampleRecord) {\n throw new Error(\"Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.\");\n }\n const requestPath = \"/1/transformations/try\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: transformationTry\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Try a transformation before updating it.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param tryTransformationBeforeUpdate - The tryTransformationBeforeUpdate object.\n * @param tryTransformationBeforeUpdate.transformationID - Unique identifier of a transformation.\n * @param tryTransformationBeforeUpdate.transformationTry - The transformationTry object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n tryTransformationBeforeUpdate({ transformationID, transformationTry }, requestOptions) {\n if (!transformationID) {\n throw new Error(\"Parameter `transformationID` is required when calling `tryTransformationBeforeUpdate`.\");\n }\n if (!transformationTry) {\n throw new Error(\"Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.\");\n }\n if (!transformationTry.sampleRecord) {\n throw new Error(\n \"Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`.\"\n );\n }\n const requestPath = \"/1/transformations/{transformationID}/try\".replace(\n \"{transformationID}\",\n encodeURIComponent(transformationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: transformationTry\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates an authentication resource.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param updateAuthentication - The updateAuthentication object.\n * @param updateAuthentication.authenticationID - Unique identifier of an authentication resource.\n * @param updateAuthentication.authenticationUpdate - The authenticationUpdate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateAuthentication({ authenticationID, authenticationUpdate }, requestOptions) {\n if (!authenticationID) {\n throw new Error(\"Parameter `authenticationID` is required when calling `updateAuthentication`.\");\n }\n if (!authenticationUpdate) {\n throw new Error(\"Parameter `authenticationUpdate` is required when calling `updateAuthentication`.\");\n }\n const requestPath = \"/1/authentications/{authenticationID}\".replace(\n \"{authenticationID}\",\n encodeURIComponent(authenticationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PATCH\",\n path: requestPath,\n queryParameters,\n headers,\n data: authenticationUpdate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates the destination by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param updateDestination - The updateDestination object.\n * @param updateDestination.destinationID - Unique identifier of a destination.\n * @param updateDestination.destinationUpdate - The destinationUpdate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateDestination({ destinationID, destinationUpdate }, requestOptions) {\n if (!destinationID) {\n throw new Error(\"Parameter `destinationID` is required when calling `updateDestination`.\");\n }\n if (!destinationUpdate) {\n throw new Error(\"Parameter `destinationUpdate` is required when calling `updateDestination`.\");\n }\n const requestPath = \"/1/destinations/{destinationID}\".replace(\n \"{destinationID}\",\n encodeURIComponent(destinationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PATCH\",\n path: requestPath,\n queryParameters,\n headers,\n data: destinationUpdate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates a source by its ID.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param updateSource - The updateSource object.\n * @param updateSource.sourceID - Unique identifier of a source.\n * @param updateSource.sourceUpdate - The sourceUpdate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateSource({ sourceID, sourceUpdate }, requestOptions) {\n if (!sourceID) {\n throw new Error(\"Parameter `sourceID` is required when calling `updateSource`.\");\n }\n if (!sourceUpdate) {\n throw new Error(\"Parameter `sourceUpdate` is required when calling `updateSource`.\");\n }\n const requestPath = \"/1/sources/{sourceID}\".replace(\"{sourceID}\", encodeURIComponent(sourceID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PATCH\",\n path: requestPath,\n queryParameters,\n headers,\n data: sourceUpdate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Partially updates a task by its ID.\n * @param updateTask - The updateTask object.\n * @param updateTask.taskID - Unique identifier of a task.\n * @param updateTask.taskUpdate - The taskUpdate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateTask({ taskID, taskUpdate }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `updateTask`.\");\n }\n if (!taskUpdate) {\n throw new Error(\"Parameter `taskUpdate` is required when calling `updateTask`.\");\n }\n const requestPath = \"/2/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PATCH\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskUpdate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates a task by its ID using the v1 endpoint, please use `updateTask` instead.\n *\n * @deprecated\n * @param updateTaskV1 - The updateTaskV1 object.\n * @param updateTaskV1.taskID - Unique identifier of a task.\n * @param updateTaskV1.taskUpdate - The taskUpdate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateTaskV1({ taskID, taskUpdate }, requestOptions) {\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `updateTaskV1`.\");\n }\n if (!taskUpdate) {\n throw new Error(\"Parameter `taskUpdate` is required when calling `updateTaskV1`.\");\n }\n const requestPath = \"/1/tasks/{taskID}\".replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PATCH\",\n path: requestPath,\n queryParameters,\n headers,\n data: taskUpdate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates a transformation by its ID.\n * @param updateTransformation - The updateTransformation object.\n * @param updateTransformation.transformationID - Unique identifier of a transformation.\n * @param updateTransformation.transformationCreate - The transformationCreate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateTransformation({ transformationID, transformationCreate }, requestOptions) {\n if (!transformationID) {\n throw new Error(\"Parameter `transformationID` is required when calling `updateTransformation`.\");\n }\n if (!transformationCreate) {\n throw new Error(\"Parameter `transformationCreate` is required when calling `updateTransformation`.\");\n }\n if (!transformationCreate.name) {\n throw new Error(\"Parameter `transformationCreate.name` is required when calling `updateTransformation`.\");\n }\n const requestPath = \"/1/transformations/{transformationID}\".replace(\n \"{transformationID}\",\n encodeURIComponent(transformationID)\n );\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: transformationCreate\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Validates a source payload to ensure it can be created and that the data source can be reached by Algolia.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param sourceCreate -\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n validateSource(sourceCreate, requestOptions = void 0) {\n const requestPath = \"/1/sources/validate\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: sourceCreate ? sourceCreate : {}\n };\n requestOptions = {\n timeouts: {\n connect: 18e4,\n read: 18e4,\n write: 18e4,\n ...requestOptions?.timeouts\n }\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.\n *\n * Required API Key ACLs:\n * - addObject\n * - deleteIndex\n * - editSettings\n * @param validateSourceBeforeUpdate - The validateSourceBeforeUpdate object.\n * @param validateSourceBeforeUpdate.sourceID - Unique identifier of a source.\n * @param validateSourceBeforeUpdate.sourceUpdate - The sourceUpdate object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n validateSourceBeforeUpdate({ sourceID, sourceUpdate }, requestOptions) {\n if (!sourceID) {\n throw new Error(\"Parameter `sourceID` is required when calling `validateSourceBeforeUpdate`.\");\n }\n if (!sourceUpdate) {\n throw new Error(\"Parameter `sourceUpdate` is required when calling `validateSourceBeforeUpdate`.\");\n }\n const requestPath = \"/1/sources/{sourceID}/validate\".replace(\"{sourceID}\", encodeURIComponent(sourceID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: sourceUpdate\n };\n requestOptions = {\n timeouts: {\n connect: 18e4,\n read: 18e4,\n write: 18e4,\n ...requestOptions?.timeouts\n }\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction ingestionClient(appId, apiKey, region, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n if (!region || region && (typeof region !== \"string\" || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` is required and must be one of the following: ${REGIONS.join(\", \")}`);\n }\n return createIngestionClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 25e3,\n read: 25e3,\n write: 25e3\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n ingestionClient,\n isOnDemandTrigger,\n isScheduleTrigger,\n isSubscriptionTrigger\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/monitoringClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent } from \"@algolia/client-common\";\nvar apiClientVersion = \"1.41.0\";\nfunction getDefaultHosts() {\n return [{ url: \"status.algolia.com\", accept: \"readWrite\", protocol: \"https\" }];\n}\nfunction createMonitoringClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Monitoring\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves known incidents for the selected clusters.\n * @param getClusterIncidents - The getClusterIncidents object.\n * @param getClusterIncidents.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClusterIncidents({ clusters }, requestOptions) {\n if (!clusters) {\n throw new Error(\"Parameter `clusters` is required when calling `getClusterIncidents`.\");\n }\n const requestPath = \"/1/incidents/{clusters}\".replace(\"{clusters}\", encodeURIComponent(clusters));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the status of selected clusters.\n * @param getClusterStatus - The getClusterStatus object.\n * @param getClusterStatus.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClusterStatus({ clusters }, requestOptions) {\n if (!clusters) {\n throw new Error(\"Parameter `clusters` is required when calling `getClusterStatus`.\");\n }\n const requestPath = \"/1/status/{clusters}\".replace(\"{clusters}\", encodeURIComponent(clusters));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves known incidents for all clusters.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getIncidents(requestOptions) {\n const requestPath = \"/1/incidents\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves average times for indexing operations for selected clusters.\n * @param getIndexingTime - The getIndexingTime object.\n * @param getIndexingTime.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getIndexingTime({ clusters }, requestOptions) {\n if (!clusters) {\n throw new Error(\"Parameter `clusters` is required when calling `getIndexingTime`.\");\n }\n const requestPath = \"/1/indexing/{clusters}\".replace(\"{clusters}\", encodeURIComponent(clusters));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the average latency for search requests for selected clusters.\n * @param getLatency - The getLatency object.\n * @param getLatency.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLatency({ clusters }, requestOptions) {\n if (!clusters) {\n throw new Error(\"Parameter `clusters` is required when calling `getLatency`.\");\n }\n const requestPath = \"/1/latency/{clusters}\".replace(\"{clusters}\", encodeURIComponent(clusters));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves metrics related to your Algolia infrastructure, aggregated over a selected time window. Access to this API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing). You must authenticate requests with the `x-algolia-application-id` and `x-algolia-api-key` headers (using the Monitoring API key).\n * @param getMetrics - The getMetrics object.\n * @param getMetrics.metric - Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use `*`.\n * @param getMetrics.period - Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getMetrics({ metric, period }, requestOptions) {\n if (!metric) {\n throw new Error(\"Parameter `metric` is required when calling `getMetrics`.\");\n }\n if (!period) {\n throw new Error(\"Parameter `period` is required when calling `getMetrics`.\");\n }\n const requestPath = \"/1/infrastructure/{metric}/period/{period}\".replace(\"{metric}\", encodeURIComponent(metric)).replace(\"{period}\", encodeURIComponent(period));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Test whether clusters are reachable or not.\n * @param getReachability - The getReachability object.\n * @param getReachability.clusters - Subset of clusters, separated by commas.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getReachability({ clusters }, requestOptions) {\n if (!clusters) {\n throw new Error(\"Parameter `clusters` is required when calling `getReachability`.\");\n }\n const requestPath = \"/1/reachability/{clusters}/probes\".replace(\"{clusters}\", encodeURIComponent(clusters));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the servers that belong to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application\\'s cluster. - Without authentication, the response lists the servers for all Algolia clusters.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getServers(requestOptions) {\n const requestPath = \"/1/inventory/servers\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the status of all Algolia clusters and instances.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getStatus(requestOptions) {\n const requestPath = \"/1/status\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction monitoringClient(appId, apiKey, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n return createMonitoringClient({\n appId,\n apiKey,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n monitoringClient\n};\n//# sourceMappingURL=browser.js.map","// builds/browser.ts\nimport { createXhrRequester } from \"@algolia/requester-browser-xhr\";\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger\n} from \"@algolia/client-common\";\n\n// src/recommendClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent, shuffle } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.41.0\";\nfunction getDefaultHosts(appId) {\n return [\n {\n url: `${appId}-dsn.algolia.net`,\n accept: \"read\",\n protocol: \"https\"\n },\n {\n url: `${appId}.algolia.net`,\n accept: \"write\",\n protocol: \"https\"\n }\n ].concat(\n shuffle([\n {\n url: `${appId}-1.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n },\n {\n url: `${appId}-2.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n },\n {\n url: `${appId}-3.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n }\n ])\n );\n}\nfunction createRecommendClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Recommend\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Create or update a batch of Recommend Rules Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions `pattern` and `anchoring` are unavailable. - Condition `filters` triggers if the source item matches the specified filters. - Condition `filters` accepts numeric filters. - Consequence `params` only covers filtering parameters. - Consequence `automaticFacetFilters` doesn\\'t require a facet value placeholder (it tries to match the data source item\\'s attributes instead).\n *\n * Required API Key ACLs:\n * - editSettings\n * @param batchRecommendRules - The batchRecommendRules object.\n * @param batchRecommendRules.indexName - Name of the index on which to perform the operation.\n * @param batchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).\n * @param batchRecommendRules.recommendRule - The recommendRule object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n batchRecommendRules({ indexName, model, recommendRule }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `batchRecommendRules`.\");\n }\n if (!model) {\n throw new Error(\"Parameter `model` is required when calling `batchRecommendRules`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{model}/recommend/rules/batch\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{model}\", encodeURIComponent(model));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: recommendRule ? recommendRule : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customDelete`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customGet`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPut`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"PUT\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a Recommend rule from a recommendation scenario.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteRecommendRule - The deleteRecommendRule object.\n * @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.\n * @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).\n * @param deleteRecommendRule.objectID - Unique record identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteRecommendRule({ indexName, model, objectID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `deleteRecommendRule`.\");\n }\n if (!model) {\n throw new Error(\"Parameter `model` is required when calling `deleteRecommendRule`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `deleteRecommendRule`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{model}\", encodeURIComponent(model)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"DELETE\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a Recommend rule that you previously created in the Algolia dashboard.\n *\n * Required API Key ACLs:\n * - settings\n * @param getRecommendRule - The getRecommendRule object.\n * @param getRecommendRule.indexName - Name of the index on which to perform the operation.\n * @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).\n * @param getRecommendRule.objectID - Unique record identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRecommendRule({ indexName, model, objectID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getRecommendRule`.\");\n }\n if (!model) {\n throw new Error(\"Parameter `model` is required when calling `getRecommendRule`.\");\n }\n if (!objectID) {\n throw new Error(\"Parameter `objectID` is required when calling `getRecommendRule`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{model}\", encodeURIComponent(model)).replace(\"{objectID}\", encodeURIComponent(objectID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Checks the status of a given task. Deleting a Recommend rule is asynchronous. When you delete a rule, a task is created on a queue and completed depending on the load on the server. The API response includes a task ID that you can use to check the status.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param getRecommendStatus - The getRecommendStatus object.\n * @param getRecommendStatus.indexName - Name of the index on which to perform the operation.\n * @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).\n * @param getRecommendStatus.taskID - Unique task identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRecommendStatus({ indexName, model, taskID }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `getRecommendStatus`.\");\n }\n if (!model) {\n throw new Error(\"Parameter `model` is required when calling `getRecommendStatus`.\");\n }\n if (!taskID) {\n throw new Error(\"Parameter `taskID` is required when calling `getRecommendStatus`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{model}/task/{taskID}\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{model}\", encodeURIComponent(model)).replace(\"{taskID}\", encodeURIComponent(taskID));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"GET\",\n path: requestPath,\n queryParameters,\n headers\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves recommendations from selected AI models.\n *\n * Required API Key ACLs:\n * - search\n * @param getRecommendationsParams - The getRecommendationsParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRecommendations(getRecommendationsParams, requestOptions) {\n if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {\n const newSignatureRequest = {\n requests: getRecommendationsParams\n };\n getRecommendationsParams = newSignatureRequest;\n }\n if (!getRecommendationsParams) {\n throw new Error(\"Parameter `getRecommendationsParams` is required when calling `getRecommendations`.\");\n }\n if (!getRecommendationsParams.requests) {\n throw new Error(\"Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.\");\n }\n const requestPath = \"/1/indexes/*/recommendations\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: getRecommendationsParams,\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.\n *\n * Required API Key ACLs:\n * - settings\n * @param searchRecommendRules - The searchRecommendRules object.\n * @param searchRecommendRules.indexName - Name of the index on which to perform the operation.\n * @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).\n * @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchRecommendRules({ indexName, model, searchRecommendRulesParams }, requestOptions) {\n if (!indexName) {\n throw new Error(\"Parameter `indexName` is required when calling `searchRecommendRules`.\");\n }\n if (!model) {\n throw new Error(\"Parameter `model` is required when calling `searchRecommendRules`.\");\n }\n const requestPath = \"/1/indexes/{indexName}/{model}/recommend/rules/search\".replace(\"{indexName}\", encodeURIComponent(indexName)).replace(\"{model}\", encodeURIComponent(model));\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchRecommendRulesParams ? searchRecommendRulesParams : {},\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// builds/browser.ts\nfunction recommendClient(appId, apiKey, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n return createRecommendClient({\n appId,\n apiKey,\n timeouts: {\n connect: 1e3,\n read: 2e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: \"Browser\" }],\n authMode: \"WithinQueryParameters\",\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]\n }),\n ...options\n });\n}\nexport {\n apiClientVersion,\n recommendClient\n};\n//# sourceMappingURL=browser.js.map","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\n\n// builds/browser.ts\nvar browser_exports = {};\n__export(browser_exports, {\n algoliasearch: () => algoliasearch,\n apiClientVersion: () => apiClientVersion\n});\nimport { abtestingV3Client } from \"@algolia/abtesting\";\nimport { abtestingClient } from \"@algolia/client-abtesting\";\nimport { analyticsClient } from \"@algolia/client-analytics\";\nimport { insightsClient } from \"@algolia/client-insights\";\nimport { personalizationClient } from \"@algolia/client-personalization\";\nimport { querySuggestionsClient } from \"@algolia/client-query-suggestions\";\nimport { searchClient } from \"@algolia/client-search\";\nimport { ingestionClient } from \"@algolia/ingestion\";\nimport { monitoringClient } from \"@algolia/monitoring\";\nimport { recommendClient } from \"@algolia/recommend\";\n\n// builds/models.ts\nvar models_exports = {};\n__export(models_exports, {\n apiClientVersion: () => apiClientVersion\n});\n__reExport(models_exports, abtesting_star);\n__reExport(models_exports, client_abtesting_star);\n__reExport(models_exports, client_analytics_star);\n__reExport(models_exports, client_insights_star);\n__reExport(models_exports, client_personalization_star);\n__reExport(models_exports, client_query_suggestions_star);\n__reExport(models_exports, client_search_star);\n__reExport(models_exports, ingestion_star);\n__reExport(models_exports, monitoring_star);\n__reExport(models_exports, recommend_star);\nimport { apiClientVersion } from \"@algolia/client-search\";\nimport * as abtesting_star from \"@algolia/abtesting\";\nimport * as client_abtesting_star from \"@algolia/client-abtesting\";\nimport * as client_analytics_star from \"@algolia/client-analytics\";\nimport * as client_insights_star from \"@algolia/client-insights\";\nimport * as client_personalization_star from \"@algolia/client-personalization\";\nimport * as client_query_suggestions_star from \"@algolia/client-query-suggestions\";\nimport * as client_search_star from \"@algolia/client-search\";\nimport * as ingestion_star from \"@algolia/ingestion\";\nimport * as monitoring_star from \"@algolia/monitoring\";\nimport * as recommend_star from \"@algolia/recommend\";\n\n// builds/browser.ts\n__reExport(browser_exports, models_exports);\nfunction algoliasearch(appId, apiKey, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n const client = searchClient(appId, apiKey, options);\n let ingestionTransporter;\n if (options?.transformation) {\n if (!options.transformation.region) {\n throw new Error(\"`region` must be provided when leveraging the transformation pipeline\");\n }\n ingestionTransporter = ingestionClient(appId, apiKey, options.transformation.region, options);\n }\n return {\n ...client,\n async saveObjectsWithTransformation({ indexName, objects, waitForTasks }, requestOptions) {\n if (!ingestionTransporter) {\n throw new Error(\"`transformation.region` must be provided at client instantiation before calling this method.\");\n }\n if (!options?.transformation?.region) {\n throw new Error(\"`region` must be provided when leveraging the transformation pipeline\");\n }\n return ingestionTransporter.chunkedPush(\n { indexName, objects, action: \"addObject\", waitForTasks },\n requestOptions\n );\n },\n async partialUpdateObjectsWithTransformation({ indexName, objects, createIfNotExists, waitForTasks }, requestOptions) {\n if (!ingestionTransporter) {\n throw new Error(\"`transformation.region` must be provided at client instantiation before calling this method.\");\n }\n if (!options?.transformation?.region) {\n throw new Error(\"`region` must be provided when leveraging the transformation pipeline\");\n }\n return ingestionTransporter.chunkedPush(\n {\n indexName,\n objects,\n action: createIfNotExists ? \"partialUpdateObject\" : \"partialUpdateObjectNoCreate\",\n waitForTasks\n },\n requestOptions\n );\n },\n async replaceAllObjectsWithTransformation({ indexName, objects, batchSize, scopes }, requestOptions) {\n if (!ingestionTransporter) {\n throw new Error(\"`transformation.region` must be provided at client instantiation before calling this method.\");\n }\n if (!options?.transformation?.region) {\n throw new Error(\"`region` must be provided when leveraging the transformation pipeline\");\n }\n const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;\n const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;\n if (scopes === void 0) {\n scopes = [\"settings\", \"rules\", \"synonyms\"];\n }\n try {\n let copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: \"copy\",\n destination: tmpIndexName,\n scope: scopes\n }\n },\n requestOptions\n );\n const watchResponses = await ingestionTransporter.chunkedPush(\n { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, referenceIndexName: indexName },\n requestOptions\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID\n });\n copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: \"copy\",\n destination: tmpIndexName,\n scope: scopes\n }\n },\n requestOptions\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID\n });\n const moveOperationResponse = await this.operationIndex(\n {\n indexName: tmpIndexName,\n operationIndexParams: { operation: \"move\", destination: indexName }\n },\n requestOptions\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: moveOperationResponse.taskID\n });\n return { copyOperationResponse, watchResponses, moveOperationResponse };\n } catch (error) {\n await this.deleteIndex({ indexName: tmpIndexName });\n throw error;\n }\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return client.transporter.algoliaAgent.value;\n },\n initAbtesting: (initOptions) => {\n return abtestingClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initAbtestingV3: (initOptions) => {\n return abtestingV3Client(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initAnalytics: (initOptions) => {\n return analyticsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initIngestion: (initOptions) => {\n return ingestionClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initInsights: (initOptions) => {\n return insightsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initMonitoring: (initOptions = {}) => {\n return monitoringClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n },\n initPersonalization: (initOptions) => {\n return personalizationClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initQuerySuggestions: (initOptions) => {\n return querySuggestionsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options\n );\n },\n initRecommend: (initOptions = {}) => {\n return recommendClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n }\n };\n}\nexport {\n algoliasearch,\n apiClientVersion\n};\n//# sourceMappingURL=browser.js.map","import { algoliasearch } from 'algoliasearch'\nimport { getEnv } from '../../config/env'\nimport { algoliaClient } from '../../services/blogClient'\nimport type { SearchResult } from '../../shared/blog/types/blog.domain'\nimport { resolveAssetUrl, resolveEntrySlug } from '../blog/blog.helpers'\nimport type { AlgoliaHit, SearchBlogPostsParams, SearchBlogPostsResponse, SearchBlogResult } from './search.types'\n\nconst algoliaAppId = getEnv('ALGOLIA_APP_ID') || ''\nconst algoliaApiKey = getEnv('ALGOLIA_API_KEY') || ''\nconst algoliaIndex = getEnv('ALGOLIA_BLOG_INDEX') || 'decentraland-blog'\n\nconst searchClient = algoliaClient.injectEndpoints({\n endpoints: build => ({\n searchBlogPosts: build.query<SearchBlogPostsResponse, SearchBlogPostsParams>({\n queryFn: async ({ query, hitsPerPage = 10, page = 0 }) => {\n try {\n if (query.length < 3) {\n return {\n data: {\n results: [],\n total: 0,\n hasMore: false\n }\n }\n }\n\n const client = algoliasearch(algoliaAppId, algoliaApiKey)\n const searchResponse = await client.searchSingleIndex({\n indexName: algoliaIndex,\n searchParams: {\n query,\n hitsPerPage,\n page\n }\n })\n\n const hits = (searchResponse.hits || []) as AlgoliaHit[]\n\n // Resolve all assets and categories in parallel\n const searchResults: SearchResult[] = await Promise.all(\n hits.map(async (hit: AlgoliaHit) => {\n // Get asset ID from imageObject reference\n const imgObj = hit.imageObject as { sys?: { id?: string } } | undefined\n const assetId = imgObj?.sys?.id || ''\n\n // Get category ID from categoryObject reference\n const catObj = hit.categoryObject as { sys?: { id?: string } } | undefined\n const categoryId = catObj?.sys?.id || ''\n\n // Resolve asset URL and category slug in parallel\n const [imageUrl, categorySlug] = await Promise.all([resolveAssetUrl(assetId), resolveEntrySlug(categoryId)])\n\n return {\n url: `/blog/${categorySlug}/${hit.id}`,\n image: imageUrl,\n title: hit._highlightResult?.title?.value || hit.title,\n description: hit._highlightResult?.description?.value || hit.description\n }\n })\n )\n\n return {\n data: {\n results: searchResults,\n total: (searchResponse.nbHits as number) || 0,\n hasMore: (page + 1) * hitsPerPage < ((searchResponse.nbHits as number) || 0)\n }\n }\n } catch (error) {\n return {\n error: {\n status: 'CUSTOM_ERROR',\n error: error instanceof Error ? error.message : 'Unknown error'\n }\n }\n }\n },\n providesTags: (_result, _error, arg) => [{ type: 'SearchResults', id: arg.query }]\n }),\n searchBlog: build.query<SearchBlogResult[], SearchBlogPostsParams>({\n queryFn: async ({ query, hitsPerPage = 10, page = 0 }) => {\n try {\n if (query.length < 3) {\n return { data: [] }\n }\n\n const client = algoliasearch(algoliaAppId, algoliaApiKey)\n const searchResponse = await client.searchSingleIndex({\n indexName: algoliaIndex,\n searchParams: {\n query,\n hitsPerPage,\n page\n }\n })\n\n const hits = (searchResponse.hits || []) as AlgoliaHit[]\n\n const searchResults: SearchBlogResult[] = await Promise.all(\n hits.map(async (hit: AlgoliaHit) => {\n const imgObj = hit.imageObject as { sys?: { id?: string } } | undefined\n const assetId = imgObj?.sys?.id || ''\n\n const catObj = hit.categoryObject as { sys?: { id?: string } } | undefined\n const categoryId = catObj?.sys?.id || ''\n\n const [imageUrl, categorySlug] = await Promise.all([resolveAssetUrl(assetId), resolveEntrySlug(categoryId)])\n\n return {\n id: hit.id,\n categoryId: categorySlug,\n url: `/blog/${categorySlug}/${hit.id}`,\n image: imageUrl,\n highlightedTitle: hit._highlightResult?.title?.value || hit.title,\n highlightedDescription: hit._highlightResult?.description?.value || hit.description\n }\n })\n )\n\n return { data: searchResults }\n } catch (error) {\n return {\n error: {\n status: 'CUSTOM_ERROR',\n error: error instanceof Error ? error.message : 'Unknown error'\n }\n }\n }\n },\n providesTags: (_result, _error, arg) => [{ type: 'SearchResults', id: arg.query }]\n })\n }),\n overrideExisting: false\n})\n\nconst { useLazySearchBlogPostsQuery, useSearchBlogPostsQuery, useSearchBlogQuery } = searchClient\n\nexport { searchClient, useLazySearchBlogPostsQuery, useSearchBlogPostsQuery, useSearchBlogQuery }\n","/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */\n\nconst {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n} = Object;\nlet {\n freeze,\n seal,\n create\n} = Object; // eslint-disable-line import/no-mutable-exports\nlet {\n apply,\n construct\n} = typeof Reflect !== 'undefined' && Reflect;\nif (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n}\nif (!seal) {\n seal = function seal(x) {\n return x;\n };\n}\nif (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n}\nif (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n}\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySplice = unapply(Array.prototype.splice);\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param func - The function to be wrapped and called.\n * @returns A new function that calls the given function with a specified thisArg and arguments.\n */\nfunction unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return apply(func, thisArg, args);\n };\n}\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param func - The constructor function to be wrapped and called.\n * @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n */\nfunction unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return construct(func, args);\n };\n}\n/**\n * Add properties to a lookup table\n *\n * @param set - The set to which elements will be added.\n * @param array - The array containing elements to be added to the set.\n * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns The modified set with added elements.\n */\nfunction addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n element = lcElement;\n }\n }\n set[element] = true;\n }\n return set;\n}\n/**\n * Clean up an array to harden against CSPP\n *\n * @param array - The array to be cleaned.\n * @returns The cleaned version of the array\n */\nfunction cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n return array;\n}\n/**\n * Shallow clone an object\n *\n * @param object - The object to be cloned.\n * @returns A new object that copies the original.\n */\nfunction clone(object) {\n const newObject = create(null);\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n if (isPropertyExist) {\n if (Array.isArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (value && typeof value === 'object' && value.constructor === Object) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n return newObject;\n}\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param object - The object to look up the getter function in its prototype chain.\n * @param prop - The property name for which to find the getter function.\n * @returns The getter function found in the prototype chain or a fallback function.\n */\nfunction lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n object = getPrototypeOf(object);\n }\n function fallbackValue() {\n return null;\n }\n return fallbackValue;\n}\n\nconst html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\nconst svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\nconst svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nconst svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\nconst mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nconst mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\nconst text = freeze(['#text']);\n\nconst html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);\nconst svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\nconst mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\nconst xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n// eslint-disable-next-line unicorn/better-regex\nconst MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\nconst ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\nconst TMPLIT_EXPR = seal(/\\$\\{[\\w\\W]*/gm); // eslint-disable-line unicorn/better-regex\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nconst DOCTYPE_NAME = seal(/^html$/i);\nconst CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\nvar EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n ARIA_ATTR: ARIA_ATTR,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n CUSTOM_ELEMENT: CUSTOM_ELEMENT,\n DATA_ATTR: DATA_ATTR,\n DOCTYPE_NAME: DOCTYPE_NAME,\n ERB_EXPR: ERB_EXPR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR\n});\n\n/* eslint-disable @typescript-eslint/indent */\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\nconst NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5,\n // Deprecated\n entityNode: 6,\n // Deprecated\n progressingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12 // Deprecated\n};\nconst getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n};\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param trustedTypes The policy factory.\n * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n};\nconst _createHooksMap = function _createHooksMap() {\n return {\n afterSanitizeAttributes: [],\n afterSanitizeElements: [],\n afterSanitizeShadowDOM: [],\n beforeSanitizeAttributes: [],\n beforeSanitizeElements: [],\n beforeSanitizeShadowDOM: [],\n uponSanitizeAttribute: [],\n uponSanitizeElement: [],\n uponSanitizeShadowNode: []\n };\n};\nfunction createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n const DOMPurify = root => createDOMPurify(root);\n DOMPurify.version = '3.2.4';\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const remove = lookupGetter(ElementPrototype, 'remove');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = _createHooksMap();\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n /*\n * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n /* Decide if document with <html>... should be returned */\n let WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n const formElement = document.createElement('form');\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n /* Set configuration parameters */\n ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;\n HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, text);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n }\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n // Sign local variables required by `sanitize`.\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n }\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n CONFIG = cfg;\n };\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n /**\n * @param element a DOM element whose namespace is being checked\n * @returns Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element);\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via <svg>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n // The only way to switch from MathML to SVG is via`\n // svg if parent is either <annotation-xml> or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via <math>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n // The only way to switch from SVG to MathML is via\n // <math> and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n // For XHTML and XML documents that support custom namespaces\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n }\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n /**\n * _forceRemove\n *\n * @param node a DOM node\n */\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n getParentNode(node).removeChild(node);\n } catch (_) {\n remove(node);\n }\n };\n /**\n * _removeAttribute\n *\n * @param name an Attribute name\n * @param element a DOM node\n */\n const _removeAttribute = function _removeAttribute(name, element) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: element.getAttributeNode(name),\n from: element\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: element\n });\n }\n element.removeAttribute(name);\n // We void attribute values for unremovable \"is\" attributes\n if (name === 'is') {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(element);\n } catch (_) {}\n } else {\n try {\n element.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n /**\n * _initDocument\n *\n * @param dirty - a string of dirty markup\n * @return a DOM, filled with the dirty markup\n */\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n if (FORCE_BODY) {\n dirty = '<remove></remove>' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n }\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n const body = doc.body || doc.documentElement;\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param root The root element or node to start traversing on.\n * @return The created NodeIterator\n */\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n };\n /**\n * _isClobbered\n *\n * @param element element to check for clobbering attacks\n * @return true if clobbered, false if safe\n */\n const _isClobbered = function _isClobbered(element) {\n return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');\n };\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param value object to check whether it's a DOM node\n * @return true is object is a DOM node\n */\n const _isNode = function _isNode(value) {\n return typeof Node === 'function' && value instanceof Node;\n };\n function _executeHooks(hooks, currentNode, data) {\n arrayForEach(hooks, hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n }\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n * @param currentNode to check for permission to exist\n * @return true if node was killed, false if left alive\n */\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n /* Execute a hook if present */\n _executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n /* Execute a hook if present */\n _executeHooks(hooks.uponSanitizeElement, currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* Detect mXSS attempts abusing namespace confusion */\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Remove any occurrence of processing instructions */\n if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n _forceRemove(currentNode);\n return true;\n }\n /* Remove any kind of possibly harmful comments */\n if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\\w]/g, currentNode.data)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n for (let i = childCount - 1; i >= 0; --i) {\n const childClone = cloneNode(childNodes[i], true);\n childClone.__removalCount = (currentNode.__removalCount || 0) + 1;\n parentNode.insertBefore(childClone, getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n }\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n /* Execute a hook if present */\n _executeHooks(hooks.afterSanitizeElements, currentNode, null);\n return false;\n };\n /**\n * _isValidAttribute\n *\n * @param lcTag Lowercase tag name of containing element.\n * @param lcName Lowercase attribute name.\n * @param value Attribute value.\n * @return Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if (\n // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||\n // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n return false;\n } else ;\n return true;\n };\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param tagName name of the tag of the node to sanitize\n * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n };\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param currentNode to sanitize\n */\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n const {\n attributes\n } = currentNode;\n /* Check if we have attributes; if not we might have a text node */\n if (!attributes || _isClobbered(currentNode)) {\n return;\n }\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR,\n forceKeepAttr: undefined\n };\n let l = attributes.length;\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode);\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n /* Work around a security issue with comments inside attributes */\n if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|title)/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n /* Is `value` valid for this attribute? */\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n /* Handle attributes that require Trusted Types */\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n } else {\n arrayPop(DOMPurify.removed);\n }\n } catch (_) {}\n }\n /* Execute a hook if present */\n _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n };\n /**\n * _sanitizeShadowDOM\n *\n * @param fragment to iterate over recursively\n */\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n /* Execute a hook if present */\n _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n /* Sanitize tags and elements */\n _sanitizeElements(shadowNode);\n /* Check attributes next */\n _sanitizeAttributes(shadowNode);\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n }\n /* Execute a hook if present */\n _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n };\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '<!-->';\n }\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n /* Clean up removed elements */\n DOMPurify.removed = [];\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('<!---->');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n /* Get node iterator */\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n _sanitizeElements(currentNode);\n /* Check attributes next */\n _sanitizeAttributes(currentNode);\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n }\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n return returnNode;\n }\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n /* Serialize doctype if allowed */\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n }\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n arrayPush(hooks[entryPoint], hookFunction);\n };\n DOMPurify.removeHook = function (entryPoint, hookFunction) {\n if (hookFunction !== undefined) {\n const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];\n }\n return arrayPop(hooks[entryPoint]);\n };\n DOMPurify.removeHooks = function (entryPoint) {\n hooks[entryPoint] = [];\n };\n DOMPurify.removeAllHooks = function () {\n hooks = _createHooksMap();\n };\n return DOMPurify;\n}\nvar purify = createDOMPurify();\n\nexport { purify as default };\n//# sourceMappingURL=purify.es.mjs.map\n","/* eslint-disable @typescript-eslint/naming-convention */\nimport DOMPurify from 'dompurify'\n\nconst sanitizeHighlight = (value: string): string =>\n DOMPurify.sanitize(value, {\n ALLOWED_TAGS: ['em', 'mark'],\n ALLOWED_ATTR: []\n })\n\nexport { sanitizeHighlight }\n","/**\n * Returns a CSS-safe url() value for use in backgroundImage.\n * Only allows https URLs; double-quotes are percent-encoded to prevent\n * CSS injection via a URL containing `\")` sequences.\n */\nconst safeCssUrl = (url: string): string => {\n try {\n const parsed = new URL(url)\n if (parsed.protocol !== 'https:') return ''\n return parsed.toString().replace(/\"/g, '%22')\n } catch {\n return ''\n }\n}\n\nexport { safeCssUrl }\n","/* eslint-disable @typescript-eslint/naming-convention */\nimport { Link } from 'react-router-dom'\nimport { Box, dclColors, styled } from 'decentraland-ui2'\nimport { safeCssUrl } from '../utils/safeCssUrl'\n\nconst SearchContainer = styled(Box, {\n shouldForwardProp: prop => prop !== '$hasResults'\n})<{ $hasResults: boolean }>(({ theme, $hasResults }) => ({\n position: 'relative',\n width: 'auto',\n zIndex: $hasResults ? theme.zIndex.modal : 1,\n [theme.breakpoints.down('sm')]: {\n width: '100%'\n }\n}))\n\nconst SearchOverlay = styled(Box)(({ theme }) => ({\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n zIndex: theme.zIndex.modal - 1\n}))\n\nconst SearchInputContent = styled(Box)(() => ({\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n width: '100%'\n}))\n\nconst SearchInput = styled(Box)(({ theme }) => ({\n width: '300px',\n padding: `${theme.spacing(1.5)} ${theme.spacing(5)} ${theme.spacing(1.5)} ${theme.spacing(2)}`,\n border: '1px solid rgba(255, 255, 255, 0.15)',\n borderRadius: theme.spacing(1),\n backgroundColor: 'rgba(255, 255, 255, 0.05)',\n color: theme.palette.text.primary,\n fontSize: '15px',\n outline: 'none',\n transition: 'all 200ms ease',\n\n '&::placeholder': {\n color: 'rgba(255, 255, 255, 0.5)'\n },\n\n '&:focus': {\n backgroundColor: 'rgba(255, 255, 255, 0.08)',\n borderColor: 'rgba(255, 255, 255, 0.25)'\n },\n\n '@media (max-width: 1450px)': {\n width: '100%',\n marginBottom: theme.spacing(2)\n }\n})).withComponent('input')\n\nconst SearchCloseButton = styled(Box)(({ theme }) => ({\n position: 'absolute',\n right: theme.spacing(1.5),\n top: '50%',\n transform: 'translateY(-50%)',\n background: 'none',\n border: 'none',\n color: 'rgba(255, 255, 255, 0.5)',\n fontSize: '24px',\n cursor: 'pointer',\n padding: theme.spacing(0.5),\n lineHeight: 1,\n transition: 'color 200ms ease',\n\n '&:hover': {\n color: theme.palette.text.primary\n }\n})).withComponent('button')\n\nconst SearchResults = styled(Box)(({ theme }) => ({\n position: 'absolute',\n top: `calc(100% + ${theme.spacing(1)})`,\n right: 0,\n width: '500px',\n maxWidth: '90vw',\n backgroundColor: theme.palette.background.paper,\n borderRadius: theme.spacing(1.5),\n boxShadow: '0 8px 24px rgba(0, 0, 0, 0.4)',\n listStyleType: 'none',\n margin: 0,\n padding: theme.spacing(1),\n maxHeight: '600px',\n overflowY: 'auto',\n zIndex: theme.zIndex.modal + 1,\n\n '@media (max-width: 1450px)': {\n width: `calc(100vw - ${theme.spacing(6)})`,\n left: 0,\n right: 'auto'\n }\n})).withComponent('ul')\n\nconst SearchResultItem = styled(Box, {\n shouldForwardProp: prop => prop !== '$selected'\n})<{ $selected: boolean }>(({ theme, $selected }) => ({\n borderRadius: theme.spacing(1),\n backgroundColor: $selected ? theme.palette.action.hover : 'transparent',\n transition: 'background-color 200ms ease',\n marginBottom: theme.spacing(0.5),\n\n '&:last-child': {\n marginBottom: 0\n }\n})).withComponent('li')\n\nconst SearchResultLink = styled(Link)(({ theme }) => ({\n display: 'flex',\n padding: theme.spacing(1.5),\n textDecoration: 'none',\n color: 'inherit',\n gap: theme.spacing(1.5)\n}))\n\nconst SearchResultImage = styled(Box, {\n shouldForwardProp: prop => prop !== '$image'\n})<{ $image?: string }>(({ theme, $image }) => ({\n width: '80px',\n height: '80px',\n flexShrink: 0,\n borderRadius: theme.spacing(1),\n backgroundColor: 'rgba(255, 255, 255, 0.05)',\n backgroundImage: $image ? `url(\"${safeCssUrl($image)}\")` : 'none',\n backgroundSize: 'cover',\n backgroundPosition: 'center'\n}))\n\nconst SearchResultText = styled(Box)(({ theme }) => ({\n flex: 1,\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n overflow: 'hidden'\n}))\n\nconst SearchResultTitle = styled(Box)(({ theme }) => ({\n color: theme.palette.text.primary,\n fontSize: '15px',\n fontWeight: 600,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n\n '& em': {\n fontStyle: 'normal',\n color: dclColors.base.primary\n }\n}))\n\nconst SearchResultDescription = styled(Box)(({ theme }) => ({\n color: theme.palette.text.secondary,\n fontSize: '13px',\n lineHeight: '1.5',\n overflow: 'hidden',\n display: '-webkit-box',\n WebkitLineClamp: 2,\n WebkitBoxOrient: 'vertical',\n\n '& em': {\n fontStyle: 'normal',\n color: dclColors.base.primary\n }\n}))\n\nconst NoResults = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n padding: `${theme.spacing(5)} ${theme.spacing(2.5)}`,\n textAlign: 'center',\n color: theme.palette.text.secondary,\n\n '& strong': {\n color: theme.palette.text.primary,\n fontSize: '17px',\n marginBottom: theme.spacing(1)\n },\n\n '& span': {\n fontSize: '15px'\n }\n})).withComponent('li')\n\nconst NoResultsImage = styled(Box)(({ theme }) => ({\n fontSize: '48px',\n marginBottom: theme.spacing(2),\n opacity: 0.5\n}))\n\nconst MoreResultsItem = styled(Box, {\n shouldForwardProp: prop => prop !== '$selected'\n})<{ $selected: boolean }>(({ theme, $selected }) => ({\n borderRadius: theme.spacing(1),\n backgroundColor: $selected ? theme.palette.action.hover : 'transparent',\n transition: 'background-color 200ms ease',\n marginTop: theme.spacing(0.5)\n})).withComponent('li')\n\nconst MoreResultsLink = styled(Link)(({ theme }) => ({\n display: 'block',\n padding: theme.spacing(1.5),\n textAlign: 'center',\n color: dclColors.base.primary,\n fontSize: '15px',\n fontWeight: 500,\n textDecoration: 'none',\n transition: 'opacity 200ms ease',\n\n '&:hover': {\n opacity: 0.8\n }\n}))\n\nexport {\n MoreResultsItem,\n MoreResultsLink,\n NoResults,\n NoResultsImage,\n SearchCloseButton,\n SearchContainer,\n SearchInput,\n SearchInputContent,\n SearchOverlay,\n SearchResultDescription,\n SearchResultImage,\n SearchResultItem,\n SearchResultLink,\n SearchResultText,\n SearchResultTitle,\n SearchResults\n}\n","import { useCallback, useEffect, useState } from 'react'\nimport { useNavigate } from 'react-router-dom'\nimport { useTranslation } from '@dcl/hooks'\nimport { useSearchBlogQuery } from '../../../features/search/search.client'\nimport { sanitizeHighlight } from './sanitizeHighlight'\nimport type { SearchProps } from './Search.types'\nimport {\n MoreResultsItem,\n MoreResultsLink,\n NoResults,\n NoResultsImage,\n SearchCloseButton,\n SearchContainer,\n SearchInput,\n SearchInputContent,\n SearchOverlay,\n SearchResultDescription,\n SearchResultImage,\n SearchResultItem,\n SearchResultLink,\n SearchResultText,\n SearchResultTitle,\n SearchResults\n} from './Search.styled'\n\nfunction getErrorMessage(error: unknown, fallback: string): string {\n if (typeof error === 'object' && error !== null && 'error' in error) {\n const errorValue = error.error\n if (typeof errorValue === 'string') {\n return errorValue\n }\n }\n return fallback\n}\n\nconst Search = ({ placeholder, onClose }: SearchProps) => {\n const { t } = useTranslation()\n const navigate = useNavigate()\n const [searchValue, setSearchValue] = useState('')\n const [selectedIndex, setSelectedIndex] = useState(-1)\n const [debouncedValue, setDebouncedValue] = useState('')\n\n // Debounce search value\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedValue(searchValue)\n }, 300)\n\n return () => clearTimeout(timer)\n }, [searchValue])\n\n const {\n data: searchResults = [],\n isLoading,\n error,\n isError\n } = useSearchBlogQuery({ query: debouncedValue, hitsPerPage: 5, page: 0 }, { skip: debouncedValue.trim().length <= 2 })\n\n const handleClose = useCallback(() => {\n setSearchValue('')\n setSelectedIndex(-1)\n onClose?.()\n }, [onClose])\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n const maxLength = searchResults.length > 3 ? 4 : searchResults.length\n\n if (e.key === 'ArrowUp') {\n e.preventDefault()\n setSelectedIndex(prev => (prev <= 0 ? maxLength : prev - 1))\n } else if (e.key === 'ArrowDown') {\n e.preventDefault()\n setSelectedIndex(prev => (prev >= maxLength ? 0 : prev + 1))\n } else if (e.key === 'Enter') {\n e.preventDefault()\n if (selectedIndex === 4 || selectedIndex === -1) {\n navigate(`/blog/search?q=${encodeURIComponent(searchValue)}`)\n } else if (selectedIndex >= 0 && searchResults[selectedIndex]) {\n const result = searchResults[selectedIndex]\n navigate(`/blog/${result.categoryId}/${result.id}`)\n }\n handleClose()\n } else if (e.key === 'Escape') {\n handleClose()\n }\n },\n [searchValue, selectedIndex, searchResults, navigate, handleClose]\n )\n\n const showResults = searchValue.trim().length > 2\n const hasResults = searchResults.length > 0\n\n return (\n <SearchContainer $hasResults={showResults}>\n {showResults && <SearchOverlay onClick={handleClose} />}\n <SearchInputContent>\n <SearchInput\n type=\"text\"\n value={searchValue}\n onChange={e => setSearchValue((e.target as HTMLInputElement).value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder || t('search.placeholder')}\n />\n {searchValue && (\n <SearchCloseButton onClick={handleClose} aria-label={t('search.clear')}>\n ×\n </SearchCloseButton>\n )}\n </SearchInputContent>\n\n {showResults && (\n <SearchResults>\n {isLoading && (\n <NoResults>\n <span>{t('search.searching')}</span>\n </NoResults>\n )}\n\n {!isLoading && isError && (\n <NoResults>\n <NoResultsImage>⚠️</NoResultsImage>\n <strong>{t('search.error')}</strong>\n <span>{getErrorMessage(error, t('error.generic'))}</span>\n </NoResults>\n )}\n\n {!isLoading && !isError && !hasResults && (\n <NoResults>\n <NoResultsImage>🔍</NoResultsImage>\n <strong>{t('search.no_matches')}</strong>\n <span>{t('search.try_something_else')}</span>\n </NoResults>\n )}\n\n {!isLoading &&\n !isError &&\n hasResults &&\n searchResults.slice(0, 4).map((result, index) => (\n <SearchResultItem key={result.id} $selected={index === selectedIndex} onMouseEnter={() => setSelectedIndex(index)}>\n <SearchResultLink to={`/blog/${result.categoryId}/${result.id}`} onClick={handleClose}>\n <SearchResultImage $image={result.image} />\n <SearchResultText>\n {/* eslint-disable-next-line @typescript-eslint/naming-convention */}\n <SearchResultTitle dangerouslySetInnerHTML={{ __html: sanitizeHighlight(result.highlightedTitle) }} />\n {/* eslint-disable-next-line @typescript-eslint/naming-convention */}\n <SearchResultDescription dangerouslySetInnerHTML={{ __html: sanitizeHighlight(result.highlightedDescription) }} />\n </SearchResultText>\n </SearchResultLink>\n </SearchResultItem>\n ))}\n\n {!isLoading && !isError && searchResults.length > 4 && (\n <MoreResultsItem $selected={selectedIndex === 4} onMouseEnter={() => setSelectedIndex(4)}>\n <MoreResultsLink to={`/blog/search?q=${encodeURIComponent(searchValue)}`} onClick={handleClose}>\n {t('search.see_more_results')}\n </MoreResultsLink>\n </MoreResultsItem>\n )}\n </SearchResults>\n )}\n </SearchContainer>\n )\n}\n\nexport { Search }\n","/* eslint-disable @typescript-eslint/naming-convention */\nimport { Link } from 'react-router-dom'\nimport { Box, dclColors, styled } from 'decentraland-ui2'\n\nconst HOST_NAVBAR_HEIGHT = '96px'\n\nconst NavbarContainer = styled(Box, {\n shouldForwardProp: prop => prop !== '$embedded'\n})<{ $embedded?: boolean }>(({ $embedded }) => ({\n width: '100%',\n ...($embedded && { marginTop: HOST_NAVBAR_HEIGHT })\n}))\n\nconst NavbarContent = styled(Box)(({ theme }) => ({\n paddingTop: theme.spacing(2),\n height: '84px',\n position: 'relative',\n borderBottom: '1px solid',\n borderColor: theme.palette.divider,\n display: 'flex',\n '@media (max-width: 1450px)': {\n height: 'auto'\n }\n}))\n\nconst NavbarWrapper = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n width: '100%',\n margin: '0 auto',\n padding: `0 ${theme.spacing(3)}`,\n '@media (max-width: 1450px)': {\n flexDirection: 'column-reverse',\n alignItems: 'flex-start'\n }\n}))\n\nconst NavbarCategories = styled(Box)(({ theme }) => ({\n overflowX: 'auto',\n overflowY: 'hidden',\n width: 'auto',\n '@media (max-width: 1450px)': {\n width: '100%',\n paddingBottom: theme.spacing(1)\n }\n})).withComponent('nav')\n\nconst CategoryList = styled(Box)(() => ({\n display: 'flex',\n flexDirection: 'row',\n listStyleType: 'none',\n margin: 0,\n padding: 0,\n minWidth: '210px'\n})).withComponent('ul')\n\nconst CategoryItem = styled(Box)(({ theme }) => ({\n marginRight: theme.spacing(4),\n whiteSpace: 'nowrap'\n})).withComponent('li')\n\nconst CategoryLink = styled(Link, {\n shouldForwardProp: prop => prop !== '$active'\n})<{ $active: boolean }>(({ theme, $active }) => ({\n color: theme.palette.text.primary,\n display: 'flex',\n alignItems: 'center',\n fontSize: '17px',\n fontWeight: $active ? 700 : 400,\n height: '64px',\n padding: 0,\n position: 'relative',\n textDecoration: 'none',\n WebkitTapHighlightColor: 'transparent',\n\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n height: '1px',\n backgroundColor: dclColors.base.primary,\n left: 0,\n right: 0,\n bottom: 0,\n opacity: $active ? 1 : 0,\n transition: 'opacity 250ms ease'\n },\n\n '&:hover::after': {\n opacity: 1\n }\n}))\n\nexport { CategoryItem, CategoryLink, CategoryList, NavbarCategories, NavbarContainer, NavbarContent, NavbarWrapper }\n","import { useCallback, useMemo } from 'react'\nimport { useLocation } from 'react-router-dom'\nimport { useTranslation } from '@dcl/hooks'\nimport { useGetBlogCategoriesQuery } from '../../../features/blog/blog.client'\nimport { Search } from '../Search'\nimport type { BlogNavigationProps } from './BlogNavigation.types'\nimport {\n CategoryItem,\n CategoryLink,\n CategoryList,\n NavbarCategories,\n NavbarContainer,\n NavbarContent,\n NavbarWrapper\n} from './BlogNavigation.styled'\n\nconst BlogNavigation = ({ active, embedded }: BlogNavigationProps) => {\n const { t } = useTranslation()\n const location = useLocation()\n const { data: allCategories = [] } = useGetBlogCategoriesQuery()\n\n const categories = useMemo(() => {\n return allCategories.filter(category => category.isShownInMenu)\n }, [allCategories])\n\n const isActive = useCallback(\n (path: string) => {\n if (active) {\n if (active === 'all_articles' && path === '/blog') {\n return true\n }\n return `/blog/${active}` === path\n }\n return location.pathname === path\n },\n [active, location.pathname]\n )\n\n return (\n <NavbarContainer $embedded={embedded}>\n <NavbarContent>\n <NavbarWrapper>\n <NavbarCategories>\n <CategoryList>\n <CategoryItem>\n <CategoryLink to=\"/blog\" $active={isActive('/blog') || active === 'all_articles'}>\n {t('blog.all_articles')}\n </CategoryLink>\n </CategoryItem>\n {categories.map(category => (\n <CategoryItem key={category.id}>\n <CategoryLink to={`/blog/${category.slug}`} $active={isActive(`/blog/${category.slug}`)}>\n {category.title}\n </CategoryLink>\n </CategoryItem>\n ))}\n </CategoryList>\n </NavbarCategories>\n <Search />\n </NavbarWrapper>\n </NavbarContent>\n </NavbarContainer>\n )\n}\n\nexport { BlogNavigation }\n","import { Box, styled } from 'decentraland-ui2'\n\nconst BlogLayoutContainer = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n paddingTop: 64, // mobile navbar height (px)\n [theme.breakpoints.up('md')]: {\n paddingTop: 96 // desktop navbar height 92px + 4px buffer\n }\n}))\n\nconst BlogContentWrapper = styled(Box)(({ theme }) => ({\n flex: 1,\n padding: theme.spacing(5, 0, 2, 0),\n maxWidth: theme.spacing(133),\n margin: '0 auto',\n [theme.breakpoints.down('md')]: {\n padding: theme.spacing(5, 2, 2, 2)\n }\n}))\n\nexport { BlogContentWrapper, BlogLayoutContainer }\n","import type { ReactNode } from 'react'\nimport { HelmetProvider } from 'react-helmet-async'\nimport { BlogNavigation } from './BlogNavigation/BlogNavigation'\nimport { BlogContentWrapper, BlogLayoutContainer } from './BlogLayout.styled'\n\ninterface BlogLayoutProps {\n children: ReactNode\n activeCategory?: string\n banner?: ReactNode\n showBlogNavigation?: boolean\n relatedPosts?: ReactNode\n}\n\nfunction BlogLayout({ children, activeCategory, banner, showBlogNavigation = true, relatedPosts }: BlogLayoutProps) {\n return (\n <HelmetProvider>\n <BlogLayoutContainer>\n {showBlogNavigation && <BlogNavigation active={activeCategory} />}\n {banner}\n <BlogContentWrapper component=\"main\">{children}</BlogContentWrapper>\n {relatedPosts}\n </BlogLayoutContainer>\n </HelmetProvider>\n )\n}\n\nexport { BlogLayout }\n"],"names":["exports","BLOCKS","INLINES","MARKS","_export","target","all","name","CONTAINERS","HEADINGS","LIST_ITEM_BLOCKS","TABLE_BLOCKS","TEXT_CONTAINERS","TOP_LEVEL_BLOCKS","V1_MARKS","V1_NODE_TYPES","VOID_BLOCKS","_blocks","require$$0","_inlines","require$$1","_marks","require$$2","_array_like_to_array","arr","len","i","arr2","_array_without_holes","_define_property","obj","key","value","_iterable_to_array","iter","_non_iterable_spread","_to_consumable_array","_unsupported_iterable_to_array","o","minLen","n","_obj","types","nodeTypes","EMPTY_DOCUMENT","isBlock","isEmptyParagraph","isInline","isText","stripEmptyTrailingParagraphFromDocument","_object_spread","source","ownKeys","sym","object","enumerableOnly","keys","symbols","_object_spread_props","_type_of","hasValue","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","_step","err","node","textNode","isValidDocument","document","MIN_NODES_FOR_STRIPPING","lastNode","isPlainObj","prototype","enumError","maxSizeError","minSizeError","requiredPropertyError","typeMismatchError","unknownPropertyError","param","path","property","typeName","min","max","expected","ObjectAssertion","_isplainobj","_interop_require_default","_errors","_class_call_check","instance","Constructor","_defineProperties","props","descriptor","_create_class","protoProps","staticProps","_this","_this1","_len","errors","_key","_this__errors","_$path","_ref","optional","properties","unknowns","assert","foundErrors","item","index","serializeError","error","step","EntityLinkAssertion","HyperLinkAssertion","NodeAssertion","VOID_CONTENT","assertLink","_assert","_assert_this_initialized","self","_call_super","derived","args","_get_prototype_of","_possible_constructor_return","_is_native_reflect_construct","_inherits","subClass","superClass","_set_prototype_of","call","p","result","contentRule","validateData","$","_ref_min","item$","_$","_this_validateData","_this_validateData1","dataErrors","linkType","contentNodeTypes","data","sys$","Path","element","assertText","text","mark","mark$","validateRichTextDocument","_schemaConstraints","require$$3","_node","require$$4","_path","require$$5","_text","require$$6","assertInlineOrText","assertList","assertVoidEntryLink","assertTableCell","nodeValidator","validateNode","_emptyDocument","_helpers","_index","_export_star","_interop_require_wildcard","require$$7","require$$8","from","to","k","_getRequireWildcardCache","nodeInterop","cacheBabelInterop","cacheNodeInterop","cache","newObj","hasPropertyDescriptor","desc","hasElementType","hasMap","hasSet","hasArrayBuffer","equal","a","b","length","it","reactFastCompare","invariant","condition","format","c","d","e","f","argIndex","browser","shallowequal","objA","objB","compare","compareContext","ret","keysA","keysB","bHasOwnProperty","idx","valueA","valueB","TAG_NAMES","TAG_NAMES2","SEO_PRIORITY_TAGS","VALID_TAG_NAMES","REACT_TAG_MAP","HTML_TAG_MAP","carry","HELMET_ATTRIBUTE","HELMET_PROPS","getInnermostProperty","propsList","getTitleFromPropsList","innermostTitle","innermostTemplate","innermostDefaultTitle","getOnChangeClientState","getAttributesFromPropsList","tagType","tagAttrs","current","getBaseTagFromPropsList","primaryAttributes","innermostBaseTag","tag","lowerCaseAttributeKey","warn","msg","getTagsFromPropsList","tagName","approvedSeenTags","approvedTags","instanceTags","instanceSeenTags","primaryAttributeKey","keys2","attributeKey","tagUnion","getAnyTrueFromPropsList","checkedTag","reducePropsToState","flattenArray","possibleArray","checkIfPropsMatch","toMatch","prioritizer","elementsList","propsToMatch","acc","elementAttrs","without","SELF_CLOSING_TAGS","encodeSpecialCharacters","str","encode","generateElementAttributesAsString","attributes","attr","generateTitleAsString","type","title","attributeString","flattenedTitle","generateTagsAsString","tags","t","attributeHtml","attribute","string","tagContent","isSelfClosing","convertElementAttributesToReactProps","initProps","mapped","generateTitleAsReactComponent","_type","React","generateTagsAsReactComponent","mappedTag","mappedAttribute","content","getMethodsForTag","getPriorityMethods","metaTags","linkTags","scriptTags","meta","link","script","mapStateOnServer","baseTag","bodyAttributes","htmlAttributes","noscriptTags","styleTags","titleAttributes","prioritizeSeoTags","priorityMethods","server_default","instances","isDocument","HelmetData","serverState","context","canUseDOM","defaultValue","Context","React2","HelmetProvider","_HelmetProvider","Component","updateTags","headElement","tagNodes","oldTags","newTags","indexToDelete","newElement","existingTag","updateAttributes","elementTag","helmetAttributeString","helmetAttributes","attributesToRemove","attributeKeys","indexToSave","updateTitle","commitTagChanges","newState","cb","onChangeClientState","tagUpdates","addedTags","removedTags","_helmetCallback","handleStateChangeOnClient","client_default","HelmetDispatcher","Component2","nextProps","shallowEqual","helmetInstances","setHelmet","state","Helmet","Component3","fastCompare","child","nestedChildren","arrayTypeChildren","newChildProps","newProps","newFlattenedProps","arrayChildName","nestedChild","children","React3","childProps","helmetData","getEntrySlug","fields","sysId","fetchFromCMS","endpoint","params","baseUrl","cmsBaseUrl","url","response","assetsCache","assetsCachePromises","entriesCache","entriesCachePromises","resolveAssetLink","assetId","assetPromise","asset","cmsAsset","resolvedCategoriesCache","resolvedAuthorsCache","fetchAndCacheEntry","entryId","entryPromise","fetched","cmsEntry","resolveCategoryLink","entry","resolveAuthorLink","resolveAssetUrl","resolveEntrySlug","formatUtcDate","raw","date","BASE_URL","locations","categorySlug","postSlug","authorSlug","query","post","slugify","mapContentfulAsset","mapBlogCategory","slug","image","createDefaultCategory","createDefaultImage","createDefaultAuthor","mapBlogAuthor","mapBlogPost","category","author","publishedDate","body","getPostFromStore","postId","store","resolveEntryReferences","resolvedEntry","resolveImageOnly","normalizeCmsError","extractEmbeddedAssetIds","ids","resolveBodyAssets","assetIds","uniqueIds","resolvedAssets","id","resolved","assetsMap","blogClient","cmsClient","build","queryArgs","currentCache","newItems","arg","existingIds","newPosts","currentArg","previousArg","limit","skip","getCmsBaseUrl","listResponse","_meta","totalAvailable","validPosts","cachedPost","nextCmsSkip","hasMore","_arg","dispatch","queryFulfilled","postsUpserted","_error","cat","categoryEntry","postEntry","auth","authorEntry","env","token","previewBaseUrl","spaceId","previewUrl","useGetBlogPostsQuery","useGetBlogCategoriesQuery","useGetBlogCategoryBySlugQuery","useGetBlogPostBySlugQuery","useGetBlogAuthorBySlugQuery","useGetBlogPostPreviewQuery","m","r","u","createBrowserLocalStorageCache","options","storage","namespaceKey","getStorage","getNamespace","setNamespace","namespace","removeOutdatedCacheItems","timeToLive","filteredNamespaceWithoutOldFormattedCacheItems","cacheItem","filteredNamespaceWithoutExpiredItems","currentTimestamp","events","exists","createNullCache","createFallbackableCache","caches","createMemoryCache","keyAsString","promise","createAlgoliaAgent","version","algoliaAgent","addedAlgoliaAgent","createAuth","appId","apiKey","authMode","credentials","createIterablePromise","func","validate","aggregator","timeout","retry","previousResponse","resolve","reject","getAlgoliaAgent","algoliaAgents","client","defaultAlgoliaAgent","createNullLogger","_message","_args","EXPIRATION_DELAY","createStatefulHost","host","status","lastUpdate","isUp","isTimedOut","AlgoliaError","message","ErrorWithStackTrace","stackTrace","RetryError","ApiError","DeserializationError","DetailedApiError","shuffle","array","shuffledArray","serializeUrl","queryParameters","queryParametersAsString","serializeQueryParameters","parameters","serializeData","request","requestOptions","serializeHeaders","baseHeaders","requestHeaders","requestOptionsHeaders","headers","serializedHeaders","header","deserializeSuccess","deserializeFailure","stackFrame","parsed","isNetworkError","isRetryable","isSuccess","stackTraceWithoutCredentials","stackFrameWithoutCredentials","modifiedHeaders","createTransporter","hosts","hostsCache","logger","baseQueryParameters","timeouts","requester","requestsCache","responsesCache","createRetryableOptions","compatibleHosts","statefulHosts","compatibleHost","hostsUp","hostsTimedOut","hostsAvailable","timeoutsCount","baseTimeout","retryableRequest","isRead","dataQueryParameters","retryableHosts","getTimeout","payload","pushToStackTrace","response2","createRequest","createRetryableRequest","_","apiClientVersion","REGIONS","getDefaultHosts","region","createAbtestingV3Client","appIdOption","apiKeyOption","regionOption","transporter","segment","addABTestsRequest","estimateABTestRequest","startDate","endDate","metric","requestPath","offset","indexPrefix","indexSuffix","direction","scheduleABTestsRequest","abtestingV3Client","createXhrRequester","createAbtestingClient","abtestingClient","createAnalyticsClient","search","clickAnalytics","revenueAnalytics","orderBy","analyticsClient","createInsightsClient","userToken","insightsEvents","insightsClient","createPersonalizationClient","personalizationStrategyParams","personalizationClient","createQuerySuggestionsClient","configurationWithIndex","indexName","configuration","querySuggestionsClient","createSearchClient","taskID","maxRetries","retryCount","operation","baseIteratorOptions","field","resValue","v","browseParams","browseObjectsOptions","searchRulesParams","browseRulesOptions","searchSynonymsParams","browseSynonymsOptions","resp","objects","action","waitForTasks","batchSize","requests","responses","objectEntries","objectIDs","objectID","createIfNotExists","scopes","randomSuffix","tmpIndexName","copyOperationResponse","batchResponses","moveOperationResponse","searchMethodParams","xAlgoliaUserID","assignUserIdParams","batchWriteParams","batchAssignUserIdsParams","dictionaryName","batchDictionaryEntriesParams","forwardToReplicas","deleteByParams","attributesToRetrieve","getObjectsParams","getVersion","userID","getClusters","page","hitsPerPage","batchParams","operationIndexParams","attributesToUpdate","rule","rules","clearExistingRules","synonymHit","replaceExistingSynonyms","legacyRequest","searchDictionaryEntriesParams","facetName","searchForFacetValuesRequest","searchParams","searchUserIdsParams","dictionarySettingsParams","indexSettings","searchClient","isOnDemandTrigger","trigger","isScheduleTrigger","isSubscriptionTrigger","createIngestionClient","referenceIndexName","records","waitBatchSize","authenticationCreate","destinationCreate","sourceCreate","taskCreate","transformationCreate","authenticationID","destinationID","sourceID","transformationID","runID","eventID","itemsPerPage","platform","sort","order","enabled","sourceType","triggerType","withEmailNotifications","pushTaskPayload","watch","taskReplace","runSourcePayload","runTaskPayload","authenticationSearch","destinationSearch","sourceSearch","taskSearch","transformationSearch","transformationTry","authenticationUpdate","destinationUpdate","sourceUpdate","taskUpdate","ingestionClient","createMonitoringClient","clusters","period","monitoringClient","createRecommendClient","model","recommendRule","getRecommendationsParams","searchRecommendRulesParams","recommendClient","__defProp","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","__export","__copyProps","except","__reExport","mod","secondTarget","browser_exports","algoliasearch","models_exports","abtesting_star","client_abtesting_star","client_analytics_star","client_insights_star","client_personalization_star","client_query_suggestions_star","client_search_star","ingestion_star","monitoring_star","recommend_star","ingestionTransporter","watchResponses","initOptions","algoliaAppId","getEnv","algoliaApiKey","algoliaIndex","algoliaClient","searchResponse","hits","hit","categoryId","imageUrl","_result","useSearchBlogPostsQuery","useSearchBlogQuery","entries","setPrototypeOf","isFrozen","getPrototypeOf","getOwnPropertyDescriptor","freeze","seal","create","apply","construct","x","fun","thisValue","Func","arrayForEach","unapply","arrayLastIndexOf","arrayPop","arrayPush","arraySplice","stringToLowerCase","stringToString","stringMatch","stringReplace","stringIndexOf","stringTrim","objectHasOwnProperty","regExpTest","typeErrorCreate","unconstruct","thisArg","_len2","_key2","addToSet","set","transformCaseFunc","lcElement","cleanArray","clone","newObject","lookupGetter","prop","fallbackValue","html$1","svg$1","svgFilters","svgDisallowed","mathMl$1","mathMlDisallowed","html","svg","mathMl","xml","MUSTACHE_EXPR","ERB_EXPR","TMPLIT_EXPR","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","DOCTYPE_NAME","CUSTOM_ELEMENT","EXPRESSIONS","NODE_TYPE","getGlobal","_createTrustedTypesPolicy","trustedTypes","purifyHostElement","suffix","ATTR_NAME","policyName","scriptUrl","_createHooksMap","createDOMPurify","window","DOMPurify","root","originalDocument","currentScript","DocumentFragment","HTMLTemplateElement","Node","Element","NodeFilter","NamedNodeMap","HTMLFormElement","DOMParser","ElementPrototype","cloneNode","remove","getNextSibling","getChildNodes","getParentNode","template","trustedTypesPolicy","emptyHTML","implementation","createNodeIterator","createDocumentFragment","getElementsByTagName","importNode","hooks","IS_ALLOWED_URI$1","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","CUSTOM_ELEMENT_HANDLING","FORBID_TAGS","FORBID_ATTR","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","ALLOW_SELF_CLOSE_IN_ATTR","SAFE_FOR_TEMPLATES","SAFE_FOR_XML","WHOLE_DOCUMENT","SET_CONFIG","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_TRUSTED_TYPE","SANITIZE_DOM","SANITIZE_NAMED_PROPS","SANITIZE_NAMED_PROPS_PREFIX","KEEP_CONTENT","IN_PLACE","USE_PROFILES","FORBID_CONTENTS","DEFAULT_FORBID_CONTENTS","DATA_URI_TAGS","DEFAULT_DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","DEFAULT_URI_SAFE_ATTRIBUTES","MATHML_NAMESPACE","SVG_NAMESPACE","HTML_NAMESPACE","NAMESPACE","IS_EMPTY_INPUT","ALLOWED_NAMESPACES","DEFAULT_ALLOWED_NAMESPACES","MATHML_TEXT_INTEGRATION_POINTS","HTML_INTEGRATION_POINTS","COMMON_SVG_AND_HTML_ELEMENTS","PARSER_MEDIA_TYPE","SUPPORTED_PARSER_MEDIA_TYPES","DEFAULT_PARSER_MEDIA_TYPE","CONFIG","formElement","isRegexOrFunction","testValue","_parseConfig","cfg","ALL_SVG_TAGS","ALL_MATHML_TAGS","_checkValidNamespace","parent","parentTagName","_forceRemove","_removeAttribute","_initDocument","dirty","doc","leadingWhitespace","matches","dirtyPayload","_createNodeIterator","_isClobbered","_isNode","_executeHooks","currentNode","hook","_sanitizeElements","_isBasicCustomElement","parentNode","childNodes","childCount","childClone","expr","_isValidAttribute","lcTag","lcName","_sanitizeAttributes","hookEvent","l","namespaceURI","attrValue","_sanitizeShadowDOM","fragment","shadowNode","shadowIterator","importedNode","returnNode","nodeIterator","serializedHTML","entryPoint","hookFunction","purify","sanitizeHighlight","safeCssUrl","SearchContainer","styled","Box","theme","$hasResults","SearchOverlay","SearchInputContent","SearchInput","SearchCloseButton","SearchResults","SearchResultItem","$selected","SearchResultLink","Link","SearchResultImage","$image","SearchResultText","SearchResultTitle","dclColors.base","SearchResultDescription","NoResults","NoResultsImage","MoreResultsItem","MoreResultsLink","getErrorMessage","fallback","errorValue","Search","placeholder","onClose","useTranslation","navigate","useNavigate","searchValue","setSearchValue","useState","selectedIndex","setSelectedIndex","debouncedValue","setDebouncedValue","useEffect","timer","searchResults","isLoading","isError","handleClose","useCallback","handleKeyDown","maxLength","prev","showResults","hasResults","jsxs","jsx","HOST_NAVBAR_HEIGHT","NavbarContainer","$embedded","NavbarContent","NavbarWrapper","NavbarCategories","CategoryList","CategoryItem","CategoryLink","$active","BlogNavigation","active","embedded","location","useLocation","allCategories","categories","useMemo","isActive","BlogLayoutContainer","BlogContentWrapper","BlogLayout","activeCategory","banner","showBlogNavigation","relatedPosts"],"mappings":"sTACA,OAAO,eAAcA,EAAU,aAAc,CACzC,MAAO,EACX,CAAC,EACD,OAAO,eAAeA,EAAS,SAAU,CACrC,WAAY,GACZ,IAAK,UAAW,CACZ,OAAOC,CACf,CACA,CAAC,EACD,IAAIA,EAAuB,SAASA,EAAQ,CACxC,OAAAA,EAAO,SAAc,WACrBA,EAAO,UAAe,YACtBA,EAAO,UAAe,YACtBA,EAAO,UAAe,YACtBA,EAAO,UAAe,YACtBA,EAAO,UAAe,YACtBA,EAAO,UAAe,YACtBA,EAAO,UAAe,YACtBA,EAAO,QAAa,eACpBA,EAAO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