Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@algolia/client-analytics

Package Overview
Dependencies
Maintainers
3
Versions
234
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algolia/client-analytics - npm Package Compare versions

Comparing version 5.10.0 to 5.10.1

2

dist/builds/browser.js

@@ -15,3 +15,3 @@ // builds/browser.ts

import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
var apiClientVersion = "5.10.0";
var apiClientVersion = "5.10.1";
var REGIONS = ["de", "us"];

@@ -18,0 +18,0 @@ function getDefaultHosts(region) {

@@ -1,2 +0,2 @@

function U(){function o(t){return new Promise(d=>{let u=new XMLHttpRequest;u.open(t.method,t.url,!0),Object.keys(t.headers).forEach(l=>u.setRequestHeader(l,t.headers[l]));let h=(l,e)=>setTimeout(()=>{u.abort(),d({status:0,content:e,isTimedOut:!0})},l),R=h(t.connectTimeout,"Connection timeout"),T;u.onreadystatechange=()=>{u.readyState>u.OPENED&&T===void 0&&(clearTimeout(R),T=h(t.responseTimeout,"Socket timeout"))},u.onerror=()=>{u.status===0&&(clearTimeout(R),clearTimeout(T),d({content:u.responseText||"Network request failed",status:u.status,isTimedOut:!1}))},u.onload=()=>{clearTimeout(R),clearTimeout(T),d({content:u.responseText,status:u.status,isTimedOut:!1})},u.send(t.data)})}return{send:o}}function L(o){let t,d=`algolia-client-js-${o.key}`;function u(){return t===void 0&&(t=o.localStorage||window.localStorage),t}function h(){return JSON.parse(u().getItem(d)||"{}")}function R(l){u().setItem(d,JSON.stringify(l))}function T(){let l=o.timeToLive?o.timeToLive*1e3:null,e=h(),s=Object.fromEntries(Object.entries(e).filter(([,i])=>i.timestamp!==void 0));if(R(s),!l)return;let n=Object.fromEntries(Object.entries(s).filter(([,i])=>{let f=new Date().getTime();return!(i.timestamp+l<f)}));R(n)}return{get(l,e,s={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(T(),h()[JSON.stringify(l)])).then(n=>Promise.all([n?n.value:e(),n!==void 0])).then(([n,i])=>Promise.all([n,i||s.miss(n)])).then(([n])=>n)},set(l,e){return Promise.resolve().then(()=>{let s=h();return s[JSON.stringify(l)]={timestamp:new Date().getTime(),value:e},u().setItem(d,JSON.stringify(s)),e})},delete(l){return Promise.resolve().then(()=>{let e=h();delete e[JSON.stringify(l)],u().setItem(d,JSON.stringify(e))})},clear(){return Promise.resolve().then(()=>{u().removeItem(d)})}}}function ee(){return{get(o,t,d={miss:()=>Promise.resolve()}){return t().then(h=>Promise.all([h,d.miss(h)])).then(([h])=>h)},set(o,t){return Promise.resolve(t)},delete(o){return Promise.resolve()},clear(){return Promise.resolve()}}}function w(o){let t=[...o.caches],d=t.shift();return d===void 0?ee():{get(u,h,R={miss:()=>Promise.resolve()}){return d.get(u,h,R).catch(()=>w({caches:t}).get(u,h,R))},set(u,h){return d.set(u,h).catch(()=>w({caches:t}).set(u,h))},delete(u){return d.delete(u).catch(()=>w({caches:t}).delete(u))},clear(){return d.clear().catch(()=>w({caches:t}).clear())}}}function v(o={serializable:!0}){let t={};return{get(d,u,h={miss:()=>Promise.resolve()}){let R=JSON.stringify(d);if(R in t)return Promise.resolve(o.serializable?JSON.parse(t[R]):t[R]);let T=u();return T.then(l=>h.miss(l)).then(()=>T)},set(d,u){return t[JSON.stringify(d)]=o.serializable?JSON.stringify(u):u,Promise.resolve(u)},delete(d){return delete t[JSON.stringify(d)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}var W=1e3,$=2e3,j=3e4;function te(o){let t={value:`Algolia for JavaScript (${o})`,add(d){let u=`; ${d.segment}${d.version!==void 0?` (${d.version})`:""}`;return t.value.indexOf(u)===-1&&(t.value=`${t.value}${u}`),t}};return t}function J(o,t,d="WithinHeaders"){let u={"x-algolia-api-key":t,"x-algolia-application-id":o};return{headers(){return d==="WithinHeaders"?u:{}},queryParameters(){return d==="WithinQueryParameters"?u:{}}}}function M({algoliaAgents:o,client:t,version:d}){let u=te(d).add({segment:t,version:d});return o.forEach(h=>u.add(h)),u}function z(){return{debug(o,t){return Promise.resolve()},info(o,t){return Promise.resolve()},error(o,t){return Promise.resolve()}}}var Q=2*60*1e3;function I(o,t="up"){let d=Date.now();function u(){return t==="up"||Date.now()-d>Q}function h(){return t==="timed out"&&Date.now()-d<=Q}return{...o,status:t,lastUpdate:d,isUp:u,isTimedOut:h}}var B=class extends Error{name="AlgoliaError";constructor(o,t){super(o),t&&(this.name=t)}},X=class extends B{stackTrace;constructor(o,t,d){super(o,d),this.stackTrace=t}},re=class extends X{constructor(o){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",o,"RetryError")}},k=class extends X{status;constructor(o,t,d,u="ApiError"){super(o,d,u),this.status=t}},oe=class extends B{response;constructor(o,t){super(o,"DeserializationError"),this.response=t}},se=class extends k{error;constructor(o,t,d,u){super(o,t,u,"DetailedApiError"),this.error=d}};function ne(o,t,d){let u=ie(d),h=`${o.protocol}://${o.url}${o.port?`:${o.port}`:""}/${t.charAt(0)==="/"?t.substring(1):t}`;return u.length&&(h+=`?${u}`),h}function ie(o){return Object.keys(o).filter(t=>o[t]!==void 0).sort().map(t=>`${t}=${encodeURIComponent(Object.prototype.toString.call(o[t])==="[object Array]"?o[t].join(","):o[t]).replace(/\+/g,"%20")}`).join("&")}function ae(o,t){if(o.method==="GET"||o.data===void 0&&t.data===void 0)return;let d=Array.isArray(o.data)?o.data:{...o.data,...t.data};return JSON.stringify(d)}function ue(o,t,d){let u={Accept:"application/json",...o,...t,...d},h={};return Object.keys(u).forEach(R=>{let T=u[R];h[R.toLowerCase()]=T}),h}function ce(o){try{return JSON.parse(o.content)}catch(t){throw new oe(t.message,o)}}function de({content:o,status:t},d){try{let u=JSON.parse(o);return"error"in u?new se(u.message,t,u.error,d):new k(u.message,t,d)}catch{}return new k(o,t,d)}function fe({isTimedOut:o,status:t}){return!o&&~~t===0}function le({isTimedOut:o,status:t}){return o||fe({isTimedOut:o,status:t})||~~(t/100)!==2&&~~(t/100)!==4}function me({status:o}){return~~(o/100)===2}function pe(o){return o.map(t=>K(t))}function K(o){let t=o.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...o,request:{...o.request,headers:{...o.request.headers,...t}}}}function V({hosts:o,hostsCache:t,baseHeaders:d,logger:u,baseQueryParameters:h,algoliaAgent:R,timeouts:T,requester:l,requestsCache:e,responsesCache:s}){async function n(a){let c=await Promise.all(a.map(P=>t.get(P,()=>Promise.resolve(I(P))))),r=c.filter(P=>P.isUp()),m=c.filter(P=>P.isTimedOut()),p=[...r,...m];return{hosts:p.length>0?p:a,getTimeout(P,S){return(m.length===0&&P===0?1:m.length+3+P)*S}}}async function i(a,c,r=!0){let m=[],p=ae(a,c),g=ue(d,a.headers,c.headers),P=a.method==="GET"?{...a.data,...c.data}:{},S={...h,...a.queryParameters,...P};if(R.value&&(S["x-algolia-agent"]=R.value),c&&c.queryParameters)for(let y of Object.keys(c.queryParameters))!c.queryParameters[y]||Object.prototype.toString.call(c.queryParameters[y])==="[object Object]"?S[y]=c.queryParameters[y]:S[y]=c.queryParameters[y].toString();let q=0,G=async(y,A)=>{let C=y.pop();if(C===void 0)throw new re(pe(m));let O={...T,...c.timeouts},F={data:p,headers:g,method:a.method,url:ne(C,a.path,S),connectTimeout:A(q,O.connect),responseTimeout:A(q,r?O.read:O.write)},_=N=>{let D={request:F,response:N,host:C,triesLeft:y.length};return m.push(D),D},E=await l.send(F);if(le(E)){let N=_(E);return E.isTimedOut&&q++,u.info("Retryable failure",K(N)),await t.set(C,I(C,E.isTimedOut?"timed out":"down")),G(y,A)}if(me(E))return ce(E);throw _(E),de(E,m)},Z=o.filter(y=>y.accept==="readWrite"||(r?y.accept==="read":y.accept==="write")),H=await n(Z);return G([...H.hosts].reverse(),H.getTimeout)}function f(a,c={}){let r=a.useReadTransporter||a.method==="GET";if(!r)return i(a,c,r);let m=()=>i(a,c);if((c.cacheable||a.cacheable)!==!0)return m();let g={request:a,requestOptions:c,transporter:{queryParameters:h,headers:d}};return s.get(g,()=>e.get(g,()=>e.set(g,m()).then(P=>Promise.all([e.delete(g),P]),P=>Promise.all([e.delete(g),Promise.reject(P)])).then(([P,S])=>S)),{miss:P=>s.set(g,P)})}return{hostsCache:t,requester:l,timeouts:T,logger:u,algoliaAgent:R,baseHeaders:d,baseQueryParameters:h,hosts:o,request:f,requestsCache:e,responsesCache:s}}var x="5.10.0",b=["de","us"];function ge(o){return[{url:o?"analytics.{region}.algolia.com".replace("{region}",o):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function Y({appId:o,apiKey:t,authMode:d,algoliaAgents:u,region:h,...R}){let T=J(o,t,d),l=V({hosts:ge(h),...R,algoliaAgent:M({algoliaAgents:u,client:"Analytics",version:x}),baseHeaders:{"content-type":"text/plain",...T.headers(),...R.baseHeaders},baseQueryParameters:{...T.queryParameters(),...R.baseQueryParameters}});return{transporter:l,appId:o,clearCache(){return Promise.all([l.requestsCache.clear(),l.responsesCache.clear()]).then(()=>{})},get _ua(){return l.algoliaAgent.value},addAlgoliaAgent(e,s){l.algoliaAgent.add({segment:e,version:s})},setClientApiKey({apiKey:e}){!d||d==="WithinHeaders"?l.baseHeaders["x-algolia-api-key"]=e:l.baseQueryParameters["x-algolia-api-key"]=e},customDelete({path:e,parameters:s},n){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let c={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{}};return l.request(c,n)},customGet({path:e,parameters:s},n){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let c={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{}};return l.request(c,n)},customPost({path:e,parameters:s,body:n},i){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");let r={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{},data:n||{}};return l.request(r,i)},customPut({path:e,parameters:s,body:n},i){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");let r={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{},data:n||{}};return l.request(r,i)},getAddToCartRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");let a="/2/conversions/addToCartRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getAverageClickPosition({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");let a="/2/clicks/averageClickPosition",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getClickPositions({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");let a="/2/clicks/positions",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getClickThroughRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");let a="/2/clicks/clickThroughRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getConversionRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");let a="/2/conversions/conversionRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getNoClickRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");let a="/2/searches/noClickRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getNoResultsRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");let a="/2/searches/noResultRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getPurchaseRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");let a="/2/conversions/purchaseRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getRevenue({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");let a="/2/conversions/revenue",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getSearchesCount({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");let a="/2/searches/count",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getSearchesNoClicks({index:e,startDate:s,endDate:n,limit:i,offset:f,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");let r="/2/searches/noClicks",m={},p={};e!==void 0&&(p.index=e.toString()),s!==void 0&&(p.startDate=s.toString()),n!==void 0&&(p.endDate=n.toString()),i!==void 0&&(p.limit=i.toString()),f!==void 0&&(p.offset=f.toString()),a!==void 0&&(p.tags=a.toString());let g={method:"GET",path:r,queryParameters:p,headers:m};return l.request(g,c)},getSearchesNoResults({index:e,startDate:s,endDate:n,limit:i,offset:f,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");let r="/2/searches/noResults",m={},p={};e!==void 0&&(p.index=e.toString()),s!==void 0&&(p.startDate=s.toString()),n!==void 0&&(p.endDate=n.toString()),i!==void 0&&(p.limit=i.toString()),f!==void 0&&(p.offset=f.toString()),a!==void 0&&(p.tags=a.toString());let g={method:"GET",path:r,queryParameters:p,headers:m};return l.request(g,c)},getStatus({index:e},s){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");let n="/2/status",i={},f={};e!==void 0&&(f.index=e.toString());let a={method:"GET",path:n,queryParameters:f,headers:i};return l.request(a,s)},getTopCountries({index:e,startDate:s,endDate:n,limit:i,offset:f,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");let r="/2/countries",m={},p={};e!==void 0&&(p.index=e.toString()),s!==void 0&&(p.startDate=s.toString()),n!==void 0&&(p.endDate=n.toString()),i!==void 0&&(p.limit=i.toString()),f!==void 0&&(p.offset=f.toString()),a!==void 0&&(p.tags=a.toString());let g={method:"GET",path:r,queryParameters:p,headers:m};return l.request(g,c)},getTopFilterAttributes({index:e,search:s,startDate:n,endDate:i,limit:f,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");let m="/2/filters",p={},g={};e!==void 0&&(g.index=e.toString()),s!==void 0&&(g.search=s.toString()),n!==void 0&&(g.startDate=n.toString()),i!==void 0&&(g.endDate=i.toString()),f!==void 0&&(g.limit=f.toString()),a!==void 0&&(g.offset=a.toString()),c!==void 0&&(g.tags=c.toString());let P={method:"GET",path:m,queryParameters:g,headers:p};return l.request(P,r)},getTopFilterForAttribute({attribute:e,index:s,search:n,startDate:i,endDate:f,limit:a,offset:c,tags:r},m){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!s)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");let p="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),g={},P={};s!==void 0&&(P.index=s.toString()),n!==void 0&&(P.search=n.toString()),i!==void 0&&(P.startDate=i.toString()),f!==void 0&&(P.endDate=f.toString()),a!==void 0&&(P.limit=a.toString()),c!==void 0&&(P.offset=c.toString()),r!==void 0&&(P.tags=r.toString());let S={method:"GET",path:p,queryParameters:P,headers:g};return l.request(S,m)},getTopFiltersNoResults({index:e,search:s,startDate:n,endDate:i,limit:f,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");let m="/2/filters/noResults",p={},g={};e!==void 0&&(g.index=e.toString()),s!==void 0&&(g.search=s.toString()),n!==void 0&&(g.startDate=n.toString()),i!==void 0&&(g.endDate=i.toString()),f!==void 0&&(g.limit=f.toString()),a!==void 0&&(g.offset=a.toString()),c!==void 0&&(g.tags=c.toString());let P={method:"GET",path:m,queryParameters:g,headers:p};return l.request(P,r)},getTopHits({index:e,search:s,clickAnalytics:n,revenueAnalytics:i,startDate:f,endDate:a,limit:c,offset:r,tags:m},p){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");let g="/2/hits",P={},S={};e!==void 0&&(S.index=e.toString()),s!==void 0&&(S.search=s.toString()),n!==void 0&&(S.clickAnalytics=n.toString()),i!==void 0&&(S.revenueAnalytics=i.toString()),f!==void 0&&(S.startDate=f.toString()),a!==void 0&&(S.endDate=a.toString()),c!==void 0&&(S.limit=c.toString()),r!==void 0&&(S.offset=r.toString()),m!==void 0&&(S.tags=m.toString());let q={method:"GET",path:g,queryParameters:S,headers:P};return l.request(q,p)},getTopSearches({index:e,clickAnalytics:s,revenueAnalytics:n,startDate:i,endDate:f,orderBy:a,direction:c,limit:r,offset:m,tags:p},g){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");let P="/2/searches",S={},q={};e!==void 0&&(q.index=e.toString()),s!==void 0&&(q.clickAnalytics=s.toString()),n!==void 0&&(q.revenueAnalytics=n.toString()),i!==void 0&&(q.startDate=i.toString()),f!==void 0&&(q.endDate=f.toString()),a!==void 0&&(q.orderBy=a.toString()),c!==void 0&&(q.direction=c.toString()),r!==void 0&&(q.limit=r.toString()),m!==void 0&&(q.offset=m.toString()),p!==void 0&&(q.tags=p.toString());let G={method:"GET",path:P,queryParameters:q,headers:S};return l.request(G,g)},getUsersCount({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");let a="/2/users/count",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)}}}function Ht(o,t,d,u){if(!o||typeof o!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(d&&(typeof d!="string"||!b.includes(d)))throw new Error(`\`region\` must be one of the following: ${b.join(", ")}`);return Y({appId:o,apiKey:t,region:d,timeouts:{connect:W,read:$,write:j},logger:z(),requester:U(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:v(),requestsCache:v({serializable:!1}),hostsCache:w({caches:[L({key:`${x}-${o}`}),v()]}),...u})}export{Ht as analyticsClient,x as apiClientVersion};
function U(){function o(t){return new Promise(d=>{let u=new XMLHttpRequest;u.open(t.method,t.url,!0),Object.keys(t.headers).forEach(l=>u.setRequestHeader(l,t.headers[l]));let h=(l,e)=>setTimeout(()=>{u.abort(),d({status:0,content:e,isTimedOut:!0})},l),R=h(t.connectTimeout,"Connection timeout"),T;u.onreadystatechange=()=>{u.readyState>u.OPENED&&T===void 0&&(clearTimeout(R),T=h(t.responseTimeout,"Socket timeout"))},u.onerror=()=>{u.status===0&&(clearTimeout(R),clearTimeout(T),d({content:u.responseText||"Network request failed",status:u.status,isTimedOut:!1}))},u.onload=()=>{clearTimeout(R),clearTimeout(T),d({content:u.responseText,status:u.status,isTimedOut:!1})},u.send(t.data)})}return{send:o}}function L(o){let t,d=`algolia-client-js-${o.key}`;function u(){return t===void 0&&(t=o.localStorage||window.localStorage),t}function h(){return JSON.parse(u().getItem(d)||"{}")}function R(l){u().setItem(d,JSON.stringify(l))}function T(){let l=o.timeToLive?o.timeToLive*1e3:null,e=h(),s=Object.fromEntries(Object.entries(e).filter(([,i])=>i.timestamp!==void 0));if(R(s),!l)return;let n=Object.fromEntries(Object.entries(s).filter(([,i])=>{let f=new Date().getTime();return!(i.timestamp+l<f)}));R(n)}return{get(l,e,s={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(T(),h()[JSON.stringify(l)])).then(n=>Promise.all([n?n.value:e(),n!==void 0])).then(([n,i])=>Promise.all([n,i||s.miss(n)])).then(([n])=>n)},set(l,e){return Promise.resolve().then(()=>{let s=h();return s[JSON.stringify(l)]={timestamp:new Date().getTime(),value:e},u().setItem(d,JSON.stringify(s)),e})},delete(l){return Promise.resolve().then(()=>{let e=h();delete e[JSON.stringify(l)],u().setItem(d,JSON.stringify(e))})},clear(){return Promise.resolve().then(()=>{u().removeItem(d)})}}}function ee(){return{get(o,t,d={miss:()=>Promise.resolve()}){return t().then(h=>Promise.all([h,d.miss(h)])).then(([h])=>h)},set(o,t){return Promise.resolve(t)},delete(o){return Promise.resolve()},clear(){return Promise.resolve()}}}function w(o){let t=[...o.caches],d=t.shift();return d===void 0?ee():{get(u,h,R={miss:()=>Promise.resolve()}){return d.get(u,h,R).catch(()=>w({caches:t}).get(u,h,R))},set(u,h){return d.set(u,h).catch(()=>w({caches:t}).set(u,h))},delete(u){return d.delete(u).catch(()=>w({caches:t}).delete(u))},clear(){return d.clear().catch(()=>w({caches:t}).clear())}}}function v(o={serializable:!0}){let t={};return{get(d,u,h={miss:()=>Promise.resolve()}){let R=JSON.stringify(d);if(R in t)return Promise.resolve(o.serializable?JSON.parse(t[R]):t[R]);let T=u();return T.then(l=>h.miss(l)).then(()=>T)},set(d,u){return t[JSON.stringify(d)]=o.serializable?JSON.stringify(u):u,Promise.resolve(u)},delete(d){return delete t[JSON.stringify(d)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}var W=1e3,$=2e3,j=3e4;function te(o){let t={value:`Algolia for JavaScript (${o})`,add(d){let u=`; ${d.segment}${d.version!==void 0?` (${d.version})`:""}`;return t.value.indexOf(u)===-1&&(t.value=`${t.value}${u}`),t}};return t}function J(o,t,d="WithinHeaders"){let u={"x-algolia-api-key":t,"x-algolia-application-id":o};return{headers(){return d==="WithinHeaders"?u:{}},queryParameters(){return d==="WithinQueryParameters"?u:{}}}}function M({algoliaAgents:o,client:t,version:d}){let u=te(d).add({segment:t,version:d});return o.forEach(h=>u.add(h)),u}function z(){return{debug(o,t){return Promise.resolve()},info(o,t){return Promise.resolve()},error(o,t){return Promise.resolve()}}}var Q=2*60*1e3;function I(o,t="up"){let d=Date.now();function u(){return t==="up"||Date.now()-d>Q}function h(){return t==="timed out"&&Date.now()-d<=Q}return{...o,status:t,lastUpdate:d,isUp:u,isTimedOut:h}}var B=class extends Error{name="AlgoliaError";constructor(o,t){super(o),t&&(this.name=t)}},X=class extends B{stackTrace;constructor(o,t,d){super(o,d),this.stackTrace=t}},re=class extends X{constructor(o){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",o,"RetryError")}},k=class extends X{status;constructor(o,t,d,u="ApiError"){super(o,d,u),this.status=t}},oe=class extends B{response;constructor(o,t){super(o,"DeserializationError"),this.response=t}},se=class extends k{error;constructor(o,t,d,u){super(o,t,u,"DetailedApiError"),this.error=d}};function ne(o,t,d){let u=ie(d),h=`${o.protocol}://${o.url}${o.port?`:${o.port}`:""}/${t.charAt(0)==="/"?t.substring(1):t}`;return u.length&&(h+=`?${u}`),h}function ie(o){return Object.keys(o).filter(t=>o[t]!==void 0).sort().map(t=>`${t}=${encodeURIComponent(Object.prototype.toString.call(o[t])==="[object Array]"?o[t].join(","):o[t]).replace(/\+/g,"%20")}`).join("&")}function ae(o,t){if(o.method==="GET"||o.data===void 0&&t.data===void 0)return;let d=Array.isArray(o.data)?o.data:{...o.data,...t.data};return JSON.stringify(d)}function ue(o,t,d){let u={Accept:"application/json",...o,...t,...d},h={};return Object.keys(u).forEach(R=>{let T=u[R];h[R.toLowerCase()]=T}),h}function ce(o){try{return JSON.parse(o.content)}catch(t){throw new oe(t.message,o)}}function de({content:o,status:t},d){try{let u=JSON.parse(o);return"error"in u?new se(u.message,t,u.error,d):new k(u.message,t,d)}catch{}return new k(o,t,d)}function fe({isTimedOut:o,status:t}){return!o&&~~t===0}function le({isTimedOut:o,status:t}){return o||fe({isTimedOut:o,status:t})||~~(t/100)!==2&&~~(t/100)!==4}function me({status:o}){return~~(o/100)===2}function pe(o){return o.map(t=>K(t))}function K(o){let t=o.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...o,request:{...o.request,headers:{...o.request.headers,...t}}}}function V({hosts:o,hostsCache:t,baseHeaders:d,logger:u,baseQueryParameters:h,algoliaAgent:R,timeouts:T,requester:l,requestsCache:e,responsesCache:s}){async function n(a){let c=await Promise.all(a.map(P=>t.get(P,()=>Promise.resolve(I(P))))),r=c.filter(P=>P.isUp()),m=c.filter(P=>P.isTimedOut()),p=[...r,...m];return{hosts:p.length>0?p:a,getTimeout(P,S){return(m.length===0&&P===0?1:m.length+3+P)*S}}}async function i(a,c,r=!0){let m=[],p=ae(a,c),g=ue(d,a.headers,c.headers),P=a.method==="GET"?{...a.data,...c.data}:{},S={...h,...a.queryParameters,...P};if(R.value&&(S["x-algolia-agent"]=R.value),c&&c.queryParameters)for(let y of Object.keys(c.queryParameters))!c.queryParameters[y]||Object.prototype.toString.call(c.queryParameters[y])==="[object Object]"?S[y]=c.queryParameters[y]:S[y]=c.queryParameters[y].toString();let q=0,G=async(y,A)=>{let C=y.pop();if(C===void 0)throw new re(pe(m));let O={...T,...c.timeouts},F={data:p,headers:g,method:a.method,url:ne(C,a.path,S),connectTimeout:A(q,O.connect),responseTimeout:A(q,r?O.read:O.write)},_=N=>{let D={request:F,response:N,host:C,triesLeft:y.length};return m.push(D),D},E=await l.send(F);if(le(E)){let N=_(E);return E.isTimedOut&&q++,u.info("Retryable failure",K(N)),await t.set(C,I(C,E.isTimedOut?"timed out":"down")),G(y,A)}if(me(E))return ce(E);throw _(E),de(E,m)},Z=o.filter(y=>y.accept==="readWrite"||(r?y.accept==="read":y.accept==="write")),H=await n(Z);return G([...H.hosts].reverse(),H.getTimeout)}function f(a,c={}){let r=a.useReadTransporter||a.method==="GET";if(!r)return i(a,c,r);let m=()=>i(a,c);if((c.cacheable||a.cacheable)!==!0)return m();let g={request:a,requestOptions:c,transporter:{queryParameters:h,headers:d}};return s.get(g,()=>e.get(g,()=>e.set(g,m()).then(P=>Promise.all([e.delete(g),P]),P=>Promise.all([e.delete(g),Promise.reject(P)])).then(([P,S])=>S)),{miss:P=>s.set(g,P)})}return{hostsCache:t,requester:l,timeouts:T,logger:u,algoliaAgent:R,baseHeaders:d,baseQueryParameters:h,hosts:o,request:f,requestsCache:e,responsesCache:s}}var x="5.10.1",b=["de","us"];function ge(o){return[{url:o?"analytics.{region}.algolia.com".replace("{region}",o):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function Y({appId:o,apiKey:t,authMode:d,algoliaAgents:u,region:h,...R}){let T=J(o,t,d),l=V({hosts:ge(h),...R,algoliaAgent:M({algoliaAgents:u,client:"Analytics",version:x}),baseHeaders:{"content-type":"text/plain",...T.headers(),...R.baseHeaders},baseQueryParameters:{...T.queryParameters(),...R.baseQueryParameters}});return{transporter:l,appId:o,clearCache(){return Promise.all([l.requestsCache.clear(),l.responsesCache.clear()]).then(()=>{})},get _ua(){return l.algoliaAgent.value},addAlgoliaAgent(e,s){l.algoliaAgent.add({segment:e,version:s})},setClientApiKey({apiKey:e}){!d||d==="WithinHeaders"?l.baseHeaders["x-algolia-api-key"]=e:l.baseQueryParameters["x-algolia-api-key"]=e},customDelete({path:e,parameters:s},n){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let c={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{}};return l.request(c,n)},customGet({path:e,parameters:s},n){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let c={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{}};return l.request(c,n)},customPost({path:e,parameters:s,body:n},i){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");let r={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{},data:n||{}};return l.request(r,i)},customPut({path:e,parameters:s,body:n},i){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");let r={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{},data:n||{}};return l.request(r,i)},getAddToCartRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");let a="/2/conversions/addToCartRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getAverageClickPosition({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");let a="/2/clicks/averageClickPosition",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getClickPositions({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");let a="/2/clicks/positions",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getClickThroughRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");let a="/2/clicks/clickThroughRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getConversionRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");let a="/2/conversions/conversionRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getNoClickRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");let a="/2/searches/noClickRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getNoResultsRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");let a="/2/searches/noResultRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getPurchaseRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");let a="/2/conversions/purchaseRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getRevenue({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");let a="/2/conversions/revenue",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getSearchesCount({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");let a="/2/searches/count",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getSearchesNoClicks({index:e,startDate:s,endDate:n,limit:i,offset:f,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");let r="/2/searches/noClicks",m={},p={};e!==void 0&&(p.index=e.toString()),s!==void 0&&(p.startDate=s.toString()),n!==void 0&&(p.endDate=n.toString()),i!==void 0&&(p.limit=i.toString()),f!==void 0&&(p.offset=f.toString()),a!==void 0&&(p.tags=a.toString());let g={method:"GET",path:r,queryParameters:p,headers:m};return l.request(g,c)},getSearchesNoResults({index:e,startDate:s,endDate:n,limit:i,offset:f,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");let r="/2/searches/noResults",m={},p={};e!==void 0&&(p.index=e.toString()),s!==void 0&&(p.startDate=s.toString()),n!==void 0&&(p.endDate=n.toString()),i!==void 0&&(p.limit=i.toString()),f!==void 0&&(p.offset=f.toString()),a!==void 0&&(p.tags=a.toString());let g={method:"GET",path:r,queryParameters:p,headers:m};return l.request(g,c)},getStatus({index:e},s){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");let n="/2/status",i={},f={};e!==void 0&&(f.index=e.toString());let a={method:"GET",path:n,queryParameters:f,headers:i};return l.request(a,s)},getTopCountries({index:e,startDate:s,endDate:n,limit:i,offset:f,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");let r="/2/countries",m={},p={};e!==void 0&&(p.index=e.toString()),s!==void 0&&(p.startDate=s.toString()),n!==void 0&&(p.endDate=n.toString()),i!==void 0&&(p.limit=i.toString()),f!==void 0&&(p.offset=f.toString()),a!==void 0&&(p.tags=a.toString());let g={method:"GET",path:r,queryParameters:p,headers:m};return l.request(g,c)},getTopFilterAttributes({index:e,search:s,startDate:n,endDate:i,limit:f,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");let m="/2/filters",p={},g={};e!==void 0&&(g.index=e.toString()),s!==void 0&&(g.search=s.toString()),n!==void 0&&(g.startDate=n.toString()),i!==void 0&&(g.endDate=i.toString()),f!==void 0&&(g.limit=f.toString()),a!==void 0&&(g.offset=a.toString()),c!==void 0&&(g.tags=c.toString());let P={method:"GET",path:m,queryParameters:g,headers:p};return l.request(P,r)},getTopFilterForAttribute({attribute:e,index:s,search:n,startDate:i,endDate:f,limit:a,offset:c,tags:r},m){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!s)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");let p="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),g={},P={};s!==void 0&&(P.index=s.toString()),n!==void 0&&(P.search=n.toString()),i!==void 0&&(P.startDate=i.toString()),f!==void 0&&(P.endDate=f.toString()),a!==void 0&&(P.limit=a.toString()),c!==void 0&&(P.offset=c.toString()),r!==void 0&&(P.tags=r.toString());let S={method:"GET",path:p,queryParameters:P,headers:g};return l.request(S,m)},getTopFiltersNoResults({index:e,search:s,startDate:n,endDate:i,limit:f,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");let m="/2/filters/noResults",p={},g={};e!==void 0&&(g.index=e.toString()),s!==void 0&&(g.search=s.toString()),n!==void 0&&(g.startDate=n.toString()),i!==void 0&&(g.endDate=i.toString()),f!==void 0&&(g.limit=f.toString()),a!==void 0&&(g.offset=a.toString()),c!==void 0&&(g.tags=c.toString());let P={method:"GET",path:m,queryParameters:g,headers:p};return l.request(P,r)},getTopHits({index:e,search:s,clickAnalytics:n,revenueAnalytics:i,startDate:f,endDate:a,limit:c,offset:r,tags:m},p){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");let g="/2/hits",P={},S={};e!==void 0&&(S.index=e.toString()),s!==void 0&&(S.search=s.toString()),n!==void 0&&(S.clickAnalytics=n.toString()),i!==void 0&&(S.revenueAnalytics=i.toString()),f!==void 0&&(S.startDate=f.toString()),a!==void 0&&(S.endDate=a.toString()),c!==void 0&&(S.limit=c.toString()),r!==void 0&&(S.offset=r.toString()),m!==void 0&&(S.tags=m.toString());let q={method:"GET",path:g,queryParameters:S,headers:P};return l.request(q,p)},getTopSearches({index:e,clickAnalytics:s,revenueAnalytics:n,startDate:i,endDate:f,orderBy:a,direction:c,limit:r,offset:m,tags:p},g){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");let P="/2/searches",S={},q={};e!==void 0&&(q.index=e.toString()),s!==void 0&&(q.clickAnalytics=s.toString()),n!==void 0&&(q.revenueAnalytics=n.toString()),i!==void 0&&(q.startDate=i.toString()),f!==void 0&&(q.endDate=f.toString()),a!==void 0&&(q.orderBy=a.toString()),c!==void 0&&(q.direction=c.toString()),r!==void 0&&(q.limit=r.toString()),m!==void 0&&(q.offset=m.toString()),p!==void 0&&(q.tags=p.toString());let G={method:"GET",path:P,queryParameters:q,headers:S};return l.request(G,g)},getUsersCount({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");let a="/2/users/count",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)}}}function Ht(o,t,d,u){if(!o||typeof o!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(d&&(typeof d!="string"||!b.includes(d)))throw new Error(`\`region\` must be one of the following: ${b.join(", ")}`);return Y({appId:o,apiKey:t,region:d,timeouts:{connect:W,read:$,write:j},logger:z(),requester:U(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:v(),requestsCache:v({serializable:!1}),hostsCache:w({caches:[L({key:`${x}-${o}`}),v()]}),...u})}export{Ht as analyticsClient,x as apiClientVersion};
//# sourceMappingURL=browser.min.js.map

@@ -7,3 +7,3 @@ (function (global, factory) {

function U(){function o(t){return new Promise(d=>{let u=new XMLHttpRequest;u.open(t.method,t.url,!0),Object.keys(t.headers).forEach(l=>u.setRequestHeader(l,t.headers[l]));let h=(l,e)=>setTimeout(()=>{u.abort(),d({status:0,content:e,isTimedOut:!0});},l),R=h(t.connectTimeout,"Connection timeout"),T;u.onreadystatechange=()=>{u.readyState>u.OPENED&&T===void 0&&(clearTimeout(R),T=h(t.responseTimeout,"Socket timeout"));},u.onerror=()=>{u.status===0&&(clearTimeout(R),clearTimeout(T),d({content:u.responseText||"Network request failed",status:u.status,isTimedOut:!1}));},u.onload=()=>{clearTimeout(R),clearTimeout(T),d({content:u.responseText,status:u.status,isTimedOut:!1});},u.send(t.data);})}return {send:o}}function L(o){let t,d=`algolia-client-js-${o.key}`;function u(){return t===void 0&&(t=o.localStorage||window.localStorage),t}function h(){return JSON.parse(u().getItem(d)||"{}")}function R(l){u().setItem(d,JSON.stringify(l));}function T(){let l=o.timeToLive?o.timeToLive*1e3:null,e=h(),s=Object.fromEntries(Object.entries(e).filter(([,i])=>i.timestamp!==void 0));if(R(s),!l)return;let n=Object.fromEntries(Object.entries(s).filter(([,i])=>{let f=new Date().getTime();return !(i.timestamp+l<f)}));R(n);}return {get(l,e,s={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(T(),h()[JSON.stringify(l)])).then(n=>Promise.all([n?n.value:e(),n!==void 0])).then(([n,i])=>Promise.all([n,i||s.miss(n)])).then(([n])=>n)},set(l,e){return Promise.resolve().then(()=>{let s=h();return s[JSON.stringify(l)]={timestamp:new Date().getTime(),value:e},u().setItem(d,JSON.stringify(s)),e})},delete(l){return Promise.resolve().then(()=>{let e=h();delete e[JSON.stringify(l)],u().setItem(d,JSON.stringify(e));})},clear(){return Promise.resolve().then(()=>{u().removeItem(d);})}}}function ee(){return {get(o,t,d={miss:()=>Promise.resolve()}){return t().then(h=>Promise.all([h,d.miss(h)])).then(([h])=>h)},set(o,t){return Promise.resolve(t)},delete(o){return Promise.resolve()},clear(){return Promise.resolve()}}}function w(o){let t=[...o.caches],d=t.shift();return d===void 0?ee():{get(u,h,R={miss:()=>Promise.resolve()}){return d.get(u,h,R).catch(()=>w({caches:t}).get(u,h,R))},set(u,h){return d.set(u,h).catch(()=>w({caches:t}).set(u,h))},delete(u){return d.delete(u).catch(()=>w({caches:t}).delete(u))},clear(){return d.clear().catch(()=>w({caches:t}).clear())}}}function v(o={serializable:!0}){let t={};return {get(d,u,h={miss:()=>Promise.resolve()}){let R=JSON.stringify(d);if(R in t)return Promise.resolve(o.serializable?JSON.parse(t[R]):t[R]);let T=u();return T.then(l=>h.miss(l)).then(()=>T)},set(d,u){return t[JSON.stringify(d)]=o.serializable?JSON.stringify(u):u,Promise.resolve(u)},delete(d){return delete t[JSON.stringify(d)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}var W=1e3,$=2e3,j=3e4;function te(o){let t={value:`Algolia for JavaScript (${o})`,add(d){let u=`; ${d.segment}${d.version!==void 0?` (${d.version})`:""}`;return t.value.indexOf(u)===-1&&(t.value=`${t.value}${u}`),t}};return t}function J(o,t,d="WithinHeaders"){let u={"x-algolia-api-key":t,"x-algolia-application-id":o};return {headers(){return d==="WithinHeaders"?u:{}},queryParameters(){return d==="WithinQueryParameters"?u:{}}}}function M({algoliaAgents:o,client:t,version:d}){let u=te(d).add({segment:t,version:d});return o.forEach(h=>u.add(h)),u}function z(){return {debug(o,t){return Promise.resolve()},info(o,t){return Promise.resolve()},error(o,t){return Promise.resolve()}}}var Q=2*60*1e3;function I(o,t="up"){let d=Date.now();function u(){return t==="up"||Date.now()-d>Q}function h(){return t==="timed out"&&Date.now()-d<=Q}return {...o,status:t,lastUpdate:d,isUp:u,isTimedOut:h}}var B=class extends Error{name="AlgoliaError";constructor(o,t){super(o),t&&(this.name=t);}},X=class extends B{stackTrace;constructor(o,t,d){super(o,d),this.stackTrace=t;}},re=class extends X{constructor(o){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",o,"RetryError");}},k=class extends X{status;constructor(o,t,d,u="ApiError"){super(o,d,u),this.status=t;}},oe=class extends B{response;constructor(o,t){super(o,"DeserializationError"),this.response=t;}},se=class extends k{error;constructor(o,t,d,u){super(o,t,u,"DetailedApiError"),this.error=d;}};function ne(o,t,d){let u=ie(d),h=`${o.protocol}://${o.url}${o.port?`:${o.port}`:""}/${t.charAt(0)==="/"?t.substring(1):t}`;return u.length&&(h+=`?${u}`),h}function ie(o){return Object.keys(o).filter(t=>o[t]!==void 0).sort().map(t=>`${t}=${encodeURIComponent(Object.prototype.toString.call(o[t])==="[object Array]"?o[t].join(","):o[t]).replace(/\+/g,"%20")}`).join("&")}function ae(o,t){if(o.method==="GET"||o.data===void 0&&t.data===void 0)return;let d=Array.isArray(o.data)?o.data:{...o.data,...t.data};return JSON.stringify(d)}function ue(o,t,d){let u={Accept:"application/json",...o,...t,...d},h={};return Object.keys(u).forEach(R=>{let T=u[R];h[R.toLowerCase()]=T;}),h}function ce(o){try{return JSON.parse(o.content)}catch(t){throw new oe(t.message,o)}}function de({content:o,status:t},d){try{let u=JSON.parse(o);return "error"in u?new se(u.message,t,u.error,d):new k(u.message,t,d)}catch{}return new k(o,t,d)}function fe({isTimedOut:o,status:t}){return !o&&~~t===0}function le({isTimedOut:o,status:t}){return o||fe({isTimedOut:o,status:t})||~~(t/100)!==2&&~~(t/100)!==4}function me({status:o}){return ~~(o/100)===2}function pe(o){return o.map(t=>K(t))}function K(o){let t=o.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...o,request:{...o.request,headers:{...o.request.headers,...t}}}}function V({hosts:o,hostsCache:t,baseHeaders:d,logger:u,baseQueryParameters:h,algoliaAgent:R,timeouts:T,requester:l,requestsCache:e,responsesCache:s}){async function n(a){let c=await Promise.all(a.map(P=>t.get(P,()=>Promise.resolve(I(P))))),r=c.filter(P=>P.isUp()),m=c.filter(P=>P.isTimedOut()),p=[...r,...m];return {hosts:p.length>0?p:a,getTimeout(P,S){return (m.length===0&&P===0?1:m.length+3+P)*S}}}async function i(a,c,r=!0){let m=[],p=ae(a,c),g=ue(d,a.headers,c.headers),P=a.method==="GET"?{...a.data,...c.data}:{},S={...h,...a.queryParameters,...P};if(R.value&&(S["x-algolia-agent"]=R.value),c&&c.queryParameters)for(let y of Object.keys(c.queryParameters))!c.queryParameters[y]||Object.prototype.toString.call(c.queryParameters[y])==="[object Object]"?S[y]=c.queryParameters[y]:S[y]=c.queryParameters[y].toString();let q=0,G=async(y,A)=>{let C=y.pop();if(C===void 0)throw new re(pe(m));let O={...T,...c.timeouts},F={data:p,headers:g,method:a.method,url:ne(C,a.path,S),connectTimeout:A(q,O.connect),responseTimeout:A(q,r?O.read:O.write)},_=N=>{let D={request:F,response:N,host:C,triesLeft:y.length};return m.push(D),D},E=await l.send(F);if(le(E)){let N=_(E);return E.isTimedOut&&q++,u.info("Retryable failure",K(N)),await t.set(C,I(C,E.isTimedOut?"timed out":"down")),G(y,A)}if(me(E))return ce(E);throw _(E),de(E,m)},Z=o.filter(y=>y.accept==="readWrite"||(r?y.accept==="read":y.accept==="write")),H=await n(Z);return G([...H.hosts].reverse(),H.getTimeout)}function f(a,c={}){let r=a.useReadTransporter||a.method==="GET";if(!r)return i(a,c,r);let m=()=>i(a,c);if((c.cacheable||a.cacheable)!==!0)return m();let g={request:a,requestOptions:c,transporter:{queryParameters:h,headers:d}};return s.get(g,()=>e.get(g,()=>e.set(g,m()).then(P=>Promise.all([e.delete(g),P]),P=>Promise.all([e.delete(g),Promise.reject(P)])).then(([P,S])=>S)),{miss:P=>s.set(g,P)})}return {hostsCache:t,requester:l,timeouts:T,logger:u,algoliaAgent:R,baseHeaders:d,baseQueryParameters:h,hosts:o,request:f,requestsCache:e,responsesCache:s}}var x="5.10.0",b=["de","us"];function ge(o){return [{url:o?"analytics.{region}.algolia.com".replace("{region}",o):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function Y({appId:o,apiKey:t,authMode:d,algoliaAgents:u,region:h,...R}){let T=J(o,t,d),l=V({hosts:ge(h),...R,algoliaAgent:M({algoliaAgents:u,client:"Analytics",version:x}),baseHeaders:{"content-type":"text/plain",...T.headers(),...R.baseHeaders},baseQueryParameters:{...T.queryParameters(),...R.baseQueryParameters}});return {transporter:l,appId:o,clearCache(){return Promise.all([l.requestsCache.clear(),l.responsesCache.clear()]).then(()=>{})},get _ua(){return l.algoliaAgent.value},addAlgoliaAgent(e,s){l.algoliaAgent.add({segment:e,version:s});},setClientApiKey({apiKey:e}){!d||d==="WithinHeaders"?l.baseHeaders["x-algolia-api-key"]=e:l.baseQueryParameters["x-algolia-api-key"]=e;},customDelete({path:e,parameters:s},n){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let c={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{}};return l.request(c,n)},customGet({path:e,parameters:s},n){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let c={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{}};return l.request(c,n)},customPost({path:e,parameters:s,body:n},i){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");let r={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{},data:n||{}};return l.request(r,i)},customPut({path:e,parameters:s,body:n},i){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");let r={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{},data:n||{}};return l.request(r,i)},getAddToCartRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");let a="/2/conversions/addToCartRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getAverageClickPosition({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");let a="/2/clicks/averageClickPosition",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getClickPositions({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");let a="/2/clicks/positions",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getClickThroughRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");let a="/2/clicks/clickThroughRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getConversionRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");let a="/2/conversions/conversionRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getNoClickRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");let a="/2/searches/noClickRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getNoResultsRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");let a="/2/searches/noResultRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getPurchaseRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");let a="/2/conversions/purchaseRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getRevenue({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");let a="/2/conversions/revenue",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getSearchesCount({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");let a="/2/searches/count",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getSearchesNoClicks({index:e,startDate:s,endDate:n,limit:i,offset:f,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");let r="/2/searches/noClicks",m={},p={};e!==void 0&&(p.index=e.toString()),s!==void 0&&(p.startDate=s.toString()),n!==void 0&&(p.endDate=n.toString()),i!==void 0&&(p.limit=i.toString()),f!==void 0&&(p.offset=f.toString()),a!==void 0&&(p.tags=a.toString());let g={method:"GET",path:r,queryParameters:p,headers:m};return l.request(g,c)},getSearchesNoResults({index:e,startDate:s,endDate:n,limit:i,offset:f,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");let r="/2/searches/noResults",m={},p={};e!==void 0&&(p.index=e.toString()),s!==void 0&&(p.startDate=s.toString()),n!==void 0&&(p.endDate=n.toString()),i!==void 0&&(p.limit=i.toString()),f!==void 0&&(p.offset=f.toString()),a!==void 0&&(p.tags=a.toString());let g={method:"GET",path:r,queryParameters:p,headers:m};return l.request(g,c)},getStatus({index:e},s){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");let n="/2/status",i={},f={};e!==void 0&&(f.index=e.toString());let a={method:"GET",path:n,queryParameters:f,headers:i};return l.request(a,s)},getTopCountries({index:e,startDate:s,endDate:n,limit:i,offset:f,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");let r="/2/countries",m={},p={};e!==void 0&&(p.index=e.toString()),s!==void 0&&(p.startDate=s.toString()),n!==void 0&&(p.endDate=n.toString()),i!==void 0&&(p.limit=i.toString()),f!==void 0&&(p.offset=f.toString()),a!==void 0&&(p.tags=a.toString());let g={method:"GET",path:r,queryParameters:p,headers:m};return l.request(g,c)},getTopFilterAttributes({index:e,search:s,startDate:n,endDate:i,limit:f,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");let m="/2/filters",p={},g={};e!==void 0&&(g.index=e.toString()),s!==void 0&&(g.search=s.toString()),n!==void 0&&(g.startDate=n.toString()),i!==void 0&&(g.endDate=i.toString()),f!==void 0&&(g.limit=f.toString()),a!==void 0&&(g.offset=a.toString()),c!==void 0&&(g.tags=c.toString());let P={method:"GET",path:m,queryParameters:g,headers:p};return l.request(P,r)},getTopFilterForAttribute({attribute:e,index:s,search:n,startDate:i,endDate:f,limit:a,offset:c,tags:r},m){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!s)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");let p="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),g={},P={};s!==void 0&&(P.index=s.toString()),n!==void 0&&(P.search=n.toString()),i!==void 0&&(P.startDate=i.toString()),f!==void 0&&(P.endDate=f.toString()),a!==void 0&&(P.limit=a.toString()),c!==void 0&&(P.offset=c.toString()),r!==void 0&&(P.tags=r.toString());let S={method:"GET",path:p,queryParameters:P,headers:g};return l.request(S,m)},getTopFiltersNoResults({index:e,search:s,startDate:n,endDate:i,limit:f,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");let m="/2/filters/noResults",p={},g={};e!==void 0&&(g.index=e.toString()),s!==void 0&&(g.search=s.toString()),n!==void 0&&(g.startDate=n.toString()),i!==void 0&&(g.endDate=i.toString()),f!==void 0&&(g.limit=f.toString()),a!==void 0&&(g.offset=a.toString()),c!==void 0&&(g.tags=c.toString());let P={method:"GET",path:m,queryParameters:g,headers:p};return l.request(P,r)},getTopHits({index:e,search:s,clickAnalytics:n,revenueAnalytics:i,startDate:f,endDate:a,limit:c,offset:r,tags:m},p){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");let g="/2/hits",P={},S={};e!==void 0&&(S.index=e.toString()),s!==void 0&&(S.search=s.toString()),n!==void 0&&(S.clickAnalytics=n.toString()),i!==void 0&&(S.revenueAnalytics=i.toString()),f!==void 0&&(S.startDate=f.toString()),a!==void 0&&(S.endDate=a.toString()),c!==void 0&&(S.limit=c.toString()),r!==void 0&&(S.offset=r.toString()),m!==void 0&&(S.tags=m.toString());let q={method:"GET",path:g,queryParameters:S,headers:P};return l.request(q,p)},getTopSearches({index:e,clickAnalytics:s,revenueAnalytics:n,startDate:i,endDate:f,orderBy:a,direction:c,limit:r,offset:m,tags:p},g){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");let P="/2/searches",S={},q={};e!==void 0&&(q.index=e.toString()),s!==void 0&&(q.clickAnalytics=s.toString()),n!==void 0&&(q.revenueAnalytics=n.toString()),i!==void 0&&(q.startDate=i.toString()),f!==void 0&&(q.endDate=f.toString()),a!==void 0&&(q.orderBy=a.toString()),c!==void 0&&(q.direction=c.toString()),r!==void 0&&(q.limit=r.toString()),m!==void 0&&(q.offset=m.toString()),p!==void 0&&(q.tags=p.toString());let G={method:"GET",path:P,queryParameters:q,headers:S};return l.request(G,g)},getUsersCount({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");let a="/2/users/count",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)}}}function Ht(o,t,d,u){if(!o||typeof o!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(d&&(typeof d!="string"||!b.includes(d)))throw new Error(`\`region\` must be one of the following: ${b.join(", ")}`);return Y({appId:o,apiKey:t,region:d,timeouts:{connect:W,read:$,write:j},logger:z(),requester:U(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:v(),requestsCache:v({serializable:!1}),hostsCache:w({caches:[L({key:`${x}-${o}`}),v()]}),...u})}
function U(){function o(t){return new Promise(d=>{let u=new XMLHttpRequest;u.open(t.method,t.url,!0),Object.keys(t.headers).forEach(l=>u.setRequestHeader(l,t.headers[l]));let h=(l,e)=>setTimeout(()=>{u.abort(),d({status:0,content:e,isTimedOut:!0});},l),R=h(t.connectTimeout,"Connection timeout"),T;u.onreadystatechange=()=>{u.readyState>u.OPENED&&T===void 0&&(clearTimeout(R),T=h(t.responseTimeout,"Socket timeout"));},u.onerror=()=>{u.status===0&&(clearTimeout(R),clearTimeout(T),d({content:u.responseText||"Network request failed",status:u.status,isTimedOut:!1}));},u.onload=()=>{clearTimeout(R),clearTimeout(T),d({content:u.responseText,status:u.status,isTimedOut:!1});},u.send(t.data);})}return {send:o}}function L(o){let t,d=`algolia-client-js-${o.key}`;function u(){return t===void 0&&(t=o.localStorage||window.localStorage),t}function h(){return JSON.parse(u().getItem(d)||"{}")}function R(l){u().setItem(d,JSON.stringify(l));}function T(){let l=o.timeToLive?o.timeToLive*1e3:null,e=h(),s=Object.fromEntries(Object.entries(e).filter(([,i])=>i.timestamp!==void 0));if(R(s),!l)return;let n=Object.fromEntries(Object.entries(s).filter(([,i])=>{let f=new Date().getTime();return !(i.timestamp+l<f)}));R(n);}return {get(l,e,s={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(T(),h()[JSON.stringify(l)])).then(n=>Promise.all([n?n.value:e(),n!==void 0])).then(([n,i])=>Promise.all([n,i||s.miss(n)])).then(([n])=>n)},set(l,e){return Promise.resolve().then(()=>{let s=h();return s[JSON.stringify(l)]={timestamp:new Date().getTime(),value:e},u().setItem(d,JSON.stringify(s)),e})},delete(l){return Promise.resolve().then(()=>{let e=h();delete e[JSON.stringify(l)],u().setItem(d,JSON.stringify(e));})},clear(){return Promise.resolve().then(()=>{u().removeItem(d);})}}}function ee(){return {get(o,t,d={miss:()=>Promise.resolve()}){return t().then(h=>Promise.all([h,d.miss(h)])).then(([h])=>h)},set(o,t){return Promise.resolve(t)},delete(o){return Promise.resolve()},clear(){return Promise.resolve()}}}function w(o){let t=[...o.caches],d=t.shift();return d===void 0?ee():{get(u,h,R={miss:()=>Promise.resolve()}){return d.get(u,h,R).catch(()=>w({caches:t}).get(u,h,R))},set(u,h){return d.set(u,h).catch(()=>w({caches:t}).set(u,h))},delete(u){return d.delete(u).catch(()=>w({caches:t}).delete(u))},clear(){return d.clear().catch(()=>w({caches:t}).clear())}}}function v(o={serializable:!0}){let t={};return {get(d,u,h={miss:()=>Promise.resolve()}){let R=JSON.stringify(d);if(R in t)return Promise.resolve(o.serializable?JSON.parse(t[R]):t[R]);let T=u();return T.then(l=>h.miss(l)).then(()=>T)},set(d,u){return t[JSON.stringify(d)]=o.serializable?JSON.stringify(u):u,Promise.resolve(u)},delete(d){return delete t[JSON.stringify(d)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}var W=1e3,$=2e3,j=3e4;function te(o){let t={value:`Algolia for JavaScript (${o})`,add(d){let u=`; ${d.segment}${d.version!==void 0?` (${d.version})`:""}`;return t.value.indexOf(u)===-1&&(t.value=`${t.value}${u}`),t}};return t}function J(o,t,d="WithinHeaders"){let u={"x-algolia-api-key":t,"x-algolia-application-id":o};return {headers(){return d==="WithinHeaders"?u:{}},queryParameters(){return d==="WithinQueryParameters"?u:{}}}}function M({algoliaAgents:o,client:t,version:d}){let u=te(d).add({segment:t,version:d});return o.forEach(h=>u.add(h)),u}function z(){return {debug(o,t){return Promise.resolve()},info(o,t){return Promise.resolve()},error(o,t){return Promise.resolve()}}}var Q=2*60*1e3;function I(o,t="up"){let d=Date.now();function u(){return t==="up"||Date.now()-d>Q}function h(){return t==="timed out"&&Date.now()-d<=Q}return {...o,status:t,lastUpdate:d,isUp:u,isTimedOut:h}}var B=class extends Error{name="AlgoliaError";constructor(o,t){super(o),t&&(this.name=t);}},X=class extends B{stackTrace;constructor(o,t,d){super(o,d),this.stackTrace=t;}},re=class extends X{constructor(o){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",o,"RetryError");}},k=class extends X{status;constructor(o,t,d,u="ApiError"){super(o,d,u),this.status=t;}},oe=class extends B{response;constructor(o,t){super(o,"DeserializationError"),this.response=t;}},se=class extends k{error;constructor(o,t,d,u){super(o,t,u,"DetailedApiError"),this.error=d;}};function ne(o,t,d){let u=ie(d),h=`${o.protocol}://${o.url}${o.port?`:${o.port}`:""}/${t.charAt(0)==="/"?t.substring(1):t}`;return u.length&&(h+=`?${u}`),h}function ie(o){return Object.keys(o).filter(t=>o[t]!==void 0).sort().map(t=>`${t}=${encodeURIComponent(Object.prototype.toString.call(o[t])==="[object Array]"?o[t].join(","):o[t]).replace(/\+/g,"%20")}`).join("&")}function ae(o,t){if(o.method==="GET"||o.data===void 0&&t.data===void 0)return;let d=Array.isArray(o.data)?o.data:{...o.data,...t.data};return JSON.stringify(d)}function ue(o,t,d){let u={Accept:"application/json",...o,...t,...d},h={};return Object.keys(u).forEach(R=>{let T=u[R];h[R.toLowerCase()]=T;}),h}function ce(o){try{return JSON.parse(o.content)}catch(t){throw new oe(t.message,o)}}function de({content:o,status:t},d){try{let u=JSON.parse(o);return "error"in u?new se(u.message,t,u.error,d):new k(u.message,t,d)}catch{}return new k(o,t,d)}function fe({isTimedOut:o,status:t}){return !o&&~~t===0}function le({isTimedOut:o,status:t}){return o||fe({isTimedOut:o,status:t})||~~(t/100)!==2&&~~(t/100)!==4}function me({status:o}){return ~~(o/100)===2}function pe(o){return o.map(t=>K(t))}function K(o){let t=o.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...o,request:{...o.request,headers:{...o.request.headers,...t}}}}function V({hosts:o,hostsCache:t,baseHeaders:d,logger:u,baseQueryParameters:h,algoliaAgent:R,timeouts:T,requester:l,requestsCache:e,responsesCache:s}){async function n(a){let c=await Promise.all(a.map(P=>t.get(P,()=>Promise.resolve(I(P))))),r=c.filter(P=>P.isUp()),m=c.filter(P=>P.isTimedOut()),p=[...r,...m];return {hosts:p.length>0?p:a,getTimeout(P,S){return (m.length===0&&P===0?1:m.length+3+P)*S}}}async function i(a,c,r=!0){let m=[],p=ae(a,c),g=ue(d,a.headers,c.headers),P=a.method==="GET"?{...a.data,...c.data}:{},S={...h,...a.queryParameters,...P};if(R.value&&(S["x-algolia-agent"]=R.value),c&&c.queryParameters)for(let y of Object.keys(c.queryParameters))!c.queryParameters[y]||Object.prototype.toString.call(c.queryParameters[y])==="[object Object]"?S[y]=c.queryParameters[y]:S[y]=c.queryParameters[y].toString();let q=0,G=async(y,A)=>{let C=y.pop();if(C===void 0)throw new re(pe(m));let O={...T,...c.timeouts},F={data:p,headers:g,method:a.method,url:ne(C,a.path,S),connectTimeout:A(q,O.connect),responseTimeout:A(q,r?O.read:O.write)},_=N=>{let D={request:F,response:N,host:C,triesLeft:y.length};return m.push(D),D},E=await l.send(F);if(le(E)){let N=_(E);return E.isTimedOut&&q++,u.info("Retryable failure",K(N)),await t.set(C,I(C,E.isTimedOut?"timed out":"down")),G(y,A)}if(me(E))return ce(E);throw _(E),de(E,m)},Z=o.filter(y=>y.accept==="readWrite"||(r?y.accept==="read":y.accept==="write")),H=await n(Z);return G([...H.hosts].reverse(),H.getTimeout)}function f(a,c={}){let r=a.useReadTransporter||a.method==="GET";if(!r)return i(a,c,r);let m=()=>i(a,c);if((c.cacheable||a.cacheable)!==!0)return m();let g={request:a,requestOptions:c,transporter:{queryParameters:h,headers:d}};return s.get(g,()=>e.get(g,()=>e.set(g,m()).then(P=>Promise.all([e.delete(g),P]),P=>Promise.all([e.delete(g),Promise.reject(P)])).then(([P,S])=>S)),{miss:P=>s.set(g,P)})}return {hostsCache:t,requester:l,timeouts:T,logger:u,algoliaAgent:R,baseHeaders:d,baseQueryParameters:h,hosts:o,request:f,requestsCache:e,responsesCache:s}}var x="5.10.1",b=["de","us"];function ge(o){return [{url:o?"analytics.{region}.algolia.com".replace("{region}",o):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function Y({appId:o,apiKey:t,authMode:d,algoliaAgents:u,region:h,...R}){let T=J(o,t,d),l=V({hosts:ge(h),...R,algoliaAgent:M({algoliaAgents:u,client:"Analytics",version:x}),baseHeaders:{"content-type":"text/plain",...T.headers(),...R.baseHeaders},baseQueryParameters:{...T.queryParameters(),...R.baseQueryParameters}});return {transporter:l,appId:o,clearCache(){return Promise.all([l.requestsCache.clear(),l.responsesCache.clear()]).then(()=>{})},get _ua(){return l.algoliaAgent.value},addAlgoliaAgent(e,s){l.algoliaAgent.add({segment:e,version:s});},setClientApiKey({apiKey:e}){!d||d==="WithinHeaders"?l.baseHeaders["x-algolia-api-key"]=e:l.baseQueryParameters["x-algolia-api-key"]=e;},customDelete({path:e,parameters:s},n){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let c={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{}};return l.request(c,n)},customGet({path:e,parameters:s},n){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let c={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{}};return l.request(c,n)},customPost({path:e,parameters:s,body:n},i){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");let r={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{},data:n||{}};return l.request(r,i)},customPut({path:e,parameters:s,body:n},i){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");let r={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:s||{},headers:{},data:n||{}};return l.request(r,i)},getAddToCartRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");let a="/2/conversions/addToCartRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getAverageClickPosition({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");let a="/2/clicks/averageClickPosition",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getClickPositions({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");let a="/2/clicks/positions",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getClickThroughRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");let a="/2/clicks/clickThroughRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getConversionRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");let a="/2/conversions/conversionRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getNoClickRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");let a="/2/searches/noClickRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getNoResultsRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");let a="/2/searches/noResultRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getPurchaseRate({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");let a="/2/conversions/purchaseRate",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getRevenue({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");let a="/2/conversions/revenue",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getSearchesCount({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");let a="/2/searches/count",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)},getSearchesNoClicks({index:e,startDate:s,endDate:n,limit:i,offset:f,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");let r="/2/searches/noClicks",m={},p={};e!==void 0&&(p.index=e.toString()),s!==void 0&&(p.startDate=s.toString()),n!==void 0&&(p.endDate=n.toString()),i!==void 0&&(p.limit=i.toString()),f!==void 0&&(p.offset=f.toString()),a!==void 0&&(p.tags=a.toString());let g={method:"GET",path:r,queryParameters:p,headers:m};return l.request(g,c)},getSearchesNoResults({index:e,startDate:s,endDate:n,limit:i,offset:f,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");let r="/2/searches/noResults",m={},p={};e!==void 0&&(p.index=e.toString()),s!==void 0&&(p.startDate=s.toString()),n!==void 0&&(p.endDate=n.toString()),i!==void 0&&(p.limit=i.toString()),f!==void 0&&(p.offset=f.toString()),a!==void 0&&(p.tags=a.toString());let g={method:"GET",path:r,queryParameters:p,headers:m};return l.request(g,c)},getStatus({index:e},s){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");let n="/2/status",i={},f={};e!==void 0&&(f.index=e.toString());let a={method:"GET",path:n,queryParameters:f,headers:i};return l.request(a,s)},getTopCountries({index:e,startDate:s,endDate:n,limit:i,offset:f,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");let r="/2/countries",m={},p={};e!==void 0&&(p.index=e.toString()),s!==void 0&&(p.startDate=s.toString()),n!==void 0&&(p.endDate=n.toString()),i!==void 0&&(p.limit=i.toString()),f!==void 0&&(p.offset=f.toString()),a!==void 0&&(p.tags=a.toString());let g={method:"GET",path:r,queryParameters:p,headers:m};return l.request(g,c)},getTopFilterAttributes({index:e,search:s,startDate:n,endDate:i,limit:f,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");let m="/2/filters",p={},g={};e!==void 0&&(g.index=e.toString()),s!==void 0&&(g.search=s.toString()),n!==void 0&&(g.startDate=n.toString()),i!==void 0&&(g.endDate=i.toString()),f!==void 0&&(g.limit=f.toString()),a!==void 0&&(g.offset=a.toString()),c!==void 0&&(g.tags=c.toString());let P={method:"GET",path:m,queryParameters:g,headers:p};return l.request(P,r)},getTopFilterForAttribute({attribute:e,index:s,search:n,startDate:i,endDate:f,limit:a,offset:c,tags:r},m){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!s)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");let p="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),g={},P={};s!==void 0&&(P.index=s.toString()),n!==void 0&&(P.search=n.toString()),i!==void 0&&(P.startDate=i.toString()),f!==void 0&&(P.endDate=f.toString()),a!==void 0&&(P.limit=a.toString()),c!==void 0&&(P.offset=c.toString()),r!==void 0&&(P.tags=r.toString());let S={method:"GET",path:p,queryParameters:P,headers:g};return l.request(S,m)},getTopFiltersNoResults({index:e,search:s,startDate:n,endDate:i,limit:f,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");let m="/2/filters/noResults",p={},g={};e!==void 0&&(g.index=e.toString()),s!==void 0&&(g.search=s.toString()),n!==void 0&&(g.startDate=n.toString()),i!==void 0&&(g.endDate=i.toString()),f!==void 0&&(g.limit=f.toString()),a!==void 0&&(g.offset=a.toString()),c!==void 0&&(g.tags=c.toString());let P={method:"GET",path:m,queryParameters:g,headers:p};return l.request(P,r)},getTopHits({index:e,search:s,clickAnalytics:n,revenueAnalytics:i,startDate:f,endDate:a,limit:c,offset:r,tags:m},p){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");let g="/2/hits",P={},S={};e!==void 0&&(S.index=e.toString()),s!==void 0&&(S.search=s.toString()),n!==void 0&&(S.clickAnalytics=n.toString()),i!==void 0&&(S.revenueAnalytics=i.toString()),f!==void 0&&(S.startDate=f.toString()),a!==void 0&&(S.endDate=a.toString()),c!==void 0&&(S.limit=c.toString()),r!==void 0&&(S.offset=r.toString()),m!==void 0&&(S.tags=m.toString());let q={method:"GET",path:g,queryParameters:S,headers:P};return l.request(q,p)},getTopSearches({index:e,clickAnalytics:s,revenueAnalytics:n,startDate:i,endDate:f,orderBy:a,direction:c,limit:r,offset:m,tags:p},g){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");let P="/2/searches",S={},q={};e!==void 0&&(q.index=e.toString()),s!==void 0&&(q.clickAnalytics=s.toString()),n!==void 0&&(q.revenueAnalytics=n.toString()),i!==void 0&&(q.startDate=i.toString()),f!==void 0&&(q.endDate=f.toString()),a!==void 0&&(q.orderBy=a.toString()),c!==void 0&&(q.direction=c.toString()),r!==void 0&&(q.limit=r.toString()),m!==void 0&&(q.offset=m.toString()),p!==void 0&&(q.tags=p.toString());let G={method:"GET",path:P,queryParameters:q,headers:S};return l.request(G,g)},getUsersCount({index:e,startDate:s,endDate:n,tags:i},f){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");let a="/2/users/count",c={},r={};e!==void 0&&(r.index=e.toString()),s!==void 0&&(r.startDate=s.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let m={method:"GET",path:a,queryParameters:r,headers:c};return l.request(m,f)}}}function Ht(o,t,d,u){if(!o||typeof o!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(d&&(typeof d!="string"||!b.includes(d)))throw new Error(`\`region\` must be one of the following: ${b.join(", ")}`);return Y({appId:o,apiKey:t,region:d,timeouts:{connect:W,read:$,write:j},logger:z(),requester:U(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:v(),requestsCache:v({serializable:!1}),hostsCache:w({caches:[L({key:`${x}-${o}`}),v()]}),...u})}

@@ -10,0 +10,0 @@ exports.analyticsClient = Ht;

@@ -14,3 +14,3 @@ // builds/fetch.ts

import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
var apiClientVersion = "5.10.0";
var apiClientVersion = "5.10.1";
var REGIONS = ["de", "us"];

@@ -17,0 +17,0 @@ function getDefaultHosts(region) {

@@ -14,3 +14,3 @@ // builds/node.ts

import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
var apiClientVersion = "5.10.0";
var apiClientVersion = "5.10.1";
var REGIONS = ["de", "us"];

@@ -17,0 +17,0 @@ function getDefaultHosts(region) {

// src/analyticsClient.ts
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
var apiClientVersion = "5.10.0";
var apiClientVersion = "5.10.1";
var REGIONS = ["de", "us"];

@@ -5,0 +5,0 @@ function getDefaultHosts(region) {

{
"version": "5.10.0",
"version": "5.10.1",
"repository": {

@@ -51,6 +51,6 @@ "type": "git",

"dependencies": {
"@algolia/client-common": "5.10.0",
"@algolia/requester-browser-xhr": "5.10.0",
"@algolia/requester-fetch": "5.10.0",
"@algolia/requester-node-http": "5.10.0"
"@algolia/client-common": "5.10.1",
"@algolia/requester-browser-xhr": "5.10.1",
"@algolia/requester-fetch": "5.10.1",
"@algolia/requester-node-http": "5.10.1"
},

@@ -57,0 +57,0 @@ "devDependencies": {

@@ -44,7 +44,7 @@ <p align="center">

```bash
yarn add @algolia/client-analytics@5.10.0
yarn add @algolia/client-analytics@5.10.1
# or
npm install @algolia/client-analytics@5.10.0
npm install @algolia/client-analytics@5.10.1
# or
pnpm add @algolia/client-analytics@5.10.0
pnpm add @algolia/client-analytics@5.10.1
```

@@ -57,3 +57,3 @@

```html
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-analytics@5.10.0/dist/builds/browser.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-analytics@5.10.1/dist/builds/browser.umd.js"></script>
```

@@ -60,0 +60,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc