@algolia/client-analytics
Advanced tools
Comparing version 5.3.0 to 5.3.1
@@ -14,3 +14,3 @@ // builds/browser.ts | ||
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common"; | ||
var apiClientVersion = "5.3.0"; | ||
var apiClientVersion = "5.3.1"; | ||
var REGIONS = ["de", "us"]; | ||
@@ -83,3 +83,7 @@ function getDefaultHosts(region) { | ||
setClientApiKey({ apiKey }) { | ||
this.transporter.baseHeaders["x-algolia-api-key"] = apiKey; | ||
if (!authMode || authMode === "WithinHeaders") { | ||
this.transporter.baseHeaders["x-algolia-api-key"] = apiKey; | ||
} else { | ||
this.transporter.baseQueryParameters["x-algolia-api-key"] = apiKey; | ||
} | ||
}, | ||
@@ -86,0 +90,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
function Q(s,t,d="WithinHeaders"){let u={"x-algolia-api-key":t,"x-algolia-application-id":s};return{headers(){return d==="WithinHeaders"?u:{}},queryParameters(){return d==="WithinQueryParameters"?u:{}}}}function I(s){let t,d=`algolia-client-js-${s.key}`;function u(){return t===void 0&&(t=s.localStorage||window.localStorage),t}function h(){return JSON.parse(u().getItem(d)||"{}")}function P(e){u().setItem(d,JSON.stringify(e))}function q(){let e=s.timeToLive?s.timeToLive*1e3:null,o=h(),n=Object.fromEntries(Object.entries(o).filter(([,l])=>l.timestamp!==void 0));if(P(n),!e)return;let i=Object.fromEntries(Object.entries(n).filter(([,l])=>{let a=new Date().getTime();return!(l.timestamp+e<a)}));P(i)}return{get(e,o,n={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(q(),h()[JSON.stringify(e)])).then(i=>Promise.all([i?i.value:o(),i!==void 0])).then(([i,l])=>Promise.all([i,l||n.miss(i)])).then(([i])=>i)},set(e,o){return Promise.resolve().then(()=>{let n=h();return n[JSON.stringify(e)]={timestamp:new Date().getTime(),value:o},u().setItem(d,JSON.stringify(n)),o})},delete(e){return Promise.resolve().then(()=>{let o=h();delete o[JSON.stringify(e)],u().setItem(d,JSON.stringify(o))})},clear(){return Promise.resolve().then(()=>{u().removeItem(d)})}}}function Y(){return{get(s,t,d={miss:()=>Promise.resolve()}){return t().then(h=>Promise.all([h,d.miss(h)])).then(([h])=>h)},set(s,t){return Promise.resolve(t)},delete(s){return Promise.resolve()},clear(){return Promise.resolve()}}}function E(s){let t=[...s.caches],d=t.shift();return d===void 0?Y():{get(u,h,P={miss:()=>Promise.resolve()}){return d.get(u,h,P).catch(()=>E({caches:t}).get(u,h,P))},set(u,h){return d.set(u,h).catch(()=>E({caches:t}).set(u,h))},delete(u){return d.delete(u).catch(()=>E({caches:t}).delete(u))},clear(){return d.clear().catch(()=>E({caches:t}).clear())}}}function G(s={serializable:!0}){let t={};return{get(d,u,h={miss:()=>Promise.resolve()}){let P=JSON.stringify(d);if(P in t)return Promise.resolve(s.serializable?JSON.parse(t[P]):t[P]);let q=u();return q.then(e=>h.miss(e)).then(()=>q)},set(d,u){return t[JSON.stringify(d)]=s.serializable?JSON.stringify(u):u,Promise.resolve(u)},delete(d){return delete t[JSON.stringify(d)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}var D=2*60*1e3;function _(s,t="up"){let d=Date.now();function u(){return t==="up"||Date.now()-d>D}function h(){return t==="timed out"&&Date.now()-d<=D}return{...s,status:t,lastUpdate:d,isUp:u,isTimedOut:h}}var L=class extends Error{name="AlgoliaError";constructor(s,t){super(s),t&&(this.name=t)}},W=class extends L{stackTrace;constructor(s,t,d){super(s,d),this.stackTrace=t}},Z=class extends W{constructor(s){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.",s,"RetryError")}},N=class extends W{status;constructor(s,t,d,u="ApiError"){super(s,d,u),this.status=t}},ee=class extends L{response;constructor(s,t){super(s,"DeserializationError"),this.response=t}},te=class extends N{error;constructor(s,t,d,u){super(s,t,u,"DetailedApiError"),this.error=d}};function re(s,t,d){let u=oe(d),h=`${s.protocol}://${s.url}${s.port?`:${s.port}`:""}/${t.charAt(0)==="/"?t.substring(1):t}`;return u.length&&(h+=`?${u}`),h}function oe(s){return Object.keys(s).filter(t=>s[t]!==void 0).sort().map(t=>`${t}=${encodeURIComponent(Object.prototype.toString.call(s[t])==="[object Array]"?s[t].join(","):s[t]).replaceAll("+","%20")}`).join("&")}function se(s,t){if(s.method==="GET"||s.data===void 0&&t.data===void 0)return;let d=Array.isArray(s.data)?s.data:{...s.data,...t.data};return JSON.stringify(d)}function ne(s,t,d){let u={Accept:"application/json",...s,...t,...d},h={};return Object.keys(u).forEach(P=>{let q=u[P];h[P.toLowerCase()]=q}),h}function ie(s){try{return JSON.parse(s.content)}catch(t){throw new ee(t.message,s)}}function ae({content:s,status:t},d){try{let u=JSON.parse(s);return"error"in u?new te(u.message,t,u.error,d):new N(u.message,t,d)}catch{}return new N(s,t,d)}function ue({isTimedOut:s,status:t}){return!s&&~~t===0}function ce({isTimedOut:s,status:t}){return s||ue({isTimedOut:s,status:t})||~~(t/100)!==2&&~~(t/100)!==4}function de({status:s}){return~~(s/100)===2}function le(s){return s.map(t=>j(t))}function j(s){let t=s.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...s,request:{...s.request,headers:{...s.request.headers,...t}}}}function J({hosts:s,hostsCache:t,baseHeaders:d,baseQueryParameters:u,algoliaAgent:h,timeouts:P,requester:q,requestsCache:e,responsesCache:o}){async function n(a){let c=await Promise.all(a.map(g=>t.get(g,()=>Promise.resolve(_(g))))),r=c.filter(g=>g.isUp()),p=c.filter(g=>g.isTimedOut()),f=[...r,...p];return{hosts:f.length>0?f:a,getTimeout(g,R){return(p.length===0&&g===0?1:p.length+3+g)*R}}}async function i(a,c,r=!0){let p=[],f=se(a,c),m=ne(d,a.headers,c.headers),g=a.method==="GET"?{...a.data,...c.data}:{},R={...u,...a.queryParameters,...g};if(h.value&&(R["x-algolia-agent"]=h.value),c&&c.queryParameters)for(let y of Object.keys(c.queryParameters))!c.queryParameters[y]||Object.prototype.toString.call(c.queryParameters[y])==="[object Object]"?R[y]=c.queryParameters[y]:R[y]=c.queryParameters[y].toString();let S=0,C=async(y,A)=>{let w=y.pop();if(w===void 0)throw new Z(le(p));let x={...P,...c.timeouts},H={data:f,headers:m,method:a.method,url:re(w,a.path,R),connectTimeout:A(S,x.connect),responseTimeout:A(S,r?x.read:x.write)},F=O=>{let U={request:H,response:O,host:w,triesLeft:y.length};return p.push(U),U},T=await q.send(H);if(ce(T)){let O=F(T);return T.isTimedOut&&S++,console.log("Retryable failure",j(O)),await t.set(w,_(w,T.isTimedOut?"timed out":"down")),C(y,A)}if(de(T))return ie(T);throw F(T),ae(T,p)},V=s.filter(y=>y.accept==="readWrite"||(r?y.accept==="read":y.accept==="write")),b=await n(V);return C([...b.hosts].reverse(),b.getTimeout)}function l(a,c={}){let r=a.useReadTransporter||a.method==="GET";if(!r)return i(a,c,r);let p=()=>i(a,c);if((c.cacheable||a.cacheable)!==!0)return p();let m={request:a,requestOptions:c,transporter:{queryParameters:u,headers:d}};return o.get(m,()=>e.get(m,()=>e.set(m,p()).then(g=>Promise.all([e.delete(m),g]),g=>Promise.all([e.delete(m),Promise.reject(g)])).then(([g,R])=>R)),{miss:g=>o.set(m,g)})}return{hostsCache:t,requester:q,timeouts:P,algoliaAgent:h,baseHeaders:d,baseQueryParameters:u,hosts:s,request:l,requestsCache:e,responsesCache:o}}function pe(s){let t={value:`Algolia for JavaScript (${s})`,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 $({algoliaAgents:s,client:t,version:d}){let u=pe(d).add({segment:t,version:d});return s.forEach(h=>u.add(h)),u}var M=1e3,z=2e3,B=3e4;function X(){function s(t){return new Promise(d=>{let u=new XMLHttpRequest;u.open(t.method,t.url,!0),Object.keys(t.headers).forEach(e=>u.setRequestHeader(e,t.headers[e]));let h=(e,o)=>setTimeout(()=>{u.abort(),d({status:0,content:o,isTimedOut:!0})},e),P=h(t.connectTimeout,"Connection timeout"),q;u.onreadystatechange=()=>{u.readyState>u.OPENED&&q===void 0&&(clearTimeout(P),q=h(t.responseTimeout,"Socket timeout"))},u.onerror=()=>{u.status===0&&(clearTimeout(P),clearTimeout(q),d({content:u.responseText||"Network request failed",status:u.status,isTimedOut:!1}))},u.onload=()=>{clearTimeout(P),clearTimeout(q),d({content:u.responseText,status:u.status,isTimedOut:!1})},u.send(t.data)})}return{send:s}}var v="5.3.0",k=["de","us"];function fe(s){return[{url:s?"analytics.{region}.algolia.com".replace("{region}",s):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function K({appId:s,apiKey:t,authMode:d,algoliaAgents:u,region:h,...P}){let q=Q(s,t,d);return{transporter:J({hosts:fe(h),...P,algoliaAgent:$({algoliaAgents:u,client:"Analytics",version:v}),baseHeaders:{"content-type":"text/plain",...q.headers(),...P.baseHeaders},baseQueryParameters:{...q.queryParameters(),...P.baseQueryParameters}}),appId:s,clearCache(){return Promise.all([this.transporter.requestsCache.clear(),this.transporter.responsesCache.clear()]).then(()=>{})},get _ua(){return this.transporter.algoliaAgent.value},addAlgoliaAgent(e,o){this.transporter.algoliaAgent.add({segment:e,version:o})},setClientApiKey({apiKey:e}){this.transporter.baseHeaders["x-algolia-api-key"]=e},customDelete({path:e,parameters:o},n){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let c={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:o||{},headers:{}};return this.transporter.request(c,n)},customGet({path:e,parameters:o},n){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let c={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:o||{},headers:{}};return this.transporter.request(c,n)},customPost({path:e,parameters:o,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:o||{},headers:{},data:n||{}};return this.transporter.request(r,i)},customPut({path:e,parameters:o,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:o||{},headers:{},data:n||{}};return this.transporter.request(r,i)},getAddToCartRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getAverageClickPosition({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getClickPositions({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getClickThroughRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getConversionRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getNoClickRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getNoResultsRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getPurchaseRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getRevenue({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getSearchesCount({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getSearchesNoClicks({index:e,startDate:o,endDate:n,limit:i,offset:l,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");let r="/2/searches/noClicks",p={},f={};e!==void 0&&(f.index=e.toString()),o!==void 0&&(f.startDate=o.toString()),n!==void 0&&(f.endDate=n.toString()),i!==void 0&&(f.limit=i.toString()),l!==void 0&&(f.offset=l.toString()),a!==void 0&&(f.tags=a.toString());let m={method:"GET",path:r,queryParameters:f,headers:p};return this.transporter.request(m,c)},getSearchesNoResults({index:e,startDate:o,endDate:n,limit:i,offset:l,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");let r="/2/searches/noResults",p={},f={};e!==void 0&&(f.index=e.toString()),o!==void 0&&(f.startDate=o.toString()),n!==void 0&&(f.endDate=n.toString()),i!==void 0&&(f.limit=i.toString()),l!==void 0&&(f.offset=l.toString()),a!==void 0&&(f.tags=a.toString());let m={method:"GET",path:r,queryParameters:f,headers:p};return this.transporter.request(m,c)},getStatus({index:e},o){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");let n="/2/status",i={},l={};e!==void 0&&(l.index=e.toString());let a={method:"GET",path:n,queryParameters:l,headers:i};return this.transporter.request(a,o)},getTopCountries({index:e,startDate:o,endDate:n,limit:i,offset:l,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");let r="/2/countries",p={},f={};e!==void 0&&(f.index=e.toString()),o!==void 0&&(f.startDate=o.toString()),n!==void 0&&(f.endDate=n.toString()),i!==void 0&&(f.limit=i.toString()),l!==void 0&&(f.offset=l.toString()),a!==void 0&&(f.tags=a.toString());let m={method:"GET",path:r,queryParameters:f,headers:p};return this.transporter.request(m,c)},getTopFilterAttributes({index:e,search:o,startDate:n,endDate:i,limit:l,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");let p="/2/filters",f={},m={};e!==void 0&&(m.index=e.toString()),o!==void 0&&(m.search=o.toString()),n!==void 0&&(m.startDate=n.toString()),i!==void 0&&(m.endDate=i.toString()),l!==void 0&&(m.limit=l.toString()),a!==void 0&&(m.offset=a.toString()),c!==void 0&&(m.tags=c.toString());let g={method:"GET",path:p,queryParameters:m,headers:f};return this.transporter.request(g,r)},getTopFilterForAttribute({attribute:e,index:o,search:n,startDate:i,endDate:l,limit:a,offset:c,tags:r},p){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!o)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");let f="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),m={},g={};o!==void 0&&(g.index=o.toString()),n!==void 0&&(g.search=n.toString()),i!==void 0&&(g.startDate=i.toString()),l!==void 0&&(g.endDate=l.toString()),a!==void 0&&(g.limit=a.toString()),c!==void 0&&(g.offset=c.toString()),r!==void 0&&(g.tags=r.toString());let R={method:"GET",path:f,queryParameters:g,headers:m};return this.transporter.request(R,p)},getTopFiltersNoResults({index:e,search:o,startDate:n,endDate:i,limit:l,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");let p="/2/filters/noResults",f={},m={};e!==void 0&&(m.index=e.toString()),o!==void 0&&(m.search=o.toString()),n!==void 0&&(m.startDate=n.toString()),i!==void 0&&(m.endDate=i.toString()),l!==void 0&&(m.limit=l.toString()),a!==void 0&&(m.offset=a.toString()),c!==void 0&&(m.tags=c.toString());let g={method:"GET",path:p,queryParameters:m,headers:f};return this.transporter.request(g,r)},getTopHits({index:e,search:o,clickAnalytics:n,revenueAnalytics:i,startDate:l,endDate:a,limit:c,offset:r,tags:p},f){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");let m="/2/hits",g={},R={};e!==void 0&&(R.index=e.toString()),o!==void 0&&(R.search=o.toString()),n!==void 0&&(R.clickAnalytics=n.toString()),i!==void 0&&(R.revenueAnalytics=i.toString()),l!==void 0&&(R.startDate=l.toString()),a!==void 0&&(R.endDate=a.toString()),c!==void 0&&(R.limit=c.toString()),r!==void 0&&(R.offset=r.toString()),p!==void 0&&(R.tags=p.toString());let S={method:"GET",path:m,queryParameters:R,headers:g};return this.transporter.request(S,f)},getTopSearches({index:e,clickAnalytics:o,revenueAnalytics:n,startDate:i,endDate:l,orderBy:a,direction:c,limit:r,offset:p,tags:f},m){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");let g="/2/searches",R={},S={};e!==void 0&&(S.index=e.toString()),o!==void 0&&(S.clickAnalytics=o.toString()),n!==void 0&&(S.revenueAnalytics=n.toString()),i!==void 0&&(S.startDate=i.toString()),l!==void 0&&(S.endDate=l.toString()),a!==void 0&&(S.orderBy=a.toString()),c!==void 0&&(S.direction=c.toString()),r!==void 0&&(S.limit=r.toString()),p!==void 0&&(S.offset=p.toString()),f!==void 0&&(S.tags=f.toString());let C={method:"GET",path:g,queryParameters:S,headers:R};return this.transporter.request(C,m)},getUsersCount({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)}}}function Nt(s,t,d,u){if(!s||typeof s!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(d&&(typeof d!="string"||!k.includes(d)))throw new Error(`\`region\` must be one of the following: ${k.join(", ")}`);return K({appId:s,apiKey:t,region:d,timeouts:{connect:M,read:z,write:B},requester:X(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:G(),requestsCache:G({serializable:!1}),hostsCache:E({caches:[I({key:`${v}-${s}`}),G()]}),...u})}export{Nt as analyticsClient,v as apiClientVersion}; | ||
function Q(s,t,d="WithinHeaders"){let u={"x-algolia-api-key":t,"x-algolia-application-id":s};return{headers(){return d==="WithinHeaders"?u:{}},queryParameters(){return d==="WithinQueryParameters"?u:{}}}}function I(s){let t,d=`algolia-client-js-${s.key}`;function u(){return t===void 0&&(t=s.localStorage||window.localStorage),t}function h(){return JSON.parse(u().getItem(d)||"{}")}function P(e){u().setItem(d,JSON.stringify(e))}function q(){let e=s.timeToLive?s.timeToLive*1e3:null,o=h(),n=Object.fromEntries(Object.entries(o).filter(([,l])=>l.timestamp!==void 0));if(P(n),!e)return;let i=Object.fromEntries(Object.entries(n).filter(([,l])=>{let a=new Date().getTime();return!(l.timestamp+e<a)}));P(i)}return{get(e,o,n={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(q(),h()[JSON.stringify(e)])).then(i=>Promise.all([i?i.value:o(),i!==void 0])).then(([i,l])=>Promise.all([i,l||n.miss(i)])).then(([i])=>i)},set(e,o){return Promise.resolve().then(()=>{let n=h();return n[JSON.stringify(e)]={timestamp:new Date().getTime(),value:o},u().setItem(d,JSON.stringify(n)),o})},delete(e){return Promise.resolve().then(()=>{let o=h();delete o[JSON.stringify(e)],u().setItem(d,JSON.stringify(o))})},clear(){return Promise.resolve().then(()=>{u().removeItem(d)})}}}function Y(){return{get(s,t,d={miss:()=>Promise.resolve()}){return t().then(h=>Promise.all([h,d.miss(h)])).then(([h])=>h)},set(s,t){return Promise.resolve(t)},delete(s){return Promise.resolve()},clear(){return Promise.resolve()}}}function E(s){let t=[...s.caches],d=t.shift();return d===void 0?Y():{get(u,h,P={miss:()=>Promise.resolve()}){return d.get(u,h,P).catch(()=>E({caches:t}).get(u,h,P))},set(u,h){return d.set(u,h).catch(()=>E({caches:t}).set(u,h))},delete(u){return d.delete(u).catch(()=>E({caches:t}).delete(u))},clear(){return d.clear().catch(()=>E({caches:t}).clear())}}}function G(s={serializable:!0}){let t={};return{get(d,u,h={miss:()=>Promise.resolve()}){let P=JSON.stringify(d);if(P in t)return Promise.resolve(s.serializable?JSON.parse(t[P]):t[P]);let q=u();return q.then(e=>h.miss(e)).then(()=>q)},set(d,u){return t[JSON.stringify(d)]=s.serializable?JSON.stringify(u):u,Promise.resolve(u)},delete(d){return delete t[JSON.stringify(d)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}var D=2*60*1e3;function _(s,t="up"){let d=Date.now();function u(){return t==="up"||Date.now()-d>D}function h(){return t==="timed out"&&Date.now()-d<=D}return{...s,status:t,lastUpdate:d,isUp:u,isTimedOut:h}}var L=class extends Error{name="AlgoliaError";constructor(s,t){super(s),t&&(this.name=t)}},W=class extends L{stackTrace;constructor(s,t,d){super(s,d),this.stackTrace=t}},Z=class extends W{constructor(s){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.",s,"RetryError")}},N=class extends W{status;constructor(s,t,d,u="ApiError"){super(s,d,u),this.status=t}},ee=class extends L{response;constructor(s,t){super(s,"DeserializationError"),this.response=t}},te=class extends N{error;constructor(s,t,d,u){super(s,t,u,"DetailedApiError"),this.error=d}};function re(s,t,d){let u=oe(d),h=`${s.protocol}://${s.url}${s.port?`:${s.port}`:""}/${t.charAt(0)==="/"?t.substring(1):t}`;return u.length&&(h+=`?${u}`),h}function oe(s){return Object.keys(s).filter(t=>s[t]!==void 0).sort().map(t=>`${t}=${encodeURIComponent(Object.prototype.toString.call(s[t])==="[object Array]"?s[t].join(","):s[t]).replaceAll("+","%20")}`).join("&")}function se(s,t){if(s.method==="GET"||s.data===void 0&&t.data===void 0)return;let d=Array.isArray(s.data)?s.data:{...s.data,...t.data};return JSON.stringify(d)}function ne(s,t,d){let u={Accept:"application/json",...s,...t,...d},h={};return Object.keys(u).forEach(P=>{let q=u[P];h[P.toLowerCase()]=q}),h}function ie(s){try{return JSON.parse(s.content)}catch(t){throw new ee(t.message,s)}}function ae({content:s,status:t},d){try{let u=JSON.parse(s);return"error"in u?new te(u.message,t,u.error,d):new N(u.message,t,d)}catch{}return new N(s,t,d)}function ue({isTimedOut:s,status:t}){return!s&&~~t===0}function ce({isTimedOut:s,status:t}){return s||ue({isTimedOut:s,status:t})||~~(t/100)!==2&&~~(t/100)!==4}function de({status:s}){return~~(s/100)===2}function le(s){return s.map(t=>j(t))}function j(s){let t=s.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...s,request:{...s.request,headers:{...s.request.headers,...t}}}}function J({hosts:s,hostsCache:t,baseHeaders:d,baseQueryParameters:u,algoliaAgent:h,timeouts:P,requester:q,requestsCache:e,responsesCache:o}){async function n(a){let c=await Promise.all(a.map(g=>t.get(g,()=>Promise.resolve(_(g))))),r=c.filter(g=>g.isUp()),p=c.filter(g=>g.isTimedOut()),f=[...r,...p];return{hosts:f.length>0?f:a,getTimeout(g,R){return(p.length===0&&g===0?1:p.length+3+g)*R}}}async function i(a,c,r=!0){let p=[],f=se(a,c),m=ne(d,a.headers,c.headers),g=a.method==="GET"?{...a.data,...c.data}:{},R={...u,...a.queryParameters,...g};if(h.value&&(R["x-algolia-agent"]=h.value),c&&c.queryParameters)for(let y of Object.keys(c.queryParameters))!c.queryParameters[y]||Object.prototype.toString.call(c.queryParameters[y])==="[object Object]"?R[y]=c.queryParameters[y]:R[y]=c.queryParameters[y].toString();let S=0,C=async(y,A)=>{let w=y.pop();if(w===void 0)throw new Z(le(p));let x={...P,...c.timeouts},H={data:f,headers:m,method:a.method,url:re(w,a.path,R),connectTimeout:A(S,x.connect),responseTimeout:A(S,r?x.read:x.write)},F=O=>{let U={request:H,response:O,host:w,triesLeft:y.length};return p.push(U),U},T=await q.send(H);if(ce(T)){let O=F(T);return T.isTimedOut&&S++,console.log("Retryable failure",j(O)),await t.set(w,_(w,T.isTimedOut?"timed out":"down")),C(y,A)}if(de(T))return ie(T);throw F(T),ae(T,p)},V=s.filter(y=>y.accept==="readWrite"||(r?y.accept==="read":y.accept==="write")),b=await n(V);return C([...b.hosts].reverse(),b.getTimeout)}function l(a,c={}){let r=a.useReadTransporter||a.method==="GET";if(!r)return i(a,c,r);let p=()=>i(a,c);if((c.cacheable||a.cacheable)!==!0)return p();let m={request:a,requestOptions:c,transporter:{queryParameters:u,headers:d}};return o.get(m,()=>e.get(m,()=>e.set(m,p()).then(g=>Promise.all([e.delete(m),g]),g=>Promise.all([e.delete(m),Promise.reject(g)])).then(([g,R])=>R)),{miss:g=>o.set(m,g)})}return{hostsCache:t,requester:q,timeouts:P,algoliaAgent:h,baseHeaders:d,baseQueryParameters:u,hosts:s,request:l,requestsCache:e,responsesCache:o}}function pe(s){let t={value:`Algolia for JavaScript (${s})`,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 $({algoliaAgents:s,client:t,version:d}){let u=pe(d).add({segment:t,version:d});return s.forEach(h=>u.add(h)),u}var M=1e3,z=2e3,B=3e4;function X(){function s(t){return new Promise(d=>{let u=new XMLHttpRequest;u.open(t.method,t.url,!0),Object.keys(t.headers).forEach(e=>u.setRequestHeader(e,t.headers[e]));let h=(e,o)=>setTimeout(()=>{u.abort(),d({status:0,content:o,isTimedOut:!0})},e),P=h(t.connectTimeout,"Connection timeout"),q;u.onreadystatechange=()=>{u.readyState>u.OPENED&&q===void 0&&(clearTimeout(P),q=h(t.responseTimeout,"Socket timeout"))},u.onerror=()=>{u.status===0&&(clearTimeout(P),clearTimeout(q),d({content:u.responseText||"Network request failed",status:u.status,isTimedOut:!1}))},u.onload=()=>{clearTimeout(P),clearTimeout(q),d({content:u.responseText,status:u.status,isTimedOut:!1})},u.send(t.data)})}return{send:s}}var v="5.3.1",k=["de","us"];function fe(s){return[{url:s?"analytics.{region}.algolia.com".replace("{region}",s):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function K({appId:s,apiKey:t,authMode:d,algoliaAgents:u,region:h,...P}){let q=Q(s,t,d);return{transporter:J({hosts:fe(h),...P,algoliaAgent:$({algoliaAgents:u,client:"Analytics",version:v}),baseHeaders:{"content-type":"text/plain",...q.headers(),...P.baseHeaders},baseQueryParameters:{...q.queryParameters(),...P.baseQueryParameters}}),appId:s,clearCache(){return Promise.all([this.transporter.requestsCache.clear(),this.transporter.responsesCache.clear()]).then(()=>{})},get _ua(){return this.transporter.algoliaAgent.value},addAlgoliaAgent(e,o){this.transporter.algoliaAgent.add({segment:e,version:o})},setClientApiKey({apiKey:e}){!d||d==="WithinHeaders"?this.transporter.baseHeaders["x-algolia-api-key"]=e:this.transporter.baseQueryParameters["x-algolia-api-key"]=e},customDelete({path:e,parameters:o},n){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let c={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:o||{},headers:{}};return this.transporter.request(c,n)},customGet({path:e,parameters:o},n){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let c={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:o||{},headers:{}};return this.transporter.request(c,n)},customPost({path:e,parameters:o,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:o||{},headers:{},data:n||{}};return this.transporter.request(r,i)},customPut({path:e,parameters:o,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:o||{},headers:{},data:n||{}};return this.transporter.request(r,i)},getAddToCartRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getAverageClickPosition({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getClickPositions({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getClickThroughRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getConversionRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getNoClickRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getNoResultsRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getPurchaseRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getRevenue({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getSearchesCount({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getSearchesNoClicks({index:e,startDate:o,endDate:n,limit:i,offset:l,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");let r="/2/searches/noClicks",p={},f={};e!==void 0&&(f.index=e.toString()),o!==void 0&&(f.startDate=o.toString()),n!==void 0&&(f.endDate=n.toString()),i!==void 0&&(f.limit=i.toString()),l!==void 0&&(f.offset=l.toString()),a!==void 0&&(f.tags=a.toString());let m={method:"GET",path:r,queryParameters:f,headers:p};return this.transporter.request(m,c)},getSearchesNoResults({index:e,startDate:o,endDate:n,limit:i,offset:l,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");let r="/2/searches/noResults",p={},f={};e!==void 0&&(f.index=e.toString()),o!==void 0&&(f.startDate=o.toString()),n!==void 0&&(f.endDate=n.toString()),i!==void 0&&(f.limit=i.toString()),l!==void 0&&(f.offset=l.toString()),a!==void 0&&(f.tags=a.toString());let m={method:"GET",path:r,queryParameters:f,headers:p};return this.transporter.request(m,c)},getStatus({index:e},o){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");let n="/2/status",i={},l={};e!==void 0&&(l.index=e.toString());let a={method:"GET",path:n,queryParameters:l,headers:i};return this.transporter.request(a,o)},getTopCountries({index:e,startDate:o,endDate:n,limit:i,offset:l,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");let r="/2/countries",p={},f={};e!==void 0&&(f.index=e.toString()),o!==void 0&&(f.startDate=o.toString()),n!==void 0&&(f.endDate=n.toString()),i!==void 0&&(f.limit=i.toString()),l!==void 0&&(f.offset=l.toString()),a!==void 0&&(f.tags=a.toString());let m={method:"GET",path:r,queryParameters:f,headers:p};return this.transporter.request(m,c)},getTopFilterAttributes({index:e,search:o,startDate:n,endDate:i,limit:l,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");let p="/2/filters",f={},m={};e!==void 0&&(m.index=e.toString()),o!==void 0&&(m.search=o.toString()),n!==void 0&&(m.startDate=n.toString()),i!==void 0&&(m.endDate=i.toString()),l!==void 0&&(m.limit=l.toString()),a!==void 0&&(m.offset=a.toString()),c!==void 0&&(m.tags=c.toString());let g={method:"GET",path:p,queryParameters:m,headers:f};return this.transporter.request(g,r)},getTopFilterForAttribute({attribute:e,index:o,search:n,startDate:i,endDate:l,limit:a,offset:c,tags:r},p){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!o)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");let f="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),m={},g={};o!==void 0&&(g.index=o.toString()),n!==void 0&&(g.search=n.toString()),i!==void 0&&(g.startDate=i.toString()),l!==void 0&&(g.endDate=l.toString()),a!==void 0&&(g.limit=a.toString()),c!==void 0&&(g.offset=c.toString()),r!==void 0&&(g.tags=r.toString());let R={method:"GET",path:f,queryParameters:g,headers:m};return this.transporter.request(R,p)},getTopFiltersNoResults({index:e,search:o,startDate:n,endDate:i,limit:l,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");let p="/2/filters/noResults",f={},m={};e!==void 0&&(m.index=e.toString()),o!==void 0&&(m.search=o.toString()),n!==void 0&&(m.startDate=n.toString()),i!==void 0&&(m.endDate=i.toString()),l!==void 0&&(m.limit=l.toString()),a!==void 0&&(m.offset=a.toString()),c!==void 0&&(m.tags=c.toString());let g={method:"GET",path:p,queryParameters:m,headers:f};return this.transporter.request(g,r)},getTopHits({index:e,search:o,clickAnalytics:n,revenueAnalytics:i,startDate:l,endDate:a,limit:c,offset:r,tags:p},f){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");let m="/2/hits",g={},R={};e!==void 0&&(R.index=e.toString()),o!==void 0&&(R.search=o.toString()),n!==void 0&&(R.clickAnalytics=n.toString()),i!==void 0&&(R.revenueAnalytics=i.toString()),l!==void 0&&(R.startDate=l.toString()),a!==void 0&&(R.endDate=a.toString()),c!==void 0&&(R.limit=c.toString()),r!==void 0&&(R.offset=r.toString()),p!==void 0&&(R.tags=p.toString());let S={method:"GET",path:m,queryParameters:R,headers:g};return this.transporter.request(S,f)},getTopSearches({index:e,clickAnalytics:o,revenueAnalytics:n,startDate:i,endDate:l,orderBy:a,direction:c,limit:r,offset:p,tags:f},m){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");let g="/2/searches",R={},S={};e!==void 0&&(S.index=e.toString()),o!==void 0&&(S.clickAnalytics=o.toString()),n!==void 0&&(S.revenueAnalytics=n.toString()),i!==void 0&&(S.startDate=i.toString()),l!==void 0&&(S.endDate=l.toString()),a!==void 0&&(S.orderBy=a.toString()),c!==void 0&&(S.direction=c.toString()),r!==void 0&&(S.limit=r.toString()),p!==void 0&&(S.offset=p.toString()),f!==void 0&&(S.tags=f.toString());let C={method:"GET",path:g,queryParameters:S,headers:R};return this.transporter.request(C,m)},getUsersCount({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)}}}function Nt(s,t,d,u){if(!s||typeof s!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(d&&(typeof d!="string"||!k.includes(d)))throw new Error(`\`region\` must be one of the following: ${k.join(", ")}`);return K({appId:s,apiKey:t,region:d,timeouts:{connect:M,read:z,write:B},requester:X(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:G(),requestsCache:G({serializable:!1}),hostsCache:E({caches:[I({key:`${v}-${s}`}),G()]}),...u})}export{Nt as analyticsClient,v as apiClientVersion}; | ||
//# sourceMappingURL=browser.min.js.map |
@@ -7,3 +7,3 @@ (function (global, factory) { | ||
function Q(s,t,d="WithinHeaders"){let u={"x-algolia-api-key":t,"x-algolia-application-id":s};return {headers(){return d==="WithinHeaders"?u:{}},queryParameters(){return d==="WithinQueryParameters"?u:{}}}}function I(s){let t,d=`algolia-client-js-${s.key}`;function u(){return t===void 0&&(t=s.localStorage||window.localStorage),t}function h(){return JSON.parse(u().getItem(d)||"{}")}function P(e){u().setItem(d,JSON.stringify(e));}function q(){let e=s.timeToLive?s.timeToLive*1e3:null,o=h(),n=Object.fromEntries(Object.entries(o).filter(([,l])=>l.timestamp!==void 0));if(P(n),!e)return;let i=Object.fromEntries(Object.entries(n).filter(([,l])=>{let a=new Date().getTime();return !(l.timestamp+e<a)}));P(i);}return {get(e,o,n={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(q(),h()[JSON.stringify(e)])).then(i=>Promise.all([i?i.value:o(),i!==void 0])).then(([i,l])=>Promise.all([i,l||n.miss(i)])).then(([i])=>i)},set(e,o){return Promise.resolve().then(()=>{let n=h();return n[JSON.stringify(e)]={timestamp:new Date().getTime(),value:o},u().setItem(d,JSON.stringify(n)),o})},delete(e){return Promise.resolve().then(()=>{let o=h();delete o[JSON.stringify(e)],u().setItem(d,JSON.stringify(o));})},clear(){return Promise.resolve().then(()=>{u().removeItem(d);})}}}function Y(){return {get(s,t,d={miss:()=>Promise.resolve()}){return t().then(h=>Promise.all([h,d.miss(h)])).then(([h])=>h)},set(s,t){return Promise.resolve(t)},delete(s){return Promise.resolve()},clear(){return Promise.resolve()}}}function E(s){let t=[...s.caches],d=t.shift();return d===void 0?Y():{get(u,h,P={miss:()=>Promise.resolve()}){return d.get(u,h,P).catch(()=>E({caches:t}).get(u,h,P))},set(u,h){return d.set(u,h).catch(()=>E({caches:t}).set(u,h))},delete(u){return d.delete(u).catch(()=>E({caches:t}).delete(u))},clear(){return d.clear().catch(()=>E({caches:t}).clear())}}}function G(s={serializable:!0}){let t={};return {get(d,u,h={miss:()=>Promise.resolve()}){let P=JSON.stringify(d);if(P in t)return Promise.resolve(s.serializable?JSON.parse(t[P]):t[P]);let q=u();return q.then(e=>h.miss(e)).then(()=>q)},set(d,u){return t[JSON.stringify(d)]=s.serializable?JSON.stringify(u):u,Promise.resolve(u)},delete(d){return delete t[JSON.stringify(d)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}var D=2*60*1e3;function _(s,t="up"){let d=Date.now();function u(){return t==="up"||Date.now()-d>D}function h(){return t==="timed out"&&Date.now()-d<=D}return {...s,status:t,lastUpdate:d,isUp:u,isTimedOut:h}}var L=class extends Error{name="AlgoliaError";constructor(s,t){super(s),t&&(this.name=t);}},W=class extends L{stackTrace;constructor(s,t,d){super(s,d),this.stackTrace=t;}},Z=class extends W{constructor(s){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.",s,"RetryError");}},N=class extends W{status;constructor(s,t,d,u="ApiError"){super(s,d,u),this.status=t;}},ee=class extends L{response;constructor(s,t){super(s,"DeserializationError"),this.response=t;}},te=class extends N{error;constructor(s,t,d,u){super(s,t,u,"DetailedApiError"),this.error=d;}};function re(s,t,d){let u=oe(d),h=`${s.protocol}://${s.url}${s.port?`:${s.port}`:""}/${t.charAt(0)==="/"?t.substring(1):t}`;return u.length&&(h+=`?${u}`),h}function oe(s){return Object.keys(s).filter(t=>s[t]!==void 0).sort().map(t=>`${t}=${encodeURIComponent(Object.prototype.toString.call(s[t])==="[object Array]"?s[t].join(","):s[t]).replaceAll("+","%20")}`).join("&")}function se(s,t){if(s.method==="GET"||s.data===void 0&&t.data===void 0)return;let d=Array.isArray(s.data)?s.data:{...s.data,...t.data};return JSON.stringify(d)}function ne(s,t,d){let u={Accept:"application/json",...s,...t,...d},h={};return Object.keys(u).forEach(P=>{let q=u[P];h[P.toLowerCase()]=q;}),h}function ie(s){try{return JSON.parse(s.content)}catch(t){throw new ee(t.message,s)}}function ae({content:s,status:t},d){try{let u=JSON.parse(s);return "error"in u?new te(u.message,t,u.error,d):new N(u.message,t,d)}catch{}return new N(s,t,d)}function ue({isTimedOut:s,status:t}){return !s&&~~t===0}function ce({isTimedOut:s,status:t}){return s||ue({isTimedOut:s,status:t})||~~(t/100)!==2&&~~(t/100)!==4}function de({status:s}){return ~~(s/100)===2}function le(s){return s.map(t=>j(t))}function j(s){let t=s.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...s,request:{...s.request,headers:{...s.request.headers,...t}}}}function J({hosts:s,hostsCache:t,baseHeaders:d,baseQueryParameters:u,algoliaAgent:h,timeouts:P,requester:q,requestsCache:e,responsesCache:o}){async function n(a){let c=await Promise.all(a.map(g=>t.get(g,()=>Promise.resolve(_(g))))),r=c.filter(g=>g.isUp()),p=c.filter(g=>g.isTimedOut()),f=[...r,...p];return {hosts:f.length>0?f:a,getTimeout(g,R){return (p.length===0&&g===0?1:p.length+3+g)*R}}}async function i(a,c,r=!0){let p=[],f=se(a,c),m=ne(d,a.headers,c.headers),g=a.method==="GET"?{...a.data,...c.data}:{},R={...u,...a.queryParameters,...g};if(h.value&&(R["x-algolia-agent"]=h.value),c&&c.queryParameters)for(let y of Object.keys(c.queryParameters))!c.queryParameters[y]||Object.prototype.toString.call(c.queryParameters[y])==="[object Object]"?R[y]=c.queryParameters[y]:R[y]=c.queryParameters[y].toString();let S=0,C=async(y,A)=>{let w=y.pop();if(w===void 0)throw new Z(le(p));let x={...P,...c.timeouts},H={data:f,headers:m,method:a.method,url:re(w,a.path,R),connectTimeout:A(S,x.connect),responseTimeout:A(S,r?x.read:x.write)},F=O=>{let U={request:H,response:O,host:w,triesLeft:y.length};return p.push(U),U},T=await q.send(H);if(ce(T)){let O=F(T);return T.isTimedOut&&S++,console.log("Retryable failure",j(O)),await t.set(w,_(w,T.isTimedOut?"timed out":"down")),C(y,A)}if(de(T))return ie(T);throw F(T),ae(T,p)},V=s.filter(y=>y.accept==="readWrite"||(r?y.accept==="read":y.accept==="write")),b=await n(V);return C([...b.hosts].reverse(),b.getTimeout)}function l(a,c={}){let r=a.useReadTransporter||a.method==="GET";if(!r)return i(a,c,r);let p=()=>i(a,c);if((c.cacheable||a.cacheable)!==!0)return p();let m={request:a,requestOptions:c,transporter:{queryParameters:u,headers:d}};return o.get(m,()=>e.get(m,()=>e.set(m,p()).then(g=>Promise.all([e.delete(m),g]),g=>Promise.all([e.delete(m),Promise.reject(g)])).then(([g,R])=>R)),{miss:g=>o.set(m,g)})}return {hostsCache:t,requester:q,timeouts:P,algoliaAgent:h,baseHeaders:d,baseQueryParameters:u,hosts:s,request:l,requestsCache:e,responsesCache:o}}function pe(s){let t={value:`Algolia for JavaScript (${s})`,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 $({algoliaAgents:s,client:t,version:d}){let u=pe(d).add({segment:t,version:d});return s.forEach(h=>u.add(h)),u}var M=1e3,z=2e3,B=3e4;function X(){function s(t){return new Promise(d=>{let u=new XMLHttpRequest;u.open(t.method,t.url,!0),Object.keys(t.headers).forEach(e=>u.setRequestHeader(e,t.headers[e]));let h=(e,o)=>setTimeout(()=>{u.abort(),d({status:0,content:o,isTimedOut:!0});},e),P=h(t.connectTimeout,"Connection timeout"),q;u.onreadystatechange=()=>{u.readyState>u.OPENED&&q===void 0&&(clearTimeout(P),q=h(t.responseTimeout,"Socket timeout"));},u.onerror=()=>{u.status===0&&(clearTimeout(P),clearTimeout(q),d({content:u.responseText||"Network request failed",status:u.status,isTimedOut:!1}));},u.onload=()=>{clearTimeout(P),clearTimeout(q),d({content:u.responseText,status:u.status,isTimedOut:!1});},u.send(t.data);})}return {send:s}}var v="5.3.0",k=["de","us"];function fe(s){return [{url:s?"analytics.{region}.algolia.com".replace("{region}",s):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function K({appId:s,apiKey:t,authMode:d,algoliaAgents:u,region:h,...P}){let q=Q(s,t,d);return {transporter:J({hosts:fe(h),...P,algoliaAgent:$({algoliaAgents:u,client:"Analytics",version:v}),baseHeaders:{"content-type":"text/plain",...q.headers(),...P.baseHeaders},baseQueryParameters:{...q.queryParameters(),...P.baseQueryParameters}}),appId:s,clearCache(){return Promise.all([this.transporter.requestsCache.clear(),this.transporter.responsesCache.clear()]).then(()=>{})},get _ua(){return this.transporter.algoliaAgent.value},addAlgoliaAgent(e,o){this.transporter.algoliaAgent.add({segment:e,version:o});},setClientApiKey({apiKey:e}){this.transporter.baseHeaders["x-algolia-api-key"]=e;},customDelete({path:e,parameters:o},n){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let c={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:o||{},headers:{}};return this.transporter.request(c,n)},customGet({path:e,parameters:o},n){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let c={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:o||{},headers:{}};return this.transporter.request(c,n)},customPost({path:e,parameters:o,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:o||{},headers:{},data:n||{}};return this.transporter.request(r,i)},customPut({path:e,parameters:o,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:o||{},headers:{},data:n||{}};return this.transporter.request(r,i)},getAddToCartRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getAverageClickPosition({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getClickPositions({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getClickThroughRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getConversionRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getNoClickRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getNoResultsRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getPurchaseRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getRevenue({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getSearchesCount({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getSearchesNoClicks({index:e,startDate:o,endDate:n,limit:i,offset:l,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");let r="/2/searches/noClicks",p={},f={};e!==void 0&&(f.index=e.toString()),o!==void 0&&(f.startDate=o.toString()),n!==void 0&&(f.endDate=n.toString()),i!==void 0&&(f.limit=i.toString()),l!==void 0&&(f.offset=l.toString()),a!==void 0&&(f.tags=a.toString());let m={method:"GET",path:r,queryParameters:f,headers:p};return this.transporter.request(m,c)},getSearchesNoResults({index:e,startDate:o,endDate:n,limit:i,offset:l,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");let r="/2/searches/noResults",p={},f={};e!==void 0&&(f.index=e.toString()),o!==void 0&&(f.startDate=o.toString()),n!==void 0&&(f.endDate=n.toString()),i!==void 0&&(f.limit=i.toString()),l!==void 0&&(f.offset=l.toString()),a!==void 0&&(f.tags=a.toString());let m={method:"GET",path:r,queryParameters:f,headers:p};return this.transporter.request(m,c)},getStatus({index:e},o){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");let n="/2/status",i={},l={};e!==void 0&&(l.index=e.toString());let a={method:"GET",path:n,queryParameters:l,headers:i};return this.transporter.request(a,o)},getTopCountries({index:e,startDate:o,endDate:n,limit:i,offset:l,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");let r="/2/countries",p={},f={};e!==void 0&&(f.index=e.toString()),o!==void 0&&(f.startDate=o.toString()),n!==void 0&&(f.endDate=n.toString()),i!==void 0&&(f.limit=i.toString()),l!==void 0&&(f.offset=l.toString()),a!==void 0&&(f.tags=a.toString());let m={method:"GET",path:r,queryParameters:f,headers:p};return this.transporter.request(m,c)},getTopFilterAttributes({index:e,search:o,startDate:n,endDate:i,limit:l,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");let p="/2/filters",f={},m={};e!==void 0&&(m.index=e.toString()),o!==void 0&&(m.search=o.toString()),n!==void 0&&(m.startDate=n.toString()),i!==void 0&&(m.endDate=i.toString()),l!==void 0&&(m.limit=l.toString()),a!==void 0&&(m.offset=a.toString()),c!==void 0&&(m.tags=c.toString());let g={method:"GET",path:p,queryParameters:m,headers:f};return this.transporter.request(g,r)},getTopFilterForAttribute({attribute:e,index:o,search:n,startDate:i,endDate:l,limit:a,offset:c,tags:r},p){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!o)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");let f="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),m={},g={};o!==void 0&&(g.index=o.toString()),n!==void 0&&(g.search=n.toString()),i!==void 0&&(g.startDate=i.toString()),l!==void 0&&(g.endDate=l.toString()),a!==void 0&&(g.limit=a.toString()),c!==void 0&&(g.offset=c.toString()),r!==void 0&&(g.tags=r.toString());let R={method:"GET",path:f,queryParameters:g,headers:m};return this.transporter.request(R,p)},getTopFiltersNoResults({index:e,search:o,startDate:n,endDate:i,limit:l,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");let p="/2/filters/noResults",f={},m={};e!==void 0&&(m.index=e.toString()),o!==void 0&&(m.search=o.toString()),n!==void 0&&(m.startDate=n.toString()),i!==void 0&&(m.endDate=i.toString()),l!==void 0&&(m.limit=l.toString()),a!==void 0&&(m.offset=a.toString()),c!==void 0&&(m.tags=c.toString());let g={method:"GET",path:p,queryParameters:m,headers:f};return this.transporter.request(g,r)},getTopHits({index:e,search:o,clickAnalytics:n,revenueAnalytics:i,startDate:l,endDate:a,limit:c,offset:r,tags:p},f){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");let m="/2/hits",g={},R={};e!==void 0&&(R.index=e.toString()),o!==void 0&&(R.search=o.toString()),n!==void 0&&(R.clickAnalytics=n.toString()),i!==void 0&&(R.revenueAnalytics=i.toString()),l!==void 0&&(R.startDate=l.toString()),a!==void 0&&(R.endDate=a.toString()),c!==void 0&&(R.limit=c.toString()),r!==void 0&&(R.offset=r.toString()),p!==void 0&&(R.tags=p.toString());let S={method:"GET",path:m,queryParameters:R,headers:g};return this.transporter.request(S,f)},getTopSearches({index:e,clickAnalytics:o,revenueAnalytics:n,startDate:i,endDate:l,orderBy:a,direction:c,limit:r,offset:p,tags:f},m){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");let g="/2/searches",R={},S={};e!==void 0&&(S.index=e.toString()),o!==void 0&&(S.clickAnalytics=o.toString()),n!==void 0&&(S.revenueAnalytics=n.toString()),i!==void 0&&(S.startDate=i.toString()),l!==void 0&&(S.endDate=l.toString()),a!==void 0&&(S.orderBy=a.toString()),c!==void 0&&(S.direction=c.toString()),r!==void 0&&(S.limit=r.toString()),p!==void 0&&(S.offset=p.toString()),f!==void 0&&(S.tags=f.toString());let C={method:"GET",path:g,queryParameters:S,headers:R};return this.transporter.request(C,m)},getUsersCount({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)}}}function Nt(s,t,d,u){if(!s||typeof s!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(d&&(typeof d!="string"||!k.includes(d)))throw new Error(`\`region\` must be one of the following: ${k.join(", ")}`);return K({appId:s,apiKey:t,region:d,timeouts:{connect:M,read:z,write:B},requester:X(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:G(),requestsCache:G({serializable:!1}),hostsCache:E({caches:[I({key:`${v}-${s}`}),G()]}),...u})} | ||
function Q(s,t,d="WithinHeaders"){let u={"x-algolia-api-key":t,"x-algolia-application-id":s};return {headers(){return d==="WithinHeaders"?u:{}},queryParameters(){return d==="WithinQueryParameters"?u:{}}}}function I(s){let t,d=`algolia-client-js-${s.key}`;function u(){return t===void 0&&(t=s.localStorage||window.localStorage),t}function h(){return JSON.parse(u().getItem(d)||"{}")}function P(e){u().setItem(d,JSON.stringify(e));}function q(){let e=s.timeToLive?s.timeToLive*1e3:null,o=h(),n=Object.fromEntries(Object.entries(o).filter(([,l])=>l.timestamp!==void 0));if(P(n),!e)return;let i=Object.fromEntries(Object.entries(n).filter(([,l])=>{let a=new Date().getTime();return !(l.timestamp+e<a)}));P(i);}return {get(e,o,n={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(q(),h()[JSON.stringify(e)])).then(i=>Promise.all([i?i.value:o(),i!==void 0])).then(([i,l])=>Promise.all([i,l||n.miss(i)])).then(([i])=>i)},set(e,o){return Promise.resolve().then(()=>{let n=h();return n[JSON.stringify(e)]={timestamp:new Date().getTime(),value:o},u().setItem(d,JSON.stringify(n)),o})},delete(e){return Promise.resolve().then(()=>{let o=h();delete o[JSON.stringify(e)],u().setItem(d,JSON.stringify(o));})},clear(){return Promise.resolve().then(()=>{u().removeItem(d);})}}}function Y(){return {get(s,t,d={miss:()=>Promise.resolve()}){return t().then(h=>Promise.all([h,d.miss(h)])).then(([h])=>h)},set(s,t){return Promise.resolve(t)},delete(s){return Promise.resolve()},clear(){return Promise.resolve()}}}function E(s){let t=[...s.caches],d=t.shift();return d===void 0?Y():{get(u,h,P={miss:()=>Promise.resolve()}){return d.get(u,h,P).catch(()=>E({caches:t}).get(u,h,P))},set(u,h){return d.set(u,h).catch(()=>E({caches:t}).set(u,h))},delete(u){return d.delete(u).catch(()=>E({caches:t}).delete(u))},clear(){return d.clear().catch(()=>E({caches:t}).clear())}}}function G(s={serializable:!0}){let t={};return {get(d,u,h={miss:()=>Promise.resolve()}){let P=JSON.stringify(d);if(P in t)return Promise.resolve(s.serializable?JSON.parse(t[P]):t[P]);let q=u();return q.then(e=>h.miss(e)).then(()=>q)},set(d,u){return t[JSON.stringify(d)]=s.serializable?JSON.stringify(u):u,Promise.resolve(u)},delete(d){return delete t[JSON.stringify(d)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}var D=2*60*1e3;function _(s,t="up"){let d=Date.now();function u(){return t==="up"||Date.now()-d>D}function h(){return t==="timed out"&&Date.now()-d<=D}return {...s,status:t,lastUpdate:d,isUp:u,isTimedOut:h}}var L=class extends Error{name="AlgoliaError";constructor(s,t){super(s),t&&(this.name=t);}},W=class extends L{stackTrace;constructor(s,t,d){super(s,d),this.stackTrace=t;}},Z=class extends W{constructor(s){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.",s,"RetryError");}},N=class extends W{status;constructor(s,t,d,u="ApiError"){super(s,d,u),this.status=t;}},ee=class extends L{response;constructor(s,t){super(s,"DeserializationError"),this.response=t;}},te=class extends N{error;constructor(s,t,d,u){super(s,t,u,"DetailedApiError"),this.error=d;}};function re(s,t,d){let u=oe(d),h=`${s.protocol}://${s.url}${s.port?`:${s.port}`:""}/${t.charAt(0)==="/"?t.substring(1):t}`;return u.length&&(h+=`?${u}`),h}function oe(s){return Object.keys(s).filter(t=>s[t]!==void 0).sort().map(t=>`${t}=${encodeURIComponent(Object.prototype.toString.call(s[t])==="[object Array]"?s[t].join(","):s[t]).replaceAll("+","%20")}`).join("&")}function se(s,t){if(s.method==="GET"||s.data===void 0&&t.data===void 0)return;let d=Array.isArray(s.data)?s.data:{...s.data,...t.data};return JSON.stringify(d)}function ne(s,t,d){let u={Accept:"application/json",...s,...t,...d},h={};return Object.keys(u).forEach(P=>{let q=u[P];h[P.toLowerCase()]=q;}),h}function ie(s){try{return JSON.parse(s.content)}catch(t){throw new ee(t.message,s)}}function ae({content:s,status:t},d){try{let u=JSON.parse(s);return "error"in u?new te(u.message,t,u.error,d):new N(u.message,t,d)}catch{}return new N(s,t,d)}function ue({isTimedOut:s,status:t}){return !s&&~~t===0}function ce({isTimedOut:s,status:t}){return s||ue({isTimedOut:s,status:t})||~~(t/100)!==2&&~~(t/100)!==4}function de({status:s}){return ~~(s/100)===2}function le(s){return s.map(t=>j(t))}function j(s){let t=s.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...s,request:{...s.request,headers:{...s.request.headers,...t}}}}function J({hosts:s,hostsCache:t,baseHeaders:d,baseQueryParameters:u,algoliaAgent:h,timeouts:P,requester:q,requestsCache:e,responsesCache:o}){async function n(a){let c=await Promise.all(a.map(g=>t.get(g,()=>Promise.resolve(_(g))))),r=c.filter(g=>g.isUp()),p=c.filter(g=>g.isTimedOut()),f=[...r,...p];return {hosts:f.length>0?f:a,getTimeout(g,R){return (p.length===0&&g===0?1:p.length+3+g)*R}}}async function i(a,c,r=!0){let p=[],f=se(a,c),m=ne(d,a.headers,c.headers),g=a.method==="GET"?{...a.data,...c.data}:{},R={...u,...a.queryParameters,...g};if(h.value&&(R["x-algolia-agent"]=h.value),c&&c.queryParameters)for(let y of Object.keys(c.queryParameters))!c.queryParameters[y]||Object.prototype.toString.call(c.queryParameters[y])==="[object Object]"?R[y]=c.queryParameters[y]:R[y]=c.queryParameters[y].toString();let S=0,C=async(y,A)=>{let w=y.pop();if(w===void 0)throw new Z(le(p));let x={...P,...c.timeouts},H={data:f,headers:m,method:a.method,url:re(w,a.path,R),connectTimeout:A(S,x.connect),responseTimeout:A(S,r?x.read:x.write)},F=O=>{let U={request:H,response:O,host:w,triesLeft:y.length};return p.push(U),U},T=await q.send(H);if(ce(T)){let O=F(T);return T.isTimedOut&&S++,console.log("Retryable failure",j(O)),await t.set(w,_(w,T.isTimedOut?"timed out":"down")),C(y,A)}if(de(T))return ie(T);throw F(T),ae(T,p)},V=s.filter(y=>y.accept==="readWrite"||(r?y.accept==="read":y.accept==="write")),b=await n(V);return C([...b.hosts].reverse(),b.getTimeout)}function l(a,c={}){let r=a.useReadTransporter||a.method==="GET";if(!r)return i(a,c,r);let p=()=>i(a,c);if((c.cacheable||a.cacheable)!==!0)return p();let m={request:a,requestOptions:c,transporter:{queryParameters:u,headers:d}};return o.get(m,()=>e.get(m,()=>e.set(m,p()).then(g=>Promise.all([e.delete(m),g]),g=>Promise.all([e.delete(m),Promise.reject(g)])).then(([g,R])=>R)),{miss:g=>o.set(m,g)})}return {hostsCache:t,requester:q,timeouts:P,algoliaAgent:h,baseHeaders:d,baseQueryParameters:u,hosts:s,request:l,requestsCache:e,responsesCache:o}}function pe(s){let t={value:`Algolia for JavaScript (${s})`,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 $({algoliaAgents:s,client:t,version:d}){let u=pe(d).add({segment:t,version:d});return s.forEach(h=>u.add(h)),u}var M=1e3,z=2e3,B=3e4;function X(){function s(t){return new Promise(d=>{let u=new XMLHttpRequest;u.open(t.method,t.url,!0),Object.keys(t.headers).forEach(e=>u.setRequestHeader(e,t.headers[e]));let h=(e,o)=>setTimeout(()=>{u.abort(),d({status:0,content:o,isTimedOut:!0});},e),P=h(t.connectTimeout,"Connection timeout"),q;u.onreadystatechange=()=>{u.readyState>u.OPENED&&q===void 0&&(clearTimeout(P),q=h(t.responseTimeout,"Socket timeout"));},u.onerror=()=>{u.status===0&&(clearTimeout(P),clearTimeout(q),d({content:u.responseText||"Network request failed",status:u.status,isTimedOut:!1}));},u.onload=()=>{clearTimeout(P),clearTimeout(q),d({content:u.responseText,status:u.status,isTimedOut:!1});},u.send(t.data);})}return {send:s}}var v="5.3.1",k=["de","us"];function fe(s){return [{url:s?"analytics.{region}.algolia.com".replace("{region}",s):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function K({appId:s,apiKey:t,authMode:d,algoliaAgents:u,region:h,...P}){let q=Q(s,t,d);return {transporter:J({hosts:fe(h),...P,algoliaAgent:$({algoliaAgents:u,client:"Analytics",version:v}),baseHeaders:{"content-type":"text/plain",...q.headers(),...P.baseHeaders},baseQueryParameters:{...q.queryParameters(),...P.baseQueryParameters}}),appId:s,clearCache(){return Promise.all([this.transporter.requestsCache.clear(),this.transporter.responsesCache.clear()]).then(()=>{})},get _ua(){return this.transporter.algoliaAgent.value},addAlgoliaAgent(e,o){this.transporter.algoliaAgent.add({segment:e,version:o});},setClientApiKey({apiKey:e}){!d||d==="WithinHeaders"?this.transporter.baseHeaders["x-algolia-api-key"]=e:this.transporter.baseQueryParameters["x-algolia-api-key"]=e;},customDelete({path:e,parameters:o},n){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let c={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:o||{},headers:{}};return this.transporter.request(c,n)},customGet({path:e,parameters:o},n){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let c={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:o||{},headers:{}};return this.transporter.request(c,n)},customPost({path:e,parameters:o,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:o||{},headers:{},data:n||{}};return this.transporter.request(r,i)},customPut({path:e,parameters:o,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:o||{},headers:{},data:n||{}};return this.transporter.request(r,i)},getAddToCartRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getAverageClickPosition({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getClickPositions({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getClickThroughRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getConversionRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getNoClickRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getNoResultsRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getPurchaseRate({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getRevenue({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getSearchesCount({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)},getSearchesNoClicks({index:e,startDate:o,endDate:n,limit:i,offset:l,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");let r="/2/searches/noClicks",p={},f={};e!==void 0&&(f.index=e.toString()),o!==void 0&&(f.startDate=o.toString()),n!==void 0&&(f.endDate=n.toString()),i!==void 0&&(f.limit=i.toString()),l!==void 0&&(f.offset=l.toString()),a!==void 0&&(f.tags=a.toString());let m={method:"GET",path:r,queryParameters:f,headers:p};return this.transporter.request(m,c)},getSearchesNoResults({index:e,startDate:o,endDate:n,limit:i,offset:l,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");let r="/2/searches/noResults",p={},f={};e!==void 0&&(f.index=e.toString()),o!==void 0&&(f.startDate=o.toString()),n!==void 0&&(f.endDate=n.toString()),i!==void 0&&(f.limit=i.toString()),l!==void 0&&(f.offset=l.toString()),a!==void 0&&(f.tags=a.toString());let m={method:"GET",path:r,queryParameters:f,headers:p};return this.transporter.request(m,c)},getStatus({index:e},o){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");let n="/2/status",i={},l={};e!==void 0&&(l.index=e.toString());let a={method:"GET",path:n,queryParameters:l,headers:i};return this.transporter.request(a,o)},getTopCountries({index:e,startDate:o,endDate:n,limit:i,offset:l,tags:a},c){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");let r="/2/countries",p={},f={};e!==void 0&&(f.index=e.toString()),o!==void 0&&(f.startDate=o.toString()),n!==void 0&&(f.endDate=n.toString()),i!==void 0&&(f.limit=i.toString()),l!==void 0&&(f.offset=l.toString()),a!==void 0&&(f.tags=a.toString());let m={method:"GET",path:r,queryParameters:f,headers:p};return this.transporter.request(m,c)},getTopFilterAttributes({index:e,search:o,startDate:n,endDate:i,limit:l,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");let p="/2/filters",f={},m={};e!==void 0&&(m.index=e.toString()),o!==void 0&&(m.search=o.toString()),n!==void 0&&(m.startDate=n.toString()),i!==void 0&&(m.endDate=i.toString()),l!==void 0&&(m.limit=l.toString()),a!==void 0&&(m.offset=a.toString()),c!==void 0&&(m.tags=c.toString());let g={method:"GET",path:p,queryParameters:m,headers:f};return this.transporter.request(g,r)},getTopFilterForAttribute({attribute:e,index:o,search:n,startDate:i,endDate:l,limit:a,offset:c,tags:r},p){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!o)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");let f="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),m={},g={};o!==void 0&&(g.index=o.toString()),n!==void 0&&(g.search=n.toString()),i!==void 0&&(g.startDate=i.toString()),l!==void 0&&(g.endDate=l.toString()),a!==void 0&&(g.limit=a.toString()),c!==void 0&&(g.offset=c.toString()),r!==void 0&&(g.tags=r.toString());let R={method:"GET",path:f,queryParameters:g,headers:m};return this.transporter.request(R,p)},getTopFiltersNoResults({index:e,search:o,startDate:n,endDate:i,limit:l,offset:a,tags:c},r){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");let p="/2/filters/noResults",f={},m={};e!==void 0&&(m.index=e.toString()),o!==void 0&&(m.search=o.toString()),n!==void 0&&(m.startDate=n.toString()),i!==void 0&&(m.endDate=i.toString()),l!==void 0&&(m.limit=l.toString()),a!==void 0&&(m.offset=a.toString()),c!==void 0&&(m.tags=c.toString());let g={method:"GET",path:p,queryParameters:m,headers:f};return this.transporter.request(g,r)},getTopHits({index:e,search:o,clickAnalytics:n,revenueAnalytics:i,startDate:l,endDate:a,limit:c,offset:r,tags:p},f){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");let m="/2/hits",g={},R={};e!==void 0&&(R.index=e.toString()),o!==void 0&&(R.search=o.toString()),n!==void 0&&(R.clickAnalytics=n.toString()),i!==void 0&&(R.revenueAnalytics=i.toString()),l!==void 0&&(R.startDate=l.toString()),a!==void 0&&(R.endDate=a.toString()),c!==void 0&&(R.limit=c.toString()),r!==void 0&&(R.offset=r.toString()),p!==void 0&&(R.tags=p.toString());let S={method:"GET",path:m,queryParameters:R,headers:g};return this.transporter.request(S,f)},getTopSearches({index:e,clickAnalytics:o,revenueAnalytics:n,startDate:i,endDate:l,orderBy:a,direction:c,limit:r,offset:p,tags:f},m){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");let g="/2/searches",R={},S={};e!==void 0&&(S.index=e.toString()),o!==void 0&&(S.clickAnalytics=o.toString()),n!==void 0&&(S.revenueAnalytics=n.toString()),i!==void 0&&(S.startDate=i.toString()),l!==void 0&&(S.endDate=l.toString()),a!==void 0&&(S.orderBy=a.toString()),c!==void 0&&(S.direction=c.toString()),r!==void 0&&(S.limit=r.toString()),p!==void 0&&(S.offset=p.toString()),f!==void 0&&(S.tags=f.toString());let C={method:"GET",path:g,queryParameters:S,headers:R};return this.transporter.request(C,m)},getUsersCount({index:e,startDate:o,endDate:n,tags:i},l){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()),o!==void 0&&(r.startDate=o.toString()),n!==void 0&&(r.endDate=n.toString()),i!==void 0&&(r.tags=i.toString());let p={method:"GET",path:a,queryParameters:r,headers:c};return this.transporter.request(p,l)}}}function Nt(s,t,d,u){if(!s||typeof s!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(d&&(typeof d!="string"||!k.includes(d)))throw new Error(`\`region\` must be one of the following: ${k.join(", ")}`);return K({appId:s,apiKey:t,region:d,timeouts:{connect:M,read:z,write:B},requester:X(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:G(),requestsCache:G({serializable:!1}),hostsCache:E({caches:[I({key:`${v}-${s}`}),G()]}),...u})} | ||
@@ -10,0 +10,0 @@ exports.analyticsClient = Nt; |
@@ -13,3 +13,3 @@ // builds/node.ts | ||
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common"; | ||
var apiClientVersion = "5.3.0"; | ||
var apiClientVersion = "5.3.1"; | ||
var REGIONS = ["de", "us"]; | ||
@@ -82,3 +82,7 @@ function getDefaultHosts(region) { | ||
setClientApiKey({ apiKey }) { | ||
this.transporter.baseHeaders["x-algolia-api-key"] = apiKey; | ||
if (!authMode || authMode === "WithinHeaders") { | ||
this.transporter.baseHeaders["x-algolia-api-key"] = apiKey; | ||
} else { | ||
this.transporter.baseQueryParameters["x-algolia-api-key"] = apiKey; | ||
} | ||
}, | ||
@@ -85,0 +89,0 @@ /** |
// src/analyticsClient.ts | ||
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common"; | ||
var apiClientVersion = "5.3.0"; | ||
var apiClientVersion = "5.3.1"; | ||
var REGIONS = ["de", "us"]; | ||
@@ -71,3 +71,7 @@ function getDefaultHosts(region) { | ||
setClientApiKey({ apiKey }) { | ||
this.transporter.baseHeaders["x-algolia-api-key"] = apiKey; | ||
if (!authMode || authMode === "WithinHeaders") { | ||
this.transporter.baseHeaders["x-algolia-api-key"] = apiKey; | ||
} else { | ||
this.transporter.baseQueryParameters["x-algolia-api-key"] = apiKey; | ||
} | ||
}, | ||
@@ -74,0 +78,0 @@ /** |
{ | ||
"version": "5.3.0", | ||
"version": "5.3.1", | ||
"repository": { | ||
@@ -47,5 +47,5 @@ "type": "git", | ||
"dependencies": { | ||
"@algolia/client-common": "5.3.0", | ||
"@algolia/requester-browser-xhr": "5.3.0", | ||
"@algolia/requester-node-http": "5.3.0" | ||
"@algolia/client-common": "5.3.1", | ||
"@algolia/requester-browser-xhr": "5.3.1", | ||
"@algolia/requester-node-http": "5.3.1" | ||
}, | ||
@@ -52,0 +52,0 @@ "devDependencies": { |
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 not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1050833
10602
+ Added@algolia/client-common@5.3.1(transitive)
+ Added@algolia/requester-browser-xhr@5.3.1(transitive)
+ Added@algolia/requester-node-http@5.3.1(transitive)
- Removed@algolia/client-common@5.3.0(transitive)
- Removed@algolia/requester-browser-xhr@5.3.0(transitive)
- Removed@algolia/requester-node-http@5.3.0(transitive)
Updated@algolia/client-common@5.3.1