import{aa as Ne,ab as Re,ac as Ce,ad as nr,ae as ar,af as Le,ag as $e,ah as or,$ as sr,Z as ur,B as me,u as ge,T as ir}from"./entry.DPwc-EV0.js";import{g as cr,b as fr,i as lr}from"./_getMatchData-DBNiRSif.mjs";import{b as dr}from"./_baseIsEqual-Qp0O0Rsf.mjs";import{k as hr}from"./_Uint8Array-Bki-tCc2.mjs";function pr(d,p,i){var O=d==null?void 0:Ne(d,p);return O===void 0?i:O}function Ue(d,p){return function(i){return i==null?!1:i[d]===p&&(p!==void 0||d in Object(i))}}function mr(d){var p=cr(d);return p.length==1&&p[0][2]?Ue(p[0][0],p[0][1]):function(i){return i===d||fr(i,d,p)}}var gr=1,yr=2;function br(d,p){return Re(d)&&lr(p)?Ue(Ce(d),p):function(i){var O=pr(i,d);return O===void 0&&O===p?nr(i,d):dr(p,O,gr|yr)}}function wr(d){return function(p){return p==null?void 0:p[d]}}function vr(d){return function(p){return Ne(p,d)}}function Sr(d){return Re(d)?wr(Ce(d)):vr(d)}function Or(d){return typeof d=="function"?d:d==null?ar:typeof d=="object"?Le(d)?br(d[0],d[1]):mr(d):Sr(d)}function xr(d){return function(p,i,O){for(var s=-1,m=Object(p),j=O(p),L=j.length;L--;){var _=j[d?L:++s];if(i(m[_],_,m)===!1)break}return p}}var Pr=xr();const Ir=Pr;function Dr(d,p){return d&&Ir(d,p,hr)}function jr(d,p){return function(i,O){if(i==null)return i;if(!$e(i))return d(i,O);for(var s=i.length,m=p?s:-1,j=Object(i);(p?m--:++m =0||(l[c]=f[c]);return l}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n =0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function j(e,t){return function(r){if(Array.isArray(r))return r}(e)||function(r,n){if(Symbol.iterator in Object(r)||Object.prototype.toString.call(r)==="[object Arguments]"){var a=[],u=!0,f=!1,o=void 0;try{for(var c,h=r[Symbol.iterator]();!(u=(c=h.next()).done)&&(a.push(c.value),!n||a.length!==n);u=!0);}catch(l){f=!0,o=l}finally{try{u||h.return==null||h.return()}finally{if(f)throw o}}return a}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function L(e){return function(t){if(Array.isArray(t)){for(var r=0,n=new Array(t.length);r 2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){f();var l=JSON.stringify(o);return a()[l]}).then(function(l){return Promise.all([l?l.value:c(),l!==void 0])}).then(function(l){var b=j(l,2),y=b[0],x=b[1];return Promise.all([y,x||h.miss(y)])}).then(function(l){return j(l,1)[0]})},set:function(o,c){return Promise.resolve().then(function(){var h=a();return h[JSON.stringify(o)]={timestamp:new Date().getTime(),value:c},n().setItem(r,JSON.stringify(h)),c})},delete:function(o){return Promise.resolve().then(function(){var c=a();delete c[JSON.stringify(o)],n().setItem(r,JSON.stringify(c))})},clear:function(){return Promise.resolve().then(function(){n().removeItem(r)})}}}function M(e){var t=L(e.caches),r=t.shift();return r===void 0?{get:function(n,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},f=a();return f.then(function(o){return Promise.all([o,u.miss(o)])}).then(function(o){return j(o,1)[0]})},set:function(n,a){return Promise.resolve(a)},delete:function(n){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(n,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(n,a,u).catch(function(){return M({caches:t}).get(n,a,u)})},set:function(n,a){return r.set(n,a).catch(function(){return M({caches:t}).set(n,a)})},delete:function(n){return r.delete(n).catch(function(){return M({caches:t}).delete(n)})},clear:function(){return r.clear().catch(function(){return M({caches:t}).clear()})}}}function E(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},u=JSON.stringify(r);if(u in t)return Promise.resolve(e.serializable?JSON.parse(t[u]):t[u]);var f=n(),o=a&&a.miss||function(){return Promise.resolve()};return f.then(function(c){return o(c)}).then(function(){return f})},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(r){return delete t[JSON.stringify(r)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function $(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===H.WithinHeaders?n:{}},queryParameters:function(){return e===H.WithinQueryParameters?n:{}}}}function U(e){var t=0;return e(function r(){return t++,new Promise(function(n){setTimeout(function(){n(e(r))},Math.min(100*t,1e3))})})}function w(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(r,n){return Promise.resolve()};return Object.assign(e,{wait:function(r){return w(e.then(function(n){return Promise.all([t(n,r),n])}).then(function(n){return n[1]}))}})}function B(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function I(e,t){return t&&Object.keys(t).forEach(function(r){e[r]=t[r](e)}),e}function g(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n 0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var G={Read:1,Write:2,Any:3},T=1,W=2,K=3;function Q(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:T;return s(s({},e),{},{status:t,lastUpdate:Date.now()})}function v(e){return typeof e=="string"?{protocol:"https",url:e,accept:G.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||G.Any}}var R="DELETE",k="GET",P="POST",se="PUT";function ze(e,t){return Promise.all(t.map(function(r){return e.get(r,function(){return Promise.resolve(Q(r))})})).then(function(r){var n=r.filter(function(f){return function(o){return o.status===T||Date.now()-o.lastUpdate>12e4}(f)}),a=r.filter(function(f){return function(o){return o.status===K&&Date.now()-o.lastUpdate<=12e4}(f)}),u=[].concat(L(n),L(a));return{getTimeout:function(f,o){return(a.length===0&&f===0?1:a.length+3+f)*o},statelessHosts:u.length>0?u.map(function(f){return v(f)}):t}})}function ye(e,t,r,n){var a=[],u=function(y,x){if(!(y.method===k||y.data===void 0&&x.data===void 0)){var S=Array.isArray(y.data)?y.data:s(s({},y.data),x.data);return JSON.stringify(S)}}(r,n),f=function(y,x){var S=s(s({},y.headers),x.headers),D={};return Object.keys(S).forEach(function(q){var z=S[q];D[q.toLowerCase()]=z}),D}(e,n),o=r.method,c=r.method!==k?{}:s(s({},r.data),n.data),h=s(s(s({"x-algolia-agent":e.userAgent.value},e.queryParameters),c),n.queryParameters),l=0,b=function y(x,S){var D=x.pop();if(D===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect.If the error persists, contact support@algolia.com.",transporterStackTrace:we(a)};var q={data:u,headers:f,method:o,url:Ge(D,r.path,h),connectTimeout:S(l,e.timeouts.connect),responseTimeout:S(l,n.timeout)},z=function(J){var C={request:q,response:J,host:D,triesLeft:x.length};return a.push(C),C},re={onSuccess:function(J){return function(C){try{return JSON.parse(C.content)}catch(X){throw function(V,Y){return{name:"DeserializationError",message:V,response:Y}}(X.message,C)}}(J)},onRetry:function(J){var C=z(J);return J.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",ve(C)),e.hostsCache.set(D,Q(D,J.isTimedOut?K:W))]).then(function(){return y(x,S)})},onFail:function(J){throw z(J),function(C,X){var V=C.content,Y=C.status,ne=V;try{ne=JSON.parse(V).message}catch{}return function(oe,pe,rr){return{name:"ApiError",message:oe,status:pe,transporterStackTrace:rr}}(ne,Y,X)}(J,we(a))}};return e.requester.send(q).then(function(J){return function(C,X){return function(V){var Y=V.status;return V.isTimedOut||function(ne){var oe=ne.isTimedOut,pe=ne.status;return!oe&&~~pe==0}(V)||~~(Y/100)!=2&&~~(Y/100)!=4}(C)?X.onRetry(C):~~(C.status/100)==2?X.onSuccess(C):X.onFail(C)}(J,re)})};return ze(e.hostsCache,t).then(function(y){return b(L(y.statelessHosts).reverse(),y.getTimeout)})}function ue(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,u=e.responsesCache,f=e.timeouts,o=e.userAgent,c=e.hosts,h=e.queryParameters,l={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:u,timeouts:f,userAgent:o,headers:e.headers,queryParameters:h,hosts:c.map(function(b){return v(b)}),read:function(b,y){var x=N(y,l.timeouts.read),S=function(){return ye(l,l.hosts.filter(function(q){return(q.accept&G.Read)!=0}),b,x)};if((x.cacheable!==void 0?x.cacheable:b.cacheable)!==!0)return S();var D={request:b,mappedRequestOptions:x,transporter:{queryParameters:l.queryParameters,headers:l.headers}};return l.responsesCache.get(D,function(){return l.requestsCache.get(D,function(){return l.requestsCache.set(D,S()).then(function(q){return Promise.all([l.requestsCache.delete(D),q])},function(q){return Promise.all([l.requestsCache.delete(D),Promise.reject(q)])}).then(function(q){var z=j(q,2);return z[0],z[1]})})},{miss:function(q){return l.responsesCache.set(D,q)}})},write:function(b,y){return ye(l,l.hosts.filter(function(x){return(x.accept&G.Write)!=0}),b,N(y,l.timeouts.write))}};return l}function Je(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(r){var n="!".concat(r.segment).concat(r.version!==void 0?" (".concat(r.version,")"):"");return t.value.indexOf(n)===-1&&(t.value="".concat(t.value).concat(n)),t}};return t}function Ge(e,t,r){var n=be(r),a="".concat(e.protocol,"://").concat(e.url,"/").concat(t.charAt(0)==="/"?t.substr(1):t);return n.length&&(a+="?".concat(n)),a}function be(e){return Object.keys(e).map(function(t){return g("%s=%s",t,(r=e[t],Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]"?JSON.stringify(e[t]):e[t]));var r}).join("&")}function we(e){return e.map(function(t){return ve(t)})}function ve(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return s(s({},e),{},{request:s(s({},e.request),{},{headers:s(s({},e.request.headers),t)})})}var Ke=function(e){return function(t,r){return e.transporter.write({method:P,path:"2/abtests",data:t},r)}},_e=function(e){return function(t,r){return e.transporter.write({method:R,path:g("2/abtests/%s",t)},r)}},He=function(e){return function(t,r){return e.transporter.read({method:k,path:g("2/abtests/%s",t)},r)}},Be=function(e){return function(t){return e.transporter.read({method:k,path:"2/abtests"},t)}},We=function(e){return function(t,r){return e.transporter.write({method:P,path:g("2/abtests/%s/stop",t)},r)}},Qe=function(e){return function(t){return e.transporter.read({method:k,path:"1/strategies/personalization"},t)}},Ve=function(e){return function(t,r){return e.transporter.write({method:P,path:"1/strategies/personalization",data:t},r)}};function ie(e){return function t(r){return e.request(r).then(function(n){if(e.batch!==void 0&&e.batch(n.hits),!e.shouldStop(n))return n.cursor?t({cursor:n.cursor}):t({page:(r.page||0)+1})})}({})}var Xe=function(e){return function(t,r){var n=r||{},a=n.queryParameters,u=m(n,["queryParameters"]),f=s({acl:t},a!==void 0?{queryParameters:a}:{});return w(e.transporter.write({method:P,path:"1/keys",data:f},u),function(o,c){return U(function(h){return ee(e)(o.key,c).catch(function(l){if(l.status!==404)throw l;return h()})})})}},Fe=function(e){return function(t,r,n){var a=N(n);return a.queryParameters["X-Algolia-User-ID"]=t,e.transporter.write({method:P,path:"1/clusters/mapping",data:{cluster:r}},a)}},Ze=function(e){return function(t,r,n){return e.transporter.write({method:P,path:"1/clusters/mapping/batch",data:{users:t,cluster:r}},n)}},Ye=function(e){return function(t,r){return w(e.transporter.write({method:P,path:g("/1/dictionaries/%s/batch",t),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},r),function(n,a){return F(e)(n.taskID,a)})}},ae=function(e){return function(t,r,n){return w(e.transporter.write({method:P,path:g("1/indexes/%s/operation",t),data:{operation:"copy",destination:r}},n),function(a,u){return te(e)(t,{methods:{waitTask:A}}).waitTask(a.taskID,u)})}},et=function(e){return function(t,r,n){return ae(e)(t,r,s(s({},n),{},{scope:[he.Rules]}))}},tt=function(e){return function(t,r,n){return ae(e)(t,r,s(s({},n),{},{scope:[he.Settings]}))}},rt=function(e){return function(t,r,n){return ae(e)(t,r,s(s({},n),{},{scope:[he.Synonyms]}))}},nt=function(e){return function(t,r){return t.method===k?e.transporter.read(t,r):e.transporter.write(t,r)}},at=function(e){return function(t,r){return w(e.transporter.write({method:R,path:g("1/keys/%s",t)},r),function(n,a){return U(function(u){return ee(e)(t,a).then(u).catch(function(f){if(f.status!==404)throw f})})})}},ot=function(e){return function(t,r,n){var a=r.map(function(u){return{action:"deleteEntry",body:{objectID:u}}});return w(e.transporter.write({method:P,path:g("/1/dictionaries/%s/batch",t),data:{clearExistingDictionaryEntries:!1,requests:a}},n),function(u,f){return F(e)(u.taskID,f)})}},ee=function(e){return function(t,r){return e.transporter.read({method:k,path:g("1/keys/%s",t)},r)}},Se=function(e){return function(t,r){return e.transporter.read({method:k,path:g("1/task/%s",t.toString())},r)}},st=function(e){return function(t){return e.transporter.read({method:k,path:"/1/dictionaries/*/settings"},t)}},ut=function(e){return function(t){return e.transporter.read({method:k,path:"1/logs"},t)}},it=function(e){return function(t){return e.transporter.read({method:k,path:"1/clusters/mapping/top"},t)}},ct=function(e){return function(t,r){return e.transporter.read({method:k,path:g("1/clusters/mapping/%s",t)},r)}},ft=function(e){return function(t){var r=t||{},n=r.retrieveMappings,a=m(r,["retrieveMappings"]);return n===!0&&(a.getClusters=!0),e.transporter.read({method:k,path:"1/clusters/mapping/pending"},a)}},te=function(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={transporter:e.transporter,appId:e.appId,indexName:t};return I(n,r.methods)}},lt=function(e){return function(t){return e.transporter.read({method:k,path:"1/keys"},t)}},dt=function(e){return function(t){return e.transporter.read({method:k,path:"1/clusters"},t)}},ht=function(e){return function(t){return e.transporter.read({method:k,path:"1/indexes"},t)}},pt=function(e){return function(t){return e.transporter.read({method:k,path:"1/clusters/mapping"},t)}},mt=function(e){return function(t,r,n){return w(e.transporter.write({method:P,path:g("1/indexes/%s/operation",t),data:{operation:"move",destination:r}},n),function(a,u){return te(e)(t,{methods:{waitTask:A}}).waitTask(a.taskID,u)})}},gt=function(e){return function(t,r){return w(e.transporter.write({method:P,path:"1/indexes/*/batch",data:{requests:t}},r),function(n,a){return Promise.all(Object.keys(n.taskID).map(function(u){return te(e)(u,{methods:{waitTask:A}}).waitTask(n.taskID[u],a)}))})}},yt=function(e){return function(t,r){return e.transporter.read({method:P,path:"1/indexes/*/objects",data:{requests:t}},r)}},Oe=function(e){return function(t,r){var n=t.map(function(a){return s(s({},a),{},{params:be(a.params||{})})});return e.transporter.read({method:P,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)}},xe=function(e){return function(t,r){return Promise.all(t.map(function(n){var a=n.params,u=a.facetName,f=a.facetQuery,o=m(a,["facetName","facetQuery"]);return te(e)(n.indexName,{methods:{searchForFacetValues:Te}}).searchForFacetValues(u,f,s(s({},r),o))}))}},bt=function(e){return function(t,r){var n=N(r);return n.queryParameters["X-Algolia-User-ID"]=t,e.transporter.write({method:R,path:"1/clusters/mapping"},n)}},wt=function(e){return function(t,r,n){var a=r.map(function(u){return{action:"addEntry",body:u}});return w(e.transporter.write({method:P,path:g("/1/dictionaries/%s/batch",t),data:{clearExistingDictionaryEntries:!0,requests:a}},n),function(u,f){return F(e)(u.taskID,f)})}},vt=function(e){return function(t,r){return w(e.transporter.write({method:P,path:g("1/keys/%s/restore",t)},r),function(n,a){return U(function(u){return ee(e)(t,a).catch(function(f){if(f.status!==404)throw f;return u()})})})}},St=function(e){return function(t,r,n){var a=r.map(function(u){return{action:"addEntry",body:u}});return w(e.transporter.write({method:P,path:g("/1/dictionaries/%s/batch",t),data:{clearExistingDictionaryEntries:!1,requests:a}},n),function(u,f){return F(e)(u.taskID,f)})}},Ot=function(e){return function(t,r,n){return e.transporter.read({method:P,path:g("/1/dictionaries/%s/search",t),data:{query:r},cacheable:!0},n)}},xt=function(e){return function(t,r){return e.transporter.read({method:P,path:"1/clusters/mapping/search",data:{query:t}},r)}},Pt=function(e){return function(t,r){return w(e.transporter.write({method:se,path:"/1/dictionaries/*/settings",data:t},r),function(n,a){return F(e)(n.taskID,a)})}},It=function(e){return function(t,r){var n=Object.assign({},r),a=r||{},u=a.queryParameters,f=m(a,["queryParameters"]),o=u?{queryParameters:u}:{},c=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"];return w(e.transporter.write({method:se,path:g("1/keys/%s",t),data:o},f),function(h,l){return U(function(b){return ee(e)(t,l).then(function(y){return function(x){return Object.keys(n).filter(function(S){return c.indexOf(S)!==-1}).every(function(S){if(Array.isArray(x[S])&&Array.isArray(n[S])){var D=x[S];return D.length===n[S].length&&D.every(function(q,z){return q===n[S][z]})}return x[S]===n[S]})}(y)?Promise.resolve():b()})})})}},F=function(e){return function(t,r){return U(function(n){return Se(e)(t,r).then(function(a){return a.status!=="published"?n():void 0})})}},Pe=function(e){return function(t,r){return w(e.transporter.write({method:P,path:g("1/indexes/%s/batch",e.indexName),data:{requests:t}},r),function(n,a){return A(e)(n.taskID,a)})}},Dt=function(e){return function(t){return ie(s(s({shouldStop:function(r){return r.cursor===void 0}},t),{},{request:function(r){return e.transporter.read({method:P,path:g("1/indexes/%s/browse",e.indexName),data:r},t)}}))}},jt=function(e){return function(t){var r=s({hitsPerPage:1e3},t);return ie(s(s({shouldStop:function(n){return n.hits.length 0&&arguments[0]!==void 0?arguments[0]:0,b=[];for(h=l;h =h.nbPages)throw{name:"ObjectNotFoundError",message:"Object not found."};return c()})}()}},zt=function(e){return function(t,r){return e.transporter.read({method:k,path:g("1/indexes/%s/%s",e.indexName,t)},r)}},Jt=function(){return function(e,t){for(var r=0,n=Object.entries(e.hits);r h.OPENED&&l===void 0&&(clearTimeout(y),l=b(o.responseTimeout,"Socket timeout"))},h.onerror=function(){h.status===0&&(clearTimeout(y),clearTimeout(l),c({content:h.responseText||"Network request failed",status:h.status,isTimedOut:!1}))},h.onload=function(){clearTimeout(y),clearTimeout(l),c({content:h.responseText,status:h.status,isTimedOut:!1})},h.send(o.data)})}},logger:(n=tr,{debug:function(o,c){return Yt>=n&&console.debug(o,c),Promise.resolve()},info:function(o,c){return er>=n&&console.info(o,c),Promise.resolve()},error:function(o,c){return console.error(o,c),Promise.resolve()}}),responsesCache:E(),requestsCache:E({serializable:!1}),hostsCache:M({caches:[_({key:"".concat("4.22.1","-").concat(e)}),E()]}),userAgent:Je("4.22.1").add({segment:"Browser"})},u=s(s({},a),r),f=function(){return function(o){return function(c){var h=c.region||"us",l=$(H.WithinHeaders,c.appId,c.apiKey),b=ue(s(s({hosts:[{url:"personalization.".concat(h,".algolia.com")}]},c),{},{headers:s(s(s({},l.headers()),{"content-type":"application/json"}),c.headers),queryParameters:s(s({},l.queryParameters()),c.queryParameters)}));return I({appId:c.appId,transporter:b},c.methods)}(s(s(s({},a),o),{},{methods:{getPersonalizationStrategy:Qe,setPersonalizationStrategy:Ve}}))}};return function(o){var c=o.appId,h=$(o.authMode!==void 0?o.authMode:H.WithinHeaders,c,o.apiKey),l=ue(s(s({hosts:[{url:"".concat(c,"-dsn.algolia.net"),accept:G.Read},{url:"".concat(c,".algolia.net"),accept:G.Write}].concat(B([{url:"".concat(c,"-1.algolianet.com")},{url:"".concat(c,"-2.algolianet.com")},{url:"".concat(c,"-3.algolianet.com")}]))},o),{},{headers:s(s(s({},h.headers()),{"content-type":"application/x-www-form-urlencoded"}),o.headers),queryParameters:s(s({},h.queryParameters()),o.queryParameters)}));return I({transporter:l,appId:c,addAlgoliaAgent:function(b,y){l.userAgent.add({segment:b,version:y})},clearCache:function(){return Promise.all([l.requestsCache.clear(),l.responsesCache.clear()]).then(function(){})}},o.methods)}(s(s({},u),{},{methods:{search:Oe,searchForFacetValues:xe,multipleBatch:gt,multipleGetObjects:yt,multipleQueries:Oe,copyIndex:ae,copySettings:tt,copySynonyms:rt,copyRules:et,moveIndex:mt,listIndices:ht,getLogs:ut,listClusters:dt,multipleSearchForFacetValues:xe,getApiKey:ee,addApiKey:Xe,listApiKeys:lt,updateApiKey:It,deleteApiKey:at,restoreApiKey:vt,assignUserID:Fe,assignUserIDs:Ze,getUserID:ct,searchUserIDs:xt,listUserIDs:pt,getTopUserIDs:it,removeUserID:bt,hasPendingMappings:ft,clearDictionaryEntries:Ye,deleteDictionaryEntries:ot,getDictionarySettings:st,getAppTask:Se,replaceDictionaryEntries:wt,saveDictionaryEntries:St,searchDictionaryEntries:Ot,setDictionarySettings:Pt,waitAppTask:F,customRequest:nt,initIndex:function(o){return function(c){return te(o)(c,{methods:{batch:Pe,delete:Nt,findAnswers:Ut,getObject:zt,getObjects:Gt,saveObject:Vt,saveObjects:fe,search:qe,searchForFacetValues:Te,waitTask:A,setSettings:Zt,getSettings:De,partialUpdateObject:Ht,partialUpdateObjects:je,deleteObject:Rt,deleteObjects:Ie,deleteBy:At,clearObjects:Tt,browseObjects:Dt,getObjectPosition:Jt,findObject:Mt,exists:$t,saveSynonym:Ft,saveSynonyms:de,getSynonym:_t,searchSynonyms:Ee,browseSynonyms:qt,deleteSynonym:Lt,clearSynonyms:Et,replaceAllObjects:Bt,replaceAllSynonyms:Qt,searchRules:ke,getRule:Kt,deleteRule:Ct,saveRule:Xt,saveRules:le,replaceAllRules:Wt,browseRules:jt,clearRules:kt}})}},initAnalytics:function(){return function(o){return function(c){var h=c.region||"us",l=$(H.WithinHeaders,c.appId,c.apiKey),b=ue(s(s({hosts:[{url:"analytics.".concat(h,".algolia.com")}]},c),{},{headers:s(s(s({},l.headers()),{"content-type":"application/json"}),c.headers),queryParameters:s(s({},l.queryParameters()),c.queryParameters)}));return I({appId:c.appId,transporter:b},c.methods)}(s(s(s({},a),o),{},{methods:{addABTest:Ke,getABTest:He,getABTests:Be,stopABTest:We,deleteABTest:_e}}))}},initPersonalization:f,initRecommendation:function(){return function(o){return u.logger.info("The `initRecommendation` method is deprecated.Use `initPersonalization` instead."),f()(o)}}}}))}return Ae.version="4.22.1",Ae})})(Me);var Er=Me.exports;const Ar=sr(Er),Nr={async searchIDs(d,p,i,O,s,m){const j=this.buildFilterParams(s,d,{...p,status:O==="admin"?p.status:[1]},O),L=O==="admin"?"authors.adminSearchFilterLabel":"authors.searchFilterLabel",_=p.implicitSchedules?"websiteSchedules":"websiteSchedulesExplicit",M=O==="admin"?_+".adminSearchFilterLabel":_+".searchFilterLabel",E={hitsPerPage:m,maxValuesPerFacet:1e3,page:i,...j,facets:["type","tenant","labels","primarySection.name",`${M}`,`${L}`,"taxonomy.adminSearchFilterLabel","gating.surveyType"]};let $=(p==null?void 0:p.text)??"";const U=$.match(/([0-9]{8})/g);U&&($="",E.filters+=` AND id:${U[0]}`);const w=await this.getIndex("relevance").search($,E),B=w.hits;for(let I=1;I =0?i.splice(O,1):i.push(d),i},buildFilterParams(d,p,i,O){var $,U,w,B,I,g,H,N,G;const{$cmsUser:s}=ge(),m={facetFilters:["type:-Job"],filters:[]};d&&d.forEach(T=>{m.facetFilters.push(`type:-${T}`)}),p&&(m.filters.push(`published <= ${p}`),m.filters.push(`unpublished > ${p}`));const j=O==="admin"?"authors.adminSearchFilterLabel":"authors.searchFilterLabel",L=i.implicitSchedules?"websiteSchedules":"websiteSchedulesExplicit",_=O==="admin"?L+".adminSearchFilterLabel":L+".searchFilterLabel",M={type:"type",labels:"labels",tenant:"tenant",authors:j,websiteSchedule:_,primarySection:"primarySection.name",taxonomy:"taxonomy.id",gating:"gating.surveyType"};for(const T in M){const W=M[T],K=[];T==="tenant"?($=i==null?void 0:i[T])!=null&&$.length&&(i[T].forEach(Q=>{K.push(`${W}:"${Q}"`)}),m.filters.push(K.join(" OR "))):(w=(U=i==null?void 0:i[T])==null?void 0:U.value)!=null&&w.length&&(i[T].value.forEach(Q=>{K.push(`${W}:"${Q}"`)}),i[T].andOr==="or"?m.filters.push(K.join(" OR ")):m.filters.push(K.join(" AND ")))}if(i!=null&&i.myContent){const T=s.getUserInfo();m.facetFilters.push([`createdBy.id:${T.id}`,`updatedBy.id:${T.id}`])}i.dateSearch&&(i.dateSearch.startDate&&m.filters.push(`${i.dateSearch.field} > ${i.dateSearch.startDate}`),i.dateSearch.endDate&&m.filters.push(`${i.dateSearch.field} <= ${i.dateSearch.endDate}`)),i.newsletterSchedule&&(i.newsletterSchedule.unscheduled?m.filters.push("hasNewsletterSchedules:false"):(i.newsletterSchedule.template&&m.facetFilters.push([`newsletterSchedules.templateId:${i.newsletterSchedule.template}`]),i.newsletterSchedule.startDate&&m.filters.push(`newsletterSchedules.deploymentDate > ${i.newsletterSchedule.startDate}`),i.newsletterSchedule.endDate&&m.filters.push(`newsletterSchedules.deploymentDate <= ${i.newsletterSchedule.endDate}`))),i.flags&&(i.flags.blueConic&&m.filters.push("blueConic:true"),i.flags.leaders&&m.filters.push("leaders:true"));let E=((B=i.magazineSchedule)==null?void 0:B.publication)??"";if(E=(I=i.magazineSchedule)!=null&&I.issue?`${E}-${(g=i.magazineSchedule)==null?void 0:g.issue}`:E,E=(H=i.magazineSchedule)!=null&&H.section?`${E}-${(N=i.magazineSchedule)==null?void 0:N.section}`:E,E&&m.filters.push(`magazineSchedulesFlat:${E}`),(G=i==null?void 0:i.status)!=null&&G.length){const T=[];i.status.forEach(W=>{T.push(`status=${W}`)}),m.filters.push(`(${T.join(" OR ")})`)}return{facetFilters:m.facetFilters,filters:m.filters.join(" AND ")}},async search(d,p,i,O,s,m,j,L){const _=this.buildFilterParams(j,p,{...i,status:s==="admin"?i.status:[1]},s),M=s==="admin"?"authors.adminSearchFilterLabel":"authors.searchFilterLabel",E=i.implicitSchedules?"websiteSchedules":"websiteSchedulesExplicit",$=s==="admin"?E+".adminSearchFilterLabel":E+".searchFilterLabel",U={hitsPerPage:L,maxValuesPerFacet:1e3,page:O,..._,facets:["type","tenant","labels","primarySection.name",`${$}`,`${M}`,"taxonomy.adminSearchFilterLabel","gating.surveyType"]};let w=(i==null?void 0:i.text)??"";const B=w.match(/([0-9]{8})/g);B&&(w="",U.filters+=` AND id:${B[0]}`);const I=await this.getIndex(m).search(w,U),g=[];for(const v in I.facets.type)g.push({value:v,label:v,count:I.facets.type[v]});g.sort((v,R)=>v.label.toLowerCase() v.label.toLowerCase() v.label.toLowerCase() v.label.toLowerCase() v.label.toLowerCase()