algoliasearch 5.55.2 → 5.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as _algolia_client_common from '@algolia/client-common';
2
- import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
2
+ import { CreateClientOptions, RequestOptions, AlgoliaHttpResponse, ClientOptions } from '@algolia/client-common';
3
3
 
4
4
  /**
5
5
  * Range object with lower and upper values in meters to define custom ranges.
@@ -533,7 +533,7 @@ type BaseRecommendRequest = {
533
533
  /**
534
534
  * Search parameters to use for a fallback request if there aren\'t enough recommendations.
535
535
  */
536
- type FallbackParams = BaseRecommendSearchParams & SearchParamsQuery & RecommendIndexSettings;
536
+ type FallbackParams = BaseRecommendSearchParams & SearchParamsQuery & RecommendIndexSettings & Record<string, unknown>;
537
537
 
538
538
  /**
539
539
  * Frequently bought together model. This model recommends items that have been purchased within 1 day with the item with the ID `objectID`.
@@ -1605,9 +1605,9 @@ type LegacySearchQuery = LegacySearchForFacets | LegacySearchForHits;
1605
1605
  */
1606
1606
  type LegacySearchMethodProps = LegacySearchQuery[];
1607
1607
 
1608
- declare const apiClientVersion = "5.55.2";
1608
+ declare const apiClientVersion = "5.56.0";
1609
1609
  declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
1610
- transporter: _algolia_client_common.Transporter;
1610
+ transporter: _algolia_client_common.TransporterWithHttpInfo;
1611
1611
  /**
1612
1612
  * The `appId` currently in use.
1613
1613
  */
@@ -1671,6 +1671,18 @@ declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, au
1671
1671
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1672
1672
  */
1673
1673
  customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
1674
+ /**
1675
+ * This method lets you send requests to the Algolia REST API.
1676
+ *
1677
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1678
+ * @param customPost - The customPost object.
1679
+ * @param customPost.path - Path of the endpoint, for example `1/newFeature`.
1680
+ * @param customPost.parameters - Query parameters to apply to the current query.
1681
+ * @param customPost.body - Parameters to send with the custom request.
1682
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1683
+ * @see customPost for the plain version.
1684
+ */
1685
+ customPostWithHTTPInfo({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<Record<string, unknown>>>;
1674
1686
  /**
1675
1687
  * Retrieves recommendations from selected AI models.
1676
1688
  *
@@ -1680,6 +1692,18 @@ declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, au
1680
1692
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1681
1693
  */
1682
1694
  getRecommendations(getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams, requestOptions?: RequestOptions): Promise<GetRecommendationsResponse>;
1695
+ /**
1696
+ * Retrieves recommendations from selected AI models.
1697
+ *
1698
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1699
+ *
1700
+ * Required API Key ACLs:
1701
+ * - search
1702
+ * @param getRecommendationsParams - The getRecommendationsParams object.
1703
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1704
+ * @see getRecommendations for the plain version.
1705
+ */
1706
+ getRecommendationsWithHTTPInfo(getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<GetRecommendationsResponse>>;
1683
1707
  /**
1684
1708
  * Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
1685
1709
  *
@@ -1689,6 +1713,18 @@ declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, au
1689
1713
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1690
1714
  */
1691
1715
  search<T>(searchMethodParams: SearchMethodParams | LegacySearchMethodProps, requestOptions?: RequestOptions): Promise<SearchResponses<T>>;
1716
+ /**
1717
+ * Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
1718
+ *
1719
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1720
+ *
1721
+ * Required API Key ACLs:
1722
+ * - search
1723
+ * @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
1724
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1725
+ * @see search for the plain version.
1726
+ */
1727
+ searchWithHTTPInfo<T>(searchMethodParams: SearchMethodParams | LegacySearchMethodProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<SearchResponses<T>>>;
1692
1728
  };
1693
1729
 
1694
1730
  /**
@@ -9,7 +9,7 @@ import { createXhrRequester } from "@algolia/requester-browser-xhr";
9
9
 
10
10
  // lite/src/liteClient.ts
11
11
  import { createAuth, createTransporter, getAlgoliaAgent, shuffle, validateRequired } from "@algolia/client-common";
12
- var apiClientVersion = "5.55.2";
12
+ var apiClientVersion = "5.56.0";
13
13
  function getDefaultHosts(appId) {
14
14
  return [
15
15
  {
@@ -156,6 +156,31 @@ function createLiteClient({
156
156
  };
157
157
  return transporter.request(request, requestOptions);
158
158
  },
159
+ /**
160
+ * This method lets you send requests to the Algolia REST API.
161
+ *
162
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
163
+ * @param customPost - The customPost object.
164
+ * @param customPost.path - Path of the endpoint, for example `1/newFeature`.
165
+ * @param customPost.parameters - Query parameters to apply to the current query.
166
+ * @param customPost.body - Parameters to send with the custom request.
167
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
168
+ * @see customPost for the plain version.
169
+ */
170
+ customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
171
+ validateRequired("path", "customPostWithHTTPInfo", path);
172
+ const requestPath = "/{path}".replace("{path}", path);
173
+ const headers = {};
174
+ const queryParameters = parameters ? parameters : {};
175
+ const request = {
176
+ method: "POST",
177
+ path: requestPath,
178
+ queryParameters,
179
+ headers,
180
+ data: body ? body : {}
181
+ };
182
+ return transporter.requestWithHttpInfo(request, requestOptions);
183
+ },
159
184
  /**
160
185
  * Retrieves recommendations from selected AI models.
161
186
  *
@@ -187,6 +212,44 @@ function createLiteClient({
187
212
  };
188
213
  return transporter.request(request, requestOptions);
189
214
  },
215
+ /**
216
+ * Retrieves recommendations from selected AI models.
217
+ *
218
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
219
+ *
220
+ * Required API Key ACLs:
221
+ * - search
222
+ * @param getRecommendationsParams - The getRecommendationsParams object.
223
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
224
+ * @see getRecommendations for the plain version.
225
+ */
226
+ getRecommendationsWithHTTPInfo(getRecommendationsParams, requestOptions) {
227
+ if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
228
+ const newSignatureRequest = {
229
+ requests: getRecommendationsParams
230
+ };
231
+ getRecommendationsParams = newSignatureRequest;
232
+ }
233
+ validateRequired("getRecommendationsParams", "getRecommendationsWithHTTPInfo", getRecommendationsParams);
234
+ validateRequired(
235
+ "getRecommendationsParams.requests",
236
+ "getRecommendationsWithHTTPInfo",
237
+ getRecommendationsParams.requests
238
+ );
239
+ const requestPath = "/1/indexes/*/recommendations";
240
+ const headers = {};
241
+ const queryParameters = {};
242
+ const request = {
243
+ method: "POST",
244
+ path: requestPath,
245
+ queryParameters,
246
+ headers,
247
+ data: getRecommendationsParams,
248
+ useReadTransporter: true,
249
+ cacheable: true
250
+ };
251
+ return transporter.requestWithHttpInfo(request, requestOptions);
252
+ },
190
253
  /**
191
254
  * Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
192
255
  *
@@ -232,6 +295,55 @@ function createLiteClient({
232
295
  cacheable: true
233
296
  };
234
297
  return transporter.request(request, requestOptions);
298
+ },
299
+ /**
300
+ * Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
301
+ *
302
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
303
+ *
304
+ * Required API Key ACLs:
305
+ * - search
306
+ * @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
307
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
308
+ * @see search for the plain version.
309
+ */
310
+ searchWithHTTPInfo(searchMethodParams, requestOptions) {
311
+ if (searchMethodParams && Array.isArray(searchMethodParams)) {
312
+ const newSignatureRequest = {
313
+ requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
314
+ if (legacyRequest.type === "facet") {
315
+ return {
316
+ ...legacyRequest,
317
+ ...params,
318
+ type: "facet"
319
+ };
320
+ }
321
+ return {
322
+ ...legacyRequest,
323
+ ...params,
324
+ facet: void 0,
325
+ maxFacetHits: void 0,
326
+ facetQuery: void 0
327
+ };
328
+ })
329
+ };
330
+ searchMethodParams = newSignatureRequest;
331
+ }
332
+ validateRequired("searchMethodParams", "searchWithHTTPInfo", searchMethodParams);
333
+ validateRequired("searchMethodParams.requests", "searchWithHTTPInfo", searchMethodParams.requests);
334
+ const requestPath = "/1/indexes/*/queries";
335
+ const headers = {};
336
+ const queryParameters = {};
337
+ const request = {
338
+ method: "POST",
339
+ path: requestPath,
340
+ queryParameters,
341
+ headers,
342
+ data: searchMethodParams,
343
+ useReadTransporter: true,
344
+ cacheable: true
345
+ };
346
+ return transporter.requestWithHttpInfo(request, requestOptions);
235
347
  }
236
348
  };
237
349
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lite/builds/browser.ts","../../../lite/src/liteClient.ts"],"sourcesContent":["// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger,\n} from '@algolia/client-common';\nimport { createXhrRequester } from '@algolia/requester-browser-xhr';\n\nimport type { ClientOptions } from '@algolia/client-common';\n\nimport { apiClientVersion, createLiteClient } from '../src/liteClient';\n\nexport { apiClientVersion } from '../src/liteClient';\n\nexport * from '../model';\n\nexport function liteClient(appId: string, apiKey: string, options?: ClientOptions | undefined): LiteClient {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n const { compression: _compression, ...browserOptions } = options || {};\n\n return createLiteClient({\n appId,\n apiKey,\n timeouts: {\n connect: 1000,\n read: 2000,\n write: 30000,\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 ...browserOptions,\n });\n}\n\nexport type LiteClient = ReturnType<typeof createLiteClient>;\n","// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\nimport { createAuth, createTransporter, getAlgoliaAgent, shuffle, validateRequired } from '@algolia/client-common';\n\nimport type { GetRecommendationsParams } from '../model/getRecommendationsParams';\nimport type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';\nimport type { SearchMethodParams } from '../model/searchMethodParams';\nimport type { SearchResponses } from '../model/searchResponses';\n\nimport type {\n CustomPostProps,\n LegacyGetRecommendationsParams,\n LegacySearchMethodProps,\n} from '../model/clientMethodProps';\n\nimport type { SearchForFacetValuesResponse } from '../model/searchForFacetValuesResponse';\nimport type { SearchResponse } from '../model/searchResponse';\n\nexport const apiClientVersion = '5.55.2';\n\nfunction getDefaultHosts(appId: string): Host[] {\n return (\n [\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 ] as Host[]\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}\n\nexport function createLiteClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}: CreateClientOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Lite',\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\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\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: string, version?: string | undefined): void {\n transporter.algoliaAgent.add({ segment, version });\n },\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 }: { apiKey: string }): void {\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 /**\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<T>(\n searchMethodParams: LegacySearchMethodProps | SearchMethodParams,\n requestOptions?: RequestOptions | undefined,\n ): Promise<{ results: Array<SearchResponse<T>> }> {\n return this.search(searchMethodParams, requestOptions) as Promise<{ results: Array<SearchResponse<T>> }>;\n },\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(\n searchMethodParams: LegacySearchMethodProps | SearchMethodParams,\n requestOptions?: RequestOptions | undefined,\n ): Promise<{ results: Array<SearchForFacetValuesResponse> }> {\n return this.search(searchMethodParams, requestOptions) as Promise<{\n results: Array<SearchForFacetValuesResponse>;\n }>;\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(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n validateRequired('path', 'customPost', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\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(\n getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams,\n requestOptions?: RequestOptions,\n ): Promise<GetRecommendationsResponse> {\n if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {\n const newSignatureRequest: GetRecommendationsParams = {\n requests: getRecommendationsParams,\n };\n\n getRecommendationsParams = newSignatureRequest;\n }\n\n validateRequired('getRecommendationsParams', 'getRecommendations', getRecommendationsParams);\n\n validateRequired('getRecommendationsParams.requests', 'getRecommendations', getRecommendationsParams.requests);\n\n const requestPath = '/1/indexes/*/recommendations';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: getRecommendationsParams,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.\n *\n * Required API Key ACLs:\n * - search\n * @param searchMethodParams - Multi-query 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<T>(\n searchMethodParams: SearchMethodParams | LegacySearchMethodProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchResponses<T>> {\n if (searchMethodParams && Array.isArray(searchMethodParams)) {\n const newSignatureRequest: SearchMethodParams = {\n requests: searchMethodParams.map(({ params, ...legacyRequest }) => {\n if (legacyRequest.type === 'facet') {\n return {\n ...legacyRequest,\n ...params,\n type: 'facet',\n };\n }\n\n return {\n ...legacyRequest,\n ...params,\n facet: undefined,\n maxFacetHits: undefined,\n facetQuery: undefined,\n };\n }),\n };\n\n searchMethodParams = newSignatureRequest;\n }\n\n validateRequired('searchMethodParams', 'search', searchMethodParams);\n\n validateRequired('searchMethodParams.requests', 'search', searchMethodParams.requests);\n\n const requestPath = '/1/indexes/*/queries';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: searchMethodParams,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;;;ACEnC,SAAS,YAAY,mBAAmB,iBAAiB,SAAS,wBAAwB;AAg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;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,MAAM;AAAA,QACN,oBAAoB;AAAA,QACpB,WAAW;AAAA,MACb;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA,EACF;AACF;;;ADzRO,SAAS,WAAW,OAAe,QAAgB,SAAiD;AACzG,MAAI,CAAC,SAAS,OAAO,UAAU,UAAU;AACvC,UAAM,IAAI,MAAM,qBAAqB;AAAA,EACvC;AAEA,MAAI,CAAC,UAAU,OAAO,WAAW,UAAU;AACzC,UAAM,IAAI,MAAM,sBAAsB;AAAA,EACxC;AAEA,QAAM,EAAE,aAAa,cAAc,GAAG,eAAe,IAAI,WAAW,CAAC;AAErE,SAAO,iBAAiB;AAAA,IACtB;AAAA,IACA;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,IACA,QAAQ,iBAAiB;AAAA,IACzB,WAAW,mBAAmB;AAAA,IAC9B,eAAe,CAAC,EAAE,SAAS,UAAU,CAAC;AAAA,IACtC,UAAU;AAAA,IACV,gBAAgB,kBAAkB;AAAA,IAClC,eAAe,kBAAkB,EAAE,cAAc,MAAM,CAAC;AAAA,IACxD,YAAY,wBAAwB;AAAA,MAClC,QAAQ,CAAC,+BAA+B,EAAE,KAAK,GAAG,gBAAgB,IAAI,KAAK,GAAG,CAAC,GAAG,kBAAkB,CAAC;AAAA,IACvG,CAAC;AAAA,IACD,GAAG;AAAA,EACL,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../../../lite/builds/browser.ts","../../../lite/src/liteClient.ts"],"sourcesContent":["// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger,\n} from '@algolia/client-common';\nimport { createXhrRequester } from '@algolia/requester-browser-xhr';\n\nimport type { ClientOptions } from '@algolia/client-common';\n\nimport { apiClientVersion, createLiteClient } from '../src/liteClient';\n\nexport { apiClientVersion } from '../src/liteClient';\n\nexport * from '../model';\n\nexport function liteClient(appId: string, apiKey: string, options?: ClientOptions | undefined): LiteClient {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n const { compression: _compression, ...browserOptions } = options || {};\n\n return createLiteClient({\n appId,\n apiKey,\n timeouts: {\n connect: 1000,\n read: 2000,\n write: 30000,\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 ...browserOptions,\n });\n}\n\nexport type LiteClient = ReturnType<typeof createLiteClient>;\n","// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type {\n AlgoliaHttpResponse,\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\nimport { createAuth, createTransporter, getAlgoliaAgent, shuffle, validateRequired } from '@algolia/client-common';\n\nimport type { GetRecommendationsParams } from '../model/getRecommendationsParams';\nimport type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';\nimport type { SearchMethodParams } from '../model/searchMethodParams';\nimport type { SearchResponses } from '../model/searchResponses';\n\nimport type {\n CustomPostProps,\n LegacyGetRecommendationsParams,\n LegacySearchMethodProps,\n} from '../model/clientMethodProps';\n\nimport type { SearchForFacetValuesResponse } from '../model/searchForFacetValuesResponse';\nimport type { SearchResponse } from '../model/searchResponse';\n\nexport const apiClientVersion = '5.56.0';\n\nfunction getDefaultHosts(appId: string): Host[] {\n return (\n [\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 ] as Host[]\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}\n\nexport function createLiteClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}: CreateClientOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Lite',\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\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\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: string, version?: string | undefined): void {\n transporter.algoliaAgent.add({ segment, version });\n },\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 }: { apiKey: string }): void {\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 /**\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<T>(\n searchMethodParams: LegacySearchMethodProps | SearchMethodParams,\n requestOptions?: RequestOptions | undefined,\n ): Promise<{ results: Array<SearchResponse<T>> }> {\n return this.search(searchMethodParams, requestOptions) as Promise<{ results: Array<SearchResponse<T>> }>;\n },\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(\n searchMethodParams: LegacySearchMethodProps | SearchMethodParams,\n requestOptions?: RequestOptions | undefined,\n ): Promise<{ results: Array<SearchForFacetValuesResponse> }> {\n return this.search(searchMethodParams, requestOptions) as Promise<{\n results: Array<SearchForFacetValuesResponse>;\n }>;\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(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n validateRequired('path', 'customPost', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\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 * @see customPost for the plain version.\n */\n customPostWithHTTPInfo(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<Record<string, unknown>>> {\n validateRequired('path', 'customPostWithHTTPInfo', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\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(\n getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams,\n requestOptions?: RequestOptions,\n ): Promise<GetRecommendationsResponse> {\n if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {\n const newSignatureRequest: GetRecommendationsParams = {\n requests: getRecommendationsParams,\n };\n\n getRecommendationsParams = newSignatureRequest;\n }\n\n validateRequired('getRecommendationsParams', 'getRecommendations', getRecommendationsParams);\n\n validateRequired('getRecommendationsParams.requests', 'getRecommendations', getRecommendationsParams.requests);\n\n const requestPath = '/1/indexes/*/recommendations';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: getRecommendationsParams,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves recommendations from selected AI models.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\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 * @see getRecommendations for the plain version.\n */\n getRecommendationsWithHTTPInfo(\n getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<GetRecommendationsResponse>> {\n if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {\n const newSignatureRequest: GetRecommendationsParams = {\n requests: getRecommendationsParams,\n };\n\n getRecommendationsParams = newSignatureRequest;\n }\n\n validateRequired('getRecommendationsParams', 'getRecommendationsWithHTTPInfo', getRecommendationsParams);\n\n validateRequired(\n 'getRecommendationsParams.requests',\n 'getRecommendationsWithHTTPInfo',\n getRecommendationsParams.requests,\n );\n\n const requestPath = '/1/indexes/*/recommendations';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: getRecommendationsParams,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n\n /**\n * Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.\n *\n * Required API Key ACLs:\n * - search\n * @param searchMethodParams - Multi-query 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<T>(\n searchMethodParams: SearchMethodParams | LegacySearchMethodProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchResponses<T>> {\n if (searchMethodParams && Array.isArray(searchMethodParams)) {\n const newSignatureRequest: SearchMethodParams = {\n requests: searchMethodParams.map(({ params, ...legacyRequest }) => {\n if (legacyRequest.type === 'facet') {\n return {\n ...legacyRequest,\n ...params,\n type: 'facet',\n };\n }\n\n return {\n ...legacyRequest,\n ...params,\n facet: undefined,\n maxFacetHits: undefined,\n facetQuery: undefined,\n };\n }),\n };\n\n searchMethodParams = newSignatureRequest;\n }\n\n validateRequired('searchMethodParams', 'search', searchMethodParams);\n\n validateRequired('searchMethodParams.requests', 'search', searchMethodParams.requests);\n\n const requestPath = '/1/indexes/*/queries';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: searchMethodParams,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\n *\n * Required API Key ACLs:\n * - search\n * @param searchMethodParams - Multi-query 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 * @see search for the plain version.\n */\n searchWithHTTPInfo<T>(\n searchMethodParams: SearchMethodParams | LegacySearchMethodProps,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<SearchResponses<T>>> {\n if (searchMethodParams && Array.isArray(searchMethodParams)) {\n const newSignatureRequest: SearchMethodParams = {\n requests: searchMethodParams.map(({ params, ...legacyRequest }) => {\n if (legacyRequest.type === 'facet') {\n return {\n ...legacyRequest,\n ...params,\n type: 'facet',\n };\n }\n\n return {\n ...legacyRequest,\n ...params,\n facet: undefined,\n maxFacetHits: undefined,\n facetQuery: undefined,\n };\n }),\n };\n\n searchMethodParams = newSignatureRequest;\n }\n\n validateRequired('searchMethodParams', 'searchWithHTTPInfo', searchMethodParams);\n\n validateRequired('searchMethodParams.requests', 'searchWithHTTPInfo', searchMethodParams.requests);\n\n const requestPath = '/1/indexes/*/queries';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: searchMethodParams,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n };\n}\n"],"mappings":";AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;;;ACGnC,SAAS,YAAY,mBAAmB,iBAAiB,SAAS,wBAAwB;AAgBnF,IAAM,mBAAmB;AAEhC,SAAS,gBAAgB,OAAuB;AAC9C,SACE;AAAA,IACE;AAAA,MACE,KAAK,GAAG,KAAK;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,IACA;AAAA,MACE,KAAK,GAAG,KAAK;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,EACF,EACA;AAAA,IACA,QAAQ;AAAA,MACN;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,Q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||window.localStorage),r}function s(){return JSON.parse(t().getItem(o)||"{}")}function l(n){t().setItem(o,JSON.stringify(n))}function i(){return new Promise(n=>setTimeout(n,0))}function a(){let n=e.timeToLive?e.timeToLive*1e3:null,u=s(),p=new Date().getTime(),d=!1;return{namespace:Object.fromEntries(Object.entries(u).filter(([,h])=>!h||h.timestamp===void 0||n&&h.timestamp+n<p?(d=!0,!1):!0)),changed:d}}return{get(n,u,p={miss:()=>Promise.resolve()}){return i().then(()=>{let{namespace:d,changed:x}=a(),h=d[JSON.stringify(n)];return x&&l(d),h?h.value:u().then(v=>p.miss(v).then(()=>v))})},set(n,u){return i().then(()=>{let p=s();return p[JSON.stringify(n)]={timestamp:new Date().getTime(),value:u},t().setItem(o,JSON.stringify(p)),u})},delete(n){return i().then(()=>{let u=s();delete u[JSON.stringify(n)],t().setItem(o,JSON.stringify(u))})},clear(){return Promise.resolve().then(()=>{t().removeItem(o)})}}}function ce(){return{get(e,r,o={miss:()=>Promise.resolve()}){return r().then(s=>Promise.all([s,o.miss(s)])).then(([s])=>s)},set(e,r){return Promise.resolve(r)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}function O(e){let r=[...e.caches],o=r.shift();return o===void 0?ce():{get(t,s,l={miss:()=>Promise.resolve()}){return o.get(t,s,l).catch(()=>O({caches:r}).get(t,s,l))},set(t,s){return o.set(t,s).catch(()=>O({caches:r}).set(t,s))},delete(t){return o.delete(t).catch(()=>O({caches:r}).delete(t))},clear(){return o.clear().catch(()=>O({caches:r}).clear())}}}function F(e={serializable:!0}){let r={};return{get(o,t,s={miss:()=>Promise.resolve()}){let l=JSON.stringify(o);if(l in r)return Promise.resolve(e.serializable?JSON.parse(r[l]):r[l]);let i=t();return i.then(a=>s.miss(a)).then(()=>i)},set(o,t){return r[JSON.stringify(o)]=e.serializable?JSON.stringify(t):t,Promise.resolve(t)},delete(o){return delete r[JSON.stringify(o)],Promise.resolve()},clear(){return r={},Promise.resolve()}}}function me(e){let r={value:`Algolia for JavaScript (${e})`,add(o){let t=`; ${o.segment}${o.version!==void 0?` (${o.version})`:""}`;return r.value.indexOf(t)===-1&&(r.value=`${r.value}${t}`),r}};return r}function Y(e,r,o="WithinHeaders"){let t={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return o==="WithinHeaders"?t:{}},queryParameters(){return o==="WithinQueryParameters"?t:{}}}}function Z({algoliaAgents:e,client:r,version:o}){let t=me(o).add({segment:r,version:o});return e.forEach(s=>t.add(s)),t}function ee(){return{debug(e,r){return Promise.resolve()},info(e,r){return Promise.resolve()},error(e,r){return Promise.resolve()}}}var le=10*1024*1024;async function*ue(e){let r=e.getReader();try{for(;;){let{done:o,value:t}=await r.read();if(o)return;yield t}}finally{r.releaseLock()}}function fe(e){return Symbol.asyncIterator in e?e:ue(e)}async function*pe(e){let r=new TextDecoder("utf-8"),o=[],t=0,s=!1,l=!0;for await(let a of fe(e)){let n=r.decode(a,{stream:!0}),u=0;for(s&&(s=!1,n.length>0&&n[0]===`
2
- `&&(u=1));u<n.length;){let p=n.indexOf("\r",u),d=n.indexOf(`
3
- `,u);if(p===-1&&d===-1){let c=n.slice(u);if(o.push(c),t+=c.length,t>le)throw new Error("SSE line buffer exceeded 10MB");break}let x,h;p!==-1&&(d===-1||p<d)?(x=p,p+1<n.length?h=n[p+1]===`
4
- `?2:1:(s=!0,h=1)):(x=d,h=1);let v=n.slice(u,x);o.push(v);let E=o.length===1?o[0]:o.join("");o.length=0,t=0,l&&(E.startsWith("\uFEFF")&&(E=E.slice(1)),l=!1),yield E,u=x+h}}let i=r.decode();if(i&&o.push(i),o.length>0){let a=o.join("");l&&a.startsWith("\uFEFF")&&(a=a.slice(1)),yield a}}var de=class{data=[];eventType="";lastEventId=null;retry=null;decode(e){if(e==="")return this.dispatch();if(e[0]===":")return null;let r=e.indexOf(":"),o,t;switch(r===-1?(o=e,t=""):(o=e.slice(0,r),t=e.slice(r+1),t[0]===" "&&(t=t.slice(1))),o){case"data":this.data.push(t);break;case"event":this.eventType=t;break;case"id":t.includes("\0")||(this.lastEventId=t);break;case"retry":/^[0-9]+$/.test(t)&&(this.retry=parseInt(t,10));break}return null}dispatch(){let e=this.eventType;if(this.eventType="",this.data.length===0)return null;let r={data:this.data.join(`
5
- `),event:e,id:this.lastEventId,retry:this.retry};return this.data=[],r}};async function*he(e){let r=new de;for await(let o of pe(e)){let t=r.decode(o);t!==null&&(yield t)}}var xe=750,J=120*1e3;function G(e,r="up"){let o=Date.now();function t(){return r==="up"||Date.now()-o>J}function s(){return r==="timed out"&&Date.now()-o<=J}return{...e,status:r,lastUpdate:o,isUp:t,isTimedOut:s}}var re=class extends Error{name="AlgoliaError";constructor(e,r){super(e),r&&(this.name=r)}};var te=class extends re{stackTrace;constructor(e,r,o){super(e,o),this.stackTrace=r}},Q=class extends te{constructor(e){super("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",e,"RetryError")}},U=class extends te{status;constructor(e,r,o,t="ApiError"){super(e,o,t),this.status=r}},ge=class extends re{response;constructor(e,r){super(e,"DeserializationError"),this.response=r}},ye=class extends U{error;constructor(e,r,o,t){super(e,r,t,"DetailedApiError"),this.error=o}};function oe(e){let r=e;for(let o=e.length-1;o>0;o--){let t=Math.floor(Math.random()*(o+1)),s=e[o];r[o]=e[t],r[t]=s}return r}function B(e,r,o){let t=Pe(o),s=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${r.charAt(0)==="/"?r.substring(1):r}`;return t.length&&(s+=`?${t}`),s}function Pe(e){return Object.keys(e).filter(r=>e[r]!==void 0).sort().map(r=>`${r}=${encodeURIComponent(Object.prototype.toString.call(e[r])==="[object Array]"?e[r].join(","):e[r]).replace(/\+/g,"%20")}`).join("&")}function V(e,r){if(e.method==="GET"||e.data===void 0&&r.data===void 0)return;let o=Array.isArray(e.data)?e.data:{...e.data,...r.data};return JSON.stringify(o)}function X(e,r,o){let t={Accept:"application/json",...e,...r,...o},s={};return Object.keys(t).forEach(l=>{let i=t[l];s[l.toLowerCase()]=i}),s}function Te(e){if(!(e.status===204||e.content.length===0))try{return JSON.parse(e.content)}catch(r){throw new ge(r.message,e)}}function ve({content:e,status:r},o){try{let t=JSON.parse(e);return"error"in t?new ye(t.message,r,t.error,o):new U(t.message,r,o)}catch{}return new U(e,r,o)}function Ee({isTimedOut:e,status:r}){return!e&&~~r===0}function Se({isTimedOut:e,status:r}){return e||Ee({isTimedOut:e,status:r})||~~(r/100)!==2&&~~(r/100)!==4}function Re({status:e}){return~~(e/100)===2}function we(e){return e.map(r=>ae(r))}function ae(e){let r=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...r}}}}function se({hosts:e,hostsCache:r,baseHeaders:o,logger:t,baseQueryParameters:s,algoliaAgent:l,timeouts:i,requester:a,requestsCache:n,responsesCache:u,compress:p,compression:d}){async function x(c){let m=await Promise.all(c.map(f=>r.get(f,()=>Promise.resolve(G(f))))),R=m.filter(f=>f.isUp()),P=m.filter(f=>f.isTimedOut()),S=[...R,...P];return{hosts:S.length>0?S:c,getTimeout(f,w){return(P.length===0&&f===0?1:P.length+3+f)*w}}}async function h(c,m,R){let P=[],S=V(c,m),g=X(o,c.headers,m.headers),f=d==="gzip"&&S!==void 0&&S.length>xe&&(c.method==="POST"||c.method==="PUT");f&&p===void 0&&t.info("Compression is disabled because no compress method is available.");let w=f&&p!==void 0,D=w?await p(S):S;w&&(g["content-encoding"]="gzip");let I=c.method==="GET"?{...c.data,...m.data}:{},A={...s,...c.queryParameters,...I};if(l.value&&(A["x-algolia-agent"]=l.value),m&&m.queryParameters)for(let y of Object.keys(m.queryParameters))!m.queryParameters[y]||Object.prototype.toString.call(m.queryParameters[y])==="[object Object]"?A[y]=m.queryParameters[y]:A[y]=m.queryParameters[y].toString();let _=0,N=async(y,$)=>{let C=y.pop();if(C===void 0)throw new Q(we(P));let q={...i,...m.timeouts},j={data:D,headers:g,method:c.method,url:B(C,c.path,A),connectTimeout:$(_,q.connect),responseTimeout:$(_,R?q.read:q.write)},W=M=>{let z={request:j,response:M,host:C,triesLeft:y.length};return P.push(z),z},b=await a.send(j);if(Se(b)){let M=W(b);return b.isTimedOut&&_++,t.info("Retryable failure",ae(M)),await r.set(C,G(C,b.isTimedOut?"timed out":"down")),N(y,$)}if(Re(b))return Te(b);throw W(b),ve(b,P)},T=e.filter(y=>y.accept==="readWrite"||(R?y.accept==="read":y.accept==="write")),H=await x(T);return N([...H.hosts].reverse(),H.getTimeout)}function v(c,m={}){let R=()=>h(c,m,P),P=c.useReadTransporter||c.method==="GET";if((m.cacheable||c.cacheable)!==!0)return R();let g={request:c,requestOptions:m,transporter:{queryParameters:s,headers:o}};return u.get(g,()=>n.get(g,()=>n.set(g,R()).then(f=>Promise.all([n.delete(g),f]),f=>Promise.all([n.delete(g),Promise.reject(f)])).then(([f,w])=>w)),{miss:f=>u.set(g,f)})}async function*E(c,m={}){if(!a.sendStream)throw new Error("This requester does not support streaming");let R=V(c,m),P=X(o,c.headers,m.headers);P.accept="text/event-stream";let S=c.method==="GET"?{...c.data,...m.data}:{},g={...s,...c.queryParameters,...S};if(l.value&&(g["x-algolia-agent"]=l.value),m&&m.queryParameters)for(let T of Object.keys(m.queryParameters))!m.queryParameters[T]||Object.prototype.toString.call(m.queryParameters[T])==="[object Object]"?g[T]=m.queryParameters[T]:g[T]=m.queryParameters[T].toString();let f=c.useReadTransporter||c.method==="GET",w=e.filter(T=>T.accept==="readWrite"||(f?T.accept==="read":T.accept==="write")),I=(await x(w)).hosts[0];if(!I)throw new Q([]);let A={...i,...m.timeouts},_={data:R,headers:P,method:c.method,url:B(I,c.path,g),connectTimeout:A.connect,responseTimeout:f?A.read:A.write},N=await a.sendStream(_);yield*he(N)}return{hostsCache:r,requester:a,timeouts:i,logger:t,algoliaAgent:l,baseHeaders:o,baseQueryParameters:s,hosts:e,request:v,requestStream:E,requestsCache:n,responsesCache:u}}function L(e,r,o){if(o==null||typeof o=="string"&&o.length===0)throw new Error(`Parameter \`${e}\` is required when calling \`${r}\`.`)}function ne(){function e(r){return new Promise(o=>{let t=new XMLHttpRequest;t.open(r.method,r.url,!0),Object.keys(r.headers).forEach(a=>t.setRequestHeader(a,r.headers[a]));let s=(a,n)=>setTimeout(()=>{t.abort(),o({status:0,content:n,isTimedOut:!0})},a),l=s(r.connectTimeout,"Connection timeout"),i;t.onreadystatechange=()=>{t.readyState>t.OPENED&&i===void 0&&(clearTimeout(l),i=s(r.responseTimeout,"Socket timeout"))},t.onerror=()=>{t.status===0&&(clearTimeout(l),clearTimeout(i),o({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(l),clearTimeout(i),o({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(r.data)})}return{send:e}}var k="5.55.2";function Ae(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(oe([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function ie({appId:e,apiKey:r,authMode:o,algoliaAgents:t,...s}){let l=Y(e,r,o),i=se({hosts:Ae(e),...s,algoliaAgent:Z({algoliaAgents:t,client:"Lite",version:k}),baseHeaders:{"content-type":"text/plain",...l.headers(),...s.baseHeaders},baseQueryParameters:{...l.queryParameters(),...s.baseQueryParameters}});return{transporter:i,appId:e,apiKey:r,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(a,n){i.algoliaAgent.add({segment:a,version:n})},setClientApiKey({apiKey:a}){!o||o==="WithinHeaders"?i.baseHeaders["x-algolia-api-key"]=a:i.baseQueryParameters["x-algolia-api-key"]=a},searchForHits(a,n){return this.search(a,n)},searchForFacets(a,n){return this.search(a,n)},customPost({path:a,parameters:n,body:u},p){L("path","customPost",a);let v={method:"POST",path:"/{path}".replace("{path}",a),queryParameters:n||{},headers:{},data:u||{}};return i.request(v,p)},getRecommendations(a,n){a&&Array.isArray(a)&&(a={requests:a}),L("getRecommendationsParams","getRecommendations",a),L("getRecommendationsParams.requests","getRecommendations",a.requests);let x={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:a,useReadTransporter:!0,cacheable:!0};return i.request(x,n)},search(a,n){a&&Array.isArray(a)&&(a={requests:a.map(({params:v,...E})=>E.type==="facet"?{...E,...v,type:"facet"}:{...E,...v,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),L("searchMethodParams","search",a),L("searchMethodParams.requests","search",a.requests);let x={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:a,useReadTransporter:!0,cacheable:!0};return i.request(x,n)}}}function xo(e,r,o){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!r||typeof r!="string")throw new Error("`apiKey` is missing.");let{compression:t,...s}=o||{};return ie({appId:e,apiKey:r,timeouts:{connect:1e3,read:2e3,write:3e4},logger:ee(),requester:ne(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:F(),requestsCache:F({serializable:!1}),hostsCache:O({caches:[K({key:`${k}-${e}`}),F()]}),...s})}export{k as apiClientVersion,xo as liteClient};
1
+ function Y(e){let r,o=`algolia-client-js-${e.key}`;function t(){return r===void 0&&(r=e.localStorage||window.localStorage),r}function n(){return JSON.parse(t().getItem(o)||"{}")}function l(a){t().setItem(o,JSON.stringify(a))}function i(){return new Promise(a=>setTimeout(a,0))}function s(){let a=e.timeToLive?e.timeToLive*1e3:null,m=n(),f=new Date().getTime(),x=!1;return{namespace:Object.fromEntries(Object.entries(m).filter(([,h])=>!h||h.timestamp===void 0||a&&h.timestamp+a<f?(x=!0,!1):!0)),changed:x}}return{get(a,m,f={miss:()=>Promise.resolve()}){return i().then(()=>{let{namespace:x,changed:d}=s(),h=x[JSON.stringify(a)];return d&&l(x),h?h.value:m().then(y=>f.miss(y).then(()=>y))})},set(a,m){return i().then(()=>{let f=n();return f[JSON.stringify(a)]={timestamp:new Date().getTime(),value:m},t().setItem(o,JSON.stringify(f)),m})},delete(a){return i().then(()=>{let m=n();delete m[JSON.stringify(a)],t().setItem(o,JSON.stringify(m))})},clear(){return Promise.resolve().then(()=>{t().removeItem(o)})}}}function me(){return{get(e,r,o={miss:()=>Promise.resolve()}){return r().then(n=>Promise.all([n,o.miss(n)])).then(([n])=>n)},set(e,r){return Promise.resolve(r)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}function O(e){let r=[...e.caches],o=r.shift();return o===void 0?me():{get(t,n,l={miss:()=>Promise.resolve()}){return o.get(t,n,l).catch(()=>O({caches:r}).get(t,n,l))},set(t,n){return o.set(t,n).catch(()=>O({caches:r}).set(t,n))},delete(t){return o.delete(t).catch(()=>O({caches:r}).delete(t))},clear(){return o.clear().catch(()=>O({caches:r}).clear())}}}function N(e={serializable:!0}){let r={};return{get(o,t,n={miss:()=>Promise.resolve()}){let l=JSON.stringify(o);if(l in r)return Promise.resolve(e.serializable?JSON.parse(r[l]):r[l]);let i=t();return i.then(s=>n.miss(s)).then(()=>i)},set(o,t){return r[JSON.stringify(o)]=e.serializable?JSON.stringify(t):t,Promise.resolve(t)},delete(o){return delete r[JSON.stringify(o)],Promise.resolve()},clear(){return r={},Promise.resolve()}}}function le(e){let r={value:`Algolia for JavaScript (${e})`,add(o){let t=`; ${o.segment}${o.version!==void 0?` (${o.version})`:""}`;return r.value.indexOf(t)===-1&&(r.value=`${r.value}${t}`),r}};return r}function Z(e,r,o="WithinHeaders"){let t={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return o==="WithinHeaders"?t:{}},queryParameters(){return o==="WithinQueryParameters"?t:{}}}}function ee({algoliaAgents:e,client:r,version:o}){let t=le(o).add({segment:r,version:o});return e.forEach(n=>t.add(n)),t}function re(){return{debug(e,r){return Promise.resolve()},info(e,r){return Promise.resolve()},error(e,r){return Promise.resolve()}}}var fe=10*1024*1024;async function*pe(e){let r=e.getReader();try{for(;;){let{done:o,value:t}=await r.read();if(o)return;yield t}}finally{r.releaseLock()}}function de(e){return Symbol.asyncIterator in e?e:pe(e)}async function*he(e){let r=new TextDecoder("utf-8"),o=[],t=0,n=!1,l=!0;for await(let s of de(e)){let a=r.decode(s,{stream:!0}),m=0;for(n&&(n=!1,a.length>0&&a[0]===`
2
+ `&&(m=1));m<a.length;){let f=a.indexOf("\r",m),x=a.indexOf(`
3
+ `,m);if(f===-1&&x===-1){let L=a.slice(m);if(o.push(L),t+=L.length,t>fe)throw new Error("SSE line buffer exceeded 10MB");break}let d,h;f!==-1&&(x===-1||f<x)?(d=f,f+1<a.length?h=a[f+1]===`
4
+ `?2:1:(n=!0,h=1)):(d=x,h=1);let y=a.slice(m,d);o.push(y);let P=o.length===1?o[0]:o.join("");o.length=0,t=0,l&&(P.startsWith("\uFEFF")&&(P=P.slice(1)),l=!1),yield P,m=d+h}}let i=r.decode();if(i&&o.push(i),o.length>0){let s=o.join("");l&&s.startsWith("\uFEFF")&&(s=s.slice(1)),yield s}}var xe=class{data=[];eventType="";lastEventId=null;retry=null;decode(e){if(e==="")return this.dispatch();if(e[0]===":")return null;let r=e.indexOf(":"),o,t;switch(r===-1?(o=e,t=""):(o=e.slice(0,r),t=e.slice(r+1),t[0]===" "&&(t=t.slice(1))),o){case"data":this.data.push(t);break;case"event":this.eventType=t;break;case"id":t.includes("\0")||(this.lastEventId=t);break;case"retry":/^[0-9]+$/.test(t)&&(this.retry=parseInt(t,10));break}return null}dispatch(){let e=this.eventType;if(this.eventType="",this.data.length===0)return null;let r={data:this.data.join(`
5
+ `),event:e,id:this.lastEventId,retry:this.retry};return this.data=[],r}};async function*ye(e){let r=new xe;for await(let o of he(e)){let t=r.decode(o);t!==null&&(yield t)}}var ge=750,J=120*1e3;function Q(e,r="up"){let o=Date.now();function t(){return r==="up"||Date.now()-o>J}function n(){return r==="timed out"&&Date.now()-o<=J}return{...e,status:r,lastUpdate:o,isUp:t,isTimedOut:n}}var te=class extends Error{name="AlgoliaError";constructor(e,r){super(e),r&&(this.name=r)}};var oe=class extends te{stackTrace;constructor(e,r,o){super(e,o),this.stackTrace=r}},B=class extends oe{constructor(e){super("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",e,"RetryError")}},U=class extends oe{status;constructor(e,r,o,t="ApiError"){super(e,o,t),this.status=r}},Pe=class extends te{response;constructor(e,r){super(e,"DeserializationError"),this.response=r}},Te=class extends U{error;constructor(e,r,o,t){super(e,r,t,"DetailedApiError"),this.error=o}};function se(e){let r=e;for(let o=e.length-1;o>0;o--){let t=Math.floor(Math.random()*(o+1)),n=e[o];r[o]=e[t],r[t]=n}return r}function V(e,r,o){let t=Re(o),n=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${r.charAt(0)==="/"?r.substring(1):r}`;return t.length&&(n+=`?${t}`),n}function Re(e){return Object.keys(e).filter(r=>e[r]!==void 0).sort().map(r=>`${r}=${encodeURIComponent(Object.prototype.toString.call(e[r])==="[object Array]"?e[r].join(","):e[r]).replace(/\+/g,"%20")}`).join("&")}function X(e,r){if(e.method==="GET"||e.data===void 0&&r.data===void 0)return;let o=Array.isArray(e.data)?e.data:{...e.data,...r.data};return JSON.stringify(o)}function K(e,r,o){let t={Accept:"application/json",...e,...r,...o},n={};return Object.keys(t).forEach(l=>{let i=t[l];n[l.toLowerCase()]=i}),n}function ae(e){if(!(e.status===204||e.content.length===0))try{return JSON.parse(e.content)}catch(r){throw new Pe(r.message,e)}}function Se(e){return{status:e.status,headers:e.headers,content:e.content,data:ae(e)}}function ve({content:e,status:r},o){try{let t=JSON.parse(e);return"error"in t?new Te(t.message,r,t.error,o):new U(t.message,r,o)}catch{}return new U(e,r,o)}function Ee({isTimedOut:e,status:r}){return!e&&~~r===0}function we({isTimedOut:e,status:r}){return e||Ee({isTimedOut:e,status:r})||~~(r/100)!==2&&~~(r/100)!==4}function Ae({status:e}){return~~(e/100)===2}function be(e){return e.map(r=>ne(r))}function ne(e){let r=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...r}}}}function ie({hosts:e,hostsCache:r,baseHeaders:o,logger:t,baseQueryParameters:n,algoliaAgent:l,timeouts:i,requester:s,requestsCache:a,responsesCache:m,compress:f,compression:x}){async function d(c){let u=await Promise.all(c.map(p=>r.get(p,()=>Promise.resolve(Q(p))))),v=u.filter(p=>p.isUp()),T=u.filter(p=>p.isTimedOut()),w=[...v,...T];return{hosts:w.length>0?w:c,getTimeout(p,A){return(T.length===0&&p===0?1:T.length+3+p)*A}}}async function h(c,u,v){let T=[],w=X(c,u),g=K(o,c.headers,u.headers),p=x==="gzip"&&w!==void 0&&w.length>ge&&(c.method==="POST"||c.method==="PUT");p&&f===void 0&&t.info("Compression is disabled because no compress method is available.");let A=p&&f!==void 0,F=A?await f(w):w;A&&(g["content-encoding"]="gzip");let C=c.method==="GET"?{...c.data,...u.data}:{},b={...n,...c.queryParameters,...C};if(l.value&&(b["x-algolia-agent"]=l.value),u&&u.queryParameters)for(let R of Object.keys(u.queryParameters))!u.queryParameters[R]||Object.prototype.toString.call(u.queryParameters[R])==="[object Object]"?b[R]=u.queryParameters[R]:b[R]=u.queryParameters[R].toString();let I=0,_=async(R,k)=>{let H=R.pop();if(H===void 0)throw new B(be(T));let D={...i,...u.timeouts},j={data:F,headers:g,method:c.method,url:V(H,c.path,b),connectTimeout:k(I,D.connect),responseTimeout:k(I,v?D.read:D.write)},z=$=>{let G={request:j,response:$,host:H,triesLeft:R.length};return T.push(G),G},q=await s.send(j);if(we(q)){let $=z(q);return q.isTimedOut&&I++,t.info("Retryable failure",ne($)),await r.set(H,Q(H,q.isTimedOut?"timed out":"down")),_(R,k)}if(Ae(q))return q;throw z(q),ve(q,T)},S=e.filter(R=>R.accept==="readWrite"||(v?R.accept==="read":R.accept==="write")),M=await d(S);return _([...M.hosts].reverse(),M.getTimeout)}function y(c,u={}){let v=()=>h(c,u,T).then(p=>ae(p)),T=c.useReadTransporter||c.method==="GET";if((u.cacheable||c.cacheable)!==!0)return v();let g={request:c,requestOptions:u,transporter:{queryParameters:n,headers:o}};return m.get(g,()=>a.get(g,()=>a.set(g,v()).then(p=>Promise.all([a.delete(g),p]),p=>Promise.all([a.delete(g),Promise.reject(p)])).then(([p,A])=>A)),{miss:p=>m.set(g,p)})}function P(c,u={}){let v=c.useReadTransporter||c.method==="GET";return h(c,u,v).then(T=>Se(T))}async function*L(c,u={}){if(!s.sendStream)throw new Error("This requester does not support streaming");let v=X(c,u),T=K(o,c.headers,u.headers);T.accept="text/event-stream";let w=c.method==="GET"?{...c.data,...u.data}:{},g={...n,...c.queryParameters,...w};if(l.value&&(g["x-algolia-agent"]=l.value),u&&u.queryParameters)for(let S of Object.keys(u.queryParameters))!u.queryParameters[S]||Object.prototype.toString.call(u.queryParameters[S])==="[object Object]"?g[S]=u.queryParameters[S]:g[S]=u.queryParameters[S].toString();let p=c.useReadTransporter||c.method==="GET",A=e.filter(S=>S.accept==="readWrite"||(p?S.accept==="read":S.accept==="write")),C=(await d(A)).hosts[0];if(!C)throw new B([]);let b={...i,...u.timeouts},I={data:v,headers:T,method:c.method,url:V(C,c.path,g),connectTimeout:b.connect,responseTimeout:p?b.read:b.write},_=await s.sendStream(I);yield*ye(_)}return{hostsCache:r,requester:s,timeouts:i,logger:t,algoliaAgent:l,baseHeaders:o,baseQueryParameters:n,hosts:e,request:y,requestWithHttpInfo:P,requestStream:L,requestsCache:a,responsesCache:m}}function E(e,r,o){if(o==null||typeof o=="string"&&o.length===0)throw new Error(`Parameter \`${e}\` is required when calling \`${r}\`.`)}function qe(e){let r={};for(let o of e.trim().split(/[\r\n]+/)){let t=o.indexOf(": ");t>0&&(r[o.slice(0,t).toLowerCase()]=o.slice(t+2))}return r}function ce(){function e(r){return new Promise(o=>{let t=new XMLHttpRequest;t.open(r.method,r.url,!0),Object.keys(r.headers).forEach(s=>t.setRequestHeader(s,r.headers[s]));let n=(s,a)=>setTimeout(()=>{t.abort(),o({status:0,content:a,isTimedOut:!0})},s),l=n(r.connectTimeout,"Connection timeout"),i;t.onreadystatechange=()=>{t.readyState>t.OPENED&&i===void 0&&(clearTimeout(l),i=n(r.responseTimeout,"Socket timeout"))},t.onerror=()=>{t.status===0&&(clearTimeout(l),clearTimeout(i),o({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(l),clearTimeout(i),o({content:t.responseText,headers:qe(t.getAllResponseHeaders()),status:t.status,isTimedOut:!1})},t.send(r.data)})}return{send:e}}var W="5.56.0";function Oe(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(se([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function ue({appId:e,apiKey:r,authMode:o,algoliaAgents:t,...n}){let l=Z(e,r,o),i=ie({hosts:Oe(e),...n,algoliaAgent:ee({algoliaAgents:t,client:"Lite",version:W}),baseHeaders:{"content-type":"text/plain",...l.headers(),...n.baseHeaders},baseQueryParameters:{...l.queryParameters(),...n.baseQueryParameters}});return{transporter:i,appId:e,apiKey:r,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(s,a){i.algoliaAgent.add({segment:s,version:a})},setClientApiKey({apiKey:s}){!o||o==="WithinHeaders"?i.baseHeaders["x-algolia-api-key"]=s:i.baseQueryParameters["x-algolia-api-key"]=s},searchForHits(s,a){return this.search(s,a)},searchForFacets(s,a){return this.search(s,a)},customPost({path:s,parameters:a,body:m},f){E("path","customPost",s);let y={method:"POST",path:"/{path}".replace("{path}",s),queryParameters:a||{},headers:{},data:m||{}};return i.request(y,f)},customPostWithHTTPInfo({path:s,parameters:a,body:m},f){E("path","customPostWithHTTPInfo",s);let y={method:"POST",path:"/{path}".replace("{path}",s),queryParameters:a||{},headers:{},data:m||{}};return i.requestWithHttpInfo(y,f)},getRecommendations(s,a){s&&Array.isArray(s)&&(s={requests:s}),E("getRecommendationsParams","getRecommendations",s),E("getRecommendationsParams.requests","getRecommendations",s.requests);let d={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:s,useReadTransporter:!0,cacheable:!0};return i.request(d,a)},getRecommendationsWithHTTPInfo(s,a){s&&Array.isArray(s)&&(s={requests:s}),E("getRecommendationsParams","getRecommendationsWithHTTPInfo",s),E("getRecommendationsParams.requests","getRecommendationsWithHTTPInfo",s.requests);let d={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:s,useReadTransporter:!0,cacheable:!0};return i.requestWithHttpInfo(d,a)},search(s,a){s&&Array.isArray(s)&&(s={requests:s.map(({params:y,...P})=>P.type==="facet"?{...P,...y,type:"facet"}:{...P,...y,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),E("searchMethodParams","search",s),E("searchMethodParams.requests","search",s.requests);let d={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:s,useReadTransporter:!0,cacheable:!0};return i.request(d,a)},searchWithHTTPInfo(s,a){s&&Array.isArray(s)&&(s={requests:s.map(({params:y,...P})=>P.type==="facet"?{...P,...y,type:"facet"}:{...P,...y,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),E("searchMethodParams","searchWithHTTPInfo",s),E("searchMethodParams.requests","searchWithHTTPInfo",s.requests);let d={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:s,useReadTransporter:!0,cacheable:!0};return i.requestWithHttpInfo(d,a)}}}function Po(e,r,o){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!r||typeof r!="string")throw new Error("`apiKey` is missing.");let{compression:t,...n}=o||{};return ue({appId:e,apiKey:r,timeouts:{connect:1e3,read:2e3,write:3e4},logger:re(),requester:ce(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:N(),requestsCache:N({serializable:!1}),hostsCache:O({caches:[Y({key:`${W}-${e}`}),N()]}),...n})}export{W as apiClientVersion,Po as liteClient};
6
6
  //# sourceMappingURL=browser.min.js.map