From 32b3bf44fc68569ffc75ce4635a4a213db7da4a8 Mon Sep 17 00:00:00 2001 From: nobody Date: Sat, 5 Oct 2024 08:40:04 +0200 Subject: [PATCH 01/26] v2.6.75 --- manifest.json | 2 +- pages/updates/updates.html | 61 +++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 29 deletions(-) diff --git a/manifest.json b/manifest.json index 932892de..f97f553c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "LocalCDN", - "version": "2.6.74", + "version": "2.6.75", "browser_specific_settings": { "gecko": { "id": "{b86e4813-687a-43e6-ab65-0bde4ab75758}", diff --git a/pages/updates/updates.html b/pages/updates/updates.html index c7153949..9bf1d163 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -25,35 +25,9 @@

New in LocalCDN:

-

Updated

+

-

Improved

- -

Mapping

- -

Added

-
@@ -92,6 +66,37 @@
+ Previous Versions
+

2024-10-05 (v2.6.74)

+

Updated

+ +

Improved

+ +

Mapping

+ +

Added

+

2024-09-09 (v2.6.73)

Updated

-

+

Updated

diff --git a/resources/algoliasearch/5.12.0/algoliasearch.min.jsm b/resources/algoliasearch/5.12.0/algoliasearch.min.jsm new file mode 100644 index 00000000..135040df --- /dev/null +++ b/resources/algoliasearch/5.12.0/algoliasearch.min.jsm @@ -0,0 +1 @@ +!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).algoliasearch={})}(this,function(e){"use strict";function d(){return{send:function(n){return new Promise(t=>{let a=new XMLHttpRequest,e=(a.open(n.method,n.url,!0),Object.keys(n.headers).forEach(e=>a.setRequestHeader(e,n.headers[e])),(e,r)=>setTimeout(()=>{a.abort(),t({status:0,content:r,isTimedOut:!0})},e)),r=e(n.connectTimeout,"Connection timeout"),i;a.onreadystatechange=()=>{a.readyState>a.OPENED&&void 0===i&&(clearTimeout(r),i=e(n.responseTimeout,"Socket timeout"))},a.onerror=()=>{0===a.status&&(clearTimeout(r),clearTimeout(i),t({content:a.responseText||"Network request failed",status:a.status,isTimedOut:!1}))},a.onload=()=>{clearTimeout(r),clearTimeout(i),t({content:a.responseText,status:a.status,isTimedOut:!1})},a.send(n.data)})}}}function u(a){let e,i="algolia-client-js-"+a.key;function n(){return e=void 0===e?a.localStorage||window.localStorage:e}function s(){return JSON.parse(n().getItem(i)||"{}")}function o(e){n().setItem(i,JSON.stringify(e))}return{get(e,r,t={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>{{let t=a.timeToLive?1e3*a.timeToLive:null,e=s(),r=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e.timestamp));o(r),t&&o(Object.fromEntries(Object.entries(r).filter(([,e])=>{var r=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:r(),void 0!==e])).then(([e,r])=>Promise.all([e,r||t.miss(e)])).then(([e])=>e)},set(r,t){return Promise.resolve().then(()=>{let e=s();return e[JSON.stringify(r)]={timestamp:(new Date).getTime(),value:t},n().setItem(i,JSON.stringify(e)),t})},delete(r){return Promise.resolve().then(()=>{let e=s();delete e[JSON.stringify(r)],n().setItem(i,JSON.stringify(e))})},clear(){return Promise.resolve().then(()=>{n().removeItem(i)})}}}function h(e){let a=[...e.caches],i=a.shift();return void 0===i?{get(e,r,t={miss:()=>Promise.resolve()}){return r().then(e=>Promise.all([e,t.miss(e)])).then(([e])=>e)},set(e,r){return Promise.resolve(r)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}:{get(e,r,t={miss:()=>Promise.resolve()}){return i.get(e,r,t).catch(()=>h({caches:a}).get(e,r,t))},set(e,r){return i.set(e,r).catch(()=>h({caches:a}).set(e,r))},delete(e){return i.delete(e).catch(()=>h({caches:a}).delete(e))},clear(){return i.clear().catch(()=>h({caches:a}).clear())}}}function c(i={serializable:!0}){let n={};return{get(e,r,t={miss:()=>Promise.resolve()}){e=JSON.stringify(e);if(e in n)return Promise.resolve(i.serializable?JSON.parse(n[e]):n[e]);let a=r();return a.then(e=>t.miss(e)).then(()=>a)},set(e,r){return n[JSON.stringify(e)]=i.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete(e){return delete n[JSON.stringify(e)],Promise.resolve()},clear(){return n={},Promise.resolve()}}}var m=1e3,p=2e3,g=3e4;function w(e,r,t="WithinHeaders"){let a={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return"WithinHeaders"===t?a:{}},queryParameters(){return"WithinQueryParameters"===t?a:{}}}}function l({func:a,validate:i,aggregator:n,error:s,timeout:o=()=>0}){let d=e=>new Promise((r,t)=>{a(e).then(e=>(n&&n(e),i(e)?r(e):s&&s.validate(e)?t(new Error(s.message(e))):setTimeout(()=>{d(e).then(r).catch(t)},o()))).catch(e=>{t(e)})});return d()}function P({algoliaAgents:e,client:r,version:t}){let a=function(e){let r={value:`Algolia for JavaScript (${e})`,add(e){e="; "+e.segment+(void 0!==e.version?` (${e.version})`:"");return-1===r.value.indexOf(e)&&(r.value=r.value+e),r}};return r}(t).add({segment:r,version:t});return e.forEach(e=>a.add(e)),a}function q(){return{debug(e,r){return Promise.resolve()},info(e,r){return Promise.resolve()},error(e,r){return Promise.resolve()}}}function T(e,r="up"){let t=Date.now();return{...e,status:r,lastUpdate:t,isUp:function(){return"up"===r||12e4void 0!==n[e]).sort().map(e=>e+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(n[e])?n[e].join(","):n[e]).replace(/\+/g,"%20")).join("&"),i=`${e.protocol}://${e.url}${e.port?":"+e.port:""}/`+("/"===r.charAt(0)?r.substring(1):r);var n;return a.length&&(i+="?"+a),i}function S(e){var r=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...r}}}}function f({hosts:i,hostsCache:y,baseHeaders:n,logger:f,baseQueryParameters:s,algoliaAgent:o,timeouts:E,requester:I,requestsCache:d,responsesCache:u}){async function h(h,c,l=!0){let m=[],p=function(e,r){if("GET"!==e.method&&(void 0!==e.data||void 0!==r.data))return e=Array.isArray(e.data)?e.data:{...e.data,...r.data},JSON.stringify(e)}(h,c),g=function(e,r,t){let a={Accept:"application/json",...e,...r,...t},i={};return Object.keys(a).forEach(e=>{var r=a[e];i[e.toLowerCase()]=r}),i}(n,h.headers,c.headers),e="GET"===h.method?{...h.data,...c.data}:{},w={...s,...h.queryParameters,...e};if(o.value&&(w["x-algolia-agent"]=o.value),c&&c.queryParameters)for(var r of Object.keys(c.queryParameters))c.queryParameters[r]&&"[object Object]"!==Object.prototype.toString.call(c.queryParameters[r])?w[r]=c.queryParameters[r].toString():w[r]=c.queryParameters[r];let P=0,q=async(r,e)=>{let t=r.pop();if(void 0===t)throw new G(m.map(e=>S(e)));var a,i;let n={...E,...c.timeouts},s={data:p,headers:g,method:h.method,url:H(t,h.path,w),connectTimeout:e(P,n.connect),responseTimeout:e(P,l?n.read:n.write)},o=e=>{e={request:s,response:e,host:t,triesLeft:r.length};return m.push(e),e},d=await I.send(s);if({isTimedOut:a,status:u}=[d][0],a||({isTimedOut:a,status:i}=[{isTimedOut:a,status:u}][0],!a&&0==~~i)||2!=~~(u/100)&&4!=~~(u/100))return a=o(d),d.isTimedOut&&P++,f.info("Retryable failure",S(a)),await y.set(t,T(t,d.isTimedOut?"timed out":"down")),q(r,e);if(i=d.status,2!=~~(i/100))throw o(d),function({content:e,status:r},t){try{var a=JSON.parse(e);return"error"in a?new B(a.message,r,a.error,t):new D(a.message,r,t)}catch{}return new D(e,r,t)}(d,m);var u=d;try{return JSON.parse(u.content)}catch(e){throw new K(e.message,u)}},t=i.filter(e=>"readWrite"===e.accept||(l?"read"===e.accept:"write"===e.accept)),a=await async function(e){let r=await Promise.all(e.map(e=>y.get(e,()=>Promise.resolve(T(e))))),t=r.filter(e=>e.isUp()),a=r.filter(e=>e.isTimedOut()),i=[...t,...a];return{hosts:0h(e,r);if(!0!==(r.cacheable||e.cacheable))return a();let i={request:e,requestOptions:r,transporter:{queryParameters:s,headers:n}};return u.get(i,()=>d.get(i,()=>d.set(i,a()).then(e=>Promise.all([d.delete(i),e]),e=>Promise.all([d.delete(i),Promise.reject(e)])).then(([,e])=>e)),{miss:e=>u.set(i,e)})},requestsCache:d,responsesCache:u}}var E="5.12.0",s=["de","us"];function i(r,t,a,i){if(!r||"string"!=typeof r)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");if(!a||"string"==typeof a&&s.includes(a)){var{appId:t,apiKey:a,authMode:n,algoliaAgents:r,region:i,...o}=[{appId:r,apiKey:t,region:a,timeouts:{connect:m,read:p,write:g},logger:q(),requester:d(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:h({caches:[u({key:E+"-"+r}),c()]}),...i}][0];let e=w(t,a,n),s=f({hosts:[{url:(a=i)?"analytics.{region}.algolia.com".replace("{region}",a):"analytics.algolia.com",accept:"readWrite",protocol:"https"}],...o,algoliaAgent:P({algoliaAgents:r,client:"Abtesting",version:E}),baseHeaders:{"content-type":"text/plain",...e.headers(),...o.baseHeaders},baseQueryParameters:{...e.queryParameters(),...o.baseQueryParameters}});return{transporter:s,appId:t,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(e,r){s.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){n&&"WithinHeaders"!==n?s.baseQueryParameters["x-algolia-api-key"]=e:s.baseHeaders["x-algolia-api-key"]=e},addABTests(e,r){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.variants)throw new Error("Parameter `addABTestsRequest.variants` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");e={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return s.request(e,r)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return s.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return s.request(e,a)},deleteABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `deleteABTest`.");e={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(e,r)},getABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `getABTest`.");e={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(e,r)},listABTests({offset:e,limit:r,indexPrefix:t,indexSuffix:a}={},i=void 0){let n={};void 0!==e&&(n.offset=e.toString()),void 0!==r&&(n.limit=r.toString()),void 0!==t&&(n.indexPrefix=t.toString()),void 0!==a&&(n.indexSuffix=a.toString());e={method:"GET",path:"/2/abtests",queryParameters:n,headers:{}};return s.request(e,i)},scheduleABTest(e,r){if(!e)throw new Error("Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.");if(!e.name)throw new Error("Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.");if(!e.variants)throw new Error("Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.");if(!e.scheduledAt)throw new Error("Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.");if(!e.endAt)throw new Error("Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.");e={method:"POST",path:"/2/abtests/schedule",queryParameters:{},headers:{},data:e};return s.request(e,r)},stopABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `stopABTest`.");e={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return s.request(e,r)}}}throw new Error("`region` must be one of the following: "+s.join(", "))}var o="5.12.0",I=["de","us"];function n(r,t,a,i){if(!r||"string"!=typeof r)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");if(!a||"string"==typeof a&&I.includes(a)){var{appId:t,apiKey:a,authMode:n,algoliaAgents:r,region:i,...s}=[{appId:r,apiKey:t,region:a,timeouts:{connect:m,read:p,write:g},logger:q(),requester:d(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:h({caches:[u({key:o+"-"+r}),c()]}),...i}][0];let e=w(t,a,n),l=f({hosts:[{url:(a=i)?"analytics.{region}.algolia.com".replace("{region}",a):"analytics.algolia.com",accept:"readWrite",protocol:"https"}],...s,algoliaAgent:P({algoliaAgents:r,client:"Analytics",version:o}),baseHeaders:{"content-type":"text/plain",...e.headers(),...s.baseHeaders},baseQueryParameters:{...e.queryParameters(),...s.baseQueryParameters}});return{transporter:l,appId:t,clearCache(){return Promise.all([l.requestsCache.clear(),l.responsesCache.clear()]).then(()=>{})},get _ua(){return l.algoliaAgent.value},addAlgoliaAgent(e,r){l.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){n&&"WithinHeaders"!==n?l.baseQueryParameters["x-algolia-api-key"]=e:l.baseHeaders["x-algolia-api-key"]=e},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return l.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return l.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return l.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return l.request(e,a)},getAddToCartRate({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");let n={};void 0!==e&&(n.index=e.toString()),void 0!==r&&(n.startDate=r.toString()),void 0!==t&&(n.endDate=t.toString()),void 0!==a&&(n.tags=a.toString());e={method:"GET",path:"/2/conversions/addToCartRate",queryParameters:n,headers:{}};return l.request(e,i)},getAverageClickPosition({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");let n={};void 0!==e&&(n.index=e.toString()),void 0!==r&&(n.startDate=r.toString()),void 0!==t&&(n.endDate=t.toString()),void 0!==a&&(n.tags=a.toString());e={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:n,headers:{}};return l.request(e,i)},getClickPositions({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");let n={};void 0!==e&&(n.index=e.toString()),void 0!==r&&(n.startDate=r.toString()),void 0!==t&&(n.endDate=t.toString()),void 0!==a&&(n.tags=a.toString());e={method:"GET",path:"/2/clicks/positions",queryParameters:n,headers:{}};return l.request(e,i)},getClickThroughRate({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");let n={};void 0!==e&&(n.index=e.toString()),void 0!==r&&(n.startDate=r.toString()),void 0!==t&&(n.endDate=t.toString()),void 0!==a&&(n.tags=a.toString());e={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:n,headers:{}};return l.request(e,i)},getConversionRate({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");let n={};void 0!==e&&(n.index=e.toString()),void 0!==r&&(n.startDate=r.toString()),void 0!==t&&(n.endDate=t.toString()),void 0!==a&&(n.tags=a.toString());e={method:"GET",path:"/2/conversions/conversionRate",queryParameters:n,headers:{}};return l.request(e,i)},getNoClickRate({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");let n={};void 0!==e&&(n.index=e.toString()),void 0!==r&&(n.startDate=r.toString()),void 0!==t&&(n.endDate=t.toString()),void 0!==a&&(n.tags=a.toString());e={method:"GET",path:"/2/searches/noClickRate",queryParameters:n,headers:{}};return l.request(e,i)},getNoResultsRate({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");let n={};void 0!==e&&(n.index=e.toString()),void 0!==r&&(n.startDate=r.toString()),void 0!==t&&(n.endDate=t.toString()),void 0!==a&&(n.tags=a.toString());e={method:"GET",path:"/2/searches/noResultRate",queryParameters:n,headers:{}};return l.request(e,i)},getPurchaseRate({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");let n={};void 0!==e&&(n.index=e.toString()),void 0!==r&&(n.startDate=r.toString()),void 0!==t&&(n.endDate=t.toString()),void 0!==a&&(n.tags=a.toString());e={method:"GET",path:"/2/conversions/purchaseRate",queryParameters:n,headers:{}};return l.request(e,i)},getRevenue({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");let n={};void 0!==e&&(n.index=e.toString()),void 0!==r&&(n.startDate=r.toString()),void 0!==t&&(n.endDate=t.toString()),void 0!==a&&(n.tags=a.toString());e={method:"GET",path:"/2/conversions/revenue",queryParameters:n,headers:{}};return l.request(e,i)},getSearchesCount({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");let n={};void 0!==e&&(n.index=e.toString()),void 0!==r&&(n.startDate=r.toString()),void 0!==t&&(n.endDate=t.toString()),void 0!==a&&(n.tags=a.toString());e={method:"GET",path:"/2/searches/count",queryParameters:n,headers:{}};return l.request(e,i)},getSearchesNoClicks({index:e,startDate:r,endDate:t,limit:a,offset:i,tags:n},s){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");let o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==i&&(o.offset=i.toString()),void 0!==n&&(o.tags=n.toString());e={method:"GET",path:"/2/searches/noClicks",queryParameters:o,headers:{}};return l.request(e,s)},getSearchesNoResults({index:e,startDate:r,endDate:t,limit:a,offset:i,tags:n},s){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");let o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==i&&(o.offset=i.toString()),void 0!==n&&(o.tags=n.toString());e={method:"GET",path:"/2/searches/noResults",queryParameters:o,headers:{}};return l.request(e,s)},getStatus({index:e},r){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");let t={};void 0!==e&&(t.index=e.toString());e={method:"GET",path:"/2/status",queryParameters:t,headers:{}};return l.request(e,r)},getTopCountries({index:e,startDate:r,endDate:t,limit:a,offset:i,tags:n},s){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");let o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==i&&(o.offset=i.toString()),void 0!==n&&(o.tags=n.toString());e={method:"GET",path:"/2/countries",queryParameters:o,headers:{}};return l.request(e,s)},getTopFilterAttributes({index:e,search:r,startDate:t,endDate:a,limit:i,offset:n,tags:s},o){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");let d={};void 0!==e&&(d.index=e.toString()),void 0!==r&&(d.search=r.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==a&&(d.endDate=a.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==n&&(d.offset=n.toString()),void 0!==s&&(d.tags=s.toString());e={method:"GET",path:"/2/filters",queryParameters:d,headers:{}};return l.request(e,o)},getTopFilterForAttribute({attribute:e,index:r,search:t,startDate:a,endDate:i,limit:n,offset:s,tags:o},d){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!r)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");let u="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),h={};void 0!==r&&(h.index=r.toString()),void 0!==t&&(h.search=t.toString()),void 0!==a&&(h.startDate=a.toString()),void 0!==i&&(h.endDate=i.toString()),void 0!==n&&(h.limit=n.toString()),void 0!==s&&(h.offset=s.toString()),void 0!==o&&(h.tags=o.toString());e={method:"GET",path:u,queryParameters:h,headers:{}};return l.request(e,d)},getTopFiltersNoResults({index:e,search:r,startDate:t,endDate:a,limit:i,offset:n,tags:s},o){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");let d={};void 0!==e&&(d.index=e.toString()),void 0!==r&&(d.search=r.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==a&&(d.endDate=a.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==n&&(d.offset=n.toString()),void 0!==s&&(d.tags=s.toString());e={method:"GET",path:"/2/filters/noResults",queryParameters:d,headers:{}};return l.request(e,o)},getTopHits({index:e,search:r,clickAnalytics:t,revenueAnalytics:a,startDate:i,endDate:n,limit:s,offset:o,tags:d},u){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");let h={};void 0!==e&&(h.index=e.toString()),void 0!==r&&(h.search=r.toString()),void 0!==t&&(h.clickAnalytics=t.toString()),void 0!==a&&(h.revenueAnalytics=a.toString()),void 0!==i&&(h.startDate=i.toString()),void 0!==n&&(h.endDate=n.toString()),void 0!==s&&(h.limit=s.toString()),void 0!==o&&(h.offset=o.toString()),void 0!==d&&(h.tags=d.toString());e={method:"GET",path:"/2/hits",queryParameters:h,headers:{}};return l.request(e,u)},getTopSearches({index:e,clickAnalytics:r,revenueAnalytics:t,startDate:a,endDate:i,orderBy:n,direction:s,limit:o,offset:d,tags:u},h){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");let c={};void 0!==e&&(c.index=e.toString()),void 0!==r&&(c.clickAnalytics=r.toString()),void 0!==t&&(c.revenueAnalytics=t.toString()),void 0!==a&&(c.startDate=a.toString()),void 0!==i&&(c.endDate=i.toString()),void 0!==n&&(c.orderBy=n.toString()),void 0!==s&&(c.direction=s.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==d&&(c.offset=d.toString()),void 0!==u&&(c.tags=u.toString());e={method:"GET",path:"/2/searches",queryParameters:c,headers:{}};return l.request(e,h)},getUsersCount({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");let n={};void 0!==e&&(n.index=e.toString()),void 0!==r&&(n.startDate=r.toString()),void 0!==t&&(n.endDate=t.toString()),void 0!==a&&(n.tags=a.toString());e={method:"GET",path:"/2/users/count",queryParameters:n,headers:{}};return l.request(e,i)}}}throw new Error("`region` must be one of the following: "+I.join(", "))}var v="5.12.0",x=["de","us"];function b(r,t,a,n){if(!r||"string"!=typeof r)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");if(!a||"string"==typeof a&&x.includes(a)){var{appId:t,apiKey:a,authMode:s,algoliaAgents:r,region:n,...o}=[{appId:r,apiKey:t,region:a,timeouts:{connect:m,read:p,write:g},logger:q(),requester:d(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:h({caches:[u({key:v+"-"+r}),c()]}),...n}][0];let e=w(t,a,s),i=f({hosts:[{url:(a=n)?"insights.{region}.algolia.io".replace("{region}",a):"insights.algolia.io",accept:"readWrite",protocol:"https"}],...o,algoliaAgent:P({algoliaAgents:r,client:"Insights",version:v}),baseHeaders:{"content-type":"text/plain",...e.headers(),...o.baseHeaders},baseQueryParameters:{...e.queryParameters(),...o.baseQueryParameters}});return{transporter:i,appId:t,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,r){i.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){s&&"WithinHeaders"!==s?i.baseQueryParameters["x-algolia-api-key"]=e:i.baseHeaders["x-algolia-api-key"]=e},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return i.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return i.request(e,a)},deleteUserToken({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `deleteUserToken`.");e={method:"DELETE",path:"/1/usertokens/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},pushEvents(e,r){if(!e)throw new Error("Parameter `insightsEvents` is required when calling `pushEvents`.");if(!e.events)throw new Error("Parameter `insightsEvents.events` is required when calling `pushEvents`.");e={method:"POST",path:"/1/events",queryParameters:{},headers:{},data:e};return i.request(e,r)}}}throw new Error("`region` must be one of the following: "+x.join(", "))}var k="5.12.0",C=["eu","us"];function R(r,t,a,n){if(!r||"string"!=typeof r)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");if(a&&"string"==typeof a&&C.includes(a)){var{appId:t,apiKey:a,authMode:s,algoliaAgents:r,region:n,...o}=[{appId:r,apiKey:t,region:a,timeouts:{connect:m,read:p,write:g},logger:q(),requester:d(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:h({caches:[u({key:k+"-"+r}),c()]}),...n}][0];let e=w(t,a,s),i=f({hosts:[{url:"personalization.{region}.algolia.com".replace("{region}",n),accept:"readWrite",protocol:"https"}],...o,algoliaAgent:P({algoliaAgents:r,client:"Personalization",version:k}),baseHeaders:{"content-type":"text/plain",...e.headers(),...o.baseHeaders},baseQueryParameters:{...e.queryParameters(),...o.baseQueryParameters}});return{transporter:i,appId:t,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,r){i.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){s&&"WithinHeaders"!==s?i.baseQueryParameters["x-algolia-api-key"]=e:i.baseHeaders["x-algolia-api-key"]=e},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return i.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return i.request(e,a)},deleteUserProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `deleteUserProfile`.");e={method:"DELETE",path:"/1/profiles/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},getPersonalizationStrategy(e){return i.request({method:"GET",path:"/1/strategies/personalization",queryParameters:{},headers:{}},e)},getUserTokenProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `getUserTokenProfile`.");e={method:"GET",path:"/1/profiles/personalization/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},setPersonalizationStrategy(e,r){if(!e)throw new Error("Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.");if(!e.eventScoring)throw new Error("Parameter `personalizationStrategyParams.eventScoring` is required when calling `setPersonalizationStrategy`.");if(!e.facetScoring)throw new Error("Parameter `personalizationStrategyParams.facetScoring` is required when calling `setPersonalizationStrategy`.");if(!e.personalizationImpact)throw new Error("Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.");e={method:"POST",path:"/1/strategies/personalization",queryParameters:{},headers:{},data:e};return i.request(e,r)}}}throw new Error("`region` is required and must be one of the following: "+C.join(", "))}var N="5.12.0",A=["eu","us"];function U(r,t,a,n){if(!r||"string"!=typeof r)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");if(a&&"string"==typeof a&&A.includes(a)){var{appId:t,apiKey:a,authMode:s,algoliaAgents:r,region:n,...o}=[{appId:r,apiKey:t,region:a,timeouts:{connect:m,read:p,write:g},logger:q(),requester:d(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:h({caches:[u({key:N+"-"+r}),c()]}),...n}][0];let e=w(t,a,s),i=f({hosts:[{url:"query-suggestions.{region}.algolia.com".replace("{region}",n),accept:"readWrite",protocol:"https"}],...o,algoliaAgent:P({algoliaAgents:r,client:"QuerySuggestions",version:N}),baseHeaders:{"content-type":"text/plain",...e.headers(),...o.baseHeaders},baseQueryParameters:{...e.queryParameters(),...o.baseQueryParameters}});return{transporter:i,appId:t,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,r){i.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){s&&"WithinHeaders"!==s?i.baseQueryParameters["x-algolia-api-key"]=e:i.baseHeaders["x-algolia-api-key"]=e},createConfig(e,r){if(!e)throw new Error("Parameter `configurationWithIndex` is required when calling `createConfig`.");e={method:"POST",path:"/1/configs",queryParameters:{},headers:{},data:e};return i.request(e,r)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return i.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return i.request(e,a)},deleteConfig({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteConfig`.");e={method:"DELETE",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},getAllConfigs(e){return i.request({method:"GET",path:"/1/configs",queryParameters:{},headers:{}},e)},getConfig({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getConfig`.");e={method:"GET",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},getConfigStatus({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getConfigStatus`.");e={method:"GET",path:"/1/configs/{indexName}/status".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},getLogFile({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getLogFile`.");e={method:"GET",path:"/1/logs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},updateConfig({indexName:e,configuration:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `updateConfig`.");if(!r)throw new Error("Parameter `configuration` is required when calling `updateConfig`.");if(!r.sourceIndices)throw new Error("Parameter `configuration.sourceIndices` is required when calling `updateConfig`.");e={method:"PUT",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return i.request(e,t)}}}throw new Error("`region` is required and must be one of the following: "+A.join(", "))}var O="5.12.0";function a({appId:e,apiKey:r,authMode:t,algoliaAgents:a,...i}){let n=w(e,r,t),o=f({hosts:[{url:e+"-dsn.algolia.net",accept:"read",protocol:"https"},{url:e+".algolia.net",accept:"write",protocol:"https"}].concat(y([{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"}])),...i,algoliaAgent:P({algoliaAgents:a,client:"Search",version:O}),baseHeaders:{"content-type":"text/plain",...n.headers(),...i.baseHeaders},baseQueryParameters:{...n.queryParameters(),...i.baseQueryParameters}});return{transporter:o,appId:e,clearCache(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then(()=>{})},get _ua(){return o.algoliaAgent.value},addAlgoliaAgent(e,r){o.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){t&&"WithinHeaders"!==t?o.baseQueryParameters["x-algolia-api-key"]=e:o.baseHeaders["x-algolia-api-key"]=e},waitForTask({indexName:e,taskID:r,maxRetries:t=50,timeout:a=e=>Math.min(200*e,5e3)},i){let n=0;return l({func:()=>this.getTask({indexName:e,taskID:r},i),validate:e=>"published"===e.status,aggregator:()=>n+=1,error:{validate:()=>n>=t,message:()=>`The maximum number of retries exceeded. (${n}/${t})`},timeout:()=>a(n)})},waitForAppTask({taskID:e,maxRetries:r=50,timeout:t=e=>Math.min(200*e,5e3)},a){let i=0;return l({func:()=>this.getAppTask({taskID:e},a),validate:e=>"published"===e.status,aggregator:()=>i+=1,error:{validate:()=>i>=r,message:()=>`The maximum number of retries exceeded. (${i}/${r})`},timeout:()=>t(i)})},waitForApiKey({operation:r,key:e,apiKey:i,maxRetries:t=50,timeout:a=e=>Math.min(200*e,5e3)},n){let s=0,o={aggregator:()=>s+=1,error:{validate:()=>s>=t,message:()=>`The maximum number of retries exceeded. (${s}/${t})`},timeout:()=>a(s)};if("update"!==r)return l({...o,func:()=>this.getApiKey({key:e},n).catch(e=>{if(404!==e.status)throw e}),validate:e=>"add"===r?void 0!==e:void 0===e});if(i)return l({...o,func:()=>this.getApiKey({key:e},n),validate:r=>{for(var a of Object.keys(i)){let e=i[a],t=r[a];if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length||e.some((e,r)=>e!==t[r]))return!1}else if(e!==t)return!1}return!0}});throw new Error("`apiKey` is required when waiting for an `update` operation.")},browseObjects({indexName:r,browseParams:t,...e},a){return l({func:e=>this.browse({indexName:r,browseParams:{cursor:e?e.cursor:void 0,...t}},a),validate:e=>void 0===e.cursor,...e})},browseRules({indexName:r,searchRulesParams:e,...t},a){let i={hitsPerPage:1e3,...e};return l({func:e=>this.searchRules({indexName:r,searchRulesParams:{...i,page:e?e.page+1:i.page||0}},a),validate:e=>e.nbHits{var r=this.searchSynonyms({indexName:t,searchSynonymsParams:{...i,page:i.page}},a);return i.page+=1,r},validate:e=>e.nbHits({objectID:e})),action:"deleteObject",waitForTasks:t},a)},async partialUpdateObjects({indexName:e,objects:r,createIfNotExists:t,waitForTasks:a},i){return this.chunkedBatch({indexName:e,objects:r,action:t?"partialUpdateObject":"partialUpdateObjectNoCreate",waitForTasks:a},i)},async replaceAllObjects({indexName:e,objects:r,batchSize:t},a){var i=e+"_tmp_"+(Math.floor(1e6*Math.random())+1e5),n=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:i,scope:["settings","rules","synonyms"]}},a),r=await this.chunkedBatch({indexName:i,objects:r,waitForTasks:!0,batchSize:t},a),t=(await this.waitForTask({indexName:i,taskID:n.taskID}),n=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:i,scope:["settings","rules","synonyms"]}},a),await this.waitForTask({indexName:i,taskID:n.taskID}),await this.operationIndex({indexName:i,operationIndexParams:{operation:"move",destination:e}},a));return await this.waitForTask({indexName:i,taskID:t.taskID}),{copyOperationResponse:n,batchResponses:r,moveOperationResponse:t}},async indexExists({indexName:e}){try{await this.getSettings({indexName:e})}catch(e){if(e instanceof D&&404===e.status)return!1;throw e}return!0},searchForHits(e,r){return this.search(e,r)},searchForFacets(e,r){return this.search(e,r)},addApiKey(e,r){if(!e)throw new Error("Parameter `apiKey` is required when calling `addApiKey`.");if(!e.acl)throw new Error("Parameter `apiKey.acl` is required when calling `addApiKey`.");e={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return o.request(e,r)},addOrUpdateObject({indexName:e,objectID:r,body:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `addOrUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `addOrUpdateObject`.");if(!t)throw new Error("Parameter `body` is required when calling `addOrUpdateObject`.");e={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t};return o.request(e,a)},appendSource(e,r){if(!e)throw new Error("Parameter `source` is required when calling `appendSource`.");if(!e.source)throw new Error("Parameter `source.source` is required when calling `appendSource`.");e={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return o.request(e,r)},assignUserId({xAlgoliaUserID:e,assignUserIdParams:r},t){if(!e)throw new Error("Parameter `xAlgoliaUserID` is required when calling `assignUserId`.");if(!r)throw new Error("Parameter `assignUserIdParams` is required when calling `assignUserId`.");if(!r.cluster)throw new Error("Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.");let a={};void 0!==e&&(a["X-Algolia-User-ID"]=e.toString());e={method:"POST",path:"/1/clusters/mapping",queryParameters:{},headers:a,data:r};return o.request(e,t)},batch({indexName:e,batchWriteParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `batch`.");if(!r)throw new Error("Parameter `batchWriteParams` is required when calling `batch`.");if(!r.requests)throw new Error("Parameter `batchWriteParams.requests` is required when calling `batch`.");e={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o.request(e,t)},batchAssignUserIds({xAlgoliaUserID:e,batchAssignUserIdsParams:r},t){if(!e)throw new Error("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.");if(!r)throw new Error("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.");if(!r.cluster)throw new Error("Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.");if(!r.users)throw new Error("Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.");let a={};void 0!==e&&(a["X-Algolia-User-ID"]=e.toString());e={method:"POST",path:"/1/clusters/mapping/batch",queryParameters:{},headers:a,data:r};return o.request(e,t)},batchDictionaryEntries({dictionaryName:e,batchDictionaryEntriesParams:r},t){if(!e)throw new Error("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.");if(!r)throw new Error("Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.");if(!r.requests)throw new Error("Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.");e={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o.request(e,t)},browse({indexName:e,browseParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `browse`.");e={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0};return o.request(e,t)},clearObjects({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");e={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},clearRules({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearRules`.");let a="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(e)),i={};void 0!==r&&(i.forwardToReplicas=r.toString());e={method:"POST",path:a,queryParameters:i,headers:{}};return o.request(e,t)},clearSynonyms({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearSynonyms`.");let a="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(e)),i={};void 0!==r&&(i.forwardToReplicas=r.toString());e={method:"POST",path:a,queryParameters:i,headers:{}};return o.request(e,t)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return o.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return o.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return o.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return o.request(e,a)},deleteApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");e={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},deleteBy({indexName:e,deleteByParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteBy`.");if(!r)throw new Error("Parameter `deleteByParams` is required when calling `deleteBy`.");e={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o.request(e,t)},deleteIndex({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");e={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},deleteObject({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteObject`.");e={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return o.request(e,t)},deleteRule({indexName:e,objectID:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");let i="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={};void 0!==t&&(n.forwardToReplicas=t.toString());e={method:"DELETE",path:i,queryParameters:n,headers:{}};return o.request(e,a)},deleteSource({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `deleteSource`.");e={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},deleteSynonym({indexName:e,objectID:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");let i="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={};void 0!==t&&(n.forwardToReplicas=t.toString());e={method:"DELETE",path:i,queryParameters:n,headers:{}};return o.request(e,a)},getApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `getApiKey`.");e={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},getAppTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getAppTask`.");e={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},getDictionaryLanguages(e){return o.request({method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}},e)},getDictionarySettings(e){return o.request({method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}},e)},getLogs({offset:e,length:r,indexName:t,type:a}={},i=void 0){let n={};void 0!==e&&(n.offset=e.toString()),void 0!==r&&(n.length=r.toString()),void 0!==t&&(n.indexName=t.toString()),void 0!==a&&(n.type=a.toString());e={method:"GET",path:"/1/logs",queryParameters:n,headers:{}};return o.request(e,i)},getObject({indexName:e,objectID:r,attributesToRetrieve:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getObject`.");let i="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={};void 0!==t&&(n.attributesToRetrieve=t.toString());e={method:"GET",path:i,queryParameters:n,headers:{}};return o.request(e,a)},getObjects(e,r){if(!e)throw new Error("Parameter `getObjectsParams` is required when calling `getObjects`.");if(!e.requests)throw new Error("Parameter `getObjectsParams.requests` is required when calling `getObjects`.");e={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return o.request(e,r)},getRule({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRule`.");e={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return o.request(e,t)},getSettings({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getSettings`.");e={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},getSources(e){return o.request({method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}},e)},getSynonym({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getSynonym`.");e={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return o.request(e,t)},getTask({indexName:e,taskID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getTask`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getTask`.");e={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return o.request(e,t)},getTopUserIds(e){return o.request({method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}},e)},getUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `getUserId`.");e={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},hasPendingMappings({getClusters:e}={},r=void 0){let t={};void 0!==e&&(t.getClusters=e.toString());e={method:"GET",path:"/1/clusters/mapping/pending",queryParameters:t,headers:{}};return o.request(e,r)},listApiKeys(e){return o.request({method:"GET",path:"/1/keys",queryParameters:{},headers:{}},e)},listClusters(e){return o.request({method:"GET",path:"/1/clusters",queryParameters:{},headers:{}},e)},listIndices({page:e,hitsPerPage:r}={},t=void 0){let a={};void 0!==e&&(a.page=e.toString()),void 0!==r&&(a.hitsPerPage=r.toString());e={method:"GET",path:"/1/indexes",queryParameters:a,headers:{}};return o.request(e,t)},listUserIds({page:e,hitsPerPage:r}={},t=void 0){let a={};void 0!==e&&(a.page=e.toString()),void 0!==r&&(a.hitsPerPage=r.toString());e={method:"GET",path:"/1/clusters/mapping",queryParameters:a,headers:{}};return o.request(e,t)},multipleBatch(e,r){if(!e)throw new Error("Parameter `batchParams` is required when calling `multipleBatch`.");if(!e.requests)throw new Error("Parameter `batchParams.requests` is required when calling `multipleBatch`.");e={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return o.request(e,r)},operationIndex({indexName:e,operationIndexParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `operationIndex`.");if(!r)throw new Error("Parameter `operationIndexParams` is required when calling `operationIndex`.");if(!r.operation)throw new Error("Parameter `operationIndexParams.operation` is required when calling `operationIndex`.");if(!r.destination)throw new Error("Parameter `operationIndexParams.destination` is required when calling `operationIndex`.");e={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o.request(e,t)},partialUpdateObject({indexName:e,objectID:r,attributesToUpdate:t,createIfNotExists:a},i){if(!e)throw new Error("Parameter `indexName` is required when calling `partialUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `partialUpdateObject`.");if(!t)throw new Error("Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.");let n="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==a&&(s.createIfNotExists=a.toString());e={method:"POST",path:n,queryParameters:s,headers:{},data:t};return o.request(e,i)},removeUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `removeUserId`.");e={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},replaceSources({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `replaceSources`.");e={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:e};return o.request(e,r)},restoreApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");e={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},saveObject({indexName:e,body:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `saveObject`.");if(!r)throw new Error("Parameter `body` is required when calling `saveObject`.");e={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o.request(e,t)},saveRule({indexName:e,objectID:r,rule:t,forwardToReplicas:a},i){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveRule`.");if(!t)throw new Error("Parameter `rule` is required when calling `saveRule`.");if(!t.objectID)throw new Error("Parameter `rule.objectID` is required when calling `saveRule`.");let n="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==a&&(s.forwardToReplicas=a.toString());e={method:"PUT",path:n,queryParameters:s,headers:{},data:t};return o.request(e,i)},saveRules({indexName:e,rules:r,forwardToReplicas:t,clearExistingRules:a},i){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!r)throw new Error("Parameter `rules` is required when calling `saveRules`.");let n="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(e)),s={};void 0!==t&&(s.forwardToReplicas=t.toString()),void 0!==a&&(s.clearExistingRules=a.toString());e={method:"POST",path:n,queryParameters:s,headers:{},data:r};return o.request(e,i)},saveSynonym({indexName:e,objectID:r,synonymHit:t,forwardToReplicas:a},i){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveSynonym`.");if(!t)throw new Error("Parameter `synonymHit` is required when calling `saveSynonym`.");if(!t.objectID)throw new Error("Parameter `synonymHit.objectID` is required when calling `saveSynonym`.");if(!t.type)throw new Error("Parameter `synonymHit.type` is required when calling `saveSynonym`.");let n="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==a&&(s.forwardToReplicas=a.toString());e={method:"PUT",path:n,queryParameters:s,headers:{},data:t};return o.request(e,i)},saveSynonyms({indexName:e,synonymHit:r,forwardToReplicas:t,replaceExistingSynonyms:a},i){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!r)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");let n="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(e)),s={};void 0!==t&&(s.forwardToReplicas=t.toString()),void 0!==a&&(s.replaceExistingSynonyms=a.toString());e={method:"POST",path:n,queryParameters:s,headers:{},data:r};return o.request(e,i)},search(e,r){if(!(e=e&&Array.isArray(e)?{requests:e.map(({params:e,...r})=>"facet"===r.type?{...r,...e,type:"facet"}:{...r,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}:e))throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");e={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return o.request(e,r)},searchDictionaryEntries({dictionaryName:e,searchDictionaryEntriesParams:r},t){if(!e)throw new Error("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.");if(!r)throw new Error("Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.");if(!r.query)throw new Error("Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.");e={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r,useReadTransporter:!0,cacheable:!0};return o.request(e,t)},searchForFacetValues({indexName:e,facetName:r,searchForFacetValuesRequest:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!r)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");e={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(e)).replace("{facetName}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return o.request(e,a)},searchRules({indexName:e,searchRulesParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRules`.");e={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return o.request(e,t)},searchSingleIndex({indexName:e,searchParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");e={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return o.request(e,t)},searchSynonyms({indexName:e,searchSynonymsParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");e={method:"POST",path:"/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return o.request(e,t)},searchUserIds(e,r){if(!e)throw new Error("Parameter `searchUserIdsParams` is required when calling `searchUserIds`.");if(!e.query)throw new Error("Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.");e={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return o.request(e,r)},setDictionarySettings(e,r){if(!e)throw new Error("Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.");if(!e.disableStandardEntries)throw new Error("Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.");e={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return o.request(e,r)},setSettings({indexName:e,indexSettings:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!r)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");let i="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),n={};void 0!==t&&(n.forwardToReplicas=t.toString());e={method:"PUT",path:i,queryParameters:n,headers:{},data:r};return o.request(e,a)},updateApiKey({key:e,apiKey:r},t){if(!e)throw new Error("Parameter `key` is required when calling `updateApiKey`.");if(!r)throw new Error("Parameter `apiKey` is required when calling `updateApiKey`.");if(!r.acl)throw new Error("Parameter `apiKey.acl` is required when calling `updateApiKey`.");e={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o.request(e,t)}}}function j(e,r,t){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(r&&"string"==typeof r)return a({appId:e,apiKey:r,timeouts:{connect:m,read:p,write:g},logger:q(),requester:d(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:h({caches:[u({key:O+"-"+e}),c()]}),...t});throw new Error("`apiKey` is missing.")}var Q="1.12.0",W=["eu","us"];function F(r,t,a,i){if(!r||"string"!=typeof r)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");if(a&&"string"==typeof a&&W.includes(a)){var{appId:t,apiKey:a,authMode:n,algoliaAgents:r,region:i,...s}=[{appId:r,apiKey:t,region:a,timeouts:{connect:m,read:p,write:g},logger:q(),requester:d(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:h({caches:[u({key:Q+"-"+r}),c()]}),...i}][0];let e=w(t,a,n),l=f({hosts:[{url:"data.{region}.algolia.com".replace("{region}",i),accept:"readWrite",protocol:"https"}],...s,algoliaAgent:P({algoliaAgents:r,client:"Ingestion",version:Q}),baseHeaders:{"content-type":"text/plain",...e.headers(),...s.baseHeaders},baseQueryParameters:{...e.queryParameters(),...s.baseQueryParameters}});return{transporter:l,appId:t,clearCache(){return Promise.all([l.requestsCache.clear(),l.responsesCache.clear()]).then(()=>{})},get _ua(){return l.algoliaAgent.value},addAlgoliaAgent(e,r){l.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){n&&"WithinHeaders"!==n?l.baseQueryParameters["x-algolia-api-key"]=e:l.baseHeaders["x-algolia-api-key"]=e},createAuthentication(e,r){if(!e)throw new Error("Parameter `authenticationCreate` is required when calling `createAuthentication`.");if(!e.type)throw new Error("Parameter `authenticationCreate.type` is required when calling `createAuthentication`.");if(!e.name)throw new Error("Parameter `authenticationCreate.name` is required when calling `createAuthentication`.");if(!e.input)throw new Error("Parameter `authenticationCreate.input` is required when calling `createAuthentication`.");e={method:"POST",path:"/1/authentications",queryParameters:{},headers:{},data:e};return l.request(e,r)},createDestination(e,r){if(!e)throw new Error("Parameter `destinationCreate` is required when calling `createDestination`.");if(!e.type)throw new Error("Parameter `destinationCreate.type` is required when calling `createDestination`.");if(!e.name)throw new Error("Parameter `destinationCreate.name` is required when calling `createDestination`.");if(!e.input)throw new Error("Parameter `destinationCreate.input` is required when calling `createDestination`.");e={method:"POST",path:"/1/destinations",queryParameters:{},headers:{},data:e};return l.request(e,r)},createSource(e,r){if(!e)throw new Error("Parameter `sourceCreate` is required when calling `createSource`.");if(!e.type)throw new Error("Parameter `sourceCreate.type` is required when calling `createSource`.");if(!e.name)throw new Error("Parameter `sourceCreate.name` is required when calling `createSource`.");e={method:"POST",path:"/1/sources",queryParameters:{},headers:{},data:e};return l.request(e,r)},createTask(e,r){if(!e)throw new Error("Parameter `taskCreate` is required when calling `createTask`.");if(!e.sourceID)throw new Error("Parameter `taskCreate.sourceID` is required when calling `createTask`.");if(!e.destinationID)throw new Error("Parameter `taskCreate.destinationID` is required when calling `createTask`.");if(!e.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTask`.");e={method:"POST",path:"/2/tasks",queryParameters:{},headers:{},data:e};return l.request(e,r)},createTaskV1(e,r){if(!e)throw new Error("Parameter `taskCreate` is required when calling `createTaskV1`.");if(!e.sourceID)throw new Error("Parameter `taskCreate.sourceID` is required when calling `createTaskV1`.");if(!e.destinationID)throw new Error("Parameter `taskCreate.destinationID` is required when calling `createTaskV1`.");if(!e.trigger)throw new Error("Parameter `taskCreate.trigger` is required when calling `createTaskV1`.");if(!e.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTaskV1`.");e={method:"POST",path:"/1/tasks",queryParameters:{},headers:{},data:e};return l.request(e,r)},createTransformation(e,r){if(!e)throw new Error("Parameter `transformationCreate` is required when calling `createTransformation`.");if(!e.code)throw new Error("Parameter `transformationCreate.code` is required when calling `createTransformation`.");if(!e.name)throw new Error("Parameter `transformationCreate.name` is required when calling `createTransformation`.");e={method:"POST",path:"/1/transformations",queryParameters:{},headers:{},data:e};return l.request(e,r)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return l.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return l.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return l.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return l.request(e,a)},deleteAuthentication({authenticationID:e},r){if(!e)throw new Error("Parameter `authenticationID` is required when calling `deleteAuthentication`.");e={method:"DELETE",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},deleteDestination({destinationID:e},r){if(!e)throw new Error("Parameter `destinationID` is required when calling `deleteDestination`.");e={method:"DELETE",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},deleteSource({sourceID:e},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `deleteSource`.");e={method:"DELETE",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},deleteTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `deleteTask`.");e={method:"DELETE",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},deleteTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `deleteTaskV1`.");e={method:"DELETE",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},deleteTransformation({transformationID:e},r){if(!e)throw new Error("Parameter `transformationID` is required when calling `deleteTransformation`.");e={method:"DELETE",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},disableTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `disableTask`.");e={method:"PUT",path:"/2/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},disableTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `disableTaskV1`.");e={method:"PUT",path:"/1/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},enableTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `enableTask`.");e={method:"PUT",path:"/2/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},enableTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `enableTaskV1`.");e={method:"PUT",path:"/1/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},getAuthentication({authenticationID:e},r){if(!e)throw new Error("Parameter `authenticationID` is required when calling `getAuthentication`.");e={method:"GET",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},getDestination({destinationID:e},r){if(!e)throw new Error("Parameter `destinationID` is required when calling `getDestination`.");e={method:"GET",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},getEvent({runID:e,eventID:r},t){if(!e)throw new Error("Parameter `runID` is required when calling `getEvent`.");if(!r)throw new Error("Parameter `eventID` is required when calling `getEvent`.");e={method:"GET",path:"/1/runs/{runID}/events/{eventID}".replace("{runID}",encodeURIComponent(e)).replace("{eventID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return l.request(e,t)},getRun({runID:e},r){if(!e)throw new Error("Parameter `runID` is required when calling `getRun`.");e={method:"GET",path:"/1/runs/{runID}".replace("{runID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},getSource({sourceID:e},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `getSource`.");e={method:"GET",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},getTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getTask`.");e={method:"GET",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},getTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getTaskV1`.");e={method:"GET",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},getTransformation({transformationID:e},r){if(!e)throw new Error("Parameter `transformationID` is required when calling `getTransformation`.");e={method:"GET",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},listAuthentications({itemsPerPage:e,page:r,type:t,platform:a,sort:i,order:n}={},s=void 0){let o={};void 0!==e&&(o.itemsPerPage=e.toString()),void 0!==r&&(o.page=r.toString()),void 0!==t&&(o.type=t.toString()),void 0!==a&&(o.platform=a.toString()),void 0!==i&&(o.sort=i.toString()),void 0!==n&&(o.order=n.toString());e={method:"GET",path:"/1/authentications",queryParameters:o,headers:{}};return l.request(e,s)},listDestinations({itemsPerPage:e,page:r,type:t,authenticationID:a,transformationID:i,sort:n,order:s}={},o=void 0){let d={};void 0!==e&&(d.itemsPerPage=e.toString()),void 0!==r&&(d.page=r.toString()),void 0!==t&&(d.type=t.toString()),void 0!==a&&(d.authenticationID=a.toString()),void 0!==i&&(d.transformationID=i.toString()),void 0!==n&&(d.sort=n.toString()),void 0!==s&&(d.order=s.toString());e={method:"GET",path:"/1/destinations",queryParameters:d,headers:{}};return l.request(e,o)},listEvents({runID:e,itemsPerPage:r,page:t,status:a,type:i,sort:n,order:s,startDate:o,endDate:d},u){if(!e)throw new Error("Parameter `runID` is required when calling `listEvents`.");let h="/1/runs/{runID}/events".replace("{runID}",encodeURIComponent(e)),c={};void 0!==r&&(c.itemsPerPage=r.toString()),void 0!==t&&(c.page=t.toString()),void 0!==a&&(c.status=a.toString()),void 0!==i&&(c.type=i.toString()),void 0!==n&&(c.sort=n.toString()),void 0!==s&&(c.order=s.toString()),void 0!==o&&(c.startDate=o.toString()),void 0!==d&&(c.endDate=d.toString());e={method:"GET",path:h,queryParameters:c,headers:{}};return l.request(e,u)},listRuns({itemsPerPage:e,page:r,status:t,type:a,taskID:i,sort:n,order:s,startDate:o,endDate:d}={},u=void 0){let h={};void 0!==e&&(h.itemsPerPage=e.toString()),void 0!==r&&(h.page=r.toString()),void 0!==t&&(h.status=t.toString()),void 0!==a&&(h.type=a.toString()),void 0!==i&&(h.taskID=i.toString()),void 0!==n&&(h.sort=n.toString()),void 0!==s&&(h.order=s.toString()),void 0!==o&&(h.startDate=o.toString()),void 0!==d&&(h.endDate=d.toString());e={method:"GET",path:"/1/runs",queryParameters:h,headers:{}};return l.request(e,u)},listSources({itemsPerPage:e,page:r,type:t,authenticationID:a,sort:i,order:n}={},s=void 0){let o={};void 0!==e&&(o.itemsPerPage=e.toString()),void 0!==r&&(o.page=r.toString()),void 0!==t&&(o.type=t.toString()),void 0!==a&&(o.authenticationID=a.toString()),void 0!==i&&(o.sort=i.toString()),void 0!==n&&(o.order=n.toString());e={method:"GET",path:"/1/sources",queryParameters:o,headers:{}};return l.request(e,s)},listTasks({itemsPerPage:e,page:r,action:t,enabled:a,sourceID:i,destinationID:n,triggerType:s,sort:o,order:d}={},u=void 0){let h={};void 0!==e&&(h.itemsPerPage=e.toString()),void 0!==r&&(h.page=r.toString()),void 0!==t&&(h.action=t.toString()),void 0!==a&&(h.enabled=a.toString()),void 0!==i&&(h.sourceID=i.toString()),void 0!==n&&(h.destinationID=n.toString()),void 0!==s&&(h.triggerType=s.toString()),void 0!==o&&(h.sort=o.toString()),void 0!==d&&(h.order=d.toString());e={method:"GET",path:"/2/tasks",queryParameters:h,headers:{}};return l.request(e,u)},listTasksV1({itemsPerPage:e,page:r,action:t,enabled:a,sourceID:i,destinationID:n,triggerType:s,sort:o,order:d}={},u=void 0){let h={};void 0!==e&&(h.itemsPerPage=e.toString()),void 0!==r&&(h.page=r.toString()),void 0!==t&&(h.action=t.toString()),void 0!==a&&(h.enabled=a.toString()),void 0!==i&&(h.sourceID=i.toString()),void 0!==n&&(h.destinationID=n.toString()),void 0!==s&&(h.triggerType=s.toString()),void 0!==o&&(h.sort=o.toString()),void 0!==d&&(h.order=d.toString());e={method:"GET",path:"/1/tasks",queryParameters:h,headers:{}};return l.request(e,u)},listTransformations({itemsPerPage:e,page:r,sort:t,order:a}={},i=void 0){let n={};void 0!==e&&(n.itemsPerPage=e.toString()),void 0!==r&&(n.page=r.toString()),void 0!==t&&(n.sort=t.toString()),void 0!==a&&(n.order=a.toString());e={method:"GET",path:"/1/transformations",queryParameters:n,headers:{}};return l.request(e,i)},pushTask({taskID:e,pushTaskPayload:r},t){if(!e)throw new Error("Parameter `taskID` is required when calling `pushTask`.");if(!r)throw new Error("Parameter `pushTaskPayload` is required when calling `pushTask`.");if(!r.action)throw new Error("Parameter `pushTaskPayload.action` is required when calling `pushTask`.");if(!r.records)throw new Error("Parameter `pushTaskPayload.records` is required when calling `pushTask`.");e={method:"POST",path:"/2/tasks/{taskID}/push".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return l.request(e,t)},runSource({sourceID:e,runSourcePayload:r},t){if(!e)throw new Error("Parameter `sourceID` is required when calling `runSource`.");e={method:"POST",path:"/1/sources/{sourceID}/run".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return l.request(e,t)},runTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `runTask`.");e={method:"POST",path:"/2/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},runTaskV1({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `runTaskV1`.");e={method:"POST",path:"/1/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},searchAuthentications(e,r){if(!e)throw new Error("Parameter `authenticationSearch` is required when calling `searchAuthentications`.");if(!e.authenticationIDs)throw new Error("Parameter `authenticationSearch.authenticationIDs` is required when calling `searchAuthentications`.");e={method:"POST",path:"/1/authentications/search",queryParameters:{},headers:{},data:e};return l.request(e,r)},searchDestinations(e,r){if(!e)throw new Error("Parameter `destinationSearch` is required when calling `searchDestinations`.");if(!e.destinationIDs)throw new Error("Parameter `destinationSearch.destinationIDs` is required when calling `searchDestinations`.");e={method:"POST",path:"/1/destinations/search",queryParameters:{},headers:{},data:e};return l.request(e,r)},searchSources(e,r){if(!e)throw new Error("Parameter `sourceSearch` is required when calling `searchSources`.");if(!e.sourceIDs)throw new Error("Parameter `sourceSearch.sourceIDs` is required when calling `searchSources`.");e={method:"POST",path:"/1/sources/search",queryParameters:{},headers:{},data:e};return l.request(e,r)},searchTasks(e,r){if(!e)throw new Error("Parameter `taskSearch` is required when calling `searchTasks`.");if(!e.taskIDs)throw new Error("Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.");e={method:"POST",path:"/2/tasks/search",queryParameters:{},headers:{},data:e};return l.request(e,r)},searchTasksV1(e,r){if(!e)throw new Error("Parameter `taskSearch` is required when calling `searchTasksV1`.");if(!e.taskIDs)throw new Error("Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.");e={method:"POST",path:"/1/tasks/search",queryParameters:{},headers:{},data:e};return l.request(e,r)},searchTransformations(e,r){if(!e)throw new Error("Parameter `transformationSearch` is required when calling `searchTransformations`.");if(!e.transformationIDs)throw new Error("Parameter `transformationSearch.transformationIDs` is required when calling `searchTransformations`.");e={method:"POST",path:"/1/transformations/search",queryParameters:{},headers:{},data:e};return l.request(e,r)},triggerDockerSourceDiscover({sourceID:e},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.");e={method:"POST",path:"/1/sources/{sourceID}/discover".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return l.request(e,r)},tryTransformation(e,r){if(!e)throw new Error("Parameter `transformationTry` is required when calling `tryTransformation`.");if(!e.code)throw new Error("Parameter `transformationTry.code` is required when calling `tryTransformation`.");if(!e.sampleRecord)throw new Error("Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.");e={method:"POST",path:"/1/transformations/try",queryParameters:{},headers:{},data:e};return l.request(e,r)},tryTransformationBeforeUpdate({transformationID:e,transformationTry:r},t){if(!e)throw new Error("Parameter `transformationID` is required when calling `tryTransformationBeforeUpdate`.");if(!r)throw new Error("Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.");if(!r.code)throw new Error("Parameter `transformationTry.code` is required when calling `tryTransformationBeforeUpdate`.");if(!r.sampleRecord)throw new Error("Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`.");e={method:"POST",path:"/1/transformations/{transformationID}/try".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return l.request(e,t)},updateAuthentication({authenticationID:e,authenticationUpdate:r},t){if(!e)throw new Error("Parameter `authenticationID` is required when calling `updateAuthentication`.");if(!r)throw new Error("Parameter `authenticationUpdate` is required when calling `updateAuthentication`.");e={method:"PATCH",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return l.request(e,t)},updateDestination({destinationID:e,destinationUpdate:r},t){if(!e)throw new Error("Parameter `destinationID` is required when calling `updateDestination`.");if(!r)throw new Error("Parameter `destinationUpdate` is required when calling `updateDestination`.");e={method:"PATCH",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return l.request(e,t)},updateSource({sourceID:e,sourceUpdate:r},t){if(!e)throw new Error("Parameter `sourceID` is required when calling `updateSource`.");if(!r)throw new Error("Parameter `sourceUpdate` is required when calling `updateSource`.");e={method:"PATCH",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return l.request(e,t)},updateTask({taskID:e,taskUpdate:r},t){if(!e)throw new Error("Parameter `taskID` is required when calling `updateTask`.");if(!r)throw new Error("Parameter `taskUpdate` is required when calling `updateTask`.");e={method:"PATCH",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return l.request(e,t)},updateTaskV1({taskID:e,taskUpdate:r},t){if(!e)throw new Error("Parameter `taskID` is required when calling `updateTaskV1`.");if(!r)throw new Error("Parameter `taskUpdate` is required when calling `updateTaskV1`.");e={method:"PATCH",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return l.request(e,t)},updateTransformation({transformationID:e,transformationCreate:r},t){if(!e)throw new Error("Parameter `transformationID` is required when calling `updateTransformation`.");if(!r)throw new Error("Parameter `transformationCreate` is required when calling `updateTransformation`.");if(!r.code)throw new Error("Parameter `transformationCreate.code` is required when calling `updateTransformation`.");if(!r.name)throw new Error("Parameter `transformationCreate.name` is required when calling `updateTransformation`.");e={method:"PUT",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return l.request(e,t)},validateSource(e,r=void 0){e={method:"POST",path:"/1/sources/validate",queryParameters:{},headers:{},data:e||{}};return l.request(e,r)},validateSourceBeforeUpdate({sourceID:e,sourceUpdate:r},t){if(!e)throw new Error("Parameter `sourceID` is required when calling `validateSourceBeforeUpdate`.");if(!r)throw new Error("Parameter `sourceUpdate` is required when calling `validateSourceBeforeUpdate`.");e={method:"POST",path:"/1/sources/{sourceID}/validate".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return l.request(e,t)}}}throw new Error("`region` is required and must be one of the following: "+W.join(", "))}var L="1.12.0";function z(r,t,a){if(!r||"string"!=typeof r)throw new Error("`appId` is missing.");if(t&&"string"==typeof t){var{appId:t,apiKey:r,authMode:n,algoliaAgents:a,...s}=[{appId:r,apiKey:t,timeouts:{connect:m,read:p,write:g},logger:q(),requester:d(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:h({caches:[u({key:L+"-"+r}),c()]}),...a}][0];let e=w(t,r,n),i=f({hosts:[{url:"status.algolia.com",accept:"readWrite",protocol:"https"}],...s,algoliaAgent:P({algoliaAgents:a,client:"Monitoring",version:L}),baseHeaders:{"content-type":"text/plain",...e.headers(),...s.baseHeaders},baseQueryParameters:{...e.queryParameters(),...s.baseQueryParameters}});return{transporter:i,appId:t,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,r){i.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){n&&"WithinHeaders"!==n?i.baseQueryParameters["x-algolia-api-key"]=e:i.baseHeaders["x-algolia-api-key"]=e},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return i.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return i.request(e,a)},getClusterIncidents({clusters:e},r){if(!e)throw new Error("Parameter `clusters` is required when calling `getClusterIncidents`.");e={method:"GET",path:"/1/incidents/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},getClusterStatus({clusters:e},r){if(!e)throw new Error("Parameter `clusters` is required when calling `getClusterStatus`.");e={method:"GET",path:"/1/status/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},getIncidents(e){return i.request({method:"GET",path:"/1/incidents",queryParameters:{},headers:{}},e)},getIndexingTime({clusters:e},r){if(!e)throw new Error("Parameter `clusters` is required when calling `getIndexingTime`.");e={method:"GET",path:"/1/indexing/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},getLatency({clusters:e},r){if(!e)throw new Error("Parameter `clusters` is required when calling `getLatency`.");e={method:"GET",path:"/1/latency/{clusters}".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},getMetrics({metric:e,period:r},t){if(!e)throw new Error("Parameter `metric` is required when calling `getMetrics`.");if(!r)throw new Error("Parameter `period` is required when calling `getMetrics`.");e={method:"GET",path:"/1/infrastructure/{metric}/period/{period}".replace("{metric}",encodeURIComponent(e)).replace("{period}",encodeURIComponent(r)),queryParameters:{},headers:{}};return i.request(e,t)},getReachability({clusters:e},r){if(!e)throw new Error("Parameter `clusters` is required when calling `getReachability`.");e={method:"GET",path:"/1/reachability/{clusters}/probes".replace("{clusters}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},getServers(e){return i.request({method:"GET",path:"/1/inventory/servers",queryParameters:{},headers:{}},e)},getStatus(e){return i.request({method:"GET",path:"/1/status",queryParameters:{},headers:{}},e)}}}throw new Error("`apiKey` is missing.")}var M="5.12.0";function V({appId:e,apiKey:r,authMode:t,algoliaAgents:a,...i}){let n=w(e,r,t),s=f({hosts:[{url:e+"-dsn.algolia.net",accept:"read",protocol:"https"},{url:e+".algolia.net",accept:"write",protocol:"https"}].concat(y([{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"}])),...i,algoliaAgent:P({algoliaAgents:a,client:"Recommend",version:M}),baseHeaders:{"content-type":"text/plain",...n.headers(),...i.baseHeaders},baseQueryParameters:{...n.queryParameters(),...i.baseQueryParameters}});return{transporter:s,appId:e,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(e,r){s.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){t&&"WithinHeaders"!==t?s.baseQueryParameters["x-algolia-api-key"]=e:s.baseHeaders["x-algolia-api-key"]=e},batchRecommendRules({indexName:e,model:r,recommendRule:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `batchRecommendRules`.");if(!r)throw new Error("Parameter `model` is required when calling `batchRecommendRules`.");e={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/batch".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t||{}};return s.request(e,a)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return s.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return s.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return s.request(e,a)},deleteRecommendRule({indexName:e,model:r,objectID:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRecommendRule`.");if(!r)throw new Error("Parameter `model` is required when calling `deleteRecommendRule`.");if(!t)throw new Error("Parameter `objectID` is required when calling `deleteRecommendRule`.");e={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return s.request(e,a)},getRecommendRule({indexName:e,model:r,objectID:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendRule`.");if(!r)throw new Error("Parameter `model` is required when calling `getRecommendRule`.");if(!t)throw new Error("Parameter `objectID` is required when calling `getRecommendRule`.");e={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return s.request(e,a)},getRecommendStatus({indexName:e,model:r,taskID:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendStatus`.");if(!r)throw new Error("Parameter `model` is required when calling `getRecommendStatus`.");if(!t)throw new Error("Parameter `taskID` is required when calling `getRecommendStatus`.");e={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)).replace("{taskID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return s.request(e,a)},getRecommendations(e,r){if(!(e=e&&Array.isArray(e)?{requests:e}:e))throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");e={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return s.request(e,r)},searchRecommendRules({indexName:e,model:r,searchRecommendRulesParams:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRecommendRules`.");if(!r)throw new Error("Parameter `model` is required when calling `searchRecommendRules`.");e={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return s.request(e,a)}}}function J(e,r,t){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(r&&"string"==typeof r)return V({appId:e,apiKey:r,timeouts:{connect:m,read:p,write:g},logger:q(),requester:d(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:h({caches:[u({key:M+"-"+e}),c()]}),...t});throw new Error("`apiKey` is missing.")}e.abtestingClient=i,e.algoliasearch=function(r,t,e){if(!r||"string"!=typeof r)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");let a=j(r,t,e);return{...a,get _ua(){return a.transporter.algoliaAgent.value},initAbtesting:e=>i(e.appId||r,e.apiKey||t,e.region,e.options),initAnalytics:e=>n(e.appId||r,e.apiKey||t,e.region,e.options),initIngestion:e=>F(e.appId||r,e.apiKey||t,e.region,e.options),initInsights:e=>b(e.appId||r,e.apiKey||t,e.region,e.options),initMonitoring:(e={})=>z(e.appId||r,e.apiKey||t,e.options),initPersonalization:e=>R(e.appId||r,e.apiKey||t,e.region,e.options),initQuerySuggestions:e=>U(e.appId||r,e.apiKey||t,e.region,e.options),initRecommend:(e={})=>J(e.appId||r,e.apiKey||t,e.options)}},e.analyticsClient=n,e.ingestionClient=F,e.insightsClient=b,e.isOnDemandTrigger=function(e){return"onDemand"===e.type},e.isScheduleTrigger=function(e){return"schedule"===e.type},e.isSubscriptionTrigger=function(e){return"subscription"===e.type},e.monitoringClient=z,e.personalizationClient=R,e.querySuggestionsClient=U,e.recommendClient=J,e.searchClient=j}); \ No newline at end of file diff --git a/resources/algoliasearch/5.4.1/note b/resources/algoliasearch/5.12.0/note similarity index 100% rename from resources/algoliasearch/5.4.1/note rename to resources/algoliasearch/5.12.0/note diff --git a/resources/algoliasearch/5.4.1/algoliasearch.min.jsm b/resources/algoliasearch/5.4.1/algoliasearch.min.jsm deleted file mode 100644 index f594a73a..00000000 --- a/resources/algoliasearch/5.4.1/algoliasearch.min.jsm +++ /dev/null @@ -1 +0,0 @@ -!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).algoliasearch={})}(this,function(e){"use strict";function d(e,r,t="WithinHeaders"){let a={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return"WithinHeaders"===t?a:{}},queryParameters(){return"WithinQueryParameters"===t?a:{}}}}function l({func:a,validate:i,aggregator:s,error:n,timeout:o=()=>0}){let d=e=>new Promise((r,t)=>{a(e).then(e=>(s&&s(e),i(e)?r(e):n&&n.validate(e)?t(new Error(n.message(e))):setTimeout(()=>{d(e).then(r).catch(t)},o()))).catch(e=>{t(e)})});return d()}function c(a){let e,i="algolia-client-js-"+a.key;function s(){return e=void 0===e?a.localStorage||window.localStorage:e}function n(){return JSON.parse(s().getItem(i)||"{}")}function o(e){s().setItem(i,JSON.stringify(e))}return{get(e,r,t={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>{{let t=a.timeToLive?1e3*a.timeToLive:null,e=n(),r=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e.timestamp));o(r),t&&o(Object.fromEntries(Object.entries(r).filter(([,e])=>{var r=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:r(),void 0!==e])).then(([e,r])=>Promise.all([e,r||t.miss(e)])).then(([e])=>e)},set(r,t){return Promise.resolve().then(()=>{let e=n();return e[JSON.stringify(r)]={timestamp:(new Date).getTime(),value:t},s().setItem(i,JSON.stringify(e)),t})},delete(r){return Promise.resolve().then(()=>{let e=n();delete e[JSON.stringify(r)],s().setItem(i,JSON.stringify(e))})},clear(){return Promise.resolve().then(()=>{s().removeItem(i)})}}}function h(e){let a=[...e.caches],i=a.shift();return void 0===i?{get(e,r,t={miss:()=>Promise.resolve()}){return r().then(e=>Promise.all([e,t.miss(e)])).then(([e])=>e)},set(e,r){return Promise.resolve(r)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}:{get(e,r,t={miss:()=>Promise.resolve()}){return i.get(e,r,t).catch(()=>h({caches:a}).get(e,r,t))},set(e,r){return i.set(e,r).catch(()=>h({caches:a}).set(e,r))},delete(e){return i.delete(e).catch(()=>h({caches:a}).delete(e))},clear(){return i.clear().catch(()=>h({caches:a}).clear())}}}function m(i={serializable:!0}){let s={};return{get(e,r,t={miss:()=>Promise.resolve()}){e=JSON.stringify(e);if(e in s)return Promise.resolve(i.serializable?JSON.parse(s[e]):s[e]);let a=r();return a.then(e=>t.miss(e)).then(()=>a)},set(e,r){return s[JSON.stringify(e)]=i.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete(e){return delete s[JSON.stringify(e)],Promise.resolve()},clear(){return s={},Promise.resolve()}}}function E(e,r="up"){let t=Date.now();return{...e,status:r,lastUpdate:t,isUp:function(){return"up"===r||12e4void 0!==s[e]).sort().map(e=>e+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(s[e])?s[e].join(","):s[e]).replaceAll("+","%20")).join("&"),i=`${e.protocol}://${e.url}${e.port?":"+e.port:""}/`+("/"===r.charAt(0)?r.substring(1):r);var s;return a.length&&(i+="?"+a),i}function D(e){var r=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...r}}}}function p({hosts:i,hostsCache:q,baseHeaders:s,baseQueryParameters:n,algoliaAgent:o,timeouts:f,requester:x,requestsCache:d,responsesCache:l}){async function c(c,h,u=!0){let m=[],p=function(e,r){if("GET"!==e.method&&(void 0!==e.data||void 0!==r.data))return e=Array.isArray(e.data)?e.data:{...e.data,...r.data},JSON.stringify(e)}(c,h),g=function(e,r,t){let a={Accept:"application/json",...e,...r,...t},i={};return Object.keys(a).forEach(e=>{var r=a[e];i[e.toLowerCase()]=r}),i}(s,c.headers,h.headers),e="GET"===c.method?{...c.data,...h.data}:{},w={...n,...c.queryParameters,...e};if(o.value&&(w["x-algolia-agent"]=o.value),h&&h.queryParameters)for(var r of Object.keys(h.queryParameters))h.queryParameters[r]&&"[object Object]"!==Object.prototype.toString.call(h.queryParameters[r])?w[r]=h.queryParameters[r].toString():w[r]=h.queryParameters[r];let P=0,y=async(r,e)=>{let t=r.pop();if(void 0===t)throw new v(m.map(e=>D(e)));var a,i;let s={...f,...h.timeouts},n={data:p,headers:g,method:c.method,url:I(t,c.path,w),connectTimeout:e(P,s.connect),responseTimeout:e(P,u?s.read:s.write)},o=e=>{e={request:n,response:e,host:t,triesLeft:r.length};return m.push(e),e},d=await x.send(n);if({isTimedOut:a,status:l}=[d][0],a||({isTimedOut:a,status:i}=[{isTimedOut:a,status:l}][0],!a&&0==~~i)||2!=~~(l/100)&&4!=~~(l/100))return a=o(d),d.isTimedOut&&P++,console.log("Retryable failure",D(a)),await q.set(t,E(t,d.isTimedOut?"timed out":"down")),y(r,e);if(i=d.status,2!=~~(i/100))throw o(d),function({content:e,status:r},t){try{var a=JSON.parse(e);return"error"in a?new T(a.message,r,a.error,t):new S(a.message,r,t)}catch{}return new S(e,r,t)}(d,m);var l=d;try{return JSON.parse(l.content)}catch(e){throw new b(e.message,l)}},t=i.filter(e=>"readWrite"===e.accept||(u?"read"===e.accept:"write"===e.accept)),a=await async function(e){let r=await Promise.all(e.map(e=>q.get(e,()=>Promise.resolve(E(e))))),t=r.filter(e=>e.isUp()),a=r.filter(e=>e.isTimedOut()),i=[...t,...a];return{hosts:0c(e,r);if(!0!==(r.cacheable||e.cacheable))return a();let i={request:e,requestOptions:r,transporter:{queryParameters:n,headers:s}};return l.get(i,()=>d.get(i,()=>d.set(i,a()).then(e=>Promise.all([d.delete(i),e]),e=>Promise.all([d.delete(i),Promise.reject(e)])).then(([,e])=>e)),{miss:e=>l.set(i,e)})},requestsCache:d,responsesCache:l}}function g({algoliaAgents:e,client:r,version:t}){let a=function(e){let r={value:`Algolia for JavaScript (${e})`,add(e){e="; "+e.segment+(void 0!==e.version?` (${e.version})`:"");return-1===r.value.indexOf(e)&&(r.value=r.value+e),r}};return r}(t).add({segment:r,version:t});return e.forEach(e=>a.add(e)),a}var w=1e3,P=2e3,y=3e4;function q(){return{send:function(s){return new Promise(t=>{let a=new XMLHttpRequest,e=(a.open(s.method,s.url,!0),Object.keys(s.headers).forEach(e=>a.setRequestHeader(e,s.headers[e])),(e,r)=>setTimeout(()=>{a.abort(),t({status:0,content:r,isTimedOut:!0})},e)),r=e(s.connectTimeout,"Connection timeout"),i;a.onreadystatechange=()=>{a.readyState>a.OPENED&&void 0===i&&(clearTimeout(r),i=e(s.responseTimeout,"Socket timeout"))},a.onerror=()=>{0===a.status&&(clearTimeout(r),clearTimeout(i),t({content:a.responseText||"Network request failed",status:a.status,isTimedOut:!1}))},a.onload=()=>{clearTimeout(r),clearTimeout(i),t({content:a.responseText,status:a.status,isTimedOut:!1})},a.send(s.data)})}}}var f="5.4.1",n=["de","us"];function i(r,t,a,i){if(!r||"string"!=typeof r)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");if(!a||"string"==typeof a&&n.includes(a)){var{appId:t,apiKey:a,authMode:s,algoliaAgents:r,region:i,...o}=[{appId:r,apiKey:t,region:a,timeouts:{connect:w,read:P,write:y},requester:q(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:m(),requestsCache:m({serializable:!1}),hostsCache:h({caches:[c({key:f+"-"+r}),m()]}),...i}][0];let e=d(t,a,s),n=p({hosts:[{url:(a=i)?"analytics.{region}.algolia.com".replace("{region}",a):"analytics.algolia.com",accept:"readWrite",protocol:"https"}],...o,algoliaAgent:g({algoliaAgents:r,client:"Abtesting",version:f}),baseHeaders:{"content-type":"text/plain",...e.headers(),...o.baseHeaders},baseQueryParameters:{...e.queryParameters(),...o.baseQueryParameters}});return{transporter:n,appId:t,clearCache(){return Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then(()=>{})},get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,r){n.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){s&&"WithinHeaders"!==s?n.baseQueryParameters["x-algolia-api-key"]=e:n.baseHeaders["x-algolia-api-key"]=e},addABTests(e,r){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.variants)throw new Error("Parameter `addABTestsRequest.variants` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");e={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return n.request(e,r)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return n.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return n.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return n.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return n.request(e,a)},deleteABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `deleteABTest`.");e={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(e,r)},getABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `getABTest`.");e={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(e,r)},listABTests({offset:e,limit:r,indexPrefix:t,indexSuffix:a}={},i=void 0){let s={};void 0!==e&&(s.offset=e.toString()),void 0!==r&&(s.limit=r.toString()),void 0!==t&&(s.indexPrefix=t.toString()),void 0!==a&&(s.indexSuffix=a.toString());e={method:"GET",path:"/2/abtests",queryParameters:s,headers:{}};return n.request(e,i)},scheduleABTest(e,r){if(!e)throw new Error("Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.");if(!e.name)throw new Error("Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.");if(!e.variants)throw new Error("Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.");if(!e.scheduledAt)throw new Error("Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.");if(!e.endAt)throw new Error("Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.");e={method:"POST",path:"/2/abtests/schedule",queryParameters:{},headers:{},data:e};return n.request(e,r)},stopABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `stopABTest`.");e={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return n.request(e,r)}}}throw new Error("`region` must be one of the following: "+n.join(", "))}var o="5.4.1",x=["de","us"];function s(r,t,a,i){if(!r||"string"!=typeof r)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");if(!a||"string"==typeof a&&x.includes(a)){var{appId:t,apiKey:a,authMode:s,algoliaAgents:r,region:i,...n}=[{appId:r,apiKey:t,region:a,timeouts:{connect:w,read:P,write:y},requester:q(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:m(),requestsCache:m({serializable:!1}),hostsCache:h({caches:[c({key:o+"-"+r}),m()]}),...i}][0];let e=d(t,a,s),u=p({hosts:[{url:(a=i)?"analytics.{region}.algolia.com".replace("{region}",a):"analytics.algolia.com",accept:"readWrite",protocol:"https"}],...n,algoliaAgent:g({algoliaAgents:r,client:"Analytics",version:o}),baseHeaders:{"content-type":"text/plain",...e.headers(),...n.baseHeaders},baseQueryParameters:{...e.queryParameters(),...n.baseQueryParameters}});return{transporter:u,appId:t,clearCache(){return Promise.all([u.requestsCache.clear(),u.responsesCache.clear()]).then(()=>{})},get _ua(){return u.algoliaAgent.value},addAlgoliaAgent(e,r){u.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){s&&"WithinHeaders"!==s?u.baseQueryParameters["x-algolia-api-key"]=e:u.baseHeaders["x-algolia-api-key"]=e},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return u.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return u.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return u.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return u.request(e,a)},getAddToCartRate({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");let s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());e={method:"GET",path:"/2/conversions/addToCartRate",queryParameters:s,headers:{}};return u.request(e,i)},getAverageClickPosition({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");let s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());e={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:s,headers:{}};return u.request(e,i)},getClickPositions({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");let s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());e={method:"GET",path:"/2/clicks/positions",queryParameters:s,headers:{}};return u.request(e,i)},getClickThroughRate({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");let s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());e={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:s,headers:{}};return u.request(e,i)},getConversionRate({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");let s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());e={method:"GET",path:"/2/conversions/conversionRate",queryParameters:s,headers:{}};return u.request(e,i)},getNoClickRate({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");let s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());e={method:"GET",path:"/2/searches/noClickRate",queryParameters:s,headers:{}};return u.request(e,i)},getNoResultsRate({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");let s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());e={method:"GET",path:"/2/searches/noResultRate",queryParameters:s,headers:{}};return u.request(e,i)},getPurchaseRate({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");let s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());e={method:"GET",path:"/2/conversions/purchaseRate",queryParameters:s,headers:{}};return u.request(e,i)},getRevenue({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");let s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());e={method:"GET",path:"/2/conversions/revenue",queryParameters:s,headers:{}};return u.request(e,i)},getSearchesCount({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");let s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());e={method:"GET",path:"/2/searches/count",queryParameters:s,headers:{}};return u.request(e,i)},getSearchesNoClicks({index:e,startDate:r,endDate:t,limit:a,offset:i,tags:s},n){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");let o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==i&&(o.offset=i.toString()),void 0!==s&&(o.tags=s.toString());e={method:"GET",path:"/2/searches/noClicks",queryParameters:o,headers:{}};return u.request(e,n)},getSearchesNoResults({index:e,startDate:r,endDate:t,limit:a,offset:i,tags:s},n){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");let o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==i&&(o.offset=i.toString()),void 0!==s&&(o.tags=s.toString());e={method:"GET",path:"/2/searches/noResults",queryParameters:o,headers:{}};return u.request(e,n)},getStatus({index:e},r){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");let t={};void 0!==e&&(t.index=e.toString());e={method:"GET",path:"/2/status",queryParameters:t,headers:{}};return u.request(e,r)},getTopCountries({index:e,startDate:r,endDate:t,limit:a,offset:i,tags:s},n){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");let o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==i&&(o.offset=i.toString()),void 0!==s&&(o.tags=s.toString());e={method:"GET",path:"/2/countries",queryParameters:o,headers:{}};return u.request(e,n)},getTopFilterAttributes({index:e,search:r,startDate:t,endDate:a,limit:i,offset:s,tags:n},o){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");let d={};void 0!==e&&(d.index=e.toString()),void 0!==r&&(d.search=r.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==a&&(d.endDate=a.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==s&&(d.offset=s.toString()),void 0!==n&&(d.tags=n.toString());e={method:"GET",path:"/2/filters",queryParameters:d,headers:{}};return u.request(e,o)},getTopFilterForAttribute({attribute:e,index:r,search:t,startDate:a,endDate:i,limit:s,offset:n,tags:o},d){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!r)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");let l="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),c={};void 0!==r&&(c.index=r.toString()),void 0!==t&&(c.search=t.toString()),void 0!==a&&(c.startDate=a.toString()),void 0!==i&&(c.endDate=i.toString()),void 0!==s&&(c.limit=s.toString()),void 0!==n&&(c.offset=n.toString()),void 0!==o&&(c.tags=o.toString());e={method:"GET",path:l,queryParameters:c,headers:{}};return u.request(e,d)},getTopFiltersNoResults({index:e,search:r,startDate:t,endDate:a,limit:i,offset:s,tags:n},o){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");let d={};void 0!==e&&(d.index=e.toString()),void 0!==r&&(d.search=r.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==a&&(d.endDate=a.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==s&&(d.offset=s.toString()),void 0!==n&&(d.tags=n.toString());e={method:"GET",path:"/2/filters/noResults",queryParameters:d,headers:{}};return u.request(e,o)},getTopHits({index:e,search:r,clickAnalytics:t,revenueAnalytics:a,startDate:i,endDate:s,limit:n,offset:o,tags:d},l){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");let c={};void 0!==e&&(c.index=e.toString()),void 0!==r&&(c.search=r.toString()),void 0!==t&&(c.clickAnalytics=t.toString()),void 0!==a&&(c.revenueAnalytics=a.toString()),void 0!==i&&(c.startDate=i.toString()),void 0!==s&&(c.endDate=s.toString()),void 0!==n&&(c.limit=n.toString()),void 0!==o&&(c.offset=o.toString()),void 0!==d&&(c.tags=d.toString());e={method:"GET",path:"/2/hits",queryParameters:c,headers:{}};return u.request(e,l)},getTopSearches({index:e,clickAnalytics:r,revenueAnalytics:t,startDate:a,endDate:i,orderBy:s,direction:n,limit:o,offset:d,tags:l},c){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");let h={};void 0!==e&&(h.index=e.toString()),void 0!==r&&(h.clickAnalytics=r.toString()),void 0!==t&&(h.revenueAnalytics=t.toString()),void 0!==a&&(h.startDate=a.toString()),void 0!==i&&(h.endDate=i.toString()),void 0!==s&&(h.orderBy=s.toString()),void 0!==n&&(h.direction=n.toString()),void 0!==o&&(h.limit=o.toString()),void 0!==d&&(h.offset=d.toString()),void 0!==l&&(h.tags=l.toString());e={method:"GET",path:"/2/searches",queryParameters:h,headers:{}};return u.request(e,c)},getUsersCount({index:e,startDate:r,endDate:t,tags:a},i){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");let s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());e={method:"GET",path:"/2/users/count",queryParameters:s,headers:{}};return u.request(e,i)}}}throw new Error("`region` must be one of the following: "+x.join(", "))}var R="5.4.1",N=["eu","us"];function A(r,t,a,s){if(!r||"string"!=typeof r)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");if(a&&"string"==typeof a&&N.includes(a)){var{appId:t,apiKey:a,authMode:n,algoliaAgents:r,region:s,...o}=[{appId:r,apiKey:t,region:a,timeouts:{connect:w,read:P,write:y},requester:q(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:m(),requestsCache:m({serializable:!1}),hostsCache:h({caches:[c({key:R+"-"+r}),m()]}),...s}][0];let e=d(t,a,n),i=p({hosts:[{url:"personalization.{region}.algolia.com".replace("{region}",s),accept:"readWrite",protocol:"https"}],...o,algoliaAgent:g({algoliaAgents:r,client:"Personalization",version:R}),baseHeaders:{"content-type":"text/plain",...e.headers(),...o.baseHeaders},baseQueryParameters:{...e.queryParameters(),...o.baseQueryParameters}});return{transporter:i,appId:t,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,r){i.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){n&&"WithinHeaders"!==n?i.baseQueryParameters["x-algolia-api-key"]=e:i.baseHeaders["x-algolia-api-key"]=e},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return i.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return i.request(e,a)},deleteUserProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `deleteUserProfile`.");e={method:"DELETE",path:"/1/profiles/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},getPersonalizationStrategy(e){return i.request({method:"GET",path:"/1/strategies/personalization",queryParameters:{},headers:{}},e)},getUserTokenProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `getUserTokenProfile`.");e={method:"GET",path:"/1/profiles/personalization/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(e,r)},setPersonalizationStrategy(e,r){if(!e)throw new Error("Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.");if(!e.eventScoring)throw new Error("Parameter `personalizationStrategyParams.eventScoring` is required when calling `setPersonalizationStrategy`.");if(!e.facetScoring)throw new Error("Parameter `personalizationStrategyParams.facetScoring` is required when calling `setPersonalizationStrategy`.");if(!e.personalizationImpact)throw new Error("Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.");e={method:"POST",path:"/1/strategies/personalization",queryParameters:{},headers:{},data:e};return i.request(e,r)}}}throw new Error("`region` is required and must be one of the following: "+N.join(", "))}var C="5.4.1";function a({appId:e,apiKey:r,authMode:t,algoliaAgents:a,...i}){let s=d(e,r,t),o=p({hosts:[{url:e+"-dsn.algolia.net",accept:"read",protocol:"https"},{url:e+".algolia.net",accept:"write",protocol:"https"}].concat(u([{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"}])),...i,algoliaAgent:g({algoliaAgents:a,client:"Search",version:C}),baseHeaders:{"content-type":"text/plain",...s.headers(),...i.baseHeaders},baseQueryParameters:{...s.queryParameters(),...i.baseQueryParameters}});return{transporter:o,appId:e,clearCache(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then(()=>{})},get _ua(){return o.algoliaAgent.value},addAlgoliaAgent(e,r){o.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){t&&"WithinHeaders"!==t?o.baseQueryParameters["x-algolia-api-key"]=e:o.baseHeaders["x-algolia-api-key"]=e},waitForTask({indexName:e,taskID:r,maxRetries:t=50,timeout:a=e=>Math.min(200*e,5e3)},i){let s=0;return l({func:()=>this.getTask({indexName:e,taskID:r},i),validate:e=>"published"===e.status,aggregator:()=>s+=1,error:{validate:()=>s>=t,message:()=>`The maximum number of retries exceeded. (${s}/${t})`},timeout:()=>a(s)})},waitForAppTask({taskID:e,maxRetries:r=50,timeout:t=e=>Math.min(200*e,5e3)},a){let i=0;return l({func:()=>this.getAppTask({taskID:e},a),validate:e=>"published"===e.status,aggregator:()=>i+=1,error:{validate:()=>i>=r,message:()=>`The maximum number of retries exceeded. (${i}/${r})`},timeout:()=>t(i)})},waitForApiKey({operation:r,key:e,apiKey:i,maxRetries:t=50,timeout:a=e=>Math.min(200*e,5e3)},s){let n=0,o={aggregator:()=>n+=1,error:{validate:()=>n>=t,message:()=>`The maximum number of retries exceeded. (${n}/${t})`},timeout:()=>a(n)};if("update"!==r)return l({...o,func:()=>this.getApiKey({key:e},s).catch(e=>{if(404!==e.status)throw e}),validate:e=>"add"===r?void 0!==e:void 0===e});if(i)return l({...o,func:()=>this.getApiKey({key:e},s),validate:r=>{for(var a of Object.keys(i)){let e=i[a],t=r[a];if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length||e.some((e,r)=>e!==t[r]))return!1}else if(e!==t)return!1}return!0}});throw new Error("`apiKey` is required when waiting for an `update` operation.")},browseObjects({indexName:r,browseParams:t,...e},a){return l({func:e=>this.browse({indexName:r,browseParams:{cursor:e?e.cursor:void 0,...t}},a),validate:e=>void 0===e.cursor,...e})},browseRules({indexName:r,searchRulesParams:e,...t},a){let i={hitsPerPage:1e3,...e};return l({func:e=>this.searchRules({indexName:r,searchRulesParams:{...i,page:e?e.page+1:i.page||0}},a),validate:e=>e.nbHits{var r=this.searchSynonyms({indexName:t,searchSynonymsParams:{...i,page:i.page}},a);return i.page+=1,r},validate:e=>e.nbHits({objectID:e})),action:"deleteObject"},t)},async partialUpdateObjects({indexName:e,objects:r,createIfNotExists:t},a){return this.chunkedBatch({indexName:e,objects:r,action:t?"partialUpdateObject":"partialUpdateObjectNoCreate"},a)},async replaceAllObjects({indexName:e,objects:r,batchSize:t},a){var i=e+"_tmp_"+(Math.floor(1e6*Math.random())+1e5),s=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:i,scope:["settings","rules","synonyms"]}},a),r=await this.chunkedBatch({indexName:i,objects:r,waitForTasks:!0,batchSize:t},a),t=(await this.waitForTask({indexName:i,taskID:s.taskID}),s=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:i,scope:["settings","rules","synonyms"]}},a),await this.waitForTask({indexName:i,taskID:s.taskID}),await this.operationIndex({indexName:i,operationIndexParams:{operation:"move",destination:e}},a));return await this.waitForTask({indexName:i,taskID:t.taskID}),{copyOperationResponse:s,batchResponses:r,moveOperationResponse:t}},async indexExists({indexName:e}){try{await this.getSettings({indexName:e})}catch(e){if(e instanceof S&&404===e.status)return!1;throw e}return!0},searchForHits(e,r){return this.search(e,r)},searchForFacets(e,r){return this.search(e,r)},addApiKey(e,r){if(!e)throw new Error("Parameter `apiKey` is required when calling `addApiKey`.");if(!e.acl)throw new Error("Parameter `apiKey.acl` is required when calling `addApiKey`.");e={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return o.request(e,r)},addOrUpdateObject({indexName:e,objectID:r,body:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `addOrUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `addOrUpdateObject`.");if(!t)throw new Error("Parameter `body` is required when calling `addOrUpdateObject`.");e={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t};return o.request(e,a)},appendSource(e,r){if(!e)throw new Error("Parameter `source` is required when calling `appendSource`.");if(!e.source)throw new Error("Parameter `source.source` is required when calling `appendSource`.");e={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return o.request(e,r)},assignUserId({xAlgoliaUserID:e,assignUserIdParams:r},t){if(!e)throw new Error("Parameter `xAlgoliaUserID` is required when calling `assignUserId`.");if(!r)throw new Error("Parameter `assignUserIdParams` is required when calling `assignUserId`.");if(!r.cluster)throw new Error("Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.");let a={};void 0!==e&&(a["X-Algolia-User-ID"]=e.toString());e={method:"POST",path:"/1/clusters/mapping",queryParameters:{},headers:a,data:r};return o.request(e,t)},batch({indexName:e,batchWriteParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `batch`.");if(!r)throw new Error("Parameter `batchWriteParams` is required when calling `batch`.");if(!r.requests)throw new Error("Parameter `batchWriteParams.requests` is required when calling `batch`.");e={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o.request(e,t)},batchAssignUserIds({xAlgoliaUserID:e,batchAssignUserIdsParams:r},t){if(!e)throw new Error("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.");if(!r)throw new Error("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.");if(!r.cluster)throw new Error("Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.");if(!r.users)throw new Error("Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.");let a={};void 0!==e&&(a["X-Algolia-User-ID"]=e.toString());e={method:"POST",path:"/1/clusters/mapping/batch",queryParameters:{},headers:a,data:r};return o.request(e,t)},batchDictionaryEntries({dictionaryName:e,batchDictionaryEntriesParams:r},t){if(!e)throw new Error("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.");if(!r)throw new Error("Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.");if(!r.requests)throw new Error("Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.");e={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o.request(e,t)},browse({indexName:e,browseParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `browse`.");e={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return o.request(e,t)},clearObjects({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");e={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},clearRules({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearRules`.");let a="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(e)),i={};void 0!==r&&(i.forwardToReplicas=r.toString());e={method:"POST",path:a,queryParameters:i,headers:{}};return o.request(e,t)},clearSynonyms({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearSynonyms`.");let a="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(e)),i={};void 0!==r&&(i.forwardToReplicas=r.toString());e={method:"POST",path:a,queryParameters:i,headers:{}};return o.request(e,t)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return o.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return o.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return o.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return o.request(e,a)},deleteApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");e={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},deleteBy({indexName:e,deleteByParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteBy`.");if(!r)throw new Error("Parameter `deleteByParams` is required when calling `deleteBy`.");e={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o.request(e,t)},deleteIndex({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");e={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},deleteObject({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteObject`.");e={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return o.request(e,t)},deleteRule({indexName:e,objectID:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");let i="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());e={method:"DELETE",path:i,queryParameters:s,headers:{}};return o.request(e,a)},deleteSource({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `deleteSource`.");e={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},deleteSynonym({indexName:e,objectID:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");let i="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());e={method:"DELETE",path:i,queryParameters:s,headers:{}};return o.request(e,a)},getApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `getApiKey`.");e={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},getAppTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getAppTask`.");e={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},getDictionaryLanguages(e){return o.request({method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}},e)},getDictionarySettings(e){return o.request({method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}},e)},getLogs({offset:e,length:r,indexName:t,type:a}={},i=void 0){let s={};void 0!==e&&(s.offset=e.toString()),void 0!==r&&(s.length=r.toString()),void 0!==t&&(s.indexName=t.toString()),void 0!==a&&(s.type=a.toString());e={method:"GET",path:"/1/logs",queryParameters:s,headers:{}};return o.request(e,i)},getObject({indexName:e,objectID:r,attributesToRetrieve:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getObject`.");let i="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.attributesToRetrieve=t.toString());e={method:"GET",path:i,queryParameters:s,headers:{}};return o.request(e,a)},getObjects(e,r){if(!e)throw new Error("Parameter `getObjectsParams` is required when calling `getObjects`.");if(!e.requests)throw new Error("Parameter `getObjectsParams.requests` is required when calling `getObjects`.");e={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return o.request(e,r)},getRule({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRule`.");e={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return o.request(e,t)},getSettings({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getSettings`.");e={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},getSources(e){return o.request({method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}},e)},getSynonym({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getSynonym`.");e={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return o.request(e,t)},getTask({indexName:e,taskID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getTask`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getTask`.");e={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return o.request(e,t)},getTopUserIds(e){return o.request({method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}},e)},getUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `getUserId`.");e={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},hasPendingMappings({getClusters:e}={},r=void 0){let t={};void 0!==e&&(t.getClusters=e.toString());e={method:"GET",path:"/1/clusters/mapping/pending",queryParameters:t,headers:{}};return o.request(e,r)},listApiKeys(e){return o.request({method:"GET",path:"/1/keys",queryParameters:{},headers:{}},e)},listClusters(e){return o.request({method:"GET",path:"/1/clusters",queryParameters:{},headers:{}},e)},listIndices({page:e,hitsPerPage:r}={},t=void 0){let a={};void 0!==e&&(a.page=e.toString()),void 0!==r&&(a.hitsPerPage=r.toString());e={method:"GET",path:"/1/indexes",queryParameters:a,headers:{}};return o.request(e,t)},listUserIds({page:e,hitsPerPage:r}={},t=void 0){let a={};void 0!==e&&(a.page=e.toString()),void 0!==r&&(a.hitsPerPage=r.toString());e={method:"GET",path:"/1/clusters/mapping",queryParameters:a,headers:{}};return o.request(e,t)},multipleBatch(e,r){if(!e)throw new Error("Parameter `batchParams` is required when calling `multipleBatch`.");if(!e.requests)throw new Error("Parameter `batchParams.requests` is required when calling `multipleBatch`.");e={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return o.request(e,r)},operationIndex({indexName:e,operationIndexParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `operationIndex`.");if(!r)throw new Error("Parameter `operationIndexParams` is required when calling `operationIndex`.");if(!r.operation)throw new Error("Parameter `operationIndexParams.operation` is required when calling `operationIndex`.");if(!r.destination)throw new Error("Parameter `operationIndexParams.destination` is required when calling `operationIndex`.");e={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o.request(e,t)},partialUpdateObject({indexName:e,objectID:r,attributesToUpdate:t,createIfNotExists:a},i){if(!e)throw new Error("Parameter `indexName` is required when calling `partialUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `partialUpdateObject`.");if(!t)throw new Error("Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.");let s="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={};void 0!==a&&(n.createIfNotExists=a.toString());e={method:"POST",path:s,queryParameters:n,headers:{},data:t};return o.request(e,i)},removeUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `removeUserId`.");e={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},replaceSources({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `replaceSources`.");e={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:e};return o.request(e,r)},restoreApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");e={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(e,r)},saveObject({indexName:e,body:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `saveObject`.");if(!r)throw new Error("Parameter `body` is required when calling `saveObject`.");e={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o.request(e,t)},saveRule({indexName:e,objectID:r,rule:t,forwardToReplicas:a},i){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveRule`.");if(!t)throw new Error("Parameter `rule` is required when calling `saveRule`.");if(!t.objectID)throw new Error("Parameter `rule.objectID` is required when calling `saveRule`.");let s="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={};void 0!==a&&(n.forwardToReplicas=a.toString());e={method:"PUT",path:s,queryParameters:n,headers:{},data:t};return o.request(e,i)},saveRules({indexName:e,rules:r,forwardToReplicas:t,clearExistingRules:a},i){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!r)throw new Error("Parameter `rules` is required when calling `saveRules`.");let s="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(e)),n={};void 0!==t&&(n.forwardToReplicas=t.toString()),void 0!==a&&(n.clearExistingRules=a.toString());e={method:"POST",path:s,queryParameters:n,headers:{},data:r};return o.request(e,i)},saveSynonym({indexName:e,objectID:r,synonymHit:t,forwardToReplicas:a},i){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveSynonym`.");if(!t)throw new Error("Parameter `synonymHit` is required when calling `saveSynonym`.");if(!t.objectID)throw new Error("Parameter `synonymHit.objectID` is required when calling `saveSynonym`.");if(!t.type)throw new Error("Parameter `synonymHit.type` is required when calling `saveSynonym`.");let s="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={};void 0!==a&&(n.forwardToReplicas=a.toString());e={method:"PUT",path:s,queryParameters:n,headers:{},data:t};return o.request(e,i)},saveSynonyms({indexName:e,synonymHit:r,forwardToReplicas:t,replaceExistingSynonyms:a},i){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!r)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");let s="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(e)),n={};void 0!==t&&(n.forwardToReplicas=t.toString()),void 0!==a&&(n.replaceExistingSynonyms=a.toString());e={method:"POST",path:s,queryParameters:n,headers:{},data:r};return o.request(e,i)},search(e,r){if(!(e=e&&Array.isArray(e)?{requests:e.map(({params:e,...r})=>"facet"===r.type?{...r,...e,type:"facet"}:{...r,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}:e))throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");e={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return o.request(e,r)},searchDictionaryEntries({dictionaryName:e,searchDictionaryEntriesParams:r},t){if(!e)throw new Error("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.");if(!r)throw new Error("Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.");if(!r.query)throw new Error("Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.");e={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r,useReadTransporter:!0,cacheable:!0};return o.request(e,t)},searchForFacetValues({indexName:e,facetName:r,searchForFacetValuesRequest:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!r)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");e={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(e)).replace("{facetName}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return o.request(e,a)},searchRules({indexName:e,searchRulesParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRules`.");e={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return o.request(e,t)},searchSingleIndex({indexName:e,searchParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");e={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return o.request(e,t)},searchSynonyms({indexName:e,searchSynonymsParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");e={method:"POST",path:"/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return o.request(e,t)},searchUserIds(e,r){if(!e)throw new Error("Parameter `searchUserIdsParams` is required when calling `searchUserIds`.");if(!e.query)throw new Error("Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.");e={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return o.request(e,r)},setDictionarySettings(e,r){if(!e)throw new Error("Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.");if(!e.disableStandardEntries)throw new Error("Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.");e={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return o.request(e,r)},setSettings({indexName:e,indexSettings:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!r)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");let i="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());e={method:"PUT",path:i,queryParameters:s,headers:{},data:r};return o.request(e,a)},updateApiKey({key:e,apiKey:r},t){if(!e)throw new Error("Parameter `key` is required when calling `updateApiKey`.");if(!r)throw new Error("Parameter `apiKey` is required when calling `updateApiKey`.");if(!r.acl)throw new Error("Parameter `apiKey.acl` is required when calling `updateApiKey`.");e={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return o.request(e,t)}}}function U(e,r,t){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(r&&"string"==typeof r)return a({appId:e,apiKey:r,timeouts:{connect:w,read:P,write:y},requester:q(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:m(),requestsCache:m({serializable:!1}),hostsCache:h({caches:[c({key:C+"-"+e}),m()]}),...t});throw new Error("`apiKey` is missing.")}var k="5.4.1";function O({appId:e,apiKey:r,authMode:t,algoliaAgents:a,...i}){let s=d(e,r,t),n=p({hosts:[{url:e+"-dsn.algolia.net",accept:"read",protocol:"https"},{url:e+".algolia.net",accept:"write",protocol:"https"}].concat(u([{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"}])),...i,algoliaAgent:g({algoliaAgents:a,client:"Recommend",version:k}),baseHeaders:{"content-type":"text/plain",...s.headers(),...i.baseHeaders},baseQueryParameters:{...s.queryParameters(),...i.baseQueryParameters}});return{transporter:n,appId:e,clearCache(){return Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then(()=>{})},get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,r){n.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){t&&"WithinHeaders"!==t?n.baseQueryParameters["x-algolia-api-key"]=e:n.baseHeaders["x-algolia-api-key"]=e},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");e={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return n.request(e,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");e={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return n.request(e,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");e={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return n.request(e,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");e={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return n.request(e,a)},deleteRecommendRule({indexName:e,model:r,objectID:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRecommendRule`.");if(!r)throw new Error("Parameter `model` is required when calling `deleteRecommendRule`.");if(!t)throw new Error("Parameter `objectID` is required when calling `deleteRecommendRule`.");e={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return n.request(e,a)},getRecommendRule({indexName:e,model:r,objectID:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendRule`.");if(!r)throw new Error("Parameter `model` is required when calling `getRecommendRule`.");if(!t)throw new Error("Parameter `objectID` is required when calling `getRecommendRule`.");e={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return n.request(e,a)},getRecommendStatus({indexName:e,model:r,taskID:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendStatus`.");if(!r)throw new Error("Parameter `model` is required when calling `getRecommendStatus`.");if(!t)throw new Error("Parameter `taskID` is required when calling `getRecommendStatus`.");e={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)).replace("{taskID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return n.request(e,a)},getRecommendations(e,r){if(!(e=e&&Array.isArray(e)?{requests:e}:e))throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");e={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(e,r)},searchRecommendRules({indexName:e,model:r,searchRecommendRulesParams:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRecommendRules`.");if(!r)throw new Error("Parameter `model` is required when calling `searchRecommendRules`.");e={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return n.request(e,a)}}}function j(e,r,t){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(r&&"string"==typeof r)return O({appId:e,apiKey:r,timeouts:{connect:w,read:P,write:y},requester:q(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:m(),requestsCache:m({serializable:!1}),hostsCache:h({caches:[c({key:k+"-"+e}),m()]}),...t});throw new Error("`apiKey` is missing.")}e.abtestingClient=i,e.algoliasearch=function(r,t,e){if(!r||"string"!=typeof r)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");let a=U(r,t,e);return{...a,get _ua(){return a.transporter.algoliaAgent.value},initRecommend:(e={})=>j(e.appId||r,e.apiKey||t,e.options),initAnalytics:(e={})=>s(e.appId||r,e.apiKey||t,e.region,e.options),initAbtesting:(e={})=>i(e.appId||r,e.apiKey||t,e.region,e.options),initPersonalization:e=>A(e.appId||r,e.apiKey||t,e.region,e.options)}},e.analyticsClient=s,e.apiClientVersion=C,e.personalizationClient=A,e.recommendClient=j,e.searchClient=U}); \ No newline at end of file From 403454d85ec00642722fcf370b4b8b8877b8f07c Mon Sep 17 00:00:00 2001 From: nobody Date: Sun, 3 Nov 2024 06:53:10 +0100 Subject: [PATCH 06/26] alpinejs v3.14.1 -> v3.14.3 --- THIRD_PARTY.txt | 2 +- modules/internal/targets.js | 2 +- pages/updates/updates.html | 1 + resources/alpinejs/3.14.1/alpine.jsm | 5 ----- resources/alpinejs/3.14.3/alpine.jsm | 5 +++++ resources/alpinejs/{3.14.1 => 3.14.3}/note | 0 6 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 resources/alpinejs/3.14.1/alpine.jsm create mode 100644 resources/alpinejs/3.14.3/alpine.jsm rename resources/alpinejs/{3.14.1 => 3.14.3}/note (100%) diff --git a/THIRD_PARTY.txt b/THIRD_PARTY.txt index afeeda45..b0a41e6d 100644 --- a/THIRD_PARTY.txt +++ b/THIRD_PARTY.txt @@ -139,7 +139,7 @@ https://cdnjs.cloudflare.com/ajax/libs/algoliasearch/3.35.1/algoliasearch.min.js https://cdnjs.cloudflare.com/ajax/libs/algoliasearch/4.24.0/algoliasearch.umd.min.js https://cdnjs.cloudflare.com/ajax/libs/algoliasearch/5.12.0/algoliasearch.umd.min.js https://cdnjs.cloudflare.com/ajax/libs/alpinejs/2.8.2/alpine.js -https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.14.1/cdn.min.js +https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.14.3/cdn.min.js https://cdnjs.cloudflare.com/ajax/libs/angucomplete-alt/3.0.0/angucomplete-alt.min.js https://cdnjs.cloudflare.com/ajax/libs/angular-bootstrap-colorpicker/3.0.32/css/colorpicker.min.css https://cdnjs.cloudflare.com/ajax/libs/angular-bootstrap-colorpicker/3.0.32/js/bootstrap-colorpicker-module.min.js diff --git a/modules/internal/targets.js b/modules/internal/targets.js index 3f6d9c75..44b97a2a 100644 --- a/modules/internal/targets.js +++ b/modules/internal/targets.js @@ -83,7 +83,7 @@ targets.setLastVersion = function (type, version) { if (type.startsWith('/algoliasearch/4.')) return '4.24.0'; if (type.startsWith('/algoliasearch/5.')) return '5.12.0'; if (type.startsWith('/alpinejs/2.')) return '2.8.2'; - if (type.startsWith('/alpinejs/3.')) return '3.14.1'; + if (type.startsWith('/alpinejs/3.')) return '3.14.3'; if (type.startsWith('/anchor-js/3.')) return '3.2.2'; if (type.startsWith('/anchor-js/4.')) return '4.3.1'; if (type.startsWith('/anchor-js/5.')) return '5.0.0'; diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 49a0e445..30deb349 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -28,6 +28,7 @@

Updated

  • algoliasearch v5.4.1 -> v5.12.0
  • +
  • alpinejs v3.14.1 -> v3.14.3
diff --git a/resources/alpinejs/3.14.1/alpine.jsm b/resources/alpinejs/3.14.1/alpine.jsm deleted file mode 100644 index 2ca48278..00000000 --- a/resources/alpinejs/3.14.1/alpine.jsm +++ /dev/null @@ -1,5 +0,0 @@ -(()=>{var rt=!1,nt=!1,U=[],it=-1;function qt(e){Cn(e)}function Cn(e){U.includes(e)||U.push(e),Tn()}function Ee(e){let t=U.indexOf(e);t!==-1&&t>it&&U.splice(t,1)}function Tn(){!nt&&!rt&&(rt=!0,queueMicrotask(Rn))}function Rn(){rt=!1,nt=!0;for(let e=0;ee.effect(t,{scheduler:r=>{ot?qt(r):r()}}),st=e.raw}function at(e){D=e}function Gt(e){let t=()=>{};return[n=>{let i=D(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),L(i))},i},()=>{t()}]}function ve(e,t){let r=!0,n,i=D(()=>{let o=e();JSON.stringify(o),r?n=o:queueMicrotask(()=>{t(o,n),n=o}),r=!1});return()=>L(i)}var Jt=[],Yt=[],Xt=[];function Zt(e){Xt.push(e)}function ee(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,Yt.push(t))}function Ae(e){Jt.push(e)}function Oe(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function ct(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{(t===void 0||t.includes(r))&&(n.forEach(i=>i()),delete e._x_attributeCleanups[r])})}function Qt(e){if(e._x_cleanups)for(;e._x_cleanups.length;)e._x_cleanups.pop()()}var lt=new MutationObserver(pt),ut=!1;function le(){lt.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),ut=!0}function ft(){Mn(),lt.disconnect(),ut=!1}var ce=[];function Mn(){let e=lt.takeRecords();ce.push(()=>e.length>0&&pt(e));let t=ce.length;queueMicrotask(()=>{if(ce.length===t)for(;ce.length>0;)ce.shift()()})}function _(e){if(!ut)return e();ft();let t=e();return le(),t}var dt=!1,Se=[];function er(){dt=!0}function tr(){dt=!1,pt(Se),Se=[]}function pt(e){if(dt){Se=Se.concat(e);return}let t=new Set,r=new Set,n=new Map,i=new Map;for(let o=0;os.nodeType===1&&t.add(s)),e[o].removedNodes.forEach(s=>s.nodeType===1&&r.add(s))),e[o].type==="attributes")){let s=e[o].target,a=e[o].attributeName,c=e[o].oldValue,l=()=>{n.has(s)||n.set(s,[]),n.get(s).push({name:a,value:s.getAttribute(a)})},u=()=>{i.has(s)||i.set(s,[]),i.get(s).push(a)};s.hasAttribute(a)&&c===null?l():s.hasAttribute(a)?(u(),l()):u()}i.forEach((o,s)=>{ct(s,o)}),n.forEach((o,s)=>{Jt.forEach(a=>a(s,o))});for(let o of r)t.has(o)||Yt.forEach(s=>s(o));t.forEach(o=>{o._x_ignoreSelf=!0,o._x_ignore=!0});for(let o of t)r.has(o)||o.isConnected&&(delete o._x_ignoreSelf,delete o._x_ignore,Xt.forEach(s=>s(o)),o._x_ignore=!0,o._x_ignoreSelf=!0);t.forEach(o=>{delete o._x_ignoreSelf,delete o._x_ignore}),t=null,r=null,n=null,i=null}function Ce(e){return F(j(e))}function P(e,t,r){return e._x_dataStack=[t,...j(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function j(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?j(e.host):e.parentNode?j(e.parentNode):[]}function F(e){return new Proxy({objects:e},Nn)}var Nn={ownKeys({objects:e}){return Array.from(new Set(e.flatMap(t=>Object.keys(t))))},has({objects:e},t){return t==Symbol.unscopables?!1:e.some(r=>Object.prototype.hasOwnProperty.call(r,t)||Reflect.has(r,t))},get({objects:e},t,r){return t=="toJSON"?Dn:Reflect.get(e.find(n=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i=e.find(s=>Object.prototype.hasOwnProperty.call(s,t))||e[e.length-1],o=Object.getOwnPropertyDescriptor(i,t);return o?.set&&o?.get?o.set.call(n,r)||!0:Reflect.set(i,t,r)}};function Dn(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function Te(e){let t=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,r=(n,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(n)).forEach(([o,{value:s,enumerable:a}])=>{if(a===!1||s===void 0||typeof s=="object"&&s!==null&&s.__v_skip)return;let c=i===""?o:`${i}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?n[o]=s.initialize(e,c,o):t(s)&&s!==n&&!(s instanceof Element)&&r(s,c)})};return r(e)}function Re(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>Pn(n,i),s=>mt(n,i,s),i,o)}};return t(r),n=>{if(typeof n=="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a)=>{let c=n.initialize(o,s,a);return r.initialValue=c,i(o,s,a)}}else r.initialValue=n;return r}}function Pn(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function mt(e,t,r){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=r;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),mt(e[t[0]],t.slice(1),r)}}var rr={};function y(e,t){rr[e]=t}function ue(e,t){return Object.entries(rr).forEach(([r,n])=>{let i=null;function o(){if(i)return i;{let[s,a]=_t(t);return i={interceptor:Re,...s},ee(t,a),i}}Object.defineProperty(e,`$${r}`,{get(){return n(t,o())},enumerable:!1})}),e}function nr(e,t,r,...n){try{return r(...n)}catch(i){te(i,e,t)}}function te(e,t,r=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message} - -${r?'Expression: "'+r+`" - -`:""}`,t),setTimeout(()=>{throw e},0)}var Me=!0;function De(e){let t=Me;Me=!1;let r=e();return Me=t,r}function M(e,t,r={}){let n;return x(e,t)(i=>n=i,r),n}function x(...e){return ir(...e)}var ir=gt;function or(e){ir=e}function gt(e,t){let r={};ue(r,e);let n=[r,...j(e)],i=typeof t=="function"?In(n,t):Ln(n,t,e);return nr.bind(null,e,t,i)}function In(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(F([n,...e]),i);Ne(r,o)}}var ht={};function kn(e,t){if(ht[e])return ht[e];let r=Object.getPrototypeOf(async function(){}).constructor,n=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e,o=(()=>{try{let s=new r(["__self","scope"],`with (scope) { __self.result = ${n} }; __self.finished = true; return __self.result;`);return Object.defineProperty(s,"name",{value:`[Alpine] ${e}`}),s}catch(s){return te(s,t,e),Promise.resolve()}})();return ht[e]=o,o}function Ln(e,t,r){let n=kn(t,r);return(i=()=>{},{scope:o={},params:s=[]}={})=>{n.result=void 0,n.finished=!1;let a=F([o,...e]);if(typeof n=="function"){let c=n(n,a).catch(l=>te(l,r,t));n.finished?(Ne(i,n.result,a,s,r),n.result=void 0):c.then(l=>{Ne(i,l,a,s,r)}).catch(l=>te(l,r,t)).finally(()=>n.result=void 0)}}}function Ne(e,t,r,n,i){if(Me&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(s=>Ne(e,s,r,n)).catch(s=>te(s,i,t)):e(o)}else typeof t=="object"&&t instanceof Promise?t.then(o=>e(o)):e(t)}var bt="x-";function C(e=""){return bt+e}function sr(e){bt=e}var Pe={};function d(e,t){return Pe[e]=t,{before(r){if(!Pe[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=W.indexOf(r);W.splice(n>=0?n:W.indexOf("DEFAULT"),0,e)}}}function ar(e){return Object.keys(Pe).includes(e)}function de(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([a,c])=>({name:a,value:c})),s=wt(o);o=o.map(a=>s.find(c=>c.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),t=t.concat(o)}let n={};return t.map(ur((o,s)=>n[o]=s)).filter(dr).map(jn(n,r)).sort(Fn).map(o=>$n(e,o))}function wt(e){return Array.from(e).map(ur()).filter(t=>!dr(t))}var xt=!1,fe=new Map,cr=Symbol();function lr(e){xt=!0;let t=Symbol();cr=t,fe.set(t,[]);let r=()=>{for(;fe.get(t).length;)fe.get(t).shift()();fe.delete(t)},n=()=>{xt=!1,r()};e(r),n()}function _t(e){let t=[],r=a=>t.push(a),[n,i]=Gt(e);return t.push(i),[{Alpine:B,effect:n,cleanup:r,evaluateLater:x.bind(x,e),evaluate:M.bind(M,e)},()=>t.forEach(a=>a())]}function $n(e,t){let r=()=>{},n=Pe[t.type]||r,[i,o]=_t(e);Oe(e,t.original,o);let s=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),xt?fe.get(cr).push(n):n())};return s.runCleanups=o,s}var Ie=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),ke=e=>e;function ur(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=fr.reduce((o,s)=>s(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var fr=[];function re(e){fr.push(e)}function dr({name:e}){return pr().test(e)}var pr=()=>new RegExp(`^${bt}([^:^.]+)\\b`);function jn(e,t){return({name:r,value:n})=>{let i=r.match(pr()),o=r.match(/:([a-zA-Z0-9\-_:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map(c=>c.replace(".","")),expression:n,original:a}}}var yt="DEFAULT",W=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",yt,"teleport"];function Fn(e,t){let r=W.indexOf(e.type)===-1?yt:e.type,n=W.indexOf(t.type)===-1?yt:t.type;return W.indexOf(r)-W.indexOf(n)}function G(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}function T(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>T(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)T(n,t,!1),n=n.nextElementSibling}function E(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var mr=!1;function _r(){mr&&E("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),mr=!0,document.body||E("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `