@abi-software/map-side-bar 2.7.2-isan.0 → 2.7.2-isan.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23270,14 +23270,14 @@ const lN = {
23270
23270
  },
23271
23271
  // openPMRSearch: Resets the results, populates dataset cards and filters with PMR data.
23272
23272
  openPMRSearch: function(e, t = "") {
23273
- this.resetSearch(), this.searchInput = t, this.loadingCards = !0, this.flatmapQueries.updateOffset((this.page - 1) * this.numberPerPage), this.flatmapQueries.updateLimit(this.numberPerPage), this.flatmapQueries.pmrSearch(e, t).then((n) => {
23273
+ this.pmrResults = [], this.searchInput = t, this.loadingCards = !0, this.flatmapQueries.updateOffset((this.page - 1) * this.numberPerPage), this.flatmapQueries.updateLimit(this.numberPerPage), this.flatmapQueries.pmrSearch(e, t).then((n) => {
23274
23274
  n.forEach((r) => {
23275
23275
  this.pmrResults.push(r);
23276
23276
  }), this.pmrNumberOfHits = this.flatmapQueries.numberOfHits, this.loadingCards = !1;
23277
23277
  });
23278
23278
  },
23279
23279
  clearSearchClicked: function() {
23280
- this.searchInput = "", this.resetSearch();
23280
+ this.searchInput = "", this.resetSearch(), this.openPMRSearch([]);
23281
23281
  },
23282
23282
  searchEvent: function(e = !1) {
23283
23283
  (e.keyCode === 13 || e instanceof MouseEvent) && (this.openPMRSearch(this.filter, this.searchInput), this.$refs.searchHistory.selectValue = "Full search history", this.$refs.searchHistory.addSearchToHistory(
@@ -23395,7 +23395,7 @@ function fN(e, t, n, r, o, a) {
23395
23395
  _: 1
23396
23396
  }, 8, ["body-style"]);
23397
23397
  }
23398
- const Iy = /* @__PURE__ */ an(lN, [["render", fN], ["__scopeId", "data-v-af8442c9"]]), pN = (e) => e.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()), fa = function(e) {
23398
+ const Iy = /* @__PURE__ */ an(lN, [["render", fN], ["__scopeId", "data-v-2a557748"]]), pN = (e) => e.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()), fa = function(e) {
23399
23399
  return e ? e.charAt(0).toUpperCase() + e.slice(1) : "";
23400
23400
  }, hN = 3e3, vN = {
23401
23401
  name: "ConnectivityInfo",
@@ -461,7 +461,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:o,curr
461
461
  </g>
462
462
  </svg>`,py=(e,t,r,o)=>{const a=["title","desc","defs","style"],i=["width","height"],s=o||[];let l=document.createElement("div");l.innerHTML=e,a.map(d=>{const u=l.querySelector(d);u&&u.remove()}),i.map(d=>{l.querySelector("svg").removeAttribute(d)}),o&&s.map(d=>{Object.values(l.querySelectorAll(`[${d}]`)).map(u=>{u.removeAttribute(d)})});const c=l.innerHTML;return l=null,c},hy=e=>[[/<\?xml[\s\S]*?>/gi,""],[/<!doctype[\s\S]*?>/gi,""],[/<!--.*-->/gi,""],[/\<([A-Za-z]+)([^\>]*)\/\>/g,"<$1$2></$1>"],[/\s+/g," "],[/\> \</g,"><"]].reduce((t,r)=>"".replace.apply(t,r),e).trim(),dF=!0,uF=!0,fF=["fill"],Wc=Object.assign({"/assets/icons/2horpanel.svg":F0,"/assets/icons/2vertpanel.svg":R0,"/assets/icons/3panel.svg":$0,"/assets/icons/4panel.svg":V0,"/assets/icons/5panel.svg":L0,"/assets/icons/6panel.svg":D0,"/assets/icons/6panelVertical.svg":M0,"/assets/icons/changeBckgd.svg":z0,"/assets/icons/close-no-bk.svg":j0,"/assets/icons/close.svg":H0,"/assets/icons/closeFullScreen.svg":U0,"/assets/icons/comment.svg":q0,"/assets/icons/connection.svg":K0,"/assets/icons/dock.svg":W0,"/assets/icons/drawLine.svg":G0,"/assets/icons/drawPoint.svg":J0,"/assets/icons/drawPolygon.svg":Z0,"/assets/icons/drawTrash.svg":Y0,"/assets/icons/fitWindow.svg":Q0,"/assets/icons/fullScreen.svg":X0,"/assets/icons/help.svg":ey,"/assets/icons/magnifyingGlass.svg":ty,"/assets/icons/noun-filter.svg":ny,"/assets/icons/openMap.svg":ry,"/assets/icons/pause.svg":oy,"/assets/icons/permalink.svg":ay,"/assets/icons/play.svg":iy,"/assets/icons/resetZoom.svg":sy,"/assets/icons/singlepanel.svg":ly,"/assets/icons/tooltips.svg":cy,"/assets/icons/undock.svg":dy,"/assets/icons/zoomIn.svg":uy,"/assets/icons/zoomOut.svg":fy});Object.keys(Wc).map(e=>{const t=py(Wc[e],dF,uF,fF),r=e.replace(/^.+\/(\w+).svg$/,"$1");return hy(t).replace("<svg",`<symbol id="${r}"`).replace("svg>","symbol>")}).join(`
463
463
  `);const Gc=Object.assign({"/assets/icons/2horpanel.svg":F0,"/assets/icons/2vertpanel.svg":R0,"/assets/icons/3panel.svg":$0,"/assets/icons/4panel.svg":V0,"/assets/icons/5panel.svg":L0,"/assets/icons/6panel.svg":D0,"/assets/icons/6panelVertical.svg":M0,"/assets/icons/changeBckgd.svg":z0,"/assets/icons/close-no-bk.svg":j0,"/assets/icons/close.svg":H0,"/assets/icons/closeFullScreen.svg":U0,"/assets/icons/comment.svg":q0,"/assets/icons/connection.svg":K0,"/assets/icons/dock.svg":W0,"/assets/icons/drawLine.svg":G0,"/assets/icons/drawPoint.svg":J0,"/assets/icons/drawPolygon.svg":Z0,"/assets/icons/drawTrash.svg":Y0,"/assets/icons/fitWindow.svg":Q0,"/assets/icons/fullScreen.svg":X0,"/assets/icons/help.svg":ey,"/assets/icons/magnifyingGlass.svg":ty,"/assets/icons/noun-filter.svg":ny,"/assets/icons/openMap.svg":ry,"/assets/icons/pause.svg":oy,"/assets/icons/permalink.svg":ay,"/assets/icons/play.svg":iy,"/assets/icons/resetZoom.svg":sy,"/assets/icons/singlepanel.svg":ly,"/assets/icons/tooltips.svg":cy,"/assets/icons/undock.svg":dy,"/assets/icons/zoomIn.svg":uy,"/assets/icons/zoomOut.svg":fy}),pF=Object.keys(Gc).map(e=>{const t=py(Gc[e]),r=e.replace(/^.+\/(\w+).svg$/,"$1");return hy(t).replace("<svg",`<symbol id="${r}"`).replace("svg>","symbol>")}),hF={name:"MapSvgSpriteColor",svgContext:Gc,svgSprite:pF.join(`
464
- `)},mF=["innerHTML"];function gF(e,t,r,o,a,i){return n.openBlock(),n.createElementBlock("svg",{width:"0",height:"0",style:{display:"none"},innerHTML:e.$options.svgSprite},null,8,mF)}const yF=P0(hF,[["render",gF]]);var my={exports:{}};/*! algoliasearch.umd.js | 4.23.2 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */(function(e,t){(function(r,o){e.exports=o()})(sx,function(){function r(w,C,k){return C in w?Object.defineProperty(w,C,{value:k,enumerable:!0,configurable:!0,writable:!0}):w[C]=k,w}function o(w,C){var k=Object.keys(w);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(w);C&&(_=_.filter(function(N){return Object.getOwnPropertyDescriptor(w,N).enumerable})),k.push.apply(k,_)}return k}function a(w){for(var C=1;C<arguments.length;C++){var k=arguments[C]!=null?arguments[C]:{};C%2?o(Object(k),!0).forEach(function(_){r(w,_,k[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(k)):o(Object(k)).forEach(function(_){Object.defineProperty(w,_,Object.getOwnPropertyDescriptor(k,_))})}return w}function i(w,C){if(w==null)return{};var k,_,N=function(W,z){if(W==null)return{};var K,ee,J={},se=Object.keys(W);for(ee=0;ee<se.length;ee++)K=se[ee],z.indexOf(K)>=0||(J[K]=W[K]);return J}(w,C);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(w);for(_=0;_<U.length;_++)k=U[_],C.indexOf(k)>=0||Object.prototype.propertyIsEnumerable.call(w,k)&&(N[k]=w[k])}return N}function s(w,C){return function(k){if(Array.isArray(k))return k}(w)||function(k,_){if(Symbol.iterator in Object(k)||Object.prototype.toString.call(k)==="[object Arguments]"){var N=[],U=!0,W=!1,z=void 0;try{for(var K,ee=k[Symbol.iterator]();!(U=(K=ee.next()).done)&&(N.push(K.value),!_||N.length!==_);U=!0);}catch(J){W=!0,z=J}finally{try{U||ee.return==null||ee.return()}finally{if(W)throw z}}return N}}(w,C)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(w){return function(C){if(Array.isArray(C)){for(var k=0,_=new Array(C.length);k<C.length;k++)_[k]=C[k];return _}}(w)||function(C){if(Symbol.iterator in Object(C)||Object.prototype.toString.call(C)==="[object Arguments]")return Array.from(C)}(w)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function c(w){var C,k="algoliasearch-client-js-".concat(w.key),_=function(){return C===void 0&&(C=w.localStorage||window.localStorage),C},N=function(){return JSON.parse(_().getItem(k)||"{}")},U=function(z){_().setItem(k,JSON.stringify(z))},W=function(){var z=w.timeToLive?1e3*w.timeToLive:null,K=N(),ee=Object.fromEntries(Object.entries(K).filter(function(se){return s(se,2)[1].timestamp!==void 0}));if(U(ee),z){var J=Object.fromEntries(Object.entries(ee).filter(function(se){var ie=s(se,2)[1],ge=new Date().getTime();return!(ie.timestamp+z<ge)}));U(J)}};return{get:function(z,K){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){W();var J=JSON.stringify(z);return N()[J]}).then(function(J){return Promise.all([J?J.value:K(),J!==void 0])}).then(function(J){var se=s(J,2),ie=se[0],ge=se[1];return Promise.all([ie,ge||ee.miss(ie)])}).then(function(J){return s(J,1)[0]})},set:function(z,K){return Promise.resolve().then(function(){var ee=N();return ee[JSON.stringify(z)]={timestamp:new Date().getTime(),value:K},_().setItem(k,JSON.stringify(ee)),K})},delete:function(z){return Promise.resolve().then(function(){var K=N();delete K[JSON.stringify(z)],_().setItem(k,JSON.stringify(K))})},clear:function(){return Promise.resolve().then(function(){_().removeItem(k)})}}}function d(w){var C=l(w.caches),k=C.shift();return k===void 0?{get:function(_,N){var U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},W=N();return W.then(function(z){return Promise.all([z,U.miss(z)])}).then(function(z){return s(z,1)[0]})},set:function(_,N){return Promise.resolve(N)},delete:function(_){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(_,N){var U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return k.get(_,N,U).catch(function(){return d({caches:C}).get(_,N,U)})},set:function(_,N){return k.set(_,N).catch(function(){return d({caches:C}).set(_,N)})},delete:function(_){return k.delete(_).catch(function(){return d({caches:C}).delete(_)})},clear:function(){return k.clear().catch(function(){return d({caches:C}).clear()})}}}function u(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},C={};return{get:function(k,_){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},U=JSON.stringify(k);if(U in C)return Promise.resolve(w.serializable?JSON.parse(C[U]):C[U]);var W=_(),z=N&&N.miss||function(){return Promise.resolve()};return W.then(function(K){return z(K)}).then(function(){return W})},set:function(k,_){return C[JSON.stringify(k)]=w.serializable?JSON.stringify(_):_,Promise.resolve(_)},delete:function(k){return delete C[JSON.stringify(k)],Promise.resolve()},clear:function(){return C={},Promise.resolve()}}}function p(w,C,k){var _={"x-algolia-api-key":k,"x-algolia-application-id":C};return{headers:function(){return w===b.WithinHeaders?_:{}},queryParameters:function(){return w===b.WithinQueryParameters?_:{}}}}function g(w){var C=0;return w(function k(){return C++,new Promise(function(_){setTimeout(function(){_(w(k))},Math.min(100*C,1e3))})})}function m(w){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(k,_){return Promise.resolve()};return Object.assign(w,{wait:function(k){return m(w.then(function(_){return Promise.all([C(_,k),_])}).then(function(_){return _[1]}))}})}function f(w){for(var C=w.length-1;C>0;C--){var k=Math.floor(Math.random()*(C+1)),_=w[C];w[C]=w[k],w[k]=_}return w}function h(w,C){return C&&Object.keys(C).forEach(function(k){w[k]=C[k](w)}),w}function y(w){for(var C=arguments.length,k=new Array(C>1?C-1:0),_=1;_<C;_++)k[_-1]=arguments[_];var N=0;return w.replace(/%s/g,function(){return encodeURIComponent(k[N++])})}var b={WithinQueryParameters:0,WithinHeaders:1};function v(w,C){var k=w||{},_=k.data||{};return Object.keys(k).forEach(function(N){["timeout","headers","queryParameters","data","cacheable"].indexOf(N)===-1&&(_[N]=k[N])}),{data:Object.entries(_).length>0?_:void 0,timeout:k.timeout||C,headers:k.headers||{},queryParameters:k.queryParameters||{},cacheable:k.cacheable}}var T={Read:1,Write:2,Any:3},S=1,E=2,x=3;function O(w){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:S;return a(a({},w),{},{status:C,lastUpdate:Date.now()})}function B(w){return typeof w=="string"?{protocol:"https",url:w,accept:T.Any}:{protocol:w.protocol||"https",url:w.url,accept:w.accept||T.Any}}var A="DELETE",L="GET",P="POST",V="PUT";function j(w,C){return Promise.all(C.map(function(k){return w.get(k,function(){return Promise.resolve(O(k))})})).then(function(k){var _=k.filter(function(W){return function(z){return z.status===S||Date.now()-z.lastUpdate>12e4}(W)}),N=k.filter(function(W){return function(z){return z.status===x&&Date.now()-z.lastUpdate<=12e4}(W)}),U=[].concat(l(_),l(N));return{getTimeout:function(W,z){return(N.length===0&&W===0?1:N.length+3+W)*z},statelessHosts:U.length>0?U.map(function(W){return B(W)}):C}})}function X(w,C,k,_){var N=[],U=function(ie,ge){if(!(ie.method===L||ie.data===void 0&&ge.data===void 0)){var ue=Array.isArray(ie.data)?ie.data:a(a({},ie.data),ge.data);return JSON.stringify(ue)}}(k,_),W=function(ie,ge){var ue=a(a({},ie.headers),ge.headers),_e={};return Object.keys(ue).forEach(function(Fe){var Tt=ue[Fe];_e[Fe.toLowerCase()]=Tt}),_e}(w,_),z=k.method,K=k.method!==L?{}:a(a({},k.data),_.data),ee=a(a(a({"x-algolia-agent":w.userAgent.value},w.queryParameters),K),_.queryParameters),J=0,se=function ie(ge,ue){var _e=ge.pop();if(_e===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:re(N)};var Fe={data:U,headers:W,method:z,url:D(_e,k.path,ee),connectTimeout:ue(J,w.timeouts.connect),responseTimeout:ue(J,_.timeout)},Tt=function(Ot){var lt={request:Fe,response:Ot,host:_e,triesLeft:ge.length};return N.push(lt),lt},wa={onSuccess:function(Ot){return function(lt){try{return JSON.parse(lt.content)}catch(Ir){throw function(rr,ho){return{name:"DeserializationError",message:rr,response:ho}}(Ir.message,lt)}}(Ot)},onRetry:function(Ot){var lt=Tt(Ot);return Ot.isTimedOut&&J++,Promise.all([w.logger.info("Retryable failure",he(lt)),w.hostsCache.set(_e,O(_e,Ot.isTimedOut?x:E))]).then(function(){return ie(ge,ue)})},onFail:function(Ot){throw Tt(Ot),function(lt,Ir){var rr=lt.content,ho=lt.status,Ca=rr;try{Ca=JSON.parse(rr).message}catch{}return function(ps,dd,V$){return{name:"ApiError",message:ps,status:dd,transporterStackTrace:V$}}(Ca,ho,Ir)}(Ot,re(N))}};return w.requester.send(Fe).then(function(Ot){return function(lt,Ir){return function(rr){var ho=rr.status;return rr.isTimedOut||function(Ca){var ps=Ca.isTimedOut,dd=Ca.status;return!ps&&~~dd==0}(rr)||~~(ho/100)!=2&&~~(ho/100)!=4}(lt)?Ir.onRetry(lt):~~(lt.status/100)==2?Ir.onSuccess(lt):Ir.onFail(lt)}(Ot,wa)})};return j(w.hostsCache,C).then(function(ie){return se(l(ie.statelessHosts).reverse(),ie.getTimeout)})}function q(w){var C=w.hostsCache,k=w.logger,_=w.requester,N=w.requestsCache,U=w.responsesCache,W=w.timeouts,z=w.userAgent,K=w.hosts,ee=w.queryParameters,J={hostsCache:C,logger:k,requester:_,requestsCache:N,responsesCache:U,timeouts:W,userAgent:z,headers:w.headers,queryParameters:ee,hosts:K.map(function(se){return B(se)}),read:function(se,ie){var ge=v(ie,J.timeouts.read),ue=function(){return X(J,J.hosts.filter(function(Fe){return(Fe.accept&T.Read)!=0}),se,ge)};if((ge.cacheable!==void 0?ge.cacheable:se.cacheable)!==!0)return ue();var _e={request:se,mappedRequestOptions:ge,transporter:{queryParameters:J.queryParameters,headers:J.headers}};return J.responsesCache.get(_e,function(){return J.requestsCache.get(_e,function(){return J.requestsCache.set(_e,ue()).then(function(Fe){return Promise.all([J.requestsCache.delete(_e),Fe])},function(Fe){return Promise.all([J.requestsCache.delete(_e),Promise.reject(Fe)])}).then(function(Fe){var Tt=s(Fe,2);return Tt[0],Tt[1]})})},{miss:function(Fe){return J.responsesCache.set(_e,Fe)}})},write:function(se,ie){return X(J,J.hosts.filter(function(ge){return(ge.accept&T.Write)!=0}),se,v(ie,J.timeouts.write))}};return J}function I(w){var C={value:"Algolia for JavaScript (".concat(w,")"),add:function(k){var _="; ".concat(k.segment).concat(k.version!==void 0?" (".concat(k.version,")"):"");return C.value.indexOf(_)===-1&&(C.value="".concat(C.value).concat(_)),C}};return C}function D(w,C,k){var _=ne(k),N="".concat(w.protocol,"://").concat(w.url,"/").concat(C.charAt(0)==="/"?C.substr(1):C);return _.length&&(N+="?".concat(_)),N}function ne(w){return Object.keys(w).map(function(C){return y("%s=%s",C,(k=w[C],Object.prototype.toString.call(k)==="[object Object]"||Object.prototype.toString.call(k)==="[object Array]"?JSON.stringify(w[C]):w[C]));var k}).join("&")}function re(w){return w.map(function(C){return he(C)})}function he(w){var C=w.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return a(a({},w),{},{request:a(a({},w.request),{},{headers:a(a({},w.request.headers),C)})})}var me=function(w){return function(C,k){return w.transporter.write({method:P,path:"2/abtests",data:C},k)}},Be=function(w){return function(C,k){return w.transporter.write({method:A,path:y("2/abtests/%s",C)},k)}},qe=function(w){return function(C,k){return w.transporter.read({method:L,path:y("2/abtests/%s",C)},k)}},Ie=function(w){return function(C){return w.transporter.read({method:L,path:"2/abtests"},C)}},ye=function(w){return function(C,k){return w.transporter.write({method:P,path:y("2/abtests/%s/stop",C)},k)}},Ce=function(w){return function(C){return w.transporter.read({method:L,path:"1/strategies/personalization"},C)}},Ne=function(w){return function(C,k){return w.transporter.write({method:P,path:"1/strategies/personalization",data:C},k)}};function Ve(w){return function C(k){return w.request(k).then(function(_){if(w.batch!==void 0&&w.batch(_.hits),!w.shouldStop(_))return _.cursor?C({cursor:_.cursor}):C({page:(k.page||0)+1})})}({})}var Qt=function(w){return function(C,k){var _=k||{},N=_.queryParameters,U=i(_,["queryParameters"]),W=a({acl:C},N!==void 0?{queryParameters:N}:{});return m(w.transporter.write({method:P,path:"1/keys",data:W},U),function(z,K){return g(function(ee){return ke(w)(z.key,K).catch(function(J){if(J.status!==404)throw J;return ee()})})})}},it=function(w){return function(C,k,_){var N=v(_);return N.queryParameters["X-Algolia-User-ID"]=C,w.transporter.write({method:P,path:"1/clusters/mapping",data:{cluster:k}},N)}},Qe=function(w){return function(C,k,_){return w.transporter.write({method:P,path:"1/clusters/mapping/batch",data:{users:C,cluster:k}},_)}},Ae=function(w){return function(C,k){return m(w.transporter.write({method:P,path:y("/1/dictionaries/%s/batch",C),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},k),function(_,N){return tr(w)(_.taskID,N)})}},Le=function(w){return function(C,k,_){return m(w.transporter.write({method:P,path:y("1/indexes/%s/operation",C),data:{operation:"copy",destination:k}},_),function(N,U){return Pe(w)(C,{methods:{waitTask:Ke}}).waitTask(N.taskID,U)})}},St=function(w){return function(C,k,_){return Le(w)(C,k,a(a({},_),{},{scope:[cd.Rules]}))}},Et=function(w){return function(C,k,_){return Le(w)(C,k,a(a({},_),{},{scope:[cd.Settings]}))}},Ze=function(w){return function(C,k,_){return Le(w)(C,k,a(a({},_),{},{scope:[cd.Synonyms]}))}},xt=function(w){return function(C,k){return C.method===L?w.transporter.read(C,k):w.transporter.write(C,k)}},st=function(w){return function(C,k){return m(w.transporter.write({method:A,path:y("1/keys/%s",C)},k),function(_,N){return g(function(U){return ke(w)(C,N).then(U).catch(function(W){if(W.status!==404)throw W})})})}},Xt=function(w){return function(C,k,_){var N=k.map(function(U){return{action:"deleteEntry",body:{objectID:U}}});return m(w.transporter.write({method:P,path:y("/1/dictionaries/%s/batch",C),data:{clearExistingDictionaryEntries:!1,requests:N}},_),function(U,W){return tr(w)(U.taskID,W)})}},ke=function(w){return function(C,k){return w.transporter.read({method:L,path:y("1/keys/%s",C)},k)}},Xe=function(w){return function(C,k){return w.transporter.read({method:L,path:y("1/task/%s",C.toString())},k)}},ut=function(w){return function(C){return w.transporter.read({method:L,path:"/1/dictionaries/*/settings"},C)}},$t=function(w){return function(C){return w.transporter.read({method:L,path:"1/logs"},C)}},et=function(w){return function(C){return w.transporter.read({method:L,path:"1/clusters/mapping/top"},C)}},H=function(w){return function(C,k){return w.transporter.read({method:L,path:y("1/clusters/mapping/%s",C)},k)}},fe=function(w){return function(C){var k=C||{},_=k.retrieveMappings,N=i(k,["retrieveMappings"]);return _===!0&&(N.getClusters=!0),w.transporter.read({method:L,path:"1/clusters/mapping/pending"},N)}},Pe=function(w){return function(C){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_={transporter:w.transporter,appId:w.appId,indexName:C};return h(_,k.methods)}},ft=function(w){return function(C){return w.transporter.read({method:L,path:"1/keys"},C)}},Vt=function(w){return function(C){return w.transporter.read({method:L,path:"1/clusters"},C)}},co=function(w){return function(C){return w.transporter.read({method:L,path:"1/indexes"},C)}},ma=function(w){return function(C){return w.transporter.read({method:L,path:"1/clusters/mapping"},C)}},Br=function(w){return function(C,k,_){return m(w.transporter.write({method:P,path:y("1/indexes/%s/operation",C),data:{operation:"move",destination:k}},_),function(N,U){return Pe(w)(C,{methods:{waitTask:Ke}}).waitTask(N.taskID,U)})}},Nr=function(w){return function(C,k){return m(w.transporter.write({method:P,path:"1/indexes/*/batch",data:{requests:C}},k),function(_,N){return Promise.all(Object.keys(_.taskID).map(function(U){return Pe(w)(U,{methods:{waitTask:Ke}}).waitTask(_.taskID[U],N)}))})}},M=function(w){return function(C,k){return w.transporter.read({method:P,path:"1/indexes/*/objects",data:{requests:C}},k)}},Z=function(w){return function(C,k){var _=C.map(function(N){return a(a({},N),{},{params:ne(N.params||{})})});return w.transporter.read({method:P,path:"1/indexes/*/queries",data:{requests:_},cacheable:!0},k)}},Y=function(w){return function(C,k){return Promise.all(C.map(function(_){var N=_.params,U=N.facetName,W=N.facetQuery,z=i(N,["facetName","facetQuery"]);return Pe(w)(_.indexName,{methods:{searchForFacetValues:By}}).searchForFacetValues(U,W,a(a({},k),z))}))}},ve=function(w){return function(C,k){var _=v(k);return _.queryParameters["X-Algolia-User-ID"]=C,w.transporter.write({method:A,path:"1/clusters/mapping"},_)}},Lt=function(w){return function(C,k,_){var N=k.map(function(U){return{action:"addEntry",body:U}});return m(w.transporter.write({method:P,path:y("/1/dictionaries/%s/batch",C),data:{clearExistingDictionaryEntries:!0,requests:N}},_),function(U,W){return tr(w)(U.taskID,W)})}},_t=function(w){return function(C,k){return m(w.transporter.write({method:P,path:y("1/keys/%s/restore",C)},k),function(_,N){return g(function(U){return ke(w)(C,N).catch(function(W){if(W.status!==404)throw W;return U()})})})}},Dt=function(w){return function(C,k,_){var N=k.map(function(U){return{action:"addEntry",body:U}});return m(w.transporter.write({method:P,path:y("/1/dictionaries/%s/batch",C),data:{clearExistingDictionaryEntries:!1,requests:N}},_),function(U,W){return tr(w)(U.taskID,W)})}},uo=function(w){return function(C,k,_){return w.transporter.read({method:P,path:y("/1/dictionaries/%s/search",C),data:{query:k},cacheable:!0},_)}},cs=function(w){return function(C,k){return w.transporter.read({method:P,path:"1/clusters/mapping/search",data:{query:C}},k)}},Yc=function(w){return function(C,k){return m(w.transporter.write({method:V,path:"/1/dictionaries/*/settings",data:C},k),function(_,N){return tr(w)(_.taskID,N)})}},Qc=function(w){return function(C,k){var _=Object.assign({},k),N=k||{},U=N.queryParameters,W=i(N,["queryParameters"]),z=U?{queryParameters:U}:{},K=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"];return m(w.transporter.write({method:V,path:y("1/keys/%s",C),data:z},W),function(ee,J){return g(function(se){return ke(w)(C,J).then(function(ie){return function(ge){return Object.keys(_).filter(function(ue){return K.indexOf(ue)!==-1}).every(function(ue){if(Array.isArray(ge[ue])&&Array.isArray(_[ue])){var _e=ge[ue];return _e.length===_[ue].length&&_e.every(function(Fe,Tt){return Fe===_[ue][Tt]})}return ge[ue]===_[ue]})}(ie)?Promise.resolve():se()})})})}},tr=function(w){return function(C,k){return g(function(_){return Xe(w)(C,k).then(function(N){return N.status!=="published"?_():void 0})})}},ga=function(w){return function(C,k){return m(w.transporter.write({method:P,path:y("1/indexes/%s/batch",w.indexName),data:{requests:C}},k),function(_,N){return Ke(w)(_.taskID,N)})}},Xc=function(w){return function(C){return Ve(a(a({shouldStop:function(k){return k.cursor===void 0}},C),{},{request:function(k){return w.transporter.read({method:P,path:y("1/indexes/%s/browse",w.indexName),data:k},C)}}))}},ya=function(w){return function(C){var k=a({hitsPerPage:1e3},C);return Ve(a(a({shouldStop:function(_){return _.hits.length<k.hitsPerPage}},k),{},{request:function(_){return Ny(w)("",a(a({},k),_)).then(function(N){return a(a({},N),{},{hits:N.hits.map(function(U){return delete U._highlightResult,U})})})}}))}},ed=function(w){return function(C){var k=a({hitsPerPage:1e3},C);return Ve(a(a({shouldStop:function(_){return _.hits.length<k.hitsPerPage}},k),{},{request:function(_){return Iy(w)("",a(a({},k),_)).then(function(N){return a(a({},N),{},{hits:N.hits.map(function(U){return delete U._highlightResult,U})})})}}))}},ba=function(w){return function(C,k,_){var N=_||{},U=N.batchSize,W=i(N,["batchSize"]),z={taskIDs:[],objectIDs:[]};return m(function K(){var ee,J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,se=[];for(ee=J;ee<C.length&&(se.push(C[ee]),se.length!==(U||1e3));ee++);return se.length===0?Promise.resolve(z):ga(w)(se.map(function(ie){return{action:k,body:ie}}),W).then(function(ie){return z.objectIDs=z.objectIDs.concat(ie.objectIDs),z.taskIDs.push(ie.taskID),ee++,K(ee)})}(),function(K,ee){return Promise.all(K.taskIDs.map(function(J){return Ke(w)(J,ee)}))})}},td=function(w){return function(C){return m(w.transporter.write({method:P,path:y("1/indexes/%s/clear",w.indexName)},C),function(k,_){return Ke(w)(k.taskID,_)})}},ds=function(w){return function(C){var k=C||{},_=k.forwardToReplicas,N=v(i(k,["forwardToReplicas"]));return _&&(N.queryParameters.forwardToReplicas=1),m(w.transporter.write({method:P,path:y("1/indexes/%s/rules/clear",w.indexName)},N),function(U,W){return Ke(w)(U.taskID,W)})}},nd=function(w){return function(C){var k=C||{},_=k.forwardToReplicas,N=v(i(k,["forwardToReplicas"]));return _&&(N.queryParameters.forwardToReplicas=1),m(w.transporter.write({method:P,path:y("1/indexes/%s/synonyms/clear",w.indexName)},N),function(U,W){return Ke(w)(U.taskID,W)})}},rd=function(w){return function(C,k){return m(w.transporter.write({method:P,path:y("1/indexes/%s/deleteByQuery",w.indexName),data:C},k),function(_,N){return Ke(w)(_.taskID,N)})}},od=function(w){return function(C){return m(w.transporter.write({method:A,path:y("1/indexes/%s",w.indexName)},C),function(k,_){return Ke(w)(k.taskID,_)})}},ad=function(w){return function(C,k){return m(F(w)([C],k).then(function(_){return{taskID:_.taskIDs[0]}}),function(_,N){return Ke(w)(_.taskID,N)})}},F=function(w){return function(C,k){var _=C.map(function(N){return{objectID:N}});return ba(w)(_,po.DeleteObject,k)}},G=function(w){return function(C,k){var _=k||{},N=_.forwardToReplicas,U=v(i(_,["forwardToReplicas"]));return N&&(U.queryParameters.forwardToReplicas=1),m(w.transporter.write({method:A,path:y("1/indexes/%s/rules/%s",w.indexName,C)},U),function(W,z){return Ke(w)(W.taskID,z)})}},de=function(w){return function(C,k){var _=k||{},N=_.forwardToReplicas,U=v(i(_,["forwardToReplicas"]));return N&&(U.queryParameters.forwardToReplicas=1),m(w.transporter.write({method:A,path:y("1/indexes/%s/synonyms/%s",w.indexName,C)},U),function(W,z){return Ke(w)(W.taskID,z)})}},Ee=function(w){return function(C){return _y(w)(C).then(function(){return!0}).catch(function(k){if(k.status!==404)throw k;return!1})}},xn=function(w){return function(C,k,_){return w.transporter.read({method:P,path:y("1/answers/%s/prediction",w.indexName),data:{query:C,queryLanguages:k},cacheable:!0},_)}},nr=function(w){return function(C,k){var _=k||{},N=_.query,U=_.paginate,W=i(_,["query","paginate"]),z=0;return function K(){return Oy(w)(N||"",a(a({},W),{},{page:z})).then(function(ee){for(var J=0,se=Object.entries(ee.hits);J<se.length;J++){var ie=s(se[J],2),ge=ie[0],ue=ie[1];if(C(ue))return{object:ue,position:parseInt(ge,10),page:z}}if(z++,U===!1||z>=ee.nbPages)throw{name:"ObjectNotFoundError",message:"Object not found."};return K()})}()}},fo=function(w){return function(C,k){return w.transporter.read({method:L,path:y("1/indexes/%s/%s",w.indexName,C)},k)}},Vn=function(){return function(w,C){for(var k=0,_=Object.entries(w.hits);k<_.length;k++){var N=s(_[k],2),U=N[0];if(N[1].objectID===C)return parseInt(U,10)}return-1}},en=function(w){return function(C,k){var _=k||{},N=_.attributesToRetrieve,U=i(_,["attributesToRetrieve"]),W=C.map(function(z){return a({indexName:w.indexName,objectID:z},N?{attributesToRetrieve:N}:{})});return w.transporter.read({method:P,path:"1/indexes/*/objects",data:{requests:W}},U)}},us=function(w){return function(C,k){return w.transporter.read({method:L,path:y("1/indexes/%s/rules/%s",w.indexName,C)},k)}},_y=function(w){return function(C){return w.transporter.read({method:L,path:y("1/indexes/%s/settings",w.indexName),data:{getVersion:2}},C)}},w$=function(w){return function(C,k){return w.transporter.read({method:L,path:y("1/indexes/%s/synonyms/%s",w.indexName,C)},k)}},C$=function(w){return function(C,k){return m(Ty(w)([C],k).then(function(_){return{objectID:_.objectIDs[0],taskID:_.taskIDs[0]}}),function(_,N){return Ke(w)(_.taskID,N)})}},Ty=function(w){return function(C,k){var _=k||{},N=_.createIfNotExists,U=i(_,["createIfNotExists"]),W=N?po.PartialUpdateObject:po.PartialUpdateObjectNoCreate;return ba(w)(C,W,U)}},k$=function(w){return function(C,k){var _=k||{},N=_.safe,U=_.autoGenerateObjectIDIfNotExist,W=_.batchSize,z=i(_,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),K=function(ue,_e,Fe,Tt){return m(w.transporter.write({method:P,path:y("1/indexes/%s/operation",ue),data:{operation:Fe,destination:_e}},Tt),function(wa,Ot){return Ke(w)(wa.taskID,Ot)})},ee=Math.random().toString(36).substring(7),J="".concat(w.indexName,"_tmp_").concat(ee),se=id({appId:w.appId,transporter:w.transporter,indexName:J}),ie=[],ge=K(w.indexName,J,"copy",a(a({},z),{},{scope:["settings","synonyms","rules"]}));return ie.push(ge),m((N?ge.wait(z):ge).then(function(){var ue=se(C,a(a({},z),{},{autoGenerateObjectIDIfNotExist:U,batchSize:W}));return ie.push(ue),N?ue.wait(z):ue}).then(function(){var ue=K(J,w.indexName,"move",z);return ie.push(ue),N?ue.wait(z):ue}).then(function(){return Promise.all(ie)}).then(function(ue){var _e=s(ue,3),Fe=_e[0],Tt=_e[1],wa=_e[2];return{objectIDs:Tt.objectIDs,taskIDs:[Fe.taskID].concat(l(Tt.taskIDs),[wa.taskID])}}),function(ue,_e){return Promise.all(ie.map(function(Fe){return Fe.wait(_e)}))})}},v$=function(w){return function(C,k){return sd(w)(C,a(a({},k),{},{clearExistingRules:!0}))}},S$=function(w){return function(C,k){return ld(w)(C,a(a({},k),{},{clearExistingSynonyms:!0}))}},E$=function(w){return function(C,k){return m(id(w)([C],k).then(function(_){return{objectID:_.objectIDs[0],taskID:_.taskIDs[0]}}),function(_,N){return Ke(w)(_.taskID,N)})}},id=function(w){return function(C,k){var _=k||{},N=_.autoGenerateObjectIDIfNotExist,U=i(_,["autoGenerateObjectIDIfNotExist"]),W=N?po.AddObject:po.UpdateObject;if(W===po.UpdateObject){var z=!0,K=!1,ee=void 0;try{for(var J,se=C[Symbol.iterator]();!(z=(J=se.next()).done);z=!0)if(J.value.objectID===void 0)return m(Promise.reject({name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}))}catch(ie){K=!0,ee=ie}finally{try{z||se.return==null||se.return()}finally{if(K)throw ee}}}return ba(w)(C,W,U)}},x$=function(w){return function(C,k){return sd(w)([C],k)}},sd=function(w){return function(C,k){var _=k||{},N=_.forwardToReplicas,U=_.clearExistingRules,W=v(i(_,["forwardToReplicas","clearExistingRules"]));return N&&(W.queryParameters.forwardToReplicas=1),U&&(W.queryParameters.clearExistingRules=1),m(w.transporter.write({method:P,path:y("1/indexes/%s/rules/batch",w.indexName),data:C},W),function(z,K){return Ke(w)(z.taskID,K)})}},_$=function(w){return function(C,k){return ld(w)([C],k)}},ld=function(w){return function(C,k){var _=k||{},N=_.forwardToReplicas,U=_.clearExistingSynonyms,W=_.replaceExistingSynonyms,z=v(i(_,["forwardToReplicas","clearExistingSynonyms","replaceExistingSynonyms"]));return N&&(z.queryParameters.forwardToReplicas=1),(W||U)&&(z.queryParameters.replaceExistingSynonyms=1),m(w.transporter.write({method:P,path:y("1/indexes/%s/synonyms/batch",w.indexName),data:C},z),function(K,ee){return Ke(w)(K.taskID,ee)})}},Oy=function(w){return function(C,k){return w.transporter.read({method:P,path:y("1/indexes/%s/query",w.indexName),data:{query:C},cacheable:!0},k)}},By=function(w){return function(C,k,_){return w.transporter.read({method:P,path:y("1/indexes/%s/facets/%s/query",w.indexName,C),data:{facetQuery:k},cacheable:!0},_)}},Ny=function(w){return function(C,k){return w.transporter.read({method:P,path:y("1/indexes/%s/rules/search",w.indexName),data:{query:C}},k)}},Iy=function(w){return function(C,k){return w.transporter.read({method:P,path:y("1/indexes/%s/synonyms/search",w.indexName),data:{query:C}},k)}},T$=function(w){return function(C,k){var _=k||{},N=_.forwardToReplicas,U=v(i(_,["forwardToReplicas"]));return N&&(U.queryParameters.forwardToReplicas=1),m(w.transporter.write({method:V,path:y("1/indexes/%s/settings",w.indexName),data:C},U),function(W,z){return Ke(w)(W.taskID,z)})}},Ke=function(w){return function(C,k){return g(function(_){return function(N){return function(U,W){return N.transporter.read({method:L,path:y("1/indexes/%s/task/%s",N.indexName,U.toString())},W)}}(w)(C,k).then(function(N){return N.status!=="published"?_():void 0})})}},po={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject",DeleteIndex:"delete",ClearIndex:"clear"},cd={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},O$=1,B$=2,N$=3,fs=function(w){return function(C,k){var _=C.map(function(N){return a(a({},N),{},{threshold:N.threshold||0})});return w.transporter.read({method:P,path:"1/indexes/*/recommendations",data:{requests:_},cacheable:!0},k)}},I$=function(w){return function(C,k){return fs(w)(C.map(function(_){return a(a({},_),{},{fallbackParameters:{},model:"bought-together"})}),k)}},A$=function(w){return function(C,k){return fs(w)(C.map(function(_){return a(a({},_),{},{model:"related-products"})}),k)}},P$=function(w){return function(C,k){var _=C.map(function(N){return a(a({},N),{},{model:"trending-facets",threshold:N.threshold||0})});return w.transporter.read({method:P,path:"1/indexes/*/recommendations",data:{requests:_},cacheable:!0},k)}},F$=function(w){return function(C,k){var _=C.map(function(N){return a(a({},N),{},{model:"trending-items",threshold:N.threshold||0})});return w.transporter.read({method:P,path:"1/indexes/*/recommendations",data:{requests:_},cacheable:!0},k)}},R$=function(w){return function(C,k){return fs(w)(C.map(function(_){return a(a({},_),{},{model:"looking-similar"})}),k)}},$$=function(w){return function(C,k){var _=C.map(function(N){return a(a({},N),{},{model:"recommended-for-you",threshold:N.threshold||0})});return w.transporter.read({method:P,path:"1/indexes/*/recommendations",data:{requests:_},cacheable:!0},k)}};function Ay(w,C,k){var _,N={appId:w,apiKey:C,timeouts:{connect:1,read:2,write:30},requester:{send:function(z){return new Promise(function(K){var ee=new XMLHttpRequest;ee.open(z.method,z.url,!0),Object.keys(z.headers).forEach(function(ge){return ee.setRequestHeader(ge,z.headers[ge])});var J,se=function(ge,ue){return setTimeout(function(){ee.abort(),K({status:0,content:ue,isTimedOut:!0})},1e3*ge)},ie=se(z.connectTimeout,"Connection timeout");ee.onreadystatechange=function(){ee.readyState>ee.OPENED&&J===void 0&&(clearTimeout(ie),J=se(z.responseTimeout,"Socket timeout"))},ee.onerror=function(){ee.status===0&&(clearTimeout(ie),clearTimeout(J),K({content:ee.responseText||"Network request failed",status:ee.status,isTimedOut:!1}))},ee.onload=function(){clearTimeout(ie),clearTimeout(J),K({content:ee.responseText,status:ee.status,isTimedOut:!1})},ee.send(z.data)})}},logger:(_=N$,{debug:function(z,K){return O$>=_&&console.debug(z,K),Promise.resolve()},info:function(z,K){return B$>=_&&console.info(z,K),Promise.resolve()},error:function(z,K){return console.error(z,K),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:d({caches:[c({key:"".concat("4.23.2","-").concat(w)}),u()]}),userAgent:I("4.23.2").add({segment:"Browser"})},U=a(a({},N),k),W=function(){return function(z){return function(K){var ee=K.region||"us",J=p(b.WithinHeaders,K.appId,K.apiKey),se=q(a(a({hosts:[{url:"personalization.".concat(ee,".algolia.com")}]},K),{},{headers:a(a(a({},J.headers()),{"content-type":"application/json"}),K.headers),queryParameters:a(a({},J.queryParameters()),K.queryParameters)}));return h({appId:K.appId,transporter:se},K.methods)}(a(a(a({},N),z),{},{methods:{getPersonalizationStrategy:Ce,setPersonalizationStrategy:Ne}}))}};return function(z){var K=z.appId,ee=p(z.authMode!==void 0?z.authMode:b.WithinHeaders,K,z.apiKey),J=q(a(a({hosts:[{url:"".concat(K,"-dsn.algolia.net"),accept:T.Read},{url:"".concat(K,".algolia.net"),accept:T.Write}].concat(f([{url:"".concat(K,"-1.algolianet.com")},{url:"".concat(K,"-2.algolianet.com")},{url:"".concat(K,"-3.algolianet.com")}]))},z),{},{headers:a(a(a({},ee.headers()),{"content-type":"application/x-www-form-urlencoded"}),z.headers),queryParameters:a(a({},ee.queryParameters()),z.queryParameters)}));return h({transporter:J,appId:K,addAlgoliaAgent:function(se,ie){J.userAgent.add({segment:se,version:ie})},clearCache:function(){return Promise.all([J.requestsCache.clear(),J.responsesCache.clear()]).then(function(){})}},z.methods)}(a(a({},U),{},{methods:{search:Z,searchForFacetValues:Y,multipleBatch:Nr,multipleGetObjects:M,multipleQueries:Z,copyIndex:Le,copySettings:Et,copySynonyms:Ze,copyRules:St,moveIndex:Br,listIndices:co,getLogs:$t,listClusters:Vt,multipleSearchForFacetValues:Y,getApiKey:ke,addApiKey:Qt,listApiKeys:ft,updateApiKey:Qc,deleteApiKey:st,restoreApiKey:_t,assignUserID:it,assignUserIDs:Qe,getUserID:H,searchUserIDs:cs,listUserIDs:ma,getTopUserIDs:et,removeUserID:ve,hasPendingMappings:fe,clearDictionaryEntries:Ae,deleteDictionaryEntries:Xt,getDictionarySettings:ut,getAppTask:Xe,replaceDictionaryEntries:Lt,saveDictionaryEntries:Dt,searchDictionaryEntries:uo,setDictionarySettings:Yc,waitAppTask:tr,customRequest:xt,initIndex:function(z){return function(K){return Pe(z)(K,{methods:{batch:ga,delete:od,findAnswers:xn,getObject:fo,getObjects:en,saveObject:E$,saveObjects:id,search:Oy,searchForFacetValues:By,waitTask:Ke,setSettings:T$,getSettings:_y,partialUpdateObject:C$,partialUpdateObjects:Ty,deleteObject:ad,deleteObjects:F,deleteBy:rd,clearObjects:td,browseObjects:Xc,getObjectPosition:Vn,findObject:nr,exists:Ee,saveSynonym:_$,saveSynonyms:ld,getSynonym:w$,searchSynonyms:Iy,browseSynonyms:ed,deleteSynonym:de,clearSynonyms:nd,replaceAllObjects:k$,replaceAllSynonyms:S$,searchRules:Ny,getRule:us,deleteRule:G,saveRule:x$,saveRules:sd,replaceAllRules:v$,browseRules:ya,clearRules:ds}})}},initAnalytics:function(){return function(z){return function(K){var ee=K.region||"us",J=p(b.WithinHeaders,K.appId,K.apiKey),se=q(a(a({hosts:[{url:"analytics.".concat(ee,".algolia.com")}]},K),{},{headers:a(a(a({},J.headers()),{"content-type":"application/json"}),K.headers),queryParameters:a(a({},J.queryParameters()),K.queryParameters)}));return h({appId:K.appId,transporter:se},K.methods)}(a(a(a({},N),z),{},{methods:{addABTest:me,getABTest:qe,getABTests:Ie,stopABTest:ye,deleteABTest:Be}}))}},initPersonalization:W,initRecommendation:function(){return function(z){return U.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."),W()(z)}},getRecommendations:fs,getFrequentlyBoughtTogether:I$,getLookingSimilar:R$,getRecommendedForYou:$$,getRelatedProducts:A$,getTrendingFacets:P$,getTrendingItems:F$}}))}return Ay.version="4.23.2",Ay})})(my);var bF=my.exports;const wF=lx(bF);class gy{constructor(t,r,o="https://api.pennsieve.io"){this.client=wF(t,r),this.PENNSIEVE_API_LOCATION=o,this.anatomyFacetLabels=[]}initIndex(t){this.index=this.client.initIndex(t)}getAlgoliaFacets(t){const r=t.map(s=>s.facetPropPath),o=t.map(s=>s.facetSubpropPath);let a=[],i=0;return this.index.search("",{sortFacetValuesBy:"alpha",facets:r.concat(o)}).then(s=>(r.map(l=>{const c=t.find(m=>m.facetPropPath==l);var d=[];const u=s.facets;if(u===void 0)return;const p=u[l]==null?{}:u[l],g=c&&u[c.facetSubpropPath]?Object.keys(u[c.facetSubpropPath]):[];Object.keys(p).map(m=>{const f=g.reduce((y,b)=>{const v=b.split(".");return v.length!==2||m===v[0]&&y.push({label:v[1],id:i++,facetPropPath:`${c?c.facetSubpropPath:void 0}`}),y},[]);let h={label:m,id:i++,facetPropPath:l};f.length>0&&(h.children=f),d.push(h)}),d.length>0&&a.push({label:c?c.label:"",id:i++,children:d,key:l})}),a))}_discoverAllDois(t,r="https://api.pennsieve.io"){return new Promise(o=>{fetch(`${r}/discover/datasets/${t}/versions`).then(a=>a.json()).then(a=>{o(a.map(i=>i.doi))})})}_expandDois(t,r="https://api.pennsieve.io"){return new Promise(o=>{let a=t.map(i=>this._discoverAllDois(i,r));Promise.all(a).then(i=>{o(i.flat())})})}_processResultsForCards(t){let r=[],o={};for(let a of t)o={...a},o={anatomy:a.anatomy?a.anatomy.organ.map(i=>i.curie):void 0,doi:a.item.curie.split(":")[1],name:a.item.name,description:a.item.description,updated:a.pennsieve?a.pennsieve.updatedAt:void 0,publishDate:a.pennsieve?a.pennsieve.publishDate:void 0,datasetId:a.objectID,detailsReady:!1},r.push(o);return r}_processAnatomy(t){let r=[],o=[],a=[],i=[];return t.forEach(s=>{s.item&&s.item.keywords&&s.item.keywords.forEach(l=>{let c=l.keyword.toUpperCase();(c.includes("UBERON")||c.includes("ILX"))&&r.push(this._processUberonURL(c))}),s.anatomy&&s.anatomy.organ&&s.anatomy.organ.forEach(l=>{l.curie&&(r.push(l.curie),o.push(l.name))})}),i=[...new Set(r)],a=[...new Set(o)],this.anatomyFacetLabels=a,i}_processUberonURL(t){return t.split("/").pop().replace("_",":")}search(t,r="",o=10,a=1){return new Promise(i=>{this.index.search(r,{facets:["*"],hitsPerPage:o,page:a-1,filters:t,attributesToHighlight:[],attributesToRetrieve:["pennsieve.publishDate","pennsieve.updatedAt","item.curie","item.name","item.description","objectID","anatomy.organ.curie"]}).then(s=>{let l={items:this._processResultsForCards(s.hits),total:s.nbHits,discoverIds:s.hits.map(c=>c.pennsieve?c.pennsieve.identifier:c.objectID),dois:s.hits.map(c=>c.item.curie.split(":")[1])};i(l)})})}anatomyInSearch(t,r="",o=999999,a=1){return new Promise(i=>{this.index.search(r,{facets:["*"],hitsPerPage:o,page:a-1,filters:t,attributesToHighlight:[],attributesToRetrieve:["objectID","item.keywords.keyword","anatomy.organ.name","anatomy.organ.curie"]}).then(s=>{i({forFlatmap:this.processResultsForFlatmap(s.hits),forScaffold:this.processResultsForScaffold(s.hits)})})})}processResultsForFlatmap(t){return t.map(o=>({id:o.objectID,terms:o.anatomy?o.anatomy.organ.map(a=>a.curie):[]}))}processResultsForScaffold(t){let r={};return t.forEach(o=>{o.anatomy&&o.anatomy.organ&&o.anatomy.organ.forEach(a=>{a.name&&(r[a.name]?r[a.name]++:r[a.name]=1)})}),r}}const Jc=[{label:"Data Type",id:"item.types",facetPropPath:"item.types.name",facetSubpropPath:"item.types.subcategory.name"},{label:"Anatomical Structure",id:"anatomy.organ.category",facetPropPath:"anatomy.organ.category.name",facetSubpropPath:"anatomy.organ.subcategory.name",facetFilterPath:"anatomy.organ.name"},{label:"Species",id:"organisms.primary.species",facetPropPath:"organisms.primary.species.name",facetSubpropPath:"organisms.primary.species.subcategory.name"},{label:"Experimental Approach",id:"item.modalities",facetPropPath:"item.modalities.keyword",facetSubpropPath:"item.modalities.subcategory.name"},{label:"Sex",id:"attributes.subject.sex",facetPropPath:"attributes.subject.sex.value",facetSubpropPath:"attributes.subject.sex.subcategory.name"},{label:"Age Categories",id:"attributes.subject.ageCategory",facetPropPath:"attributes.subject.ageCategory.value",facetSubpropPath:"attributes.subject.ageCategory.subcategory.name"},{label:"Funding Program",id:"pennsieve.organization",facetPropPath:"pennsieve.organization.name",facetSubpropPath:"pennsieve.organization.subcategory.name"}];function yy(e=void 0){if(e===void 0)return"NOT item.published.status:embargo";e.forEach(a=>a.label=a.facet);let t=CF(e),r="NOT item.published.status:embargo";return r=`(${r}) AND `,Jc.map(a=>a.facetPropPath).map(a=>{let i=t.filter(c=>c.facetPropPath==a),s="",l="";i.map(c=>{let d=c.facetSubPropPath?c.facetSubPropPath:a;c.AND?l+=`AND "${d}":"${c.label}"`:s+=`"${d}":"${c.label}" OR `}),!(s==""&&l=="")&&(s=`(${s.substring(0,s.lastIndexOf(" OR "))})`,r+=`${s+l} AND `,r=r.split("()AND ").join(""))}),r.substring(0,r.lastIndexOf(" AND "))}function CF(e){return e.filter(t=>t.label!=="Show all")}const ss=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Zc=function(e){const t=e.toLowerCase();return as[t]?ss(as[t]):ss(t)},kF={name:"SearchFilters",components:{MapSvgIcon:cF,MapSvgSpriteColor:yF,Option:xl,Select:si,Popover:li,Cascader:Op},props:{entry:Object,envVars:{type:Object,default:()=>{}}},data:function(){return{algoliaClient:void 0,cascaderIsReady:!1,previousShowAllChecked:{species:!1,gender:!1,organ:!1,datasets:!1},showFilters:!0,showFiltersText:!0,cascadeSelected:[],cascadeSelectedWithBoolean:[],filterTimeout:null,numberShown:10,filters:[],facets:["Species","Gender","Organ","Datasets"],numberDatasetsShown:["10","20","50"],props:{multiple:!0},options:[{value:"Species",label:"Species",children:[{}]}],presentTags:[]}},setup(){const e=n.markRaw({}),t=n.markRaw({term:new Set,facet:new Set,facet2:new Set});return{cascaderTags:e,correctnessCheck:t}},computed:{numberOfResultsText:function(){return`${this.entry.numberOfHits} results | Showing`}},methods:{createCascaderItemValue:function(e,t=void 0,r=void 0){let o=e;return t&&(o=`${e}>${t}`),t&&r&&(o=`${e}>${t}>${r}`),!t&&r&&console.warn(`Warning: ${r} provided without its parent, this will not be shown in the cascader`),o},processOptions:function(){this.options.forEach((e,t)=>{this.options[t].total=this.countTotalFacet(e),this.options[t].label=Zc(e.label),this.options[t].value=this.createCascaderItemValue(e.key,void 0),this.options[t].children.unshift({value:this.createCascaderItemValue("Show all"),label:"Show all"}),this.options[t].children.forEach((r,o)=>{this.options[t].children[o].facetPropPath!=="pennsieve.organization.name"&&(this.options[t].children[o].label=Zc(r.label)),this.options[t].children[o].value=this.createCascaderItemValue(e.label,r.label),this.options[t].children[o].children&&this.options[t].children[o].children.length>0&&this.options[t].children[o].children.forEach((a,i)=>{this.options[t].children[o].children[i].label=Zc(a.label),this.options[t].children[o].children[i].value=this.createCascaderItemValue(e.label,r.label,a.label)})})})},populateCascader:function(){return this.entry.options?new Promise(e=>{this.facets=this.entry.options,this.options=this.entry.options,this.processOptions(),e()}):new Promise(e=>{this.algoliaClient.getAlgoliaFacets(Jc).then(t=>{this.facets=t,Je.emit("available-facets",t),this.options=t,this.processOptions()}).finally(()=>{e()})})},cascadeTagClose:function(e){let t=[];Object.entries(this.cascaderTags).map(r=>{const o=r[0],a=r[1],i=this.options.filter(l=>l.label==o)[0],s=i.key;for(let l=0;l<i.children.length;l++){const c=i.children[l],d=c.label,u=c.value;if(Array.isArray(a))if(a.length===0&&d.toLowerCase()==="show all"){t.push([s,u]);break}else d!==e&&a.includes(d)&&t.push([s,u]);else Object.entries(a).map(p=>{const g=p[0],m=p[1];g===d&&c.children.map(f=>{const h=f.label,y=f.value;h!==e&&m.includes(h)&&t.push([s,y])})})}}),this.cascadeEvent(t)},tagsChangedCallback:function(e){this.correctnessCheck.term&&this.correctnessCheck.facet&&this.correctnessCheck.facet2&&this.options.map(t=>{this.correctnessCheck.term.add(t.label),t.children.map(r=>{this.correctnessCheck.facet.add(r.label),t.label==="Anatomical structure"&&r.label!=="Show all"&&r.children.map(o=>{this.correctnessCheck.facet2.add(o.label)})})}),this.cascaderTags={},this.presentTags=[],e.map(t=>{const{facet:r,facet2:o,term:a}=t;this.correctnessCheck.term.has(a)&&this.correctnessCheck.facet.has(r)&&(o?this.correctnessCheck.facet2.has(o)&&(a in this.cascaderTags?r in this.cascaderTags[a]?this.cascaderTags[a][r].push(o):this.cascaderTags[a][r]=[o]:(this.cascaderTags[a]={},this.cascaderTags[a][r]=[o])):a in this.cascaderTags&&a!=="Anatomical structure"?this.cascaderTags[a].push(r):r.toLowerCase()!=="show all"?this.cascaderTags[a]=[r]:this.cascaderTags[a]=[])}),Object.values(this.cascaderTags).map(t=>{const r=Array.isArray(t)?t:Object.values(t).flat(1);this.presentTags=[...this.presentTags,...r]}),this.presentTags=[...new Set(this.presentTags)],this.presentTags.length>0?this.showFiltersText=!1:this.showFiltersText=!0},countTotalFacet:function(e){return["anatomy.organ.category.name"].includes(e.key)?e.children.reduce((r,o)=>(r=typeof r=="number"?r:r.children.length,r+o.children.length)):e.children.length},showAllEventModifierForAutoCheckAll:function(e){const t={};return e.map(r=>{const o=r[0];o in t?t[o]+=1:t[o]=1}),this.options.map(r=>{const o=r.key,a=r.children.filter(s=>s.label==="Show all")[0].value,i=r.total;t[o]===i&&(e=e.filter(s=>s[0]!==r.key),delete t[o]),o in t||e.unshift([o,a])}),e},cascadeEvent:function(e){let t=[...e];if(t){if(t=this.showAllEventModifier(t),t=this.showAllEventModifierForAutoCheckAll(t),this.__expandItem__){let i=0;this.__expandItem__.length>1&&(i=1);const s=t.filter(c=>c[i]==this.__expandItem__[i]),l=t.filter(c=>c[i]!==this.__expandItem__[i]);t=[...s,...l]}let r=t.filter(i=>i!==void 0).map(i=>{let{hString:s,bString:l}=this.findHierarachyStringAndBooleanString(i),{facet:c,facet2:d,term:u}=this.getFacetsFromHierarchyString(s);return{facetPropPath:i[0],facet:c,facet2:d,term:u,AND:l}}),o=t.filter(i=>i!==void 0).map(i=>{let s,l=i[0].includes("duplicate")?i[0].split("duplicate")[0]:i[0],{hString:c,bString:d}=this.findHierarachyStringAndBooleanString(i),{facet:u,facet2:p,term:g}=this.getFacetsFromHierarchyString(c);return p&&(u=p,s="anatomy.organ.name"),{facetPropPath:l,facet:u,term:g,AND:d,facetSubPropPath:s}});o.filter(i=>i.facet!=="Show all").length||(o=[]),this.filterTimeout&&clearTimeout(this.filterTimeout),this.$emit("loading",!0),this.setCascader(r),this.filterTimeout=setTimeout(()=>{this.$emit("filterResults",o),this.cssMods()},600)}},findHierarachyStringAndBooleanString(e){let t,r;return e.length>=3?e[2]&&(typeof e[2]=="string"||e[2]instanceof String)&&e[2].split(">").length>2?(t=e[2],r=e.length==4?e[3]:void 0):(t=e[1],r=e[2]):(t=e[1],r=void 0),{hString:t,bString:r}},getFacetsFromHierarchyString(e){let t,r,o,a=e.split(">");return a.length==3?(o=a[2],t=a[1],r=a[0]):(t=a[1],r=a[0]),{facet:t,facet2:o,term:r}},showAllEventModifier:function(e){if(e.map(r=>r?r[1].toLowerCase().includes("show all"):!1).includes(!0)){let r=[],o={};for(const a in e)o[e[a][0]]===void 0&&(o[e[a][0]]=[]),o[e[a][0]].push(e[a]);for(const a in o){let i;for(let s=o[a].length-1;s>=0;s--)if(o[a][s][1].toLowerCase().includes("show all")){i=o[a].splice(s,1)[0];break}i?this.previousShowAllChecked[a]&&o[a].length>0?r.push(...o[a]):r.push(i):r.push(...o[a])}return r.sort((a,i)=>this.__expandItem__?a[0]==this.__expandItem__?i[0]==this.__expandItem__?0:-1:i[0]==this.__expandItem__?a[0]==this.__expandItem__?0:1:0:0)}return e},cascadeExpandChange:function(e){this.__expandItem__=e,this.cssMods()},numberShownChanged:function(e){this.$emit("numberPerPage",parseInt(e))},updatePreviousShowAllChecked:function(e){for(const t in this.previousShowAllChecked)this.previousShowAllChecked[t]=!1;e.forEach(t=>{t[1].toLowerCase().includes("show all")&&(this.previousShowAllChecked[t[0]]=!0)})},setCascader:function(e){if(this.cascaderIsReady&&e&&e.length!=0){const t=r=>{let o=[r.facetPropPath,this.createCascaderItemValue(ss(r.term),r.facet)];return r.facet2&&o.push(this.createCascaderItemValue(ss(r.term),r.facet,r.facet2)),o};this.cascadeSelected=e.map(r=>t(r)),this.cascadeSelectedWithBoolean=e.map(r=>{let o=t(r);return o.push(r.AND),o}),this.updatePreviousShowAllChecked(this.cascadeSelected)}this.tagsChangedCallback(e)},addFilter:function(e){if(this.cascaderIsReady&&e){let t=this.validateAndConvertFilterToHierarchical(e);if(t)return this.cascadeSelected.filter(r=>r.term!=t.term),this.cascadeSelected.push([t.facetPropPath,this.createCascaderItemValue(t.term,t.facet),this.createCascaderItemValue(t.term,t.facet,t.facet2)]),this.cascadeSelectedWithBoolean.push([t.facetPropPath,this.createCascaderItemValue(t.term,t.facet),this.createCascaderItemValue(t.term,t.facet,t.facet2),t.AND]),!0}},initiateSearch:function(){this.cascadeEvent(this.cascadeSelectedWithBoolean)},checkShowAllBoxes:function(){this.setCascader(this.options.map(e=>({facetPropPath:e.value,term:e.label,facet:"Show all"})))},makeCascadeLabelsClickable:function(){this.$nextTick(()=>{document.querySelectorAll(".sidebar-cascader-popper .el-cascader-node__label").forEach(e=>{e.onclick=function(){const t=this.previousElementSibling;t&&(t.parentElement.attributes["aria-owns"]||this.previousElementSibling.click())}})})},cssMods:function(){this.makeCascadeLabelsClickable(),this.removeTopLevelCascaderCheckboxes()},removeTopLevelCascaderCheckboxes:function(){this.$nextTick(()=>{document.querySelectorAll(".sidebar-cascader-popper .el-cascader-menu__list").forEach(t=>{const r=t.textContent,o=t.querySelector(".el-icon.arrow-right");!r.includes("Show all")&&o&&t.querySelectorAll(".el-checkbox__input").forEach(a=>{a.style.display="none"})})})},validateAndConvertFilterToHierarchical:function(e){var t,r;if(e&&e.facet&&e.term){const o=e.facet.toLowerCase();if(e.facet2)return e;for(const a of this.options)if(a.value===e.facetPropPath)for(const i of a.children){if(((t=i.label)==null?void 0:t.toLowerCase())===o)return e.facet=i.label,e;if(i.children&&i.children.length>0){for(const s of i.children)if(((r=s.label)==null?void 0:r.toLowerCase())===o)return e.facet2=s.label,e.facet=i.label,e}}}return!1},getHierarchicalValidatedFilters:function(e){if(e)if(this.cascaderIsReady){const t=[],r=[];return e.forEach(o=>{const a=this.validateAndConvertFilterToHierarchical(o);a&&(t.push(a),r.push(a.term))}),this.options.forEach(o=>{r.includes(o.label)||t.push({facet:"Show all",facetPropPath:o.key,label:"Show all",term:o.label})}),t}else return e;return[]}},mounted:function(){this.algoliaClient=n.markRaw(new gy(this.envVars.ALGOLIA_ID,this.envVars.ALGOLIA_KEY,this.envVars.PENNSIEVE_API_LOCATION)),this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX),this.populateCascader().then(()=>{this.cascaderIsReady=!0,this.checkShowAllBoxes(),this.setCascader(this.entry.filterFacets),this.cssMods(),this.$emit("cascaderReady")})}},vF={class:"filters"},SF={key:0,class:"cascader-tag"},EF={class:"el-tags-container"},xF={class:"el-tags-container"},_F={class:"search-filters transition-box"},TF={key:0,class:"filter-default-value"},OF={class:"dataset-shown"},BF={class:"dataset-results-feedback"};function NF(e,t,r,o,a,i){const s=n.resolveComponent("MapSvgSpriteColor"),l=Gn,c=li,d=Op,u=n.resolveComponent("MapSvgIcon"),p=xl,g=si,m=hr;return n.openBlock(),n.createElementBlock("div",vF,[n.createVNode(s),e.presentTags.length>0?(n.openBlock(),n.createElementBlock("div",SF,[n.createVNode(l,{class:"ml-2",type:"info",closable:"",onClose:t[0]||(t[0]=f=>i.cascadeTagClose(e.presentTags[0]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.presentTags[0]),1)]),_:1}),e.presentTags.length>1?(n.openBlock(),n.createBlock(c,{key:0,placement:"bottom-start",width:200,trigger:"hover","popper-class":"cascade-tags-popover"},{default:n.withCtx(()=>[n.createElementVNode("div",EF,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.presentTags.slice(1),(f,h)=>(n.openBlock(),n.createBlock(l,{key:h,class:"ml-2",type:"info",closable:"",onClose:y=>i.cascadeTagClose(f)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(f),1)]),_:2},1032,["onClose"]))),128))])]),reference:n.withCtx(()=>[n.createElementVNode("div",xF,[e.presentTags.length>1?(n.openBlock(),n.createBlock(l,{key:0,class:"ml-2",type:"info"},{default:n.withCtx(()=>[n.createTextVNode(" +"+n.toDisplayString(e.presentTags.length-1),1)]),_:1})):n.createCommentVNode("",!0)])]),_:1})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),n.createVNode(n.Transition,{name:"el-zoom-in-top"},{default:n.withCtx(()=>[n.withDirectives((n.openBlock(),n.createElementBlock("span",_F,[n.createVNode(d,{class:"cascader",ref:"cascader",modelValue:e.cascadeSelected,"onUpdate:modelValue":t[1]||(t[1]=f=>e.cascadeSelected=f),size:"large",placeholder:" ","collapse-tags":!0,"collapse-tags-tooltip":"",options:e.options,props:e.props,onChange:t[2]||(t[2]=f=>i.cascadeEvent(f)),onExpandChange:i.cascadeExpandChange,"show-all-levels":!0,"popper-class":"sidebar-cascader-popper"},null,8,["modelValue","options","props","onExpandChange"]),e.showFiltersText?(n.openBlock(),n.createElementBlock("div",TF,"Filters")):n.createCommentVNode("",!0),n.createVNode(c,{title:"How do filters work?",width:"250",trigger:"hover","popper-class":"filter-help-popover"},{reference:n.withCtx(()=>[n.createVNode(u,{icon:"help",class:"help"})]),default:n.withCtx(()=>[t[5]||(t[5]=n.createElementVNode("div",null,[n.createElementVNode("strong",null,"Within categories:"),n.createTextVNode(" OR "),n.createElementVNode("br"),n.createTextVNode(" example: 'heart' OR 'colon' "),n.createElementVNode("br"),n.createElementVNode("br"),n.createElementVNode("strong",null,"Between categories:"),n.createTextVNode(" AND "),n.createElementVNode("br"),n.createTextVNode(" example: 'rat' AND 'lung' ")],-1))]),_:1})])),[[n.vShow,e.showFilters],[m,!e.cascaderIsReady]])]),_:1}),n.createElementVNode("div",OF,[n.createElementVNode("span",BF,n.toDisplayString(i.numberOfResultsText),1),n.createVNode(g,{class:"number-shown-select",modelValue:e.numberShown,"onUpdate:modelValue":t[3]||(t[3]=f=>e.numberShown=f),placeholder:"10",onChange:t[4]||(t[4]=f=>i.numberShownChanged(f))},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.numberDatasetsShown,f=>(n.openBlock(),n.createBlock(p,{key:f,label:f,value:f},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])])}const ls=yt(kF,[["render",NF],["__scopeId","data-v-b05bed74"]]);var IF=async function(e){if(!e.ok){let t=await e.json();throw t?new Error(t.message):new Error(e)}return e},AF={filters:[],searchInput:"",lastSearch:"",results:[],numberOfHits:0,filter:[],loadingCards:!1,numberPerPage:10,page:1,pageModel:1,start:0,hasSearched:!1,contextCardEnabled:!1};const PF={components:{SearchFilters:ls,DatasetCard:N0,SearchHistory:is,Button:We,Card:Ur,Drawer:ri,Icon:we,Input:Hn,Pagination:Wr},name:"SideBarContent",props:{visible:{type:Boolean,default:!1},isDrawer:{type:Boolean,default:!0},entry:{type:Object,default:()=>AF},envVars:{type:Object,default:()=>{}}},data:function(){return{...this.entry,algoliaClient:void 0,bodyStyle:{flex:"1 1 auto","flex-flow":"column",display:"flex"},cascaderIsReady:!1}},computed:{filterEntry:function(){return{numberOfHits:this.numberOfHits,filterFacets:this.filter}}},methods:{hoverChanged:function(e){const t=e&&{...e,type:"dataset"};this.$emit("hover-changed",t)},resetSearch:function(){this.numberOfHits=0,this.discoverIds=[],this._dois=[],this.results=[],this.loadingCards=!1},openSearch:function(e,t="",r={withSearch:!0}){this.searchInput=t,this.resetPageNavigation(),this.cascaderIsReady?(this.filter=this.$refs.filtersRef.getHierarchicalValidatedFilters(e),e&&e.length>0&&this.filter&&this.filter.length===0?(this.$refs.filtersRef.checkShowAllBoxes(),this.resetSearch()):this.filter&&(r.withSearch&&this.searchAlgolia(this.filter,t),this.$refs.filtersRef.setCascader(this.filter))):(this.filter=e,(!e||e.length==0)&&r.withSearch&&this.searchAlgolia(this.filter,t))},addFilter:function(e){this.cascaderIsReady?(this.resetPageNavigation(),e&&this.$refs.filtersRef.addFilter(e)&&this.$refs.filtersRef.initiateSearch()):Array.isArray(this.filter)?this.filter.push(e):this.filter=[e]},cascaderReady:function(){this.cascaderIsReady=!0,this.openSearch(this.filter,this.searchInput)},clearSearchClicked:function(){this.searchInput="",this.searchAndFilterUpdate()},searchEvent:function(e=!1){(e.keyCode===13||e instanceof MouseEvent)&&(this.searchInput=this.searchInput.trim(),this.searchAndFilterUpdate())},filterUpdate:function(e){this.filters=[...e],this.searchAndFilterUpdate(),this.$emit("search-changed",{value:e,type:"filter-update"})},transformFiltersBeforeSearch:function(e){return e.map(t=>(t.facet2&&(t.facet=t.facet2,delete t.facet2),t))},searchAndFilterUpdate:function(){var t;this.resetPageNavigation();const e=this.transformFiltersBeforeSearch(this.filters);this.searchAlgolia(e,this.searchInput),this.$refs.searchHistory.selectValue="Search history",(this.filters.length||(t=this.searchInput)!=null&&t.trim())&&this.$refs.searchHistory.addSearchToHistory(this.filters,this.searchInput)},searchAlgolia(e,t=""){this.loadingCards=!0,this.algoliaClient.anatomyInSearch(yy(e),t).then(r=>{Je.emit("anatomy-in-datasets",r.forFlatmap),Je.emit("number-of-datasets-for-anatomies",r.forScaffold)}),this.algoliaClient.search(yy(e),t,this.numberPerPage,this.page).then(r=>{this.numberOfHits=r.total,this.discoverIds=r.discoverIds,this._dois=r.dois,this.results=r.items,this.loadingCards=!1,this.scrollToTop(),this.$emit("search-changed",{value:this.searchInput,type:"query-update"}),this._abortController&&this._abortController.abort(),this._abortController=new AbortController;const o=this._abortController.signal;this.perItemSearch(o,{count:0})})},filtersLoading:function(e){this.loadingCards=e},numberPerPageUpdate:function(e){this.numberPerPage=e,this.pageChange(1)},pageChange:function(e){this.start=(e-1)*this.numberPerPage,this.page=e,this.searchAlgolia(this.filters,this.searchInput,this.numberPerPage,this.page)},handleMissingData:function(e){let t=this.results.findIndex(r=>r.doi===e);this.results[t]&&(this.results[t].detailsReady=!0)},perItemSearch:function(e,t){if(10>t.count){const o=this._dois.shift();o&&(t.count++,this.callSciCrunch(this.envVars.API_LOCATION,{dois:[o]},e).then(a=>{a.numberOfHits===0?this.handleMissingData(o):this.resultsProcessing(a),this.$refs.content.style["overflow-y"]="scroll",t.count--,this.perItemSearch(e,t)}).catch(a=>{a.name!=="AbortError"&&(this.handleMissingData(o),t.count--,this.perItemSearch(e,t))}),this.perItemSearch(e,t))}},scrollToTop:function(){this.$refs.content&&this.$refs.content.scroll({top:0,behavior:"smooth"})},resetPageNavigation:function(){this.start=0,this.page=1},resultsProcessing:function(e){this.lastSearch=this.searchInput,e.results.length!==0&&e.results.forEach(t=>{let r=this.results.findIndex(o=>t.doi?t.doi.includes(o.doi):!1);Object.assign(this.results[r],t),Object.assign(this.results[r],{numberSamples:t.sampleSize?parseInt(t.sampleSize):0,numberSubjects:t.subjectSize?parseInt(t.subjectSize):0,updated:(t.updated&&t.updated.length)>0?t.updated[0].timestamp.split("T")[0]:"",url:t.uri[0],datasetId:t.dataset_identifier,datasetRevision:t.dataset_revision,datasetVersion:t.dataset_version,organs:t.organs&&t.organs.length>0?[...new Set(t.organs.map(o=>o.name))]:void 0,species:t.organisms&&t.organisms[0].species?[...new Set(t.organisms.map(o=>o.species?o.species.name:null))]:void 0,scaffolds:t["abi-scaffold-metadata-file"],thumbnails:t["abi-thumbnail"]?t["abi-thumbnail"]:t["abi-scaffold-thumbnail"],scaffoldViews:t["abi-scaffold-view-file"],videos:t.video,plots:t["abi-plot"],images:t["common-images"],contextualInformation:t["abi-contextual-information"].length>0?t["abi-contextual-information"]:void 0,segmentation:t["mbf-segmentation"],simulation:t["abi-simulation-file"],additionalLinks:t.additionalLinks,detailsReady:!0}),this.results[r]=this.results[r]})},createfilterParams:function(e){let t=new URLSearchParams;for(const r in e)Array.isArray(e[r])?e[r].forEach(o=>{t.append(r,o)}):t.append(r,e[r]);return t.toString()},callSciCrunch:function(e,t={},r){return new Promise((o,a)=>{let i=this.envVars.API_LOCATION+this.searchEndpoint+"?"+this.createfilterParams(t);fetch(i,{signal:r}).then(IF).then(s=>s.json()).then(s=>o(s)).catch(s=>a(s))})},getAlgoliaFacets:async function(){return await this.algoliaClient.getAlgoliaFacets(Jc)},searchHistorySearch:function(e){this.searchInput=e.search,this.filters=e.filters,this.searchAndFilterUpdate(),this.openSearch([...e.filters],e.search,{withSearch:!1})}},mounted:function(){this.algoliaClient=n.markRaw(new gy(this.envVars.ALGOLIA_ID,this.envVars.ALGOLIA_KEY,this.envVars.PENNSIEVE_API_LOCATION)),this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX),this.openSearch(this.filter,this.searchInput)},created:function(){this.searchEndpoint="dataset_info/using_multiple_dois/"}},FF={class:"header"},RF={class:"content scrollbar",ref:"content"},$F={key:0,class:"error-feedback"};function VF(e,t,r,o,a,i){const s=Hn,l=We,c=ls,d=is,u=N0,p=Wr,g=Ur,m=hr;return n.openBlock(),n.createBlock(g,{"body-style":e.bodyStyle,class:"content-card"},{header:n.withCtx(()=>[n.createElementVNode("div",FF,[n.createVNode(s,{class:"search-input",placeholder:"Search",modelValue:e.searchInput,"onUpdate:modelValue":t[0]||(t[0]=f=>e.searchInput=f),onKeyup:i.searchEvent,clearable:"",onClear:i.clearSearchClicked},null,8,["modelValue","onKeyup","onClear"]),n.createVNode(l,{type:"primary",class:"button",onClick:i.searchEvent,size:"large"},{default:n.withCtx(()=>t[4]||(t[4]=[n.createTextVNode(" Search ")])),_:1},8,["onClick"]),n.createVNode(l,{type:"primary",class:"button",onClick:t[1]||(t[1]=f=>i.openSearch([],"")),size:"default"},{default:n.withCtx(()=>t[5]||(t[5]=[n.createTextVNode(" Reset ")])),_:1})])]),default:n.withCtx(()=>[n.createVNode(c,{class:"filters",ref:"filtersRef",entry:i.filterEntry,envVars:r.envVars,onFilterResults:i.filterUpdate,onNumberPerPage:i.numberPerPageUpdate,onLoading:i.filtersLoading,onCascaderReady:i.cascaderReady},null,8,["entry","envVars","onFilterResults","onNumberPerPage","onLoading","onCascaderReady"]),n.createVNode(d,{ref:"searchHistory",localStorageKey:"sparc.science-dataset-search-history",onSearch:i.searchHistorySearch},null,8,["onSearch"]),n.withDirectives((n.openBlock(),n.createElementBlock("div",RF,[e.results.length===0&&!e.loadingCards?(n.openBlock(),n.createElementBlock("div",$F," No results found - Please change your search / filter criteria. ")):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.results,f=>(n.openBlock(),n.createElementBlock("div",{key:f.doi,class:"step-item"},[n.createVNode(u,{class:"dataset-card",entry:f,envVars:r.envVars,onMouseenter:h=>i.hoverChanged(f),onMouseleave:t[2]||(t[2]=h=>i.hoverChanged(void 0))},null,8,["entry","envVars","onMouseenter"])]))),128)),n.createVNode(p,{class:"pagination","current-page":e.page,"onUpdate:currentPage":t[3]||(t[3]=f=>e.page=f),"hide-on-single-page":"",large:"",layout:"prev, pager, next","page-size":e.numberPerPage,total:e.numberOfHits,onCurrentChange:i.pageChange},null,8,["current-page","page-size","total","onCurrentChange"])])),[[m,e.loadingCards]])]),_:1},8,["body-style"])}const by=yt(PF,[["render",VF],["__scopeId","data-v-9885434e"]]),LF="assets/missing-image.svg",DF={name:"PMRDatasetCard",components:{ElButton:We,ElIcon:we,ElTag:Gn},props:{entry:{type:Object,default:()=>{}},envVars:{type:Object,default:()=>{}}},data:function(){return{thumbnail:this.entry.image||LF,loading:!1}},methods:{onFlatmapClick:function(e){this.emitPMRActionClick({type:"Flatmap",resource:e})},onSimulationClick:function(e){this.emitPMRActionClick({type:"Simulation",resource:e})},emitPMRActionClick:function(e){const t={...e,name:this.entry.title,description:this.entry.description,apiLocation:this.envVars.API_LOCATION};this.$emit("pmr-action-click",t)}}},MF={class:"dataset-card-container",ref:"container"},zF={class:"dataset-card",ref:"card"},jF={class:"card"},HF={class:"card-left"},UF=["href"],qF=["src","alt"],KF={class:"card-right"},WF={class:"title"},GF={class:"details"},JF={key:0,class:"details"},ZF={class:"buttons-group"},YF=["href"],QF=["href"];function XF(e,t,r,o,a,i){const s=Gn,l=We,c=hr;return n.openBlock(),n.createElementBlock("div",MF,[n.createElementVNode("div",zF,[t[5]||(t[5]=n.createElementVNode("div",{class:"seperator-path"},null,-1)),n.withDirectives((n.openBlock(),n.createElementBlock("div",jF,[n.createElementVNode("span",HF,[n.createElementVNode("a",{class:"card-image-container",href:r.entry.exposure,target:"_blank"},[n.createElementVNode("img",{class:"card-image",src:e.thumbnail,width:"210",height:"210",alt:r.entry.title,loading:"lazy"},null,8,qF)],8,UF)]),n.createElementVNode("div",KF,[n.createVNode(s,{type:"primary",class:"source-tag"},{default:n.withCtx(()=>t[2]||(t[2]=[n.createTextVNode("PMR")])),_:1}),n.createElementVNode("div",null,[n.createElementVNode("h4",WF,n.toDisplayString(r.entry.title),1),n.createElementVNode("div",GF,n.toDisplayString(r.entry.authors),1)]),r.entry.description?(n.openBlock(),n.createElementBlock("div",JF,n.toDisplayString(r.entry.description),1)):n.createCommentVNode("",!0),n.createElementVNode("div",ZF,[n.createElementVNode("a",{href:r.entry.exposure,target:"_blank",class:"el-button el-button--small button"}," Exposure ",8,YF),r.entry.omex?(n.openBlock(),n.createElementBlock("a",{key:0,href:r.entry.omex,target:"_blank",class:"el-button el-button--small button"}," COMBINE archive ",8,QF)):n.createCommentVNode("",!0),r.entry.flatmap?(n.openBlock(),n.createBlock(l,{key:1,size:"small",class:"button",onClick:t[0]||(t[0]=d=>i.onFlatmapClick(r.entry.flatmap))},{default:n.withCtx(()=>t[3]||(t[3]=[n.createTextVNode(" Flatmap ")])),_:1})):n.createCommentVNode("",!0),r.entry.simulation?(n.openBlock(),n.createBlock(l,{key:2,size:"small",class:"button",onClick:t[1]||(t[1]=d=>i.onSimulationClick(r.entry.simulation))},{default:n.withCtx(()=>t[4]||(t[4]=[n.createTextVNode(" Simulation ")])),_:1})):n.createCommentVNode("",!0)])])])),[[c,e.loading]])],512)],512)}const wy=yt(DF,[["render",XF],["__scopeId","data-v-2d6502d7"]]);function eR(e){try{return e.values.map(r=>e.keys.reduce((o,a,i)=>(o[a]=r[i],o),{}))}catch(t){return console.error(`Error occured during conversion of Key Value Array to Object: ${t}`),{}}}const tR=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]};let nR=function(){this.initialise=function(e){this.flatmapApi=e,this.features=[],this.limit=10,this.offset=0,this.numberOfHits=0,this.sqlPreOffset="",this.lookup={},this.createLookup()},this.updateOffset=function(e){this.offset=e},this.updateLimit=function(e){this.limit=e},this.offsetText=function(){return"limit "+this.limit+" offset "+this.offset},this.createTermSQL=function(e){let t="",r=[],o=!1;return e&&e.length>0&&(t+="and ",e.forEach((a,i)=>{i==0&&(t+="("),a!==""&&(r.push(e),t+="m.term=?",o=!0,i<e.length-1&&(t+=" or ")),i==e.length-1&&(t+=") ")})),o||(t="",r=[]),{sql:t,params:r}},this.pmrSQL=function(e=[],t=""){let r="select distinct m.term, m.exposure, m.score, m.workspace, d.metadata from pmr_text ";r+="as t left join pmr_metadata as d on t.entity=d.entity left join pmr_models as m on m.exposure=t.entity ",r+="where d.metadata is not null ";const o=this.createTermSQL(e);r+=o.sql;const a=[...o.params];return t&&t!==""&&(r+="and (t.pmr_text match ?)",a.push(t)),(!t||t==="")&&(r+="and m.exposure is not null and score > 0.69"),r+=" group by m.exposure",this.sqlPreOffset=r,r+=" "+this.offsetText()+";",console.log(r),{sql:r,params:a}},this.convertTermsToIds=function(e){return e.filter(t=>this.lookUpId(t))},this.labelSQL=function(){return"select entity, label from labels"},this.countSQL=function(e){return e=`select count(*) from (${e})`,e},this.flatmapQuery=function(e,t=[]){const r={sql:e,params:t};return fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json()).catch(o=>{console.error("Error:",o)})},this.processFilters=function(e){let t=[];return e.forEach(r=>{r.facet!=="Show all"&&r.facet!=="PMR"&&t.push(r.facet)}),t},this.pmrSearch=function(e=[],t=""){let r=this.processFilters(e),o=this.convertTermsToIds(r);return new Promise((a,i)=>{const{sql:s,params:l}=this.pmrSQL(o,t);this.flatmapQuery(s,l).then(c=>{const d=this.processPMRData(c,o);this.setAvailableFeatures(d),this.flatmapQuery(this.countSQL(this.sqlPreOffset),l).then(u=>{this.numberOfHits=u.values[0][0],a(d)})}).catch(i)})},this.setAvailableFeatures=function(e){e.forEach(t=>{Object.keys(t).forEach(r=>{this.features.includes(r)||this.features.push(r)})})},this.processPMRData=function(e,t=[]){let r=eR(e);console.log(r);let a=r.filter(s=>s.metadata).map(s=>{let l=JSON.parse(s.metadata);return l.dataSource="PMR",l});return t.length>0&&(a=a.filter(s=>t.includes(s.term))),tR(a)},this.createLookup=function(){this.flatmapQuery(this.labelSQL()).then(e=>{e!=null&&e.values&&e.values.forEach(t=>{t[1]&&(typeof t[1]=="string"||t[1]instanceof String)&&(this.lookup[t[1].toLowerCase()]=t[0])})})},this.lookUpId=function(e){return this.lookup[e.toLowerCase()]}};var rR={searchInput:"",lastSearch:"",pmrNumberOfHits:0,loadingCards:!1,numberPerPage:10,page:1,hasSearched:!1,pmrResults:[]};const oR={components:{PMRDatasetCard:wy,Button:We,Card:Ur,Drawer:ri,Icon:we,Input:Hn,Pagination:Wr},name:"PMRSearch",props:{visible:{type:Boolean,default:!1},entry:{type:Object,default:()=>rR},envVars:{type:Object,default:()=>{}}},data:function(){return{...this.entry,bodyStyle:{flex:"1 1 auto","flex-flow":"column",display:"flex"}}},computed:{numberOfHitsText:function(){return this.pmrNumberOfHits>1?`${this.pmrNumberOfHits} results`:`${this.pmrNumberOfHits} result`}},methods:{hoverChanged:function(e){this.$emit("hover-changed",e)},onPmrActionClick:function(e){this.$emit("pmr-action-click",e)},resetSearch:function(){this.pmrNumberOfHits=0,this.page=1,this.pmrResults=[],this.loadingCards=!1},openPMRSearch:function(e,t=""){this.resetSearch(),this.searchInput=t,this.loadingCards=!0,this.flatmapQueries.updateOffset((this.page-1)*this.numberPerPage),this.flatmapQueries.updateLimit(this.numberPerPage),this.flatmapQueries.pmrSearch(e,t).then(r=>{r.forEach(o=>{this.pmrResults.push(o)}),this.pmrNumberOfHits=this.flatmapQueries.numberOfHits,this.loadingCards=!1})},clearSearchClicked:function(){this.searchInput="",this.resetSearch()},searchEvent:function(e=!1){(e.keyCode===13||e instanceof MouseEvent)&&(this.openPMRSearch(this.filter,this.searchInput),this.$refs.searchHistory.selectValue="Full search history",this.$refs.searchHistory.addSearchToHistory(this.filter,this.searchInput))},searchAndFilterUpdate:function(){var t;this.resetPageNavigation();const e=this.transformFiltersBeforeSearch(this.filters);this.searchAlgolia(e,this.searchInput),this.$refs.searchHistory.selectValue="Search history",(this.filters.length||(t=this.searchInput)!=null&&t.trim())&&this.$refs.searchHistory.addSearchToHistory(this.filters,this.searchInput)},numberPerPageUpdate:function(e){this.numberPerPage=e,this.pageChange(1)},pageChange:function(e){this.page=e,this.pmrResults=[],this.openPMRSearch(this.filter,this.searchInput)},scrollToTop:function(){this.$refs.content&&this.$refs.content.scroll({top:0,behavior:"smooth"})},resetPageNavigation:function(){this.page=1},createfilterParams:function(e){let t=new URLSearchParams;for(const r in e)Array.isArray(e[r])?e[r].forEach(o=>{t.append(r,o)}):t.append(r,e[r]);return t.toString()}},mounted:function(){this.flatmapQueries=new nR,this.flatmapQueries.initialise(this.envVars.FLATMAPAPI_LOCATION),this.openPMRSearch(this.filter,this.searchInput)}},aR={class:"header"},iR={class:"content scrollbar",ref:"content"},sR={key:0,class:"error-feedback"};function lR(e,t,r,o,a,i){const s=Hn,l=We,c=V5,d=wy,u=Wr,p=Ur,g=hr;return n.openBlock(),n.createBlock(p,{"body-style":e.bodyStyle,class:"content-card"},{header:n.withCtx(()=>[n.createElementVNode("div",aR,[n.createVNode(s,{class:"search-input",placeholder:"Search",modelValue:e.searchInput,"onUpdate:modelValue":t[0]||(t[0]=m=>e.searchInput=m),onKeyup:i.searchEvent,clearable:"",onClear:i.clearSearchClicked},null,8,["modelValue","onKeyup","onClear"]),n.createVNode(l,{type:"primary",class:"button",onClick:i.searchEvent,size:"large"},{default:n.withCtx(()=>t[3]||(t[3]=[n.createTextVNode(" Search ")])),_:1},8,["onClick"]),n.createVNode(c,{class:"results-number"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.numberOfHitsText),1)]),_:1})])]),default:n.withCtx(()=>[n.withDirectives((n.openBlock(),n.createElementBlock("div",iR,[e.pmrResults.length===0&&!e.loadingCards?(n.openBlock(),n.createElementBlock("div",sR," No results found - Please change your search criteria. ")):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.pmrResults,(m,f)=>(n.openBlock(),n.createElementBlock("div",{key:m.doi||f,class:"step-item"},[n.createVNode(d,{class:"dataset-card",entry:m,envVars:r.envVars,onPmrActionClick:i.onPmrActionClick,onMouseenter:h=>i.hoverChanged(m),onMouseleave:t[1]||(t[1]=h=>i.hoverChanged(void 0))},null,8,["entry","envVars","onPmrActionClick","onMouseenter"])]))),128)),n.createVNode(u,{class:"pagination","current-page":e.page,"onUpdate:currentPage":t[2]||(t[2]=m=>e.page=m),"hide-on-single-page":"",large:"",layout:"prev, pager, next","page-size":e.numberPerPage,total:e.pmrNumberOfHits,onCurrentChange:i.pageChange},null,8,["current-page","page-size","total","onCurrentChange"])])),[[g,e.loadingCards]])]),_:1},8,["body-style"])}const Cy=yt(oR,[["render",lR],["__scopeId","data-v-af8442c9"]]),cR=e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()),ha=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""},dR=3e3,uR={name:"ConnectivityInfo",components:{Button:We,Container:N_,Icon:we,ElIconWarning:Uu,ElIconLocation:Mu,ElIconSearch:ju,CopyToClipboard:Ar.CopyToClipboard,ConnectivityGraph:Ar.ConnectivityGraph,ExternalResourceCard:Ar.ExternalResourceCard},props:{connectivityEntry:{type:Array,default:[]},entryId:{type:String,default:""},envVars:{type:Object,default:()=>{}},availableAnatomyFacets:{type:Array,default:()=>[]}},data:function(){return{controller:void 0,activeSpecies:void 0,pubmedSearchUrl:"",loading:!1,activeView:"listView",facetList:[],showToolip:!1,showDetails:!1,originDescriptions:{motor:"is the location of the initial cell body of the circuit",sensory:"is the location of the initial cell body in the PNS circuit"},uberons:[{id:void 0,name:void 0}],connectivityError:null,timeoutID:void 0,graphViewLoaded:!1,updatedCopyContent:"",entryIndex:0}},watch:{availableAnatomyFacets:{handler:function(e){this.convertFacetsToList(e)},immediate:!0,deep:!0}},computed:{entry:function(){return this.entryId?this.connectivityEntry.filter(e=>e.featureId[0]===this.entryId)[this.entryIndex]:this.connectivityEntry[this.entryIndex]},hasProvenanceTaxonomyLabel:function(){return this.entry.provenanceTaxonomyLabel&&this.entry.provenanceTaxonomyLabel.length>0},hasOrigins:function(){return this.entry.origins&&this.entry.origins.length>0},hasOriginsWithDatasets:function(){return this.entry.originsWithDatasets&&this.entry.originsWithDatasets.length>0&&this.shouldShowExploreButton(this.entry.originsWithDatasets)},hasComponents:function(){return this.entry.components&&this.entry.components.length>0},hasComponentsWithDatasets:function(){return this.entry.componentsWithDatasets&&this.entry.componentsWithDatasets.length>0&&this.shouldShowExploreButton(this.entry.componentsWithDatasets)},hasDestinations:function(){return this.entry.destinations&&this.entry.destinations.length>0},hasDestinationsWithDatasets:function(){return this.entry.destinationsWithDatasets&&this.entry.destinationsWithDatasets.length>0&&this.shouldShowExploreButton(this.entry.destinationsWithDatasets)},resources:function(){let e=[];return this.entry&&this.entry.hyperlinks&&(e=this.entry.hyperlinks),e},originDescription:function(){return this.entry&&this.entry.title&&this.entry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let e="Studied in";return this.entry.provenanceTaxonomyLabel.forEach(t=>{e+=` ${t},`}),e=e.slice(0,-1),e+=" species",e},sckanVersion:function(){return this.entry.knowledgeSource},previousLabel:function(){return this.entryIndex===0?"This is the first item. Click 'Next' to see more information.":this.connectivityEntry[this.entryIndex-1].title},nextLabel:function(){return this.entryIndex===this.connectivityEntry.length-1?"This is the last item. Click 'Previous' to see more information.":this.connectivityEntry[this.entryIndex+1].title}},methods:{previous:function(){this.entryIndex!==0&&(this.entryIndex=this.entryIndex-1)},next:function(){this.entryIndex!==this.connectivityEntry.length-1&&(this.entryIndex=this.entryIndex+1)},titleCase:function(e){return cR(e)},capitalise:function(e){return ha(e)},openUrl:function(e){window.open(e,"_blank")},openAll:function(){Je.emit("onConnectivityActionClick",{type:"Facets",labels:this.entry.componentsWithDatasets.map(e=>e.name.toLowerCase())})},openAxons:function(){Je.emit("onConnectivityActionClick",{type:"Facets",labels:this.entry.destinationsWithDatasets.map(e=>e.name.toLowerCase())})},shouldShowExploreButton:function(e){for(let t=0;t<e.length;t++)if(this.facetList.includes(e[t].name.toLowerCase()))return!0;return!1},convertFacetsToList:function(e){e.forEach(t=>{t.children?this.convertFacetsToList(t.children):this.facetList.push(t.label.toLowerCase())})},openDendrites:function(){Je.emit("onConnectivityActionClick",{type:"Facets",labels:this.entry.originsWithDatasets.map(e=>e.name.toLowerCase())})},pubmedSearchUrlUpdate:function(e){this.pubmedSearchUrl=e},showConnectivity:function(){const e=this.entry.featureId||[];this.$emit("show-connectivity",e)},switchConnectivityView:function(e){this.activeView=e,e==="graphView"&&!this.graphViewLoaded&&this.$nextTick(()=>{this.graphViewLoaded=!0})},onTapNode:function(e){const t=e.map(r=>r.label).join(", ");this.connectivityHovered(t)},onShowReferenceConnectivities:function(e){this.$emit("show-reference-connectivities",e)},onReferencesLoaded:function(e){this.updatedCopyContent=this.getUpdateCopyContent(e)},getUpdateCopyContent:function(e){var s,l,c,d;if(!this.entry)return"";const t=[];let r=this.entry.title,o=this.entry.featureId;const a=[];r&&a.push(`<strong>${ha(this.entry.title)}</strong>`),o!=null&&o.length&&(typeof o=="object"?a.push(`(${o[0]})`):a.push(`(${o})`)),t.push(`<div>${a.join(" ")}</div>`),(s=this.entry.provenanceTaxonomyLabel)!=null&&s.length&&t.push(`<div>${this.provSpeciesDescription}</div>`),this.entry.paths&&t.push(`<div>${this.entry.paths}</div>`);function i(u,p,g=[]){let m=`<div><strong>${u}</strong></div>`;const f=[];p.forEach(y=>{let b=[];y.split(",").forEach(v=>{const T=g.find(S=>S.name===v.trim());T?b.push(`${ha(v)} (${T.id})`):b.push(`${ha(v)}`)}),f.push(b.join(","))});const h=f.map(y=>`<li>${y}</li>`).join(`
464
+ `)},mF=["innerHTML"];function gF(e,t,r,o,a,i){return n.openBlock(),n.createElementBlock("svg",{width:"0",height:"0",style:{display:"none"},innerHTML:e.$options.svgSprite},null,8,mF)}const yF=P0(hF,[["render",gF]]);var my={exports:{}};/*! algoliasearch.umd.js | 4.23.2 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */(function(e,t){(function(r,o){e.exports=o()})(sx,function(){function r(w,C,k){return C in w?Object.defineProperty(w,C,{value:k,enumerable:!0,configurable:!0,writable:!0}):w[C]=k,w}function o(w,C){var k=Object.keys(w);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(w);C&&(_=_.filter(function(N){return Object.getOwnPropertyDescriptor(w,N).enumerable})),k.push.apply(k,_)}return k}function a(w){for(var C=1;C<arguments.length;C++){var k=arguments[C]!=null?arguments[C]:{};C%2?o(Object(k),!0).forEach(function(_){r(w,_,k[_])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(k)):o(Object(k)).forEach(function(_){Object.defineProperty(w,_,Object.getOwnPropertyDescriptor(k,_))})}return w}function i(w,C){if(w==null)return{};var k,_,N=function(W,z){if(W==null)return{};var K,ee,J={},se=Object.keys(W);for(ee=0;ee<se.length;ee++)K=se[ee],z.indexOf(K)>=0||(J[K]=W[K]);return J}(w,C);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(w);for(_=0;_<U.length;_++)k=U[_],C.indexOf(k)>=0||Object.prototype.propertyIsEnumerable.call(w,k)&&(N[k]=w[k])}return N}function s(w,C){return function(k){if(Array.isArray(k))return k}(w)||function(k,_){if(Symbol.iterator in Object(k)||Object.prototype.toString.call(k)==="[object Arguments]"){var N=[],U=!0,W=!1,z=void 0;try{for(var K,ee=k[Symbol.iterator]();!(U=(K=ee.next()).done)&&(N.push(K.value),!_||N.length!==_);U=!0);}catch(J){W=!0,z=J}finally{try{U||ee.return==null||ee.return()}finally{if(W)throw z}}return N}}(w,C)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(w){return function(C){if(Array.isArray(C)){for(var k=0,_=new Array(C.length);k<C.length;k++)_[k]=C[k];return _}}(w)||function(C){if(Symbol.iterator in Object(C)||Object.prototype.toString.call(C)==="[object Arguments]")return Array.from(C)}(w)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function c(w){var C,k="algoliasearch-client-js-".concat(w.key),_=function(){return C===void 0&&(C=w.localStorage||window.localStorage),C},N=function(){return JSON.parse(_().getItem(k)||"{}")},U=function(z){_().setItem(k,JSON.stringify(z))},W=function(){var z=w.timeToLive?1e3*w.timeToLive:null,K=N(),ee=Object.fromEntries(Object.entries(K).filter(function(se){return s(se,2)[1].timestamp!==void 0}));if(U(ee),z){var J=Object.fromEntries(Object.entries(ee).filter(function(se){var ie=s(se,2)[1],ge=new Date().getTime();return!(ie.timestamp+z<ge)}));U(J)}};return{get:function(z,K){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){W();var J=JSON.stringify(z);return N()[J]}).then(function(J){return Promise.all([J?J.value:K(),J!==void 0])}).then(function(J){var se=s(J,2),ie=se[0],ge=se[1];return Promise.all([ie,ge||ee.miss(ie)])}).then(function(J){return s(J,1)[0]})},set:function(z,K){return Promise.resolve().then(function(){var ee=N();return ee[JSON.stringify(z)]={timestamp:new Date().getTime(),value:K},_().setItem(k,JSON.stringify(ee)),K})},delete:function(z){return Promise.resolve().then(function(){var K=N();delete K[JSON.stringify(z)],_().setItem(k,JSON.stringify(K))})},clear:function(){return Promise.resolve().then(function(){_().removeItem(k)})}}}function d(w){var C=l(w.caches),k=C.shift();return k===void 0?{get:function(_,N){var U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},W=N();return W.then(function(z){return Promise.all([z,U.miss(z)])}).then(function(z){return s(z,1)[0]})},set:function(_,N){return Promise.resolve(N)},delete:function(_){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(_,N){var U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return k.get(_,N,U).catch(function(){return d({caches:C}).get(_,N,U)})},set:function(_,N){return k.set(_,N).catch(function(){return d({caches:C}).set(_,N)})},delete:function(_){return k.delete(_).catch(function(){return d({caches:C}).delete(_)})},clear:function(){return k.clear().catch(function(){return d({caches:C}).clear()})}}}function u(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},C={};return{get:function(k,_){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},U=JSON.stringify(k);if(U in C)return Promise.resolve(w.serializable?JSON.parse(C[U]):C[U]);var W=_(),z=N&&N.miss||function(){return Promise.resolve()};return W.then(function(K){return z(K)}).then(function(){return W})},set:function(k,_){return C[JSON.stringify(k)]=w.serializable?JSON.stringify(_):_,Promise.resolve(_)},delete:function(k){return delete C[JSON.stringify(k)],Promise.resolve()},clear:function(){return C={},Promise.resolve()}}}function p(w,C,k){var _={"x-algolia-api-key":k,"x-algolia-application-id":C};return{headers:function(){return w===b.WithinHeaders?_:{}},queryParameters:function(){return w===b.WithinQueryParameters?_:{}}}}function g(w){var C=0;return w(function k(){return C++,new Promise(function(_){setTimeout(function(){_(w(k))},Math.min(100*C,1e3))})})}function m(w){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(k,_){return Promise.resolve()};return Object.assign(w,{wait:function(k){return m(w.then(function(_){return Promise.all([C(_,k),_])}).then(function(_){return _[1]}))}})}function f(w){for(var C=w.length-1;C>0;C--){var k=Math.floor(Math.random()*(C+1)),_=w[C];w[C]=w[k],w[k]=_}return w}function h(w,C){return C&&Object.keys(C).forEach(function(k){w[k]=C[k](w)}),w}function y(w){for(var C=arguments.length,k=new Array(C>1?C-1:0),_=1;_<C;_++)k[_-1]=arguments[_];var N=0;return w.replace(/%s/g,function(){return encodeURIComponent(k[N++])})}var b={WithinQueryParameters:0,WithinHeaders:1};function v(w,C){var k=w||{},_=k.data||{};return Object.keys(k).forEach(function(N){["timeout","headers","queryParameters","data","cacheable"].indexOf(N)===-1&&(_[N]=k[N])}),{data:Object.entries(_).length>0?_:void 0,timeout:k.timeout||C,headers:k.headers||{},queryParameters:k.queryParameters||{},cacheable:k.cacheable}}var T={Read:1,Write:2,Any:3},S=1,E=2,x=3;function O(w){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:S;return a(a({},w),{},{status:C,lastUpdate:Date.now()})}function B(w){return typeof w=="string"?{protocol:"https",url:w,accept:T.Any}:{protocol:w.protocol||"https",url:w.url,accept:w.accept||T.Any}}var A="DELETE",L="GET",P="POST",V="PUT";function j(w,C){return Promise.all(C.map(function(k){return w.get(k,function(){return Promise.resolve(O(k))})})).then(function(k){var _=k.filter(function(W){return function(z){return z.status===S||Date.now()-z.lastUpdate>12e4}(W)}),N=k.filter(function(W){return function(z){return z.status===x&&Date.now()-z.lastUpdate<=12e4}(W)}),U=[].concat(l(_),l(N));return{getTimeout:function(W,z){return(N.length===0&&W===0?1:N.length+3+W)*z},statelessHosts:U.length>0?U.map(function(W){return B(W)}):C}})}function X(w,C,k,_){var N=[],U=function(ie,ge){if(!(ie.method===L||ie.data===void 0&&ge.data===void 0)){var ue=Array.isArray(ie.data)?ie.data:a(a({},ie.data),ge.data);return JSON.stringify(ue)}}(k,_),W=function(ie,ge){var ue=a(a({},ie.headers),ge.headers),_e={};return Object.keys(ue).forEach(function(Fe){var Tt=ue[Fe];_e[Fe.toLowerCase()]=Tt}),_e}(w,_),z=k.method,K=k.method!==L?{}:a(a({},k.data),_.data),ee=a(a(a({"x-algolia-agent":w.userAgent.value},w.queryParameters),K),_.queryParameters),J=0,se=function ie(ge,ue){var _e=ge.pop();if(_e===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:re(N)};var Fe={data:U,headers:W,method:z,url:D(_e,k.path,ee),connectTimeout:ue(J,w.timeouts.connect),responseTimeout:ue(J,_.timeout)},Tt=function(Ot){var lt={request:Fe,response:Ot,host:_e,triesLeft:ge.length};return N.push(lt),lt},wa={onSuccess:function(Ot){return function(lt){try{return JSON.parse(lt.content)}catch(Ir){throw function(rr,ho){return{name:"DeserializationError",message:rr,response:ho}}(Ir.message,lt)}}(Ot)},onRetry:function(Ot){var lt=Tt(Ot);return Ot.isTimedOut&&J++,Promise.all([w.logger.info("Retryable failure",he(lt)),w.hostsCache.set(_e,O(_e,Ot.isTimedOut?x:E))]).then(function(){return ie(ge,ue)})},onFail:function(Ot){throw Tt(Ot),function(lt,Ir){var rr=lt.content,ho=lt.status,Ca=rr;try{Ca=JSON.parse(rr).message}catch{}return function(ps,dd,V$){return{name:"ApiError",message:ps,status:dd,transporterStackTrace:V$}}(Ca,ho,Ir)}(Ot,re(N))}};return w.requester.send(Fe).then(function(Ot){return function(lt,Ir){return function(rr){var ho=rr.status;return rr.isTimedOut||function(Ca){var ps=Ca.isTimedOut,dd=Ca.status;return!ps&&~~dd==0}(rr)||~~(ho/100)!=2&&~~(ho/100)!=4}(lt)?Ir.onRetry(lt):~~(lt.status/100)==2?Ir.onSuccess(lt):Ir.onFail(lt)}(Ot,wa)})};return j(w.hostsCache,C).then(function(ie){return se(l(ie.statelessHosts).reverse(),ie.getTimeout)})}function q(w){var C=w.hostsCache,k=w.logger,_=w.requester,N=w.requestsCache,U=w.responsesCache,W=w.timeouts,z=w.userAgent,K=w.hosts,ee=w.queryParameters,J={hostsCache:C,logger:k,requester:_,requestsCache:N,responsesCache:U,timeouts:W,userAgent:z,headers:w.headers,queryParameters:ee,hosts:K.map(function(se){return B(se)}),read:function(se,ie){var ge=v(ie,J.timeouts.read),ue=function(){return X(J,J.hosts.filter(function(Fe){return(Fe.accept&T.Read)!=0}),se,ge)};if((ge.cacheable!==void 0?ge.cacheable:se.cacheable)!==!0)return ue();var _e={request:se,mappedRequestOptions:ge,transporter:{queryParameters:J.queryParameters,headers:J.headers}};return J.responsesCache.get(_e,function(){return J.requestsCache.get(_e,function(){return J.requestsCache.set(_e,ue()).then(function(Fe){return Promise.all([J.requestsCache.delete(_e),Fe])},function(Fe){return Promise.all([J.requestsCache.delete(_e),Promise.reject(Fe)])}).then(function(Fe){var Tt=s(Fe,2);return Tt[0],Tt[1]})})},{miss:function(Fe){return J.responsesCache.set(_e,Fe)}})},write:function(se,ie){return X(J,J.hosts.filter(function(ge){return(ge.accept&T.Write)!=0}),se,v(ie,J.timeouts.write))}};return J}function I(w){var C={value:"Algolia for JavaScript (".concat(w,")"),add:function(k){var _="; ".concat(k.segment).concat(k.version!==void 0?" (".concat(k.version,")"):"");return C.value.indexOf(_)===-1&&(C.value="".concat(C.value).concat(_)),C}};return C}function D(w,C,k){var _=ne(k),N="".concat(w.protocol,"://").concat(w.url,"/").concat(C.charAt(0)==="/"?C.substr(1):C);return _.length&&(N+="?".concat(_)),N}function ne(w){return Object.keys(w).map(function(C){return y("%s=%s",C,(k=w[C],Object.prototype.toString.call(k)==="[object Object]"||Object.prototype.toString.call(k)==="[object Array]"?JSON.stringify(w[C]):w[C]));var k}).join("&")}function re(w){return w.map(function(C){return he(C)})}function he(w){var C=w.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return a(a({},w),{},{request:a(a({},w.request),{},{headers:a(a({},w.request.headers),C)})})}var me=function(w){return function(C,k){return w.transporter.write({method:P,path:"2/abtests",data:C},k)}},Be=function(w){return function(C,k){return w.transporter.write({method:A,path:y("2/abtests/%s",C)},k)}},qe=function(w){return function(C,k){return w.transporter.read({method:L,path:y("2/abtests/%s",C)},k)}},Ie=function(w){return function(C){return w.transporter.read({method:L,path:"2/abtests"},C)}},ye=function(w){return function(C,k){return w.transporter.write({method:P,path:y("2/abtests/%s/stop",C)},k)}},Ce=function(w){return function(C){return w.transporter.read({method:L,path:"1/strategies/personalization"},C)}},Ne=function(w){return function(C,k){return w.transporter.write({method:P,path:"1/strategies/personalization",data:C},k)}};function Ve(w){return function C(k){return w.request(k).then(function(_){if(w.batch!==void 0&&w.batch(_.hits),!w.shouldStop(_))return _.cursor?C({cursor:_.cursor}):C({page:(k.page||0)+1})})}({})}var Qt=function(w){return function(C,k){var _=k||{},N=_.queryParameters,U=i(_,["queryParameters"]),W=a({acl:C},N!==void 0?{queryParameters:N}:{});return m(w.transporter.write({method:P,path:"1/keys",data:W},U),function(z,K){return g(function(ee){return ke(w)(z.key,K).catch(function(J){if(J.status!==404)throw J;return ee()})})})}},it=function(w){return function(C,k,_){var N=v(_);return N.queryParameters["X-Algolia-User-ID"]=C,w.transporter.write({method:P,path:"1/clusters/mapping",data:{cluster:k}},N)}},Qe=function(w){return function(C,k,_){return w.transporter.write({method:P,path:"1/clusters/mapping/batch",data:{users:C,cluster:k}},_)}},Ae=function(w){return function(C,k){return m(w.transporter.write({method:P,path:y("/1/dictionaries/%s/batch",C),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},k),function(_,N){return tr(w)(_.taskID,N)})}},Le=function(w){return function(C,k,_){return m(w.transporter.write({method:P,path:y("1/indexes/%s/operation",C),data:{operation:"copy",destination:k}},_),function(N,U){return Pe(w)(C,{methods:{waitTask:Ke}}).waitTask(N.taskID,U)})}},St=function(w){return function(C,k,_){return Le(w)(C,k,a(a({},_),{},{scope:[cd.Rules]}))}},Et=function(w){return function(C,k,_){return Le(w)(C,k,a(a({},_),{},{scope:[cd.Settings]}))}},Ze=function(w){return function(C,k,_){return Le(w)(C,k,a(a({},_),{},{scope:[cd.Synonyms]}))}},xt=function(w){return function(C,k){return C.method===L?w.transporter.read(C,k):w.transporter.write(C,k)}},st=function(w){return function(C,k){return m(w.transporter.write({method:A,path:y("1/keys/%s",C)},k),function(_,N){return g(function(U){return ke(w)(C,N).then(U).catch(function(W){if(W.status!==404)throw W})})})}},Xt=function(w){return function(C,k,_){var N=k.map(function(U){return{action:"deleteEntry",body:{objectID:U}}});return m(w.transporter.write({method:P,path:y("/1/dictionaries/%s/batch",C),data:{clearExistingDictionaryEntries:!1,requests:N}},_),function(U,W){return tr(w)(U.taskID,W)})}},ke=function(w){return function(C,k){return w.transporter.read({method:L,path:y("1/keys/%s",C)},k)}},Xe=function(w){return function(C,k){return w.transporter.read({method:L,path:y("1/task/%s",C.toString())},k)}},ut=function(w){return function(C){return w.transporter.read({method:L,path:"/1/dictionaries/*/settings"},C)}},$t=function(w){return function(C){return w.transporter.read({method:L,path:"1/logs"},C)}},et=function(w){return function(C){return w.transporter.read({method:L,path:"1/clusters/mapping/top"},C)}},H=function(w){return function(C,k){return w.transporter.read({method:L,path:y("1/clusters/mapping/%s",C)},k)}},fe=function(w){return function(C){var k=C||{},_=k.retrieveMappings,N=i(k,["retrieveMappings"]);return _===!0&&(N.getClusters=!0),w.transporter.read({method:L,path:"1/clusters/mapping/pending"},N)}},Pe=function(w){return function(C){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_={transporter:w.transporter,appId:w.appId,indexName:C};return h(_,k.methods)}},ft=function(w){return function(C){return w.transporter.read({method:L,path:"1/keys"},C)}},Vt=function(w){return function(C){return w.transporter.read({method:L,path:"1/clusters"},C)}},co=function(w){return function(C){return w.transporter.read({method:L,path:"1/indexes"},C)}},ma=function(w){return function(C){return w.transporter.read({method:L,path:"1/clusters/mapping"},C)}},Br=function(w){return function(C,k,_){return m(w.transporter.write({method:P,path:y("1/indexes/%s/operation",C),data:{operation:"move",destination:k}},_),function(N,U){return Pe(w)(C,{methods:{waitTask:Ke}}).waitTask(N.taskID,U)})}},Nr=function(w){return function(C,k){return m(w.transporter.write({method:P,path:"1/indexes/*/batch",data:{requests:C}},k),function(_,N){return Promise.all(Object.keys(_.taskID).map(function(U){return Pe(w)(U,{methods:{waitTask:Ke}}).waitTask(_.taskID[U],N)}))})}},M=function(w){return function(C,k){return w.transporter.read({method:P,path:"1/indexes/*/objects",data:{requests:C}},k)}},Z=function(w){return function(C,k){var _=C.map(function(N){return a(a({},N),{},{params:ne(N.params||{})})});return w.transporter.read({method:P,path:"1/indexes/*/queries",data:{requests:_},cacheable:!0},k)}},Y=function(w){return function(C,k){return Promise.all(C.map(function(_){var N=_.params,U=N.facetName,W=N.facetQuery,z=i(N,["facetName","facetQuery"]);return Pe(w)(_.indexName,{methods:{searchForFacetValues:By}}).searchForFacetValues(U,W,a(a({},k),z))}))}},ve=function(w){return function(C,k){var _=v(k);return _.queryParameters["X-Algolia-User-ID"]=C,w.transporter.write({method:A,path:"1/clusters/mapping"},_)}},Lt=function(w){return function(C,k,_){var N=k.map(function(U){return{action:"addEntry",body:U}});return m(w.transporter.write({method:P,path:y("/1/dictionaries/%s/batch",C),data:{clearExistingDictionaryEntries:!0,requests:N}},_),function(U,W){return tr(w)(U.taskID,W)})}},_t=function(w){return function(C,k){return m(w.transporter.write({method:P,path:y("1/keys/%s/restore",C)},k),function(_,N){return g(function(U){return ke(w)(C,N).catch(function(W){if(W.status!==404)throw W;return U()})})})}},Dt=function(w){return function(C,k,_){var N=k.map(function(U){return{action:"addEntry",body:U}});return m(w.transporter.write({method:P,path:y("/1/dictionaries/%s/batch",C),data:{clearExistingDictionaryEntries:!1,requests:N}},_),function(U,W){return tr(w)(U.taskID,W)})}},uo=function(w){return function(C,k,_){return w.transporter.read({method:P,path:y("/1/dictionaries/%s/search",C),data:{query:k},cacheable:!0},_)}},cs=function(w){return function(C,k){return w.transporter.read({method:P,path:"1/clusters/mapping/search",data:{query:C}},k)}},Yc=function(w){return function(C,k){return m(w.transporter.write({method:V,path:"/1/dictionaries/*/settings",data:C},k),function(_,N){return tr(w)(_.taskID,N)})}},Qc=function(w){return function(C,k){var _=Object.assign({},k),N=k||{},U=N.queryParameters,W=i(N,["queryParameters"]),z=U?{queryParameters:U}:{},K=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"];return m(w.transporter.write({method:V,path:y("1/keys/%s",C),data:z},W),function(ee,J){return g(function(se){return ke(w)(C,J).then(function(ie){return function(ge){return Object.keys(_).filter(function(ue){return K.indexOf(ue)!==-1}).every(function(ue){if(Array.isArray(ge[ue])&&Array.isArray(_[ue])){var _e=ge[ue];return _e.length===_[ue].length&&_e.every(function(Fe,Tt){return Fe===_[ue][Tt]})}return ge[ue]===_[ue]})}(ie)?Promise.resolve():se()})})})}},tr=function(w){return function(C,k){return g(function(_){return Xe(w)(C,k).then(function(N){return N.status!=="published"?_():void 0})})}},ga=function(w){return function(C,k){return m(w.transporter.write({method:P,path:y("1/indexes/%s/batch",w.indexName),data:{requests:C}},k),function(_,N){return Ke(w)(_.taskID,N)})}},Xc=function(w){return function(C){return Ve(a(a({shouldStop:function(k){return k.cursor===void 0}},C),{},{request:function(k){return w.transporter.read({method:P,path:y("1/indexes/%s/browse",w.indexName),data:k},C)}}))}},ya=function(w){return function(C){var k=a({hitsPerPage:1e3},C);return Ve(a(a({shouldStop:function(_){return _.hits.length<k.hitsPerPage}},k),{},{request:function(_){return Ny(w)("",a(a({},k),_)).then(function(N){return a(a({},N),{},{hits:N.hits.map(function(U){return delete U._highlightResult,U})})})}}))}},ed=function(w){return function(C){var k=a({hitsPerPage:1e3},C);return Ve(a(a({shouldStop:function(_){return _.hits.length<k.hitsPerPage}},k),{},{request:function(_){return Iy(w)("",a(a({},k),_)).then(function(N){return a(a({},N),{},{hits:N.hits.map(function(U){return delete U._highlightResult,U})})})}}))}},ba=function(w){return function(C,k,_){var N=_||{},U=N.batchSize,W=i(N,["batchSize"]),z={taskIDs:[],objectIDs:[]};return m(function K(){var ee,J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,se=[];for(ee=J;ee<C.length&&(se.push(C[ee]),se.length!==(U||1e3));ee++);return se.length===0?Promise.resolve(z):ga(w)(se.map(function(ie){return{action:k,body:ie}}),W).then(function(ie){return z.objectIDs=z.objectIDs.concat(ie.objectIDs),z.taskIDs.push(ie.taskID),ee++,K(ee)})}(),function(K,ee){return Promise.all(K.taskIDs.map(function(J){return Ke(w)(J,ee)}))})}},td=function(w){return function(C){return m(w.transporter.write({method:P,path:y("1/indexes/%s/clear",w.indexName)},C),function(k,_){return Ke(w)(k.taskID,_)})}},ds=function(w){return function(C){var k=C||{},_=k.forwardToReplicas,N=v(i(k,["forwardToReplicas"]));return _&&(N.queryParameters.forwardToReplicas=1),m(w.transporter.write({method:P,path:y("1/indexes/%s/rules/clear",w.indexName)},N),function(U,W){return Ke(w)(U.taskID,W)})}},nd=function(w){return function(C){var k=C||{},_=k.forwardToReplicas,N=v(i(k,["forwardToReplicas"]));return _&&(N.queryParameters.forwardToReplicas=1),m(w.transporter.write({method:P,path:y("1/indexes/%s/synonyms/clear",w.indexName)},N),function(U,W){return Ke(w)(U.taskID,W)})}},rd=function(w){return function(C,k){return m(w.transporter.write({method:P,path:y("1/indexes/%s/deleteByQuery",w.indexName),data:C},k),function(_,N){return Ke(w)(_.taskID,N)})}},od=function(w){return function(C){return m(w.transporter.write({method:A,path:y("1/indexes/%s",w.indexName)},C),function(k,_){return Ke(w)(k.taskID,_)})}},ad=function(w){return function(C,k){return m(F(w)([C],k).then(function(_){return{taskID:_.taskIDs[0]}}),function(_,N){return Ke(w)(_.taskID,N)})}},F=function(w){return function(C,k){var _=C.map(function(N){return{objectID:N}});return ba(w)(_,po.DeleteObject,k)}},G=function(w){return function(C,k){var _=k||{},N=_.forwardToReplicas,U=v(i(_,["forwardToReplicas"]));return N&&(U.queryParameters.forwardToReplicas=1),m(w.transporter.write({method:A,path:y("1/indexes/%s/rules/%s",w.indexName,C)},U),function(W,z){return Ke(w)(W.taskID,z)})}},de=function(w){return function(C,k){var _=k||{},N=_.forwardToReplicas,U=v(i(_,["forwardToReplicas"]));return N&&(U.queryParameters.forwardToReplicas=1),m(w.transporter.write({method:A,path:y("1/indexes/%s/synonyms/%s",w.indexName,C)},U),function(W,z){return Ke(w)(W.taskID,z)})}},Ee=function(w){return function(C){return _y(w)(C).then(function(){return!0}).catch(function(k){if(k.status!==404)throw k;return!1})}},xn=function(w){return function(C,k,_){return w.transporter.read({method:P,path:y("1/answers/%s/prediction",w.indexName),data:{query:C,queryLanguages:k},cacheable:!0},_)}},nr=function(w){return function(C,k){var _=k||{},N=_.query,U=_.paginate,W=i(_,["query","paginate"]),z=0;return function K(){return Oy(w)(N||"",a(a({},W),{},{page:z})).then(function(ee){for(var J=0,se=Object.entries(ee.hits);J<se.length;J++){var ie=s(se[J],2),ge=ie[0],ue=ie[1];if(C(ue))return{object:ue,position:parseInt(ge,10),page:z}}if(z++,U===!1||z>=ee.nbPages)throw{name:"ObjectNotFoundError",message:"Object not found."};return K()})}()}},fo=function(w){return function(C,k){return w.transporter.read({method:L,path:y("1/indexes/%s/%s",w.indexName,C)},k)}},Vn=function(){return function(w,C){for(var k=0,_=Object.entries(w.hits);k<_.length;k++){var N=s(_[k],2),U=N[0];if(N[1].objectID===C)return parseInt(U,10)}return-1}},en=function(w){return function(C,k){var _=k||{},N=_.attributesToRetrieve,U=i(_,["attributesToRetrieve"]),W=C.map(function(z){return a({indexName:w.indexName,objectID:z},N?{attributesToRetrieve:N}:{})});return w.transporter.read({method:P,path:"1/indexes/*/objects",data:{requests:W}},U)}},us=function(w){return function(C,k){return w.transporter.read({method:L,path:y("1/indexes/%s/rules/%s",w.indexName,C)},k)}},_y=function(w){return function(C){return w.transporter.read({method:L,path:y("1/indexes/%s/settings",w.indexName),data:{getVersion:2}},C)}},w$=function(w){return function(C,k){return w.transporter.read({method:L,path:y("1/indexes/%s/synonyms/%s",w.indexName,C)},k)}},C$=function(w){return function(C,k){return m(Ty(w)([C],k).then(function(_){return{objectID:_.objectIDs[0],taskID:_.taskIDs[0]}}),function(_,N){return Ke(w)(_.taskID,N)})}},Ty=function(w){return function(C,k){var _=k||{},N=_.createIfNotExists,U=i(_,["createIfNotExists"]),W=N?po.PartialUpdateObject:po.PartialUpdateObjectNoCreate;return ba(w)(C,W,U)}},k$=function(w){return function(C,k){var _=k||{},N=_.safe,U=_.autoGenerateObjectIDIfNotExist,W=_.batchSize,z=i(_,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),K=function(ue,_e,Fe,Tt){return m(w.transporter.write({method:P,path:y("1/indexes/%s/operation",ue),data:{operation:Fe,destination:_e}},Tt),function(wa,Ot){return Ke(w)(wa.taskID,Ot)})},ee=Math.random().toString(36).substring(7),J="".concat(w.indexName,"_tmp_").concat(ee),se=id({appId:w.appId,transporter:w.transporter,indexName:J}),ie=[],ge=K(w.indexName,J,"copy",a(a({},z),{},{scope:["settings","synonyms","rules"]}));return ie.push(ge),m((N?ge.wait(z):ge).then(function(){var ue=se(C,a(a({},z),{},{autoGenerateObjectIDIfNotExist:U,batchSize:W}));return ie.push(ue),N?ue.wait(z):ue}).then(function(){var ue=K(J,w.indexName,"move",z);return ie.push(ue),N?ue.wait(z):ue}).then(function(){return Promise.all(ie)}).then(function(ue){var _e=s(ue,3),Fe=_e[0],Tt=_e[1],wa=_e[2];return{objectIDs:Tt.objectIDs,taskIDs:[Fe.taskID].concat(l(Tt.taskIDs),[wa.taskID])}}),function(ue,_e){return Promise.all(ie.map(function(Fe){return Fe.wait(_e)}))})}},v$=function(w){return function(C,k){return sd(w)(C,a(a({},k),{},{clearExistingRules:!0}))}},S$=function(w){return function(C,k){return ld(w)(C,a(a({},k),{},{clearExistingSynonyms:!0}))}},E$=function(w){return function(C,k){return m(id(w)([C],k).then(function(_){return{objectID:_.objectIDs[0],taskID:_.taskIDs[0]}}),function(_,N){return Ke(w)(_.taskID,N)})}},id=function(w){return function(C,k){var _=k||{},N=_.autoGenerateObjectIDIfNotExist,U=i(_,["autoGenerateObjectIDIfNotExist"]),W=N?po.AddObject:po.UpdateObject;if(W===po.UpdateObject){var z=!0,K=!1,ee=void 0;try{for(var J,se=C[Symbol.iterator]();!(z=(J=se.next()).done);z=!0)if(J.value.objectID===void 0)return m(Promise.reject({name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}))}catch(ie){K=!0,ee=ie}finally{try{z||se.return==null||se.return()}finally{if(K)throw ee}}}return ba(w)(C,W,U)}},x$=function(w){return function(C,k){return sd(w)([C],k)}},sd=function(w){return function(C,k){var _=k||{},N=_.forwardToReplicas,U=_.clearExistingRules,W=v(i(_,["forwardToReplicas","clearExistingRules"]));return N&&(W.queryParameters.forwardToReplicas=1),U&&(W.queryParameters.clearExistingRules=1),m(w.transporter.write({method:P,path:y("1/indexes/%s/rules/batch",w.indexName),data:C},W),function(z,K){return Ke(w)(z.taskID,K)})}},_$=function(w){return function(C,k){return ld(w)([C],k)}},ld=function(w){return function(C,k){var _=k||{},N=_.forwardToReplicas,U=_.clearExistingSynonyms,W=_.replaceExistingSynonyms,z=v(i(_,["forwardToReplicas","clearExistingSynonyms","replaceExistingSynonyms"]));return N&&(z.queryParameters.forwardToReplicas=1),(W||U)&&(z.queryParameters.replaceExistingSynonyms=1),m(w.transporter.write({method:P,path:y("1/indexes/%s/synonyms/batch",w.indexName),data:C},z),function(K,ee){return Ke(w)(K.taskID,ee)})}},Oy=function(w){return function(C,k){return w.transporter.read({method:P,path:y("1/indexes/%s/query",w.indexName),data:{query:C},cacheable:!0},k)}},By=function(w){return function(C,k,_){return w.transporter.read({method:P,path:y("1/indexes/%s/facets/%s/query",w.indexName,C),data:{facetQuery:k},cacheable:!0},_)}},Ny=function(w){return function(C,k){return w.transporter.read({method:P,path:y("1/indexes/%s/rules/search",w.indexName),data:{query:C}},k)}},Iy=function(w){return function(C,k){return w.transporter.read({method:P,path:y("1/indexes/%s/synonyms/search",w.indexName),data:{query:C}},k)}},T$=function(w){return function(C,k){var _=k||{},N=_.forwardToReplicas,U=v(i(_,["forwardToReplicas"]));return N&&(U.queryParameters.forwardToReplicas=1),m(w.transporter.write({method:V,path:y("1/indexes/%s/settings",w.indexName),data:C},U),function(W,z){return Ke(w)(W.taskID,z)})}},Ke=function(w){return function(C,k){return g(function(_){return function(N){return function(U,W){return N.transporter.read({method:L,path:y("1/indexes/%s/task/%s",N.indexName,U.toString())},W)}}(w)(C,k).then(function(N){return N.status!=="published"?_():void 0})})}},po={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject",DeleteIndex:"delete",ClearIndex:"clear"},cd={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},O$=1,B$=2,N$=3,fs=function(w){return function(C,k){var _=C.map(function(N){return a(a({},N),{},{threshold:N.threshold||0})});return w.transporter.read({method:P,path:"1/indexes/*/recommendations",data:{requests:_},cacheable:!0},k)}},I$=function(w){return function(C,k){return fs(w)(C.map(function(_){return a(a({},_),{},{fallbackParameters:{},model:"bought-together"})}),k)}},A$=function(w){return function(C,k){return fs(w)(C.map(function(_){return a(a({},_),{},{model:"related-products"})}),k)}},P$=function(w){return function(C,k){var _=C.map(function(N){return a(a({},N),{},{model:"trending-facets",threshold:N.threshold||0})});return w.transporter.read({method:P,path:"1/indexes/*/recommendations",data:{requests:_},cacheable:!0},k)}},F$=function(w){return function(C,k){var _=C.map(function(N){return a(a({},N),{},{model:"trending-items",threshold:N.threshold||0})});return w.transporter.read({method:P,path:"1/indexes/*/recommendations",data:{requests:_},cacheable:!0},k)}},R$=function(w){return function(C,k){return fs(w)(C.map(function(_){return a(a({},_),{},{model:"looking-similar"})}),k)}},$$=function(w){return function(C,k){var _=C.map(function(N){return a(a({},N),{},{model:"recommended-for-you",threshold:N.threshold||0})});return w.transporter.read({method:P,path:"1/indexes/*/recommendations",data:{requests:_},cacheable:!0},k)}};function Ay(w,C,k){var _,N={appId:w,apiKey:C,timeouts:{connect:1,read:2,write:30},requester:{send:function(z){return new Promise(function(K){var ee=new XMLHttpRequest;ee.open(z.method,z.url,!0),Object.keys(z.headers).forEach(function(ge){return ee.setRequestHeader(ge,z.headers[ge])});var J,se=function(ge,ue){return setTimeout(function(){ee.abort(),K({status:0,content:ue,isTimedOut:!0})},1e3*ge)},ie=se(z.connectTimeout,"Connection timeout");ee.onreadystatechange=function(){ee.readyState>ee.OPENED&&J===void 0&&(clearTimeout(ie),J=se(z.responseTimeout,"Socket timeout"))},ee.onerror=function(){ee.status===0&&(clearTimeout(ie),clearTimeout(J),K({content:ee.responseText||"Network request failed",status:ee.status,isTimedOut:!1}))},ee.onload=function(){clearTimeout(ie),clearTimeout(J),K({content:ee.responseText,status:ee.status,isTimedOut:!1})},ee.send(z.data)})}},logger:(_=N$,{debug:function(z,K){return O$>=_&&console.debug(z,K),Promise.resolve()},info:function(z,K){return B$>=_&&console.info(z,K),Promise.resolve()},error:function(z,K){return console.error(z,K),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:d({caches:[c({key:"".concat("4.23.2","-").concat(w)}),u()]}),userAgent:I("4.23.2").add({segment:"Browser"})},U=a(a({},N),k),W=function(){return function(z){return function(K){var ee=K.region||"us",J=p(b.WithinHeaders,K.appId,K.apiKey),se=q(a(a({hosts:[{url:"personalization.".concat(ee,".algolia.com")}]},K),{},{headers:a(a(a({},J.headers()),{"content-type":"application/json"}),K.headers),queryParameters:a(a({},J.queryParameters()),K.queryParameters)}));return h({appId:K.appId,transporter:se},K.methods)}(a(a(a({},N),z),{},{methods:{getPersonalizationStrategy:Ce,setPersonalizationStrategy:Ne}}))}};return function(z){var K=z.appId,ee=p(z.authMode!==void 0?z.authMode:b.WithinHeaders,K,z.apiKey),J=q(a(a({hosts:[{url:"".concat(K,"-dsn.algolia.net"),accept:T.Read},{url:"".concat(K,".algolia.net"),accept:T.Write}].concat(f([{url:"".concat(K,"-1.algolianet.com")},{url:"".concat(K,"-2.algolianet.com")},{url:"".concat(K,"-3.algolianet.com")}]))},z),{},{headers:a(a(a({},ee.headers()),{"content-type":"application/x-www-form-urlencoded"}),z.headers),queryParameters:a(a({},ee.queryParameters()),z.queryParameters)}));return h({transporter:J,appId:K,addAlgoliaAgent:function(se,ie){J.userAgent.add({segment:se,version:ie})},clearCache:function(){return Promise.all([J.requestsCache.clear(),J.responsesCache.clear()]).then(function(){})}},z.methods)}(a(a({},U),{},{methods:{search:Z,searchForFacetValues:Y,multipleBatch:Nr,multipleGetObjects:M,multipleQueries:Z,copyIndex:Le,copySettings:Et,copySynonyms:Ze,copyRules:St,moveIndex:Br,listIndices:co,getLogs:$t,listClusters:Vt,multipleSearchForFacetValues:Y,getApiKey:ke,addApiKey:Qt,listApiKeys:ft,updateApiKey:Qc,deleteApiKey:st,restoreApiKey:_t,assignUserID:it,assignUserIDs:Qe,getUserID:H,searchUserIDs:cs,listUserIDs:ma,getTopUserIDs:et,removeUserID:ve,hasPendingMappings:fe,clearDictionaryEntries:Ae,deleteDictionaryEntries:Xt,getDictionarySettings:ut,getAppTask:Xe,replaceDictionaryEntries:Lt,saveDictionaryEntries:Dt,searchDictionaryEntries:uo,setDictionarySettings:Yc,waitAppTask:tr,customRequest:xt,initIndex:function(z){return function(K){return Pe(z)(K,{methods:{batch:ga,delete:od,findAnswers:xn,getObject:fo,getObjects:en,saveObject:E$,saveObjects:id,search:Oy,searchForFacetValues:By,waitTask:Ke,setSettings:T$,getSettings:_y,partialUpdateObject:C$,partialUpdateObjects:Ty,deleteObject:ad,deleteObjects:F,deleteBy:rd,clearObjects:td,browseObjects:Xc,getObjectPosition:Vn,findObject:nr,exists:Ee,saveSynonym:_$,saveSynonyms:ld,getSynonym:w$,searchSynonyms:Iy,browseSynonyms:ed,deleteSynonym:de,clearSynonyms:nd,replaceAllObjects:k$,replaceAllSynonyms:S$,searchRules:Ny,getRule:us,deleteRule:G,saveRule:x$,saveRules:sd,replaceAllRules:v$,browseRules:ya,clearRules:ds}})}},initAnalytics:function(){return function(z){return function(K){var ee=K.region||"us",J=p(b.WithinHeaders,K.appId,K.apiKey),se=q(a(a({hosts:[{url:"analytics.".concat(ee,".algolia.com")}]},K),{},{headers:a(a(a({},J.headers()),{"content-type":"application/json"}),K.headers),queryParameters:a(a({},J.queryParameters()),K.queryParameters)}));return h({appId:K.appId,transporter:se},K.methods)}(a(a(a({},N),z),{},{methods:{addABTest:me,getABTest:qe,getABTests:Ie,stopABTest:ye,deleteABTest:Be}}))}},initPersonalization:W,initRecommendation:function(){return function(z){return U.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."),W()(z)}},getRecommendations:fs,getFrequentlyBoughtTogether:I$,getLookingSimilar:R$,getRecommendedForYou:$$,getRelatedProducts:A$,getTrendingFacets:P$,getTrendingItems:F$}}))}return Ay.version="4.23.2",Ay})})(my);var bF=my.exports;const wF=lx(bF);class gy{constructor(t,r,o="https://api.pennsieve.io"){this.client=wF(t,r),this.PENNSIEVE_API_LOCATION=o,this.anatomyFacetLabels=[]}initIndex(t){this.index=this.client.initIndex(t)}getAlgoliaFacets(t){const r=t.map(s=>s.facetPropPath),o=t.map(s=>s.facetSubpropPath);let a=[],i=0;return this.index.search("",{sortFacetValuesBy:"alpha",facets:r.concat(o)}).then(s=>(r.map(l=>{const c=t.find(m=>m.facetPropPath==l);var d=[];const u=s.facets;if(u===void 0)return;const p=u[l]==null?{}:u[l],g=c&&u[c.facetSubpropPath]?Object.keys(u[c.facetSubpropPath]):[];Object.keys(p).map(m=>{const f=g.reduce((y,b)=>{const v=b.split(".");return v.length!==2||m===v[0]&&y.push({label:v[1],id:i++,facetPropPath:`${c?c.facetSubpropPath:void 0}`}),y},[]);let h={label:m,id:i++,facetPropPath:l};f.length>0&&(h.children=f),d.push(h)}),d.length>0&&a.push({label:c?c.label:"",id:i++,children:d,key:l})}),a))}_discoverAllDois(t,r="https://api.pennsieve.io"){return new Promise(o=>{fetch(`${r}/discover/datasets/${t}/versions`).then(a=>a.json()).then(a=>{o(a.map(i=>i.doi))})})}_expandDois(t,r="https://api.pennsieve.io"){return new Promise(o=>{let a=t.map(i=>this._discoverAllDois(i,r));Promise.all(a).then(i=>{o(i.flat())})})}_processResultsForCards(t){let r=[],o={};for(let a of t)o={...a},o={anatomy:a.anatomy?a.anatomy.organ.map(i=>i.curie):void 0,doi:a.item.curie.split(":")[1],name:a.item.name,description:a.item.description,updated:a.pennsieve?a.pennsieve.updatedAt:void 0,publishDate:a.pennsieve?a.pennsieve.publishDate:void 0,datasetId:a.objectID,detailsReady:!1},r.push(o);return r}_processAnatomy(t){let r=[],o=[],a=[],i=[];return t.forEach(s=>{s.item&&s.item.keywords&&s.item.keywords.forEach(l=>{let c=l.keyword.toUpperCase();(c.includes("UBERON")||c.includes("ILX"))&&r.push(this._processUberonURL(c))}),s.anatomy&&s.anatomy.organ&&s.anatomy.organ.forEach(l=>{l.curie&&(r.push(l.curie),o.push(l.name))})}),i=[...new Set(r)],a=[...new Set(o)],this.anatomyFacetLabels=a,i}_processUberonURL(t){return t.split("/").pop().replace("_",":")}search(t,r="",o=10,a=1){return new Promise(i=>{this.index.search(r,{facets:["*"],hitsPerPage:o,page:a-1,filters:t,attributesToHighlight:[],attributesToRetrieve:["pennsieve.publishDate","pennsieve.updatedAt","item.curie","item.name","item.description","objectID","anatomy.organ.curie"]}).then(s=>{let l={items:this._processResultsForCards(s.hits),total:s.nbHits,discoverIds:s.hits.map(c=>c.pennsieve?c.pennsieve.identifier:c.objectID),dois:s.hits.map(c=>c.item.curie.split(":")[1])};i(l)})})}anatomyInSearch(t,r="",o=999999,a=1){return new Promise(i=>{this.index.search(r,{facets:["*"],hitsPerPage:o,page:a-1,filters:t,attributesToHighlight:[],attributesToRetrieve:["objectID","item.keywords.keyword","anatomy.organ.name","anatomy.organ.curie"]}).then(s=>{i({forFlatmap:this.processResultsForFlatmap(s.hits),forScaffold:this.processResultsForScaffold(s.hits)})})})}processResultsForFlatmap(t){return t.map(o=>({id:o.objectID,terms:o.anatomy?o.anatomy.organ.map(a=>a.curie):[]}))}processResultsForScaffold(t){let r={};return t.forEach(o=>{o.anatomy&&o.anatomy.organ&&o.anatomy.organ.forEach(a=>{a.name&&(r[a.name]?r[a.name]++:r[a.name]=1)})}),r}}const Jc=[{label:"Data Type",id:"item.types",facetPropPath:"item.types.name",facetSubpropPath:"item.types.subcategory.name"},{label:"Anatomical Structure",id:"anatomy.organ.category",facetPropPath:"anatomy.organ.category.name",facetSubpropPath:"anatomy.organ.subcategory.name",facetFilterPath:"anatomy.organ.name"},{label:"Species",id:"organisms.primary.species",facetPropPath:"organisms.primary.species.name",facetSubpropPath:"organisms.primary.species.subcategory.name"},{label:"Experimental Approach",id:"item.modalities",facetPropPath:"item.modalities.keyword",facetSubpropPath:"item.modalities.subcategory.name"},{label:"Sex",id:"attributes.subject.sex",facetPropPath:"attributes.subject.sex.value",facetSubpropPath:"attributes.subject.sex.subcategory.name"},{label:"Age Categories",id:"attributes.subject.ageCategory",facetPropPath:"attributes.subject.ageCategory.value",facetSubpropPath:"attributes.subject.ageCategory.subcategory.name"},{label:"Funding Program",id:"pennsieve.organization",facetPropPath:"pennsieve.organization.name",facetSubpropPath:"pennsieve.organization.subcategory.name"}];function yy(e=void 0){if(e===void 0)return"NOT item.published.status:embargo";e.forEach(a=>a.label=a.facet);let t=CF(e),r="NOT item.published.status:embargo";return r=`(${r}) AND `,Jc.map(a=>a.facetPropPath).map(a=>{let i=t.filter(c=>c.facetPropPath==a),s="",l="";i.map(c=>{let d=c.facetSubPropPath?c.facetSubPropPath:a;c.AND?l+=`AND "${d}":"${c.label}"`:s+=`"${d}":"${c.label}" OR `}),!(s==""&&l=="")&&(s=`(${s.substring(0,s.lastIndexOf(" OR "))})`,r+=`${s+l} AND `,r=r.split("()AND ").join(""))}),r.substring(0,r.lastIndexOf(" AND "))}function CF(e){return e.filter(t=>t.label!=="Show all")}const ss=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Zc=function(e){const t=e.toLowerCase();return as[t]?ss(as[t]):ss(t)},kF={name:"SearchFilters",components:{MapSvgIcon:cF,MapSvgSpriteColor:yF,Option:xl,Select:si,Popover:li,Cascader:Op},props:{entry:Object,envVars:{type:Object,default:()=>{}}},data:function(){return{algoliaClient:void 0,cascaderIsReady:!1,previousShowAllChecked:{species:!1,gender:!1,organ:!1,datasets:!1},showFilters:!0,showFiltersText:!0,cascadeSelected:[],cascadeSelectedWithBoolean:[],filterTimeout:null,numberShown:10,filters:[],facets:["Species","Gender","Organ","Datasets"],numberDatasetsShown:["10","20","50"],props:{multiple:!0},options:[{value:"Species",label:"Species",children:[{}]}],presentTags:[]}},setup(){const e=n.markRaw({}),t=n.markRaw({term:new Set,facet:new Set,facet2:new Set});return{cascaderTags:e,correctnessCheck:t}},computed:{numberOfResultsText:function(){return`${this.entry.numberOfHits} results | Showing`}},methods:{createCascaderItemValue:function(e,t=void 0,r=void 0){let o=e;return t&&(o=`${e}>${t}`),t&&r&&(o=`${e}>${t}>${r}`),!t&&r&&console.warn(`Warning: ${r} provided without its parent, this will not be shown in the cascader`),o},processOptions:function(){this.options.forEach((e,t)=>{this.options[t].total=this.countTotalFacet(e),this.options[t].label=Zc(e.label),this.options[t].value=this.createCascaderItemValue(e.key,void 0),this.options[t].children.unshift({value:this.createCascaderItemValue("Show all"),label:"Show all"}),this.options[t].children.forEach((r,o)=>{this.options[t].children[o].facetPropPath!=="pennsieve.organization.name"&&(this.options[t].children[o].label=Zc(r.label)),this.options[t].children[o].value=this.createCascaderItemValue(e.label,r.label),this.options[t].children[o].children&&this.options[t].children[o].children.length>0&&this.options[t].children[o].children.forEach((a,i)=>{this.options[t].children[o].children[i].label=Zc(a.label),this.options[t].children[o].children[i].value=this.createCascaderItemValue(e.label,r.label,a.label)})})})},populateCascader:function(){return this.entry.options?new Promise(e=>{this.facets=this.entry.options,this.options=this.entry.options,this.processOptions(),e()}):new Promise(e=>{this.algoliaClient.getAlgoliaFacets(Jc).then(t=>{this.facets=t,Je.emit("available-facets",t),this.options=t,this.processOptions()}).finally(()=>{e()})})},cascadeTagClose:function(e){let t=[];Object.entries(this.cascaderTags).map(r=>{const o=r[0],a=r[1],i=this.options.filter(l=>l.label==o)[0],s=i.key;for(let l=0;l<i.children.length;l++){const c=i.children[l],d=c.label,u=c.value;if(Array.isArray(a))if(a.length===0&&d.toLowerCase()==="show all"){t.push([s,u]);break}else d!==e&&a.includes(d)&&t.push([s,u]);else Object.entries(a).map(p=>{const g=p[0],m=p[1];g===d&&c.children.map(f=>{const h=f.label,y=f.value;h!==e&&m.includes(h)&&t.push([s,y])})})}}),this.cascadeEvent(t)},tagsChangedCallback:function(e){this.correctnessCheck.term&&this.correctnessCheck.facet&&this.correctnessCheck.facet2&&this.options.map(t=>{this.correctnessCheck.term.add(t.label),t.children.map(r=>{this.correctnessCheck.facet.add(r.label),t.label==="Anatomical structure"&&r.label!=="Show all"&&r.children.map(o=>{this.correctnessCheck.facet2.add(o.label)})})}),this.cascaderTags={},this.presentTags=[],e.map(t=>{const{facet:r,facet2:o,term:a}=t;this.correctnessCheck.term.has(a)&&this.correctnessCheck.facet.has(r)&&(o?this.correctnessCheck.facet2.has(o)&&(a in this.cascaderTags?r in this.cascaderTags[a]?this.cascaderTags[a][r].push(o):this.cascaderTags[a][r]=[o]:(this.cascaderTags[a]={},this.cascaderTags[a][r]=[o])):a in this.cascaderTags&&a!=="Anatomical structure"?this.cascaderTags[a].push(r):r.toLowerCase()!=="show all"?this.cascaderTags[a]=[r]:this.cascaderTags[a]=[])}),Object.values(this.cascaderTags).map(t=>{const r=Array.isArray(t)?t:Object.values(t).flat(1);this.presentTags=[...this.presentTags,...r]}),this.presentTags=[...new Set(this.presentTags)],this.presentTags.length>0?this.showFiltersText=!1:this.showFiltersText=!0},countTotalFacet:function(e){return["anatomy.organ.category.name"].includes(e.key)?e.children.reduce((r,o)=>(r=typeof r=="number"?r:r.children.length,r+o.children.length)):e.children.length},showAllEventModifierForAutoCheckAll:function(e){const t={};return e.map(r=>{const o=r[0];o in t?t[o]+=1:t[o]=1}),this.options.map(r=>{const o=r.key,a=r.children.filter(s=>s.label==="Show all")[0].value,i=r.total;t[o]===i&&(e=e.filter(s=>s[0]!==r.key),delete t[o]),o in t||e.unshift([o,a])}),e},cascadeEvent:function(e){let t=[...e];if(t){if(t=this.showAllEventModifier(t),t=this.showAllEventModifierForAutoCheckAll(t),this.__expandItem__){let i=0;this.__expandItem__.length>1&&(i=1);const s=t.filter(c=>c[i]==this.__expandItem__[i]),l=t.filter(c=>c[i]!==this.__expandItem__[i]);t=[...s,...l]}let r=t.filter(i=>i!==void 0).map(i=>{let{hString:s,bString:l}=this.findHierarachyStringAndBooleanString(i),{facet:c,facet2:d,term:u}=this.getFacetsFromHierarchyString(s);return{facetPropPath:i[0],facet:c,facet2:d,term:u,AND:l}}),o=t.filter(i=>i!==void 0).map(i=>{let s,l=i[0].includes("duplicate")?i[0].split("duplicate")[0]:i[0],{hString:c,bString:d}=this.findHierarachyStringAndBooleanString(i),{facet:u,facet2:p,term:g}=this.getFacetsFromHierarchyString(c);return p&&(u=p,s="anatomy.organ.name"),{facetPropPath:l,facet:u,term:g,AND:d,facetSubPropPath:s}});o.filter(i=>i.facet!=="Show all").length||(o=[]),this.filterTimeout&&clearTimeout(this.filterTimeout),this.$emit("loading",!0),this.setCascader(r),this.filterTimeout=setTimeout(()=>{this.$emit("filterResults",o),this.cssMods()},600)}},findHierarachyStringAndBooleanString(e){let t,r;return e.length>=3?e[2]&&(typeof e[2]=="string"||e[2]instanceof String)&&e[2].split(">").length>2?(t=e[2],r=e.length==4?e[3]:void 0):(t=e[1],r=e[2]):(t=e[1],r=void 0),{hString:t,bString:r}},getFacetsFromHierarchyString(e){let t,r,o,a=e.split(">");return a.length==3?(o=a[2],t=a[1],r=a[0]):(t=a[1],r=a[0]),{facet:t,facet2:o,term:r}},showAllEventModifier:function(e){if(e.map(r=>r?r[1].toLowerCase().includes("show all"):!1).includes(!0)){let r=[],o={};for(const a in e)o[e[a][0]]===void 0&&(o[e[a][0]]=[]),o[e[a][0]].push(e[a]);for(const a in o){let i;for(let s=o[a].length-1;s>=0;s--)if(o[a][s][1].toLowerCase().includes("show all")){i=o[a].splice(s,1)[0];break}i?this.previousShowAllChecked[a]&&o[a].length>0?r.push(...o[a]):r.push(i):r.push(...o[a])}return r.sort((a,i)=>this.__expandItem__?a[0]==this.__expandItem__?i[0]==this.__expandItem__?0:-1:i[0]==this.__expandItem__?a[0]==this.__expandItem__?0:1:0:0)}return e},cascadeExpandChange:function(e){this.__expandItem__=e,this.cssMods()},numberShownChanged:function(e){this.$emit("numberPerPage",parseInt(e))},updatePreviousShowAllChecked:function(e){for(const t in this.previousShowAllChecked)this.previousShowAllChecked[t]=!1;e.forEach(t=>{t[1].toLowerCase().includes("show all")&&(this.previousShowAllChecked[t[0]]=!0)})},setCascader:function(e){if(this.cascaderIsReady&&e&&e.length!=0){const t=r=>{let o=[r.facetPropPath,this.createCascaderItemValue(ss(r.term),r.facet)];return r.facet2&&o.push(this.createCascaderItemValue(ss(r.term),r.facet,r.facet2)),o};this.cascadeSelected=e.map(r=>t(r)),this.cascadeSelectedWithBoolean=e.map(r=>{let o=t(r);return o.push(r.AND),o}),this.updatePreviousShowAllChecked(this.cascadeSelected)}this.tagsChangedCallback(e)},addFilter:function(e){if(this.cascaderIsReady&&e){let t=this.validateAndConvertFilterToHierarchical(e);if(t)return this.cascadeSelected.filter(r=>r.term!=t.term),this.cascadeSelected.push([t.facetPropPath,this.createCascaderItemValue(t.term,t.facet),this.createCascaderItemValue(t.term,t.facet,t.facet2)]),this.cascadeSelectedWithBoolean.push([t.facetPropPath,this.createCascaderItemValue(t.term,t.facet),this.createCascaderItemValue(t.term,t.facet,t.facet2),t.AND]),!0}},initiateSearch:function(){this.cascadeEvent(this.cascadeSelectedWithBoolean)},checkShowAllBoxes:function(){this.setCascader(this.options.map(e=>({facetPropPath:e.value,term:e.label,facet:"Show all"})))},makeCascadeLabelsClickable:function(){this.$nextTick(()=>{document.querySelectorAll(".sidebar-cascader-popper .el-cascader-node__label").forEach(e=>{e.onclick=function(){const t=this.previousElementSibling;t&&(t.parentElement.attributes["aria-owns"]||this.previousElementSibling.click())}})})},cssMods:function(){this.makeCascadeLabelsClickable(),this.removeTopLevelCascaderCheckboxes()},removeTopLevelCascaderCheckboxes:function(){this.$nextTick(()=>{document.querySelectorAll(".sidebar-cascader-popper .el-cascader-menu__list").forEach(t=>{const r=t.textContent,o=t.querySelector(".el-icon.arrow-right");!r.includes("Show all")&&o&&t.querySelectorAll(".el-checkbox__input").forEach(a=>{a.style.display="none"})})})},validateAndConvertFilterToHierarchical:function(e){var t,r;if(e&&e.facet&&e.term){const o=e.facet.toLowerCase();if(e.facet2)return e;for(const a of this.options)if(a.value===e.facetPropPath)for(const i of a.children){if(((t=i.label)==null?void 0:t.toLowerCase())===o)return e.facet=i.label,e;if(i.children&&i.children.length>0){for(const s of i.children)if(((r=s.label)==null?void 0:r.toLowerCase())===o)return e.facet2=s.label,e.facet=i.label,e}}}return!1},getHierarchicalValidatedFilters:function(e){if(e)if(this.cascaderIsReady){const t=[],r=[];return e.forEach(o=>{const a=this.validateAndConvertFilterToHierarchical(o);a&&(t.push(a),r.push(a.term))}),this.options.forEach(o=>{r.includes(o.label)||t.push({facet:"Show all",facetPropPath:o.key,label:"Show all",term:o.label})}),t}else return e;return[]}},mounted:function(){this.algoliaClient=n.markRaw(new gy(this.envVars.ALGOLIA_ID,this.envVars.ALGOLIA_KEY,this.envVars.PENNSIEVE_API_LOCATION)),this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX),this.populateCascader().then(()=>{this.cascaderIsReady=!0,this.checkShowAllBoxes(),this.setCascader(this.entry.filterFacets),this.cssMods(),this.$emit("cascaderReady")})}},vF={class:"filters"},SF={key:0,class:"cascader-tag"},EF={class:"el-tags-container"},xF={class:"el-tags-container"},_F={class:"search-filters transition-box"},TF={key:0,class:"filter-default-value"},OF={class:"dataset-shown"},BF={class:"dataset-results-feedback"};function NF(e,t,r,o,a,i){const s=n.resolveComponent("MapSvgSpriteColor"),l=Gn,c=li,d=Op,u=n.resolveComponent("MapSvgIcon"),p=xl,g=si,m=hr;return n.openBlock(),n.createElementBlock("div",vF,[n.createVNode(s),e.presentTags.length>0?(n.openBlock(),n.createElementBlock("div",SF,[n.createVNode(l,{class:"ml-2",type:"info",closable:"",onClose:t[0]||(t[0]=f=>i.cascadeTagClose(e.presentTags[0]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.presentTags[0]),1)]),_:1}),e.presentTags.length>1?(n.openBlock(),n.createBlock(c,{key:0,placement:"bottom-start",width:200,trigger:"hover","popper-class":"cascade-tags-popover"},{default:n.withCtx(()=>[n.createElementVNode("div",EF,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.presentTags.slice(1),(f,h)=>(n.openBlock(),n.createBlock(l,{key:h,class:"ml-2",type:"info",closable:"",onClose:y=>i.cascadeTagClose(f)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(f),1)]),_:2},1032,["onClose"]))),128))])]),reference:n.withCtx(()=>[n.createElementVNode("div",xF,[e.presentTags.length>1?(n.openBlock(),n.createBlock(l,{key:0,class:"ml-2",type:"info"},{default:n.withCtx(()=>[n.createTextVNode(" +"+n.toDisplayString(e.presentTags.length-1),1)]),_:1})):n.createCommentVNode("",!0)])]),_:1})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),n.createVNode(n.Transition,{name:"el-zoom-in-top"},{default:n.withCtx(()=>[n.withDirectives((n.openBlock(),n.createElementBlock("span",_F,[n.createVNode(d,{class:"cascader",ref:"cascader",modelValue:e.cascadeSelected,"onUpdate:modelValue":t[1]||(t[1]=f=>e.cascadeSelected=f),size:"large",placeholder:" ","collapse-tags":!0,"collapse-tags-tooltip":"",options:e.options,props:e.props,onChange:t[2]||(t[2]=f=>i.cascadeEvent(f)),onExpandChange:i.cascadeExpandChange,"show-all-levels":!0,"popper-class":"sidebar-cascader-popper"},null,8,["modelValue","options","props","onExpandChange"]),e.showFiltersText?(n.openBlock(),n.createElementBlock("div",TF,"Filters")):n.createCommentVNode("",!0),n.createVNode(c,{title:"How do filters work?",width:"250",trigger:"hover","popper-class":"filter-help-popover"},{reference:n.withCtx(()=>[n.createVNode(u,{icon:"help",class:"help"})]),default:n.withCtx(()=>[t[5]||(t[5]=n.createElementVNode("div",null,[n.createElementVNode("strong",null,"Within categories:"),n.createTextVNode(" OR "),n.createElementVNode("br"),n.createTextVNode(" example: 'heart' OR 'colon' "),n.createElementVNode("br"),n.createElementVNode("br"),n.createElementVNode("strong",null,"Between categories:"),n.createTextVNode(" AND "),n.createElementVNode("br"),n.createTextVNode(" example: 'rat' AND 'lung' ")],-1))]),_:1})])),[[n.vShow,e.showFilters],[m,!e.cascaderIsReady]])]),_:1}),n.createElementVNode("div",OF,[n.createElementVNode("span",BF,n.toDisplayString(i.numberOfResultsText),1),n.createVNode(g,{class:"number-shown-select",modelValue:e.numberShown,"onUpdate:modelValue":t[3]||(t[3]=f=>e.numberShown=f),placeholder:"10",onChange:t[4]||(t[4]=f=>i.numberShownChanged(f))},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.numberDatasetsShown,f=>(n.openBlock(),n.createBlock(p,{key:f,label:f,value:f},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])])}const ls=yt(kF,[["render",NF],["__scopeId","data-v-b05bed74"]]);var IF=async function(e){if(!e.ok){let t=await e.json();throw t?new Error(t.message):new Error(e)}return e},AF={filters:[],searchInput:"",lastSearch:"",results:[],numberOfHits:0,filter:[],loadingCards:!1,numberPerPage:10,page:1,pageModel:1,start:0,hasSearched:!1,contextCardEnabled:!1};const PF={components:{SearchFilters:ls,DatasetCard:N0,SearchHistory:is,Button:We,Card:Ur,Drawer:ri,Icon:we,Input:Hn,Pagination:Wr},name:"SideBarContent",props:{visible:{type:Boolean,default:!1},isDrawer:{type:Boolean,default:!0},entry:{type:Object,default:()=>AF},envVars:{type:Object,default:()=>{}}},data:function(){return{...this.entry,algoliaClient:void 0,bodyStyle:{flex:"1 1 auto","flex-flow":"column",display:"flex"},cascaderIsReady:!1}},computed:{filterEntry:function(){return{numberOfHits:this.numberOfHits,filterFacets:this.filter}}},methods:{hoverChanged:function(e){const t=e&&{...e,type:"dataset"};this.$emit("hover-changed",t)},resetSearch:function(){this.numberOfHits=0,this.discoverIds=[],this._dois=[],this.results=[],this.loadingCards=!1},openSearch:function(e,t="",r={withSearch:!0}){this.searchInput=t,this.resetPageNavigation(),this.cascaderIsReady?(this.filter=this.$refs.filtersRef.getHierarchicalValidatedFilters(e),e&&e.length>0&&this.filter&&this.filter.length===0?(this.$refs.filtersRef.checkShowAllBoxes(),this.resetSearch()):this.filter&&(r.withSearch&&this.searchAlgolia(this.filter,t),this.$refs.filtersRef.setCascader(this.filter))):(this.filter=e,(!e||e.length==0)&&r.withSearch&&this.searchAlgolia(this.filter,t))},addFilter:function(e){this.cascaderIsReady?(this.resetPageNavigation(),e&&this.$refs.filtersRef.addFilter(e)&&this.$refs.filtersRef.initiateSearch()):Array.isArray(this.filter)?this.filter.push(e):this.filter=[e]},cascaderReady:function(){this.cascaderIsReady=!0,this.openSearch(this.filter,this.searchInput)},clearSearchClicked:function(){this.searchInput="",this.searchAndFilterUpdate()},searchEvent:function(e=!1){(e.keyCode===13||e instanceof MouseEvent)&&(this.searchInput=this.searchInput.trim(),this.searchAndFilterUpdate())},filterUpdate:function(e){this.filters=[...e],this.searchAndFilterUpdate(),this.$emit("search-changed",{value:e,type:"filter-update"})},transformFiltersBeforeSearch:function(e){return e.map(t=>(t.facet2&&(t.facet=t.facet2,delete t.facet2),t))},searchAndFilterUpdate:function(){var t;this.resetPageNavigation();const e=this.transformFiltersBeforeSearch(this.filters);this.searchAlgolia(e,this.searchInput),this.$refs.searchHistory.selectValue="Search history",(this.filters.length||(t=this.searchInput)!=null&&t.trim())&&this.$refs.searchHistory.addSearchToHistory(this.filters,this.searchInput)},searchAlgolia(e,t=""){this.loadingCards=!0,this.algoliaClient.anatomyInSearch(yy(e),t).then(r=>{Je.emit("anatomy-in-datasets",r.forFlatmap),Je.emit("number-of-datasets-for-anatomies",r.forScaffold)}),this.algoliaClient.search(yy(e),t,this.numberPerPage,this.page).then(r=>{this.numberOfHits=r.total,this.discoverIds=r.discoverIds,this._dois=r.dois,this.results=r.items,this.loadingCards=!1,this.scrollToTop(),this.$emit("search-changed",{value:this.searchInput,type:"query-update"}),this._abortController&&this._abortController.abort(),this._abortController=new AbortController;const o=this._abortController.signal;this.perItemSearch(o,{count:0})})},filtersLoading:function(e){this.loadingCards=e},numberPerPageUpdate:function(e){this.numberPerPage=e,this.pageChange(1)},pageChange:function(e){this.start=(e-1)*this.numberPerPage,this.page=e,this.searchAlgolia(this.filters,this.searchInput,this.numberPerPage,this.page)},handleMissingData:function(e){let t=this.results.findIndex(r=>r.doi===e);this.results[t]&&(this.results[t].detailsReady=!0)},perItemSearch:function(e,t){if(10>t.count){const o=this._dois.shift();o&&(t.count++,this.callSciCrunch(this.envVars.API_LOCATION,{dois:[o]},e).then(a=>{a.numberOfHits===0?this.handleMissingData(o):this.resultsProcessing(a),this.$refs.content.style["overflow-y"]="scroll",t.count--,this.perItemSearch(e,t)}).catch(a=>{a.name!=="AbortError"&&(this.handleMissingData(o),t.count--,this.perItemSearch(e,t))}),this.perItemSearch(e,t))}},scrollToTop:function(){this.$refs.content&&this.$refs.content.scroll({top:0,behavior:"smooth"})},resetPageNavigation:function(){this.start=0,this.page=1},resultsProcessing:function(e){this.lastSearch=this.searchInput,e.results.length!==0&&e.results.forEach(t=>{let r=this.results.findIndex(o=>t.doi?t.doi.includes(o.doi):!1);Object.assign(this.results[r],t),Object.assign(this.results[r],{numberSamples:t.sampleSize?parseInt(t.sampleSize):0,numberSubjects:t.subjectSize?parseInt(t.subjectSize):0,updated:(t.updated&&t.updated.length)>0?t.updated[0].timestamp.split("T")[0]:"",url:t.uri[0],datasetId:t.dataset_identifier,datasetRevision:t.dataset_revision,datasetVersion:t.dataset_version,organs:t.organs&&t.organs.length>0?[...new Set(t.organs.map(o=>o.name))]:void 0,species:t.organisms&&t.organisms[0].species?[...new Set(t.organisms.map(o=>o.species?o.species.name:null))]:void 0,scaffolds:t["abi-scaffold-metadata-file"],thumbnails:t["abi-thumbnail"]?t["abi-thumbnail"]:t["abi-scaffold-thumbnail"],scaffoldViews:t["abi-scaffold-view-file"],videos:t.video,plots:t["abi-plot"],images:t["common-images"],contextualInformation:t["abi-contextual-information"].length>0?t["abi-contextual-information"]:void 0,segmentation:t["mbf-segmentation"],simulation:t["abi-simulation-file"],additionalLinks:t.additionalLinks,detailsReady:!0}),this.results[r]=this.results[r]})},createfilterParams:function(e){let t=new URLSearchParams;for(const r in e)Array.isArray(e[r])?e[r].forEach(o=>{t.append(r,o)}):t.append(r,e[r]);return t.toString()},callSciCrunch:function(e,t={},r){return new Promise((o,a)=>{let i=this.envVars.API_LOCATION+this.searchEndpoint+"?"+this.createfilterParams(t);fetch(i,{signal:r}).then(IF).then(s=>s.json()).then(s=>o(s)).catch(s=>a(s))})},getAlgoliaFacets:async function(){return await this.algoliaClient.getAlgoliaFacets(Jc)},searchHistorySearch:function(e){this.searchInput=e.search,this.filters=e.filters,this.searchAndFilterUpdate(),this.openSearch([...e.filters],e.search,{withSearch:!1})}},mounted:function(){this.algoliaClient=n.markRaw(new gy(this.envVars.ALGOLIA_ID,this.envVars.ALGOLIA_KEY,this.envVars.PENNSIEVE_API_LOCATION)),this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX),this.openSearch(this.filter,this.searchInput)},created:function(){this.searchEndpoint="dataset_info/using_multiple_dois/"}},FF={class:"header"},RF={class:"content scrollbar",ref:"content"},$F={key:0,class:"error-feedback"};function VF(e,t,r,o,a,i){const s=Hn,l=We,c=ls,d=is,u=N0,p=Wr,g=Ur,m=hr;return n.openBlock(),n.createBlock(g,{"body-style":e.bodyStyle,class:"content-card"},{header:n.withCtx(()=>[n.createElementVNode("div",FF,[n.createVNode(s,{class:"search-input",placeholder:"Search",modelValue:e.searchInput,"onUpdate:modelValue":t[0]||(t[0]=f=>e.searchInput=f),onKeyup:i.searchEvent,clearable:"",onClear:i.clearSearchClicked},null,8,["modelValue","onKeyup","onClear"]),n.createVNode(l,{type:"primary",class:"button",onClick:i.searchEvent,size:"large"},{default:n.withCtx(()=>t[4]||(t[4]=[n.createTextVNode(" Search ")])),_:1},8,["onClick"]),n.createVNode(l,{type:"primary",class:"button",onClick:t[1]||(t[1]=f=>i.openSearch([],"")),size:"default"},{default:n.withCtx(()=>t[5]||(t[5]=[n.createTextVNode(" Reset ")])),_:1})])]),default:n.withCtx(()=>[n.createVNode(c,{class:"filters",ref:"filtersRef",entry:i.filterEntry,envVars:r.envVars,onFilterResults:i.filterUpdate,onNumberPerPage:i.numberPerPageUpdate,onLoading:i.filtersLoading,onCascaderReady:i.cascaderReady},null,8,["entry","envVars","onFilterResults","onNumberPerPage","onLoading","onCascaderReady"]),n.createVNode(d,{ref:"searchHistory",localStorageKey:"sparc.science-dataset-search-history",onSearch:i.searchHistorySearch},null,8,["onSearch"]),n.withDirectives((n.openBlock(),n.createElementBlock("div",RF,[e.results.length===0&&!e.loadingCards?(n.openBlock(),n.createElementBlock("div",$F," No results found - Please change your search / filter criteria. ")):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.results,f=>(n.openBlock(),n.createElementBlock("div",{key:f.doi,class:"step-item"},[n.createVNode(u,{class:"dataset-card",entry:f,envVars:r.envVars,onMouseenter:h=>i.hoverChanged(f),onMouseleave:t[2]||(t[2]=h=>i.hoverChanged(void 0))},null,8,["entry","envVars","onMouseenter"])]))),128)),n.createVNode(p,{class:"pagination","current-page":e.page,"onUpdate:currentPage":t[3]||(t[3]=f=>e.page=f),"hide-on-single-page":"",large:"",layout:"prev, pager, next","page-size":e.numberPerPage,total:e.numberOfHits,onCurrentChange:i.pageChange},null,8,["current-page","page-size","total","onCurrentChange"])])),[[m,e.loadingCards]])]),_:1},8,["body-style"])}const by=yt(PF,[["render",VF],["__scopeId","data-v-9885434e"]]),LF="assets/missing-image.svg",DF={name:"PMRDatasetCard",components:{ElButton:We,ElIcon:we,ElTag:Gn},props:{entry:{type:Object,default:()=>{}},envVars:{type:Object,default:()=>{}}},data:function(){return{thumbnail:this.entry.image||LF,loading:!1}},methods:{onFlatmapClick:function(e){this.emitPMRActionClick({type:"Flatmap",resource:e})},onSimulationClick:function(e){this.emitPMRActionClick({type:"Simulation",resource:e})},emitPMRActionClick:function(e){const t={...e,name:this.entry.title,description:this.entry.description,apiLocation:this.envVars.API_LOCATION};this.$emit("pmr-action-click",t)}}},MF={class:"dataset-card-container",ref:"container"},zF={class:"dataset-card",ref:"card"},jF={class:"card"},HF={class:"card-left"},UF=["href"],qF=["src","alt"],KF={class:"card-right"},WF={class:"title"},GF={class:"details"},JF={key:0,class:"details"},ZF={class:"buttons-group"},YF=["href"],QF=["href"];function XF(e,t,r,o,a,i){const s=Gn,l=We,c=hr;return n.openBlock(),n.createElementBlock("div",MF,[n.createElementVNode("div",zF,[t[5]||(t[5]=n.createElementVNode("div",{class:"seperator-path"},null,-1)),n.withDirectives((n.openBlock(),n.createElementBlock("div",jF,[n.createElementVNode("span",HF,[n.createElementVNode("a",{class:"card-image-container",href:r.entry.exposure,target:"_blank"},[n.createElementVNode("img",{class:"card-image",src:e.thumbnail,width:"210",height:"210",alt:r.entry.title,loading:"lazy"},null,8,qF)],8,UF)]),n.createElementVNode("div",KF,[n.createVNode(s,{type:"primary",class:"source-tag"},{default:n.withCtx(()=>t[2]||(t[2]=[n.createTextVNode("PMR")])),_:1}),n.createElementVNode("div",null,[n.createElementVNode("h4",WF,n.toDisplayString(r.entry.title),1),n.createElementVNode("div",GF,n.toDisplayString(r.entry.authors),1)]),r.entry.description?(n.openBlock(),n.createElementBlock("div",JF,n.toDisplayString(r.entry.description),1)):n.createCommentVNode("",!0),n.createElementVNode("div",ZF,[n.createElementVNode("a",{href:r.entry.exposure,target:"_blank",class:"el-button el-button--small button"}," Exposure ",8,YF),r.entry.omex?(n.openBlock(),n.createElementBlock("a",{key:0,href:r.entry.omex,target:"_blank",class:"el-button el-button--small button"}," COMBINE archive ",8,QF)):n.createCommentVNode("",!0),r.entry.flatmap?(n.openBlock(),n.createBlock(l,{key:1,size:"small",class:"button",onClick:t[0]||(t[0]=d=>i.onFlatmapClick(r.entry.flatmap))},{default:n.withCtx(()=>t[3]||(t[3]=[n.createTextVNode(" Flatmap ")])),_:1})):n.createCommentVNode("",!0),r.entry.simulation?(n.openBlock(),n.createBlock(l,{key:2,size:"small",class:"button",onClick:t[1]||(t[1]=d=>i.onSimulationClick(r.entry.simulation))},{default:n.withCtx(()=>t[4]||(t[4]=[n.createTextVNode(" Simulation ")])),_:1})):n.createCommentVNode("",!0)])])])),[[c,e.loading]])],512)],512)}const wy=yt(DF,[["render",XF],["__scopeId","data-v-2d6502d7"]]);function eR(e){try{return e.values.map(r=>e.keys.reduce((o,a,i)=>(o[a]=r[i],o),{}))}catch(t){return console.error(`Error occured during conversion of Key Value Array to Object: ${t}`),{}}}const tR=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]};let nR=function(){this.initialise=function(e){this.flatmapApi=e,this.features=[],this.limit=10,this.offset=0,this.numberOfHits=0,this.sqlPreOffset="",this.lookup={},this.createLookup()},this.updateOffset=function(e){this.offset=e},this.updateLimit=function(e){this.limit=e},this.offsetText=function(){return"limit "+this.limit+" offset "+this.offset},this.createTermSQL=function(e){let t="",r=[],o=!1;return e&&e.length>0&&(t+="and ",e.forEach((a,i)=>{i==0&&(t+="("),a!==""&&(r.push(e),t+="m.term=?",o=!0,i<e.length-1&&(t+=" or ")),i==e.length-1&&(t+=") ")})),o||(t="",r=[]),{sql:t,params:r}},this.pmrSQL=function(e=[],t=""){let r="select distinct m.term, m.exposure, m.score, m.workspace, d.metadata from pmr_text ";r+="as t left join pmr_metadata as d on t.entity=d.entity left join pmr_models as m on m.exposure=t.entity ",r+="where d.metadata is not null ";const o=this.createTermSQL(e);r+=o.sql;const a=[...o.params];return t&&t!==""&&(r+="and (t.pmr_text match ?)",a.push(t)),(!t||t==="")&&(r+="and m.exposure is not null and score > 0.69"),r+=" group by m.exposure",this.sqlPreOffset=r,r+=" "+this.offsetText()+";",console.log(r),{sql:r,params:a}},this.convertTermsToIds=function(e){return e.filter(t=>this.lookUpId(t))},this.labelSQL=function(){return"select entity, label from labels"},this.countSQL=function(e){return e=`select count(*) from (${e})`,e},this.flatmapQuery=function(e,t=[]){const r={sql:e,params:t};return fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then(o=>o.json()).catch(o=>{console.error("Error:",o)})},this.processFilters=function(e){let t=[];return e.forEach(r=>{r.facet!=="Show all"&&r.facet!=="PMR"&&t.push(r.facet)}),t},this.pmrSearch=function(e=[],t=""){let r=this.processFilters(e),o=this.convertTermsToIds(r);return new Promise((a,i)=>{const{sql:s,params:l}=this.pmrSQL(o,t);this.flatmapQuery(s,l).then(c=>{const d=this.processPMRData(c,o);this.setAvailableFeatures(d),this.flatmapQuery(this.countSQL(this.sqlPreOffset),l).then(u=>{this.numberOfHits=u.values[0][0],a(d)})}).catch(i)})},this.setAvailableFeatures=function(e){e.forEach(t=>{Object.keys(t).forEach(r=>{this.features.includes(r)||this.features.push(r)})})},this.processPMRData=function(e,t=[]){let r=eR(e);console.log(r);let a=r.filter(s=>s.metadata).map(s=>{let l=JSON.parse(s.metadata);return l.dataSource="PMR",l});return t.length>0&&(a=a.filter(s=>t.includes(s.term))),tR(a)},this.createLookup=function(){this.flatmapQuery(this.labelSQL()).then(e=>{e!=null&&e.values&&e.values.forEach(t=>{t[1]&&(typeof t[1]=="string"||t[1]instanceof String)&&(this.lookup[t[1].toLowerCase()]=t[0])})})},this.lookUpId=function(e){return this.lookup[e.toLowerCase()]}};var rR={searchInput:"",lastSearch:"",pmrNumberOfHits:0,loadingCards:!1,numberPerPage:10,page:1,hasSearched:!1,pmrResults:[]};const oR={components:{PMRDatasetCard:wy,Button:We,Card:Ur,Drawer:ri,Icon:we,Input:Hn,Pagination:Wr},name:"PMRSearch",props:{visible:{type:Boolean,default:!1},entry:{type:Object,default:()=>rR},envVars:{type:Object,default:()=>{}}},data:function(){return{...this.entry,bodyStyle:{flex:"1 1 auto","flex-flow":"column",display:"flex"}}},computed:{numberOfHitsText:function(){return this.pmrNumberOfHits>1?`${this.pmrNumberOfHits} results`:`${this.pmrNumberOfHits} result`}},methods:{hoverChanged:function(e){this.$emit("hover-changed",e)},onPmrActionClick:function(e){this.$emit("pmr-action-click",e)},resetSearch:function(){this.pmrNumberOfHits=0,this.page=1,this.pmrResults=[],this.loadingCards=!1},openPMRSearch:function(e,t=""){this.pmrResults=[],this.searchInput=t,this.loadingCards=!0,this.flatmapQueries.updateOffset((this.page-1)*this.numberPerPage),this.flatmapQueries.updateLimit(this.numberPerPage),this.flatmapQueries.pmrSearch(e,t).then(r=>{r.forEach(o=>{this.pmrResults.push(o)}),this.pmrNumberOfHits=this.flatmapQueries.numberOfHits,this.loadingCards=!1})},clearSearchClicked:function(){this.searchInput="",this.resetSearch(),this.openPMRSearch([])},searchEvent:function(e=!1){(e.keyCode===13||e instanceof MouseEvent)&&(this.openPMRSearch(this.filter,this.searchInput),this.$refs.searchHistory.selectValue="Full search history",this.$refs.searchHistory.addSearchToHistory(this.filter,this.searchInput))},searchAndFilterUpdate:function(){var t;this.resetPageNavigation();const e=this.transformFiltersBeforeSearch(this.filters);this.searchAlgolia(e,this.searchInput),this.$refs.searchHistory.selectValue="Search history",(this.filters.length||(t=this.searchInput)!=null&&t.trim())&&this.$refs.searchHistory.addSearchToHistory(this.filters,this.searchInput)},numberPerPageUpdate:function(e){this.numberPerPage=e,this.pageChange(1)},pageChange:function(e){this.page=e,this.pmrResults=[],this.openPMRSearch(this.filter,this.searchInput)},scrollToTop:function(){this.$refs.content&&this.$refs.content.scroll({top:0,behavior:"smooth"})},resetPageNavigation:function(){this.page=1},createfilterParams:function(e){let t=new URLSearchParams;for(const r in e)Array.isArray(e[r])?e[r].forEach(o=>{t.append(r,o)}):t.append(r,e[r]);return t.toString()}},mounted:function(){this.flatmapQueries=new nR,this.flatmapQueries.initialise(this.envVars.FLATMAPAPI_LOCATION),this.openPMRSearch(this.filter,this.searchInput)}},aR={class:"header"},iR={class:"content scrollbar",ref:"content"},sR={key:0,class:"error-feedback"};function lR(e,t,r,o,a,i){const s=Hn,l=We,c=V5,d=wy,u=Wr,p=Ur,g=hr;return n.openBlock(),n.createBlock(p,{"body-style":e.bodyStyle,class:"content-card"},{header:n.withCtx(()=>[n.createElementVNode("div",aR,[n.createVNode(s,{class:"search-input",placeholder:"Search",modelValue:e.searchInput,"onUpdate:modelValue":t[0]||(t[0]=m=>e.searchInput=m),onKeyup:i.searchEvent,clearable:"",onClear:i.clearSearchClicked},null,8,["modelValue","onKeyup","onClear"]),n.createVNode(l,{type:"primary",class:"button",onClick:i.searchEvent,size:"large"},{default:n.withCtx(()=>t[3]||(t[3]=[n.createTextVNode(" Search ")])),_:1},8,["onClick"]),n.createVNode(c,{class:"results-number"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.numberOfHitsText),1)]),_:1})])]),default:n.withCtx(()=>[n.withDirectives((n.openBlock(),n.createElementBlock("div",iR,[e.pmrResults.length===0&&!e.loadingCards?(n.openBlock(),n.createElementBlock("div",sR," No results found - Please change your search criteria. ")):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.pmrResults,(m,f)=>(n.openBlock(),n.createElementBlock("div",{key:m.doi||f,class:"step-item"},[n.createVNode(d,{class:"dataset-card",entry:m,envVars:r.envVars,onPmrActionClick:i.onPmrActionClick,onMouseenter:h=>i.hoverChanged(m),onMouseleave:t[1]||(t[1]=h=>i.hoverChanged(void 0))},null,8,["entry","envVars","onPmrActionClick","onMouseenter"])]))),128)),n.createVNode(u,{class:"pagination","current-page":e.page,"onUpdate:currentPage":t[2]||(t[2]=m=>e.page=m),"hide-on-single-page":"",large:"",layout:"prev, pager, next","page-size":e.numberPerPage,total:e.pmrNumberOfHits,onCurrentChange:i.pageChange},null,8,["current-page","page-size","total","onCurrentChange"])])),[[g,e.loadingCards]])]),_:1},8,["body-style"])}const Cy=yt(oR,[["render",lR],["__scopeId","data-v-2a557748"]]),cR=e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()),ha=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""},dR=3e3,uR={name:"ConnectivityInfo",components:{Button:We,Container:N_,Icon:we,ElIconWarning:Uu,ElIconLocation:Mu,ElIconSearch:ju,CopyToClipboard:Ar.CopyToClipboard,ConnectivityGraph:Ar.ConnectivityGraph,ExternalResourceCard:Ar.ExternalResourceCard},props:{connectivityEntry:{type:Array,default:[]},entryId:{type:String,default:""},envVars:{type:Object,default:()=>{}},availableAnatomyFacets:{type:Array,default:()=>[]}},data:function(){return{controller:void 0,activeSpecies:void 0,pubmedSearchUrl:"",loading:!1,activeView:"listView",facetList:[],showToolip:!1,showDetails:!1,originDescriptions:{motor:"is the location of the initial cell body of the circuit",sensory:"is the location of the initial cell body in the PNS circuit"},uberons:[{id:void 0,name:void 0}],connectivityError:null,timeoutID:void 0,graphViewLoaded:!1,updatedCopyContent:"",entryIndex:0}},watch:{availableAnatomyFacets:{handler:function(e){this.convertFacetsToList(e)},immediate:!0,deep:!0}},computed:{entry:function(){return this.entryId?this.connectivityEntry.filter(e=>e.featureId[0]===this.entryId)[this.entryIndex]:this.connectivityEntry[this.entryIndex]},hasProvenanceTaxonomyLabel:function(){return this.entry.provenanceTaxonomyLabel&&this.entry.provenanceTaxonomyLabel.length>0},hasOrigins:function(){return this.entry.origins&&this.entry.origins.length>0},hasOriginsWithDatasets:function(){return this.entry.originsWithDatasets&&this.entry.originsWithDatasets.length>0&&this.shouldShowExploreButton(this.entry.originsWithDatasets)},hasComponents:function(){return this.entry.components&&this.entry.components.length>0},hasComponentsWithDatasets:function(){return this.entry.componentsWithDatasets&&this.entry.componentsWithDatasets.length>0&&this.shouldShowExploreButton(this.entry.componentsWithDatasets)},hasDestinations:function(){return this.entry.destinations&&this.entry.destinations.length>0},hasDestinationsWithDatasets:function(){return this.entry.destinationsWithDatasets&&this.entry.destinationsWithDatasets.length>0&&this.shouldShowExploreButton(this.entry.destinationsWithDatasets)},resources:function(){let e=[];return this.entry&&this.entry.hyperlinks&&(e=this.entry.hyperlinks),e},originDescription:function(){return this.entry&&this.entry.title&&this.entry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let e="Studied in";return this.entry.provenanceTaxonomyLabel.forEach(t=>{e+=` ${t},`}),e=e.slice(0,-1),e+=" species",e},sckanVersion:function(){return this.entry.knowledgeSource},previousLabel:function(){return this.entryIndex===0?"This is the first item. Click 'Next' to see more information.":this.connectivityEntry[this.entryIndex-1].title},nextLabel:function(){return this.entryIndex===this.connectivityEntry.length-1?"This is the last item. Click 'Previous' to see more information.":this.connectivityEntry[this.entryIndex+1].title}},methods:{previous:function(){this.entryIndex!==0&&(this.entryIndex=this.entryIndex-1)},next:function(){this.entryIndex!==this.connectivityEntry.length-1&&(this.entryIndex=this.entryIndex+1)},titleCase:function(e){return cR(e)},capitalise:function(e){return ha(e)},openUrl:function(e){window.open(e,"_blank")},openAll:function(){Je.emit("onConnectivityActionClick",{type:"Facets",labels:this.entry.componentsWithDatasets.map(e=>e.name.toLowerCase())})},openAxons:function(){Je.emit("onConnectivityActionClick",{type:"Facets",labels:this.entry.destinationsWithDatasets.map(e=>e.name.toLowerCase())})},shouldShowExploreButton:function(e){for(let t=0;t<e.length;t++)if(this.facetList.includes(e[t].name.toLowerCase()))return!0;return!1},convertFacetsToList:function(e){e.forEach(t=>{t.children?this.convertFacetsToList(t.children):this.facetList.push(t.label.toLowerCase())})},openDendrites:function(){Je.emit("onConnectivityActionClick",{type:"Facets",labels:this.entry.originsWithDatasets.map(e=>e.name.toLowerCase())})},pubmedSearchUrlUpdate:function(e){this.pubmedSearchUrl=e},showConnectivity:function(){const e=this.entry.featureId||[];this.$emit("show-connectivity",e)},switchConnectivityView:function(e){this.activeView=e,e==="graphView"&&!this.graphViewLoaded&&this.$nextTick(()=>{this.graphViewLoaded=!0})},onTapNode:function(e){const t=e.map(r=>r.label).join(", ");this.connectivityHovered(t)},onShowReferenceConnectivities:function(e){this.$emit("show-reference-connectivities",e)},onReferencesLoaded:function(e){this.updatedCopyContent=this.getUpdateCopyContent(e)},getUpdateCopyContent:function(e){var s,l,c,d;if(!this.entry)return"";const t=[];let r=this.entry.title,o=this.entry.featureId;const a=[];r&&a.push(`<strong>${ha(this.entry.title)}</strong>`),o!=null&&o.length&&(typeof o=="object"?a.push(`(${o[0]})`):a.push(`(${o})`)),t.push(`<div>${a.join(" ")}</div>`),(s=this.entry.provenanceTaxonomyLabel)!=null&&s.length&&t.push(`<div>${this.provSpeciesDescription}</div>`),this.entry.paths&&t.push(`<div>${this.entry.paths}</div>`);function i(u,p,g=[]){let m=`<div><strong>${u}</strong></div>`;const f=[];p.forEach(y=>{let b=[];y.split(",").forEach(v=>{const T=g.find(S=>S.name===v.trim());T?b.push(`${ha(v)} (${T.id})`):b.push(`${ha(v)}`)}),f.push(b.join(","))});const h=f.map(y=>`<li>${y}</li>`).join(`
465
465
  `);return m+=`
466
466
  `,m+=`<ul>${h}</ul>`,m}if((l=this.entry.origins)!=null&&l.length){const u="Origin",p=this.entry.origins,g=this.entry.originsWithDatasets,m=i(u,p,g);t.push(m)}if((c=this.entry.components)!=null&&c.length){const u="Components",p=this.entry.components,g=this.entry.componentsWithDatasets,m=i(u,p,g);t.push(m)}if((d=this.entry.destinations)!=null&&d.length){const u="Destination",p=this.entry.destinations,g=this.entry.destinationsWithDatasets,m=i(u,p,g);t.push(m)}if(e){let u="<div><strong>References</strong></div>";u+=`
467
467
  `;const p=e.list.map(g=>`<li>${g}</li>`).join(`