@abi-software/mapintegratedvuer 1.24.0 → 1.24.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.
@@ -1247,7 +1247,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
1247
1247
  where source="${tK(e)}" and
1248
1248
  knowledge like "%${t}%" order by source desc`;return(await n.queryKnowledge(r)).map(e=>JSON.parse(e)).map(e=>e.id)}function tK(e){return nK(e.mapMetadata)}function nK(e){let t=``;if(e?.connectivity){let n=e.connectivity;`knowledge-source`in n?t=n[`knowledge-source`]:`npo`in n&&(t=`${n.npo.release}-npo`)}return t}async function LSe(e,t){let n=tK(e),r=`select knowledge from knowledge
1249
1249
  where source="${n}"
1250
- order by source desc`;BSe();let i=sessionStorage.getItem(`flatmap-knowledge`),a=sessionStorage.getItem(`flatmap-knowledge-source`);if(!i||a!==n){let e=(await t.queryKnowledge(r)).map(e=>JSON.parse(e));return sessionStorage.setItem(`flatmap-knowledge`,JSON.stringify(e)),sessionStorage.setItem(`flatmap-knowledge-source`,n),RSe(),e}return JSON.parse(i)}function RSe(){let e=new Date().getTime()+864e5;sessionStorage.setItem(`flatmap-knowledge-expiry`,e)}function zSe(){[`flatmap-knowledge`,`flatmap-knowledge-expiry`,`flatmap-knowledge-source`].forEach(e=>{sessionStorage.removeItem(e)})}function BSe(){let e=sessionStorage.getItem(`flatmap-knowledge-expiry`);new Date().getTime()>e&&zSe()}var rK=_((()=>{dW()})),iK,aK=_((()=>{eK(),rK(),iK=(0,n.defineStore)(`entries`,{state:()=>UG(),getters:{findIndexOfId:e=>t=>{for(let n=0;n<e.entries.length;n++)if(e.entries[n].id==t)return n;return-1}},actions:{addNewEntry(e){this.entries.push(e)},destroyEntry(e){e>-1&&this.entries.splice(e,1)},setAll(e){this.entries=[],Object.assign(this.entries,e)},updateViewForEntry({id:e,viewUrl:t}){let n=this.entries.find(t=>t.id===e);n.viewUrl=t},updateMapForEntry(e,t){if(e.id===t.id){let n=nK(t.prov);e.uuid=t.prov.uuid,e.sckanVersion=n}},updateLabelForEntry(e,t){let n=this.entries.find(t=>t.id===e.id);n&&(n.label=t)},updateTitleForEntry(e,t){let n=this.entries.find(t=>t.id===e.id);n&&(n.title=t)}}})}));function VSe(){return[{id:`UBERON:0000948`,name:`Heart`,type:`simulation`},{id:`UBERON:0001156`,name:`Colon`,type:`simulation`},{id:`UBERON:0001255`,name:`Bladder`,type:`simulation`},{id:`UBERON:0000945`,name:`Stomach`,type:`simulation`},{id:`UBERON:0001759`,name:`Vagus nerve`,type:`simulation`},{id:`UBERON:0002108`,name:`Small intestines`,type:`simulation`},{id:`UBERON:0002107`,name:`Liver`,type:`simulation`}]}function HSe(){return VSe()}var USe=_((()=>{})),oK,sK,cK,lK,uK,dK,fK,pK=_((()=>{USe(),mW(),oK=e=>{switch(e){case`2horpanel`:return{"split-1":{content:!1,horizontal:!0,children:[`pane-1`,`pane-2`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2}};case`2vertpanel`:return{"split-1":{content:!1,horizontal:!1,children:[`pane-1`,`pane-2`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2}};case`3panel`:return{"split-1":{content:!1,horizontal:!1,children:[`pane-1`,`split-2`]},"split-2":{content:!1,horizontal:!0,children:[`pane-2`,`pane-3`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3}};case`4panel`:return{"split-1":{content:!1,horizontal:!1,children:[`split-3`,`split-2`]},"split-2":{content:!1,horizontal:!0,children:[`pane-2`,`pane-3`]},"split-3":{content:!1,horizontal:!0,children:[`pane-1`,`pane-4`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4}};case`5panel`:return{"split-1":{content:!1,horizontal:!0,children:[`split-3`,`split-2`]},"split-2":{content:!1,horizontal:!1,children:[`pane-2`,`pane-3`]},"split-3":{content:!1,horizontal:!1,children:[`pane-1`,`pane-4`,`pane-5`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4},"pane-5":{content:!0,id:5}};case`6panel`:return{"split-1":{content:!1,horizontal:!0,children:[`split-3`,`split-2`]},"split-2":{content:!1,horizontal:!1,children:[`pane-2`,`pane-3`,`pane-5`]},"split-3":{content:!1,horizontal:!1,children:[`pane-1`,`pane-4`,`pane-6`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4},"pane-5":{content:!0,id:5},"pane-6":{content:!0,id:6}};case`6panelVertical`:return{"split-1":{content:!1,horizontal:!1,children:[`split-3`,`split-2`]},"split-2":{content:!1,horizontal:!0,children:[`pane-2`,`pane-3`,`pane-5`]},"split-3":{content:!1,horizontal:!0,children:[`pane-1`,`pane-4`,`pane-6`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4},"pane-5":{content:!0,id:5},"pane-6":{content:!0,id:6}};default:return{"split-1":{content:!1,horizontal:!1,children:[`pane-1`]},"pane-1":{content:!0,id:1}}}},sK=(e,t)=>{let n=[],r=[];for(let[e,i]of Object.entries(t))i.content&&(1>i.id||n.includes(i.id)?r.push(e):n.push(i.id));r.forEach(r=>{let i=!1;for(let a=0;a<e.length&&!i;a++)n.includes(e[a].id)||(t[r].id=e[a].id,n.push(e.id),i=!0)})},cK=e=>{let t={};for(let[n,r]of Object.entries(e))r.content&&(t[n]=r);return t},lK=(e,t)=>{let n=cK(e),r=oK(t);for(let[e,t]of Object.entries(n))r[e]=t;return r},uK=(e,t)=>Object.keys(e).find(n=>e[n].id===t),dK=()=>({activeView:`singlepanel`,idNamePair:{},viewIcons:[{icon:`singlepanel`,name:`Single view`,min:1},{icon:`2horpanel`,name:`Horizontal split`,min:2},{icon:`2vertpanel`,name:`Vertical split`,min:2},{icon:`3panel`,name:`Three panes`,min:3},{icon:`4panel`,name:`Four panes`,min:4},{icon:`5panel`,name:`Five panes`,min:5},{icon:`6panel`,name:`Six (horizontal)`,min:6},{icon:`6panelVertical`,name:`Six (vertical)`,min:6}],customLayout:{"split-1":{content:!1,horizontal:!1,children:[`pane-1`]},"pane-1":{content:!0,id:1}},splitters:{first:50,second:50,third:50}}),fK=(0,n.defineStore)(`splitFlow`,{state:()=>dK(),getters:{getActivePaneIds:e=>()=>{let t=[],n;for(let n in e.customLayout)e.customLayout[n].id&&t.push(e.customLayout[n].id);switch(e.activeView){case`singlepanel`:n=t.slice(0,1);break;case`2horpanel`:case`2vertpanel`:n=t.slice(0,2);break;case`3panel`:n=t.slice(0,3);break;case`4panel`:n=t.slice(0,4);break;case`5panel`:n=t.slice(0,5);break;case`6panelVertical`:case`6panel`:n=t.slice(0,6);break;default:n=[]}return n},getPaneNameById:e=>t=>uK(e.customLayout,t),getState:e=>()=>({activeView:e.activeView,splitters:e.splitters,customLayout:e.customLayout}),isPaneActive:e=>t=>{let n=oK(e.activeView);return Object.keys(n).includes(t)}},actions:{assignOrSwapPaneWithIds(e,t=!0){let n=uK(this.customLayout,e.source),r=uK(this.customLayout,e.target);r&&(this.customLayout[r].id=e.source),n&&(this.customLayout[n].id=e.target),t&&this.updateSplitPanels()},getAvailableTerms(e){let t=HSe();for(let e=0;e<t.length;e++)this.idNamePair[t[e].id]=t[e].name;if(e){this._controller&&this._controller.abort(),this._controller=new AbortController;let t=this._controller.signal;fetch(`${e}get-organ-curies`,{signal:t}).then(e=>e.json()).then(e=>{this._controller=void 0,e.uberon.array.forEach(e=>{this.idNamePair[e.id.toUpperCase()]=e.name.charAt(0).toUpperCase()+e.name.slice(1)})})}},updateActiveView(e,t=!0){this.activeView=e.view;let n=lK(this.customLayout,this.activeView);sK(e.entries,n);for(let[e,t]of Object.entries(n))this.customLayout[e]=t;t&&this.updateSplitPanels()},setSplitter(e){this.splitters[e.name]&&(this.splitters[e.name]=e.value)},setState(e){if(e){let t;if(e.activeView&&(this.activeView=e.activeView),e.customLayout)t=e.customLayout;else if(t=oK(this.activeView),e.slotInfo)for(let n=0;n<e.slotInfo.length;n++)switch(e.slotInfo[n].name){case`first`:t[`pane-1`].id=e.slotInfo[n].id;break;case`second`:`pane-2`in t&&(t[`pane-2`].id=e.slotInfo[n].id);break;case`thrid`:`pane-3`in t&&(t[`pane-3`].id=e.slotInfo[n].id);break;case`fourth`:`pane-4`in t&&(t[`pane-4`].id=e.slotInfo[n].id);break;case`fifth`:`pane-5`in t&&(t[`pane-5`].id=e.slotInfo[n].id);break;case`sixth`:`pane-6`in t&&(t[`pane-6`].id=e.slotInfo[n].id)}for(let[e,n]of Object.entries(t))this.customLayout[e]=n;for(let[t,n]of Object.entries(e.splitters))this.splitters[t]=n}},setIdToPrimaryPane(e){let t=uK(this.customLayout,e),n=this.customLayout[`pane-1`].id;this.customLayout[`pane-1`].id=e,t&&(this.customLayout[t].id=n)},placeEntryInSplitView(e){let{id:t,sourceId:n,entries:r}=e;if(this.activeView===`singlepanel`){if(uK(this.customLayout,n)!==`pane-1`){this.setIdToPrimaryPane(t);return}this.updateActiveView({view:`2vertpanel`,entries:r},!1),this.assignOrSwapPaneWithIds({source:t,target:this.customLayout[`pane-2`].id},!1)}else{let e=uK(this.customLayout,n);if(!e||!this.isPaneActive(e)){this.setIdToPrimaryPane(t);return}let r=e===`pane-1`?`pane-2`:`pane-1`;this.assignOrSwapPaneWithIds({source:t,target:this.customLayout[r].id},!1)}this.updateSplitPanels()},reset(){let e=dK();this.activeView=e.activeView,this.customLayout=e.customLayout,this.splitters=e.splitters},closeSlot(e){if(e){let t=0;if(e.entries)for(let n=0;n<e.entries.length&&t==0;n++)e.entries[n].id!==e.id&&uK(this.customLayout,e.entries[n].id)===void 0&&(t=e.entries[n].id);if(this.activeView!==`customise`){let n=this.activeView;switch(this.activeView){case`2horpanel`:case`2vertpanel`:this.activeView=`singlepanel`;break;case`3panel`:this.activeView=`2vertpanel`;break;case`4panel`:this.activeView=`3panel`;break;case`5panel`:this.activeView=`4panel`;break;case`6panelVertical`:case`6panel`:this.activeView=`5panel`}let r=lK(this.customLayout,this.activeView);switch(uK(this.customLayout,e.id)){case`pane-1`:switch(n){case`2horpanel`:case`2vertpanel`:r[`pane-1`].id=r[`pane-2`].id,r[`pane-2`].id=t;break;case`3panel`:r[`pane-1`].id=r[`pane-2`].id,r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=t;break;case`4panel`:r[`pane-1`].id=r[`pane-2`].id,r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=t;break;case`5panel`:r[`pane-1`].id=r[`pane-2`].id,r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=t;break;case`6panelVertical`:case`6panel`:r[`pane-1`].id=r[`pane-2`].id,r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=r[`pane-6`].id,r[`pane-6`].id=t}break;case`pane-2`:switch(n){case`2horpanel`:case`2vertpanel`:r[`pane-2`].id=t;break;case`3panel`:r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=t;break;case`4panel`:r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=t;break;case`5panel`:r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=t;break;case`6panelVertical`:case`6panel`:r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=r[`pane-6`].id,r[`pane-6`].id=t}break;case`pane-3`:switch(n){case`3panel`:r[`pane-3`].id=t;break;case`4panel`:r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=t;break;case`5panel`:r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=t;break;case`6panelVertical`:case`6panel`:r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=r[`pane-6`].id,r[`pane-6`].id=t}break;case`pane-4`:switch(n){case`4panel`:r[`pane-4`].id=t;break;case`5panel`:r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=t;break;case`6panelVertical`:case`6panel`:r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=r[`pane-6`].id,r[`pane-6`].id=t}break;case`pane-5`:switch(n){case`5panel`:r[`pane-5`].id=t;break;case`6panelVertical`:case`6panel`:r[`pane-5`].id=r[`pane-6`].id,r[`pane-6`].id=t}break;case`pane-6`:switch(n){case`6panelVertical`:case`6panel`:r[`pane-6`].id=t}}for(let[e,t]of Object.entries(r))this.customLayout[e]=t}}},updateSplitPanels(){fW.emit(`species-layout-connectivity-update`)}}})}));aK(),pK(),So(),mW(),_d(),gW(),yd();var WSe={name:`ContentBar`,components:{ElIconArrowDown:za,ElIconArrowUp:Ha,ContextCard:qW,FlatmapContextCard:JW,MapSvgIcon:XW,ScreenshotPopover:bd},props:{entry:Object,captureScreenshot:{type:Function,default:void 0},getScreenshotTarget:{type:Function,default:void 0},viewerReady:{type:Boolean,default:!1}},data:function(){return{contextCardVisible:!1,slot:{},boundariesElement:null,showDetails:!0,contextCardEntry:void 0}},computed:{...(0,n.mapStores)(iK,gd,fK),allClosable(){return this.settingsStore.allClosable},getSourceTitle:function(){if(this.entry){if(this.entry.doi)return this.entry.doi.replace(`https://doi.org/`,``);if(this.entry.connectivityInfo)return`SCKAN`}return``},hasSourceInfo(){return this.entry.doi||this.entry.connectivityInfo},helpDelay(){return this.settingsStore.helpDelay},activeView:function(){return this.splitFlowStore.activeView},envVars:function(){return{API_LOCATION:this.settingsStore.sparcApi,ALGOLIA_INDEX:this.settingsStore.algoliaIndex,ALGOLIA_KEY:this.settingsStore.algoliaKey,ALGOLIA_ID:this.settingsStore.algoliaId,PENNSIEVE_API_LOCATION:this.settingsStore.pennsieveApi,ROOT_URL:this.settingsStore.rootUrl}},popperOptions:function(){return{modifiers:[{name:`preventOverflow`,options:{boundary:this.boundariesElement}},{name:`flip`,options:{boundary:this.boundariesElement,flipVariations:!1,allowedAutoPlacements:[`bottom`]}}]}},entries:function(){return this.entriesStore.entries.map(e=>({...e,title:this.getEntryTitle(e)}))},titles:function(){return this.entries.map(e=>({id:e.id,title:e.title}))}},methods:{onCaptureScreenshot:async function(e){let t=await this.captureScreenshot(e);return hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_screenshot`,category:`png_${e.scale}x`,location:`pane_header`}),t},closeAndRemove:function(){this.splitFlowStore.closeSlot({id:this.entry.id,entries:this.entries}),fW.emit(`RemoveEntryRequest`,this.entry.id),this.$nextTick(()=>{this.splitFlowStore.updateSplitPanels()})},getEntryTitle:function(e){if(e){let t=e.label?e.label+` `:``,n=e.type;return n==`Scaffold`&&(n=`3D Scaffold`),t+=n,e.datasetId?t+=` - `+e.datasetId:e.discoverId&&(t+=` - `+e.discoverId),t}return`Viewer`},getTitle:function(e){let{id:t,title:n}=e,r=this.titles.filter(e=>e.title===n);if(r.length>1){let e=[];for(let t=0;t<r.length;t++){let n=this.getCharById(t);e.push({id:r[t].id,title:r[t].title+n})}let n=e.find(e=>e.id===t);if(n)return n.title}return n},getCharById:function(e){return` (`+String.fromCharCode(65+e)+`)`},openSourceInfo:function(){if(this.entry.doi){let e={type:`Search`,term:this.entry.doi.replace(`https://doi.org/`,``)};fW.emit(`PopoverActionClick`,e)}else this.entry.connectivityInfo&&fW.emit(`connectivity-info-open`,[this.entry.connectivityInfo])},viewerChanged:function(e){if(this.entry.id&&this.entry.id!=e){this.splitFlowStore.assignOrSwapPaneWithIds({source:this.entry.id,target:e}),this.$nextTick(()=>{this._chooserTimer=setTimeout(()=>{this.$emit(`chooser-changed`)},1200)});let t=this.entries.find(t=>t.id===e);hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_toolbar_viewer_changed`,category:t?.title||``,location:`map_toolbar`})}},setPopperWidth:function(e){let t=this.entries.find(t=>t.id===e);if(t)return t.type==`Flatmap`||t.type==`MultiFlatmap`?`240px`:`440px`},setBoundary:function(e){this.boundariesElement=e},setupFlatmapContextCard:function(e){this.contextCardVisible=!1;let t=Object.assign({mapImpProv:e.prov},this.entry);this.contextCardEntry=t},setupScaffoldContextCard:function(){this.entry.contextCardUrl&&(this.contextCardEntry={...this.entry})}},mounted:function(){this.setupScaffoldContextCard()},beforeUnmount:function(){clearTimeout(this._chooserTimer)}},GSe={class:`toolbar-flex-container`},KSe={class:`toolbar-left shrink`},qSe={key:1,class:`toolbar-title shrink`},JSe={class:`toolbar-right shrink`},YSe={class:`information-group shrink`};function XSe(e,n,r,i,a,o){let s=rce,c=nce,l=ic,u=JW,d=qW,f=Ha,p=Do,m=za,h=Qc,g=bd,_=(0,t.resolveComponent)(`map-svg-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,null,[(0,t.createElementVNode)(`div`,GSe,[(0,t.createElementVNode)(`div`,KSe,[o.entries.length>1?((0,t.openBlock)(),(0,t.createBlock)(c,{key:0,teleported:!1,"model-value":r.entry.id,placeholder:`Select`,class:`select-box`,"popper-class":`viewer_dropdown`,onChange:n[0]||=e=>o.viewerChanged(e)},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.entries,e=>((0,t.openBlock)(),(0,t.createBlock)(s,{key:e.id,label:o.getTitle(e),value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,qSe,(0,t.toDisplayString)(o.getEntryTitle(r.entry)),1)),o.hasSourceInfo?((0,t.openBlock)(),(0,t.createBlock)(l,{key:2,round:``,size:`small`,class:`source-chip shrink`,onClick:o.openSourceInfo},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(o.getSourceTitle),1)]),_:1},8,[`onClick`])):(0,t.createCommentVNode)(``,!0)]),(0,t.createElementVNode)(`div`,JSe,[(0,t.createElementVNode)(`div`,YSe,[(0,t.createVNode)(h,{placement:`bottom`,teleported:!1,trigger:`manual`,width:o.setPopperWidth(e.slot.id),offset:0,"popper-class":`context-card-popover`,"popper-options":o.popperOptions,visible:e.contextCardVisible},(0,t.createSlots)({reference:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createElementVNode)(`div`,null,[(0,t.withDirectives)((0,t.createElementVNode)(`div`,{class:`information`,onClick:n[3]||=t=>e.contextCardVisible=!1},[n[6]||=(0,t.createTextVNode)(` Hide information `,-1),(0,t.createVNode)(p,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(f)]),_:1})],512),[[t.vShow,e.contextCardVisible]]),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{class:`information`,onClick:n[4]||=t=>e.contextCardVisible=!0},[n[7]||=(0,t.createTextVNode)(` Show information `,-1),(0,t.createVNode)(p,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(m)]),_:1})],512),[[t.vShow,!e.contextCardVisible]])],512),[[t.vShow,e.contextCardEntry]])]),_:2},[e.contextCardEntry?{name:`default`,fn:(0,t.withCtx)(()=>[e.contextCardEntry.type==`Flatmap`||e.contextCardEntry.type==`MultiFlatmap`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:0,class:`flatmap-context-card`,mapImpProv:e.contextCardEntry.mapImpProv},null,8,[`mapImpProv`])):(0,t.createCommentVNode)(``,!0),e.contextCardEntry.type.toLowerCase()==`scaffold`?((0,t.openBlock)(),(0,t.createBlock)(d,{key:1,entry:e.contextCardEntry,envVars:o.envVars,class:`context-card`,onContextReady:n[1]||=t=>e.contextCardVisible=!0,onScaffoldViewClicked:n[2]||=t=>e.$emit(`scaffold-view-clicked`,t)},null,8,[`entry`,`envVars`])):(0,t.createCommentVNode)(``,!0)]),key:`0`}:void 0]),1032,[`width`,`popper-options`,`visible`])]),r.captureScreenshot?((0,t.openBlock)(),(0,t.createBlock)(g,{key:0,disabled:!r.viewerReady,class:`screenshot-button`,tooltip:`Download screenshot of this view`,capture:o.onCaptureScreenshot,getTarget:r.getScreenshotTarget},null,8,[`disabled`,`capture`,`getTarget`])):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(h,{class:`tooltip`,content:`Close and remove`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createVNode)(_,{icon:`close-no-bk`,class:`header-icon rightmost`,onClick:n[5]||=e=>o.closeAndRemove()},null,512),[[t.vShow,o.activeView!==`singlepanel`&&(r.entry.mode!==`main`||o.allClosable)]])]),_:1},8,[`show-after`])])])])}var mK=vd(WSe,[[`render`,XSe],[`__scopeId`,`data-v-a4a65049`]]);function hK(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e))return e.length===t.length&&e.every((e,n)=>hK(e,t[n]));let n=Object.keys(e).filter(t=>e[t]!==void 0),r=Object.keys(t).filter(e=>t[e]!==void 0);return n.length===r.length&&n.every(n=>hK(e[n],t[n]))}function ZSe(e=[],t=[]){let n=new Map;return[...e,...t].forEach(e=>{if(!e||e.id===void 0)return;let t=n.get(e.id);n.set(e.id,t?{...t,...e,"nerve-label":e[`nerve-label`]||t[`nerve-label`],"long-label":e[`long-label`]||t[`long-label`],"expert-consultants":e[`expert-consultants`]||t[`expert-consultants`]}:{...e})}),Array.from(n.values())}var gK,_K=_((()=>{eK(),gK=(0,n.defineStore)(`connectivities`,{state:()=>({activeConnectivityKeys:[],globalConnectivities:{},filterOptions:{},filterSources:{},connectivitiesUpdated:!0}),getters:{getUniqueConnectivitiesByKeys:e=>{let t=e.activeConnectivityKeys.reduce((t,n)=>{let r=e.globalConnectivities[n];if(!r)return t;for(let e of r){let n=e.id;t[n]=t[n]?{...t[n],...e}:{...e}}return t},{});return Object.values(t).sort((e,t)=>e.label.localeCompare(t.label))},getUniqueFilterOptionsByKeys:e=>{let t=e.activeConnectivityKeys.reduce((t,n)=>{let r=e.filterOptions[n];if(!r)return t;for(let e of r)if(t[e.key]){let n=[...t[e.key].children,...e.children],r=Array.from(new Map(n.map(e=>[e.key,e])).values());t[e.key].children=r}else t[e.key]={...e};return t},{});return Object.values(t)},getUniqueFilterSourcesByKeys:e=>e.activeConnectivityKeys.reduce((t,n)=>{let r=e.filterSources[n];if(!r)return t;for(let[e,n]of Object.entries(r)){t[e]||(t[e]={});for(let[r,i]of Object.entries(n))t[e][r]=t[e][r]?Array.from(new Set([...t[e][r],...i])):[...i]}return t},{})},actions:{updateActiveConnectivityKeys(e){return $G(this.activeConnectivityKeys,e)?this.connectivitiesUpdated?(this.connectivitiesUpdated=!e.every(e=>e in this.globalConnectivities),!0):!1:(this.activeConnectivityKeys=e,!0)},updateGlobalConnectivities(e){if(e){let n=(0,t.toRaw)(this.globalConnectivities),r={...n},i=!1;Object.entries((0,t.toRaw)(e)).forEach(([e,a])=>{let o=(0,t.toRaw)(n[e]),s=ZSe(o||[],(0,t.toRaw)(a)||[]);o&&hK(s,o)?(0,t.markRaw)(o):(r[e]=(0,t.markRaw)(s),i=!0)}),i&&(this.globalConnectivities=r,this.connectivitiesUpdated=!0)}},updateFilterOptions(e){this.filterOptions=e},updateFilterSources(e){this.filterSources=e}}})})),vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,QSe=_((()=>{dW(),vK=function(e){if(!e)return[];let t=new Set;return e.filter(e=>{let n=JSON.stringify(e);return!t.has(n)&&(t.add(n),!0)})},yK=function(e){return new Set((e||[]).map(e=>JSON.stringify(e)))},bK=function(e){if(!e)return[];let t=new Set,n=[];return e.forEach(e=>{let{id:r,name:i}=e,a=`${r.toLowerCase()}:${i.toLowerCase()}`;t.has(a)||(t.add(a),n.push(e))}),n},xK=new Map,SK=new Map,CK=100,wK=new Map,TK=function(e,t){if(wK.has(e)){let t=wK.get(e);return wK.delete(e),wK.set(e,t),t}let n=t().catch(t=>{throw wK.get(e)===n&&wK.delete(e),t});return wK.set(e,n),wK.size>CK&&wK.delete(wK.keys().next().value),n},EK=async function(e,t){let n=[...new Set(t)],r=n.filter(e=>!xK.has(e)&&!SK.has(e));if(r.length){let t=e.queryLabels(r).then(e=>{(e||[]).forEach(e=>{let{entity:t,label:n}=e;n===`Mammalia`&&(n=`Mammalia not otherwise specified`),xK.set(t,n)})}).finally(()=>{r.forEach(e=>SK.delete(e))});r.forEach(e=>SK.set(e,t))}let i=new Set(n.map(e=>SK.get(e)).filter(Boolean));return await Promise.all(i),n.filter(e=>xK.has(e)).map(e=>({taxon:e,label:xK.get(e)}))},DK=(e,t)=>{let n=e.name??e,r=t.name??t,i=n.toUpperCase(),a=r.toUpperCase();return i<a?-1:+(i>a)},OK=function(){return{destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],destinationsCombinations:[],originsCombinations:[],componentsCombinations:[],singleConnectivityList:[],rawURLs:[],expertConsultants:[]}},kK=function(e,t,n,r){let{sckanNodeId:i,sckanNodeLabel:a,mapNodeId:o,mapNodeLabel:s}=n;e.push({sckanId:i,sckanLabel:a,mapId:o,mapLabel:s}),o.forEach((e,n)=>{let i=typeof e==`string`?e:e[0];i&&t.push({id:i,name:r[n]})})},AK=function(){this.initialise=function(e){this.flatmapAPI=e,Object.assign(this,OK()),this.hasSingleConnectivityList=!1,this.controller=void 0,this.uberons=[],this.lookUp=[],this.connectivitySource=`map`,this.noMapConnectivity=!1,this._requestId=0},this._buildTooltipData=async function(e,t,n){let r;r=n.feature?.hyperlinks&&n.feature.hyperlinks.length>0?n.feature.hyperlinks:e.rawURLs;let i;if(n.provenanceTaxonomy){i=[];try{(await EK(t,n.provenanceTaxonomy)).forEach(e=>{i.push(e.label)})}catch(e){console.log(e)}}return{destinations:e.destinations,origins:e.origins,components:e.components,destinationsWithDatasets:bK(e.destinationsWithDatasets),originsWithDatasets:bK(e.originsWithDatasets),componentsWithDatasets:bK(e.componentsWithDatasets),destinationsCombinations:e.destinationsCombinations,originsCombinations:e.originsCombinations,componentsCombinations:e.componentsCombinations,hasSingleConnectivityList:e.singleConnectivityList.length>0,title:n.label,featureId:n.resource,hyperlinks:r,"expert-consultants":e.expertConsultants,provenanceTaxonomy:n.provenanceTaxonomy,provenanceTaxonomyLabel:i,connectivitySource:e.connectivitySource,noMapConnectivity:e.noMapConnectivity}},this.createTooltipData=async function(e,t){return this._buildTooltipData(this,e,t)},this.queryTooltipData=async function(e,t){let n=t.resource,r={...OK(),connectivitySource:`map`,noMapConnectivity:!1};if(n&&n.length>0&&n[0]){let{state:t}=await this._fetchConnectivity(e,n[0],`map`,!0);r={...r,...t}}return this._buildTooltipData(r,e,t)},this.updateTooltipData=function(e){return{...e,origins:this.origins,originsWithDatasets:bK(this.originsWithDatasets),components:this.components,componentsWithDatasets:bK(this.componentsWithDatasets),destinations:this.destinations,destinationsWithDatasets:bK(this.destinationsWithDatasets),destinationsCombinations:this.destinationsCombinations,originsCombinations:this.originsCombinations,componentsCombinations:this.componentsCombinations,connectivitySource:this.connectivitySource,noMapConnectivity:this.noMapConnectivity}},this.createComponentsLabelList=function(e,t){let n=[];return e.forEach(e=>{n.push(this.createLabelFromNeuralNode(e[0]),t),e.length===2&&n.push(this.createLabelFromNeuralNode(e[1]),t)}),n},this._buildLabelLookup=async function(e,t){let n={},r=[];return(await EK(e,t)).forEach(e=>{let{taxon:t,label:i}=e;n[t]=i,r.push({id:t,name:i})}),{lookUp:n,uberons:r}},this.createLabelLookup=async function(e,t){let{lookUp:n,uberons:r}=await this._buildLabelLookup(e,t);return this.uberons=r,n},this.buildConnectivitySqlStatement=function(e){let t=`select knowledge from knowledge where entity in (`;if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let n in e)t+=`'${e[n]}'${n>=e.length-1?`)`:`,`} `;return t},this.buildLabelSqlStatement=function(e){let t=`select entity, label from labels where entity in (`;if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let n in e)t+=`'${e[n]}'${n>=e.length-1?`)`:`,`} `;return t},this.findAllIdsFromConnectivity=function(e){return[...new Set(e.connectivity.flat(3))]},this.flattenConnectivity=function(e){return e.flat(3)},this.findComponents=function(e,t,n,r){let i=e.connectivity.flat(),a=vK(i),o=[t,r,n].filter(e=>e).map(e=>JSON.stringify(e));return a.filter(e=>{let t=JSON.stringify(e);return!o.some(e=>e.indexOf(t)!==-1)})},this.retrieveFlatmapKnowledgeForEvent=async function(e,t){this.controller&&this.controller.abort(),this.controller=new AbortController,this._requestId++;let n=t.resource;if(Object.assign(this,OK()),!(!n||n.length===0||!n[0]))return[await this.queryForConnectivityNew(e,n[0])]},this.queryForConnectivityNew=async function(e,t,n=`map`,r=!0){let i=++this._requestId,{state:a,value:o}=await this._fetchConnectivity(e,t,n,r);return i===this._requestId&&Object.assign(this,a),o},this._fetchConnectivity=async function(e,t,n,r){let i=/^sckan-(\d{4})/.exec(e.knowledgeSource||``),a=(i?Number(i[1]):0)>=2026,o=e.mapMetadata.uuid,s=this.flatmapAPI,c=OK();c.connectivitySource=a?`sckan`:n;let l=a?TK(`cq27|${s}|${o}|${t}`,()=>aye(s,o,t)).catch(()=>[]):Promise.resolve([]),u=()=>TK(`sckan|${s}|${o}|${t}`,()=>e.queryKnowledge(t)),d=c.connectivitySource===`map`?TK(`map|${s}|${o}|${t}`,()=>this.queryMapConnectivity(o,t)):u(),f=!1;try{let t=await d;if(c.singleConnectivityList=await l,this.checkConnectivityExists(t)?c.connectivitySource===`map`&&(c.noMapConnectivity=!1):c.connectivitySource===`map`?(c.connectivitySource=`sckan`,c.noMapConnectivity=!0,t=await u().catch(()=>void 0)):t=void 0,this.checkConnectivityExists(t)&&(f=t,r)){let n=await this._processConnectivity(e,t,c.singleConnectivityList);Object.assign(c,n.state),f=n.value,t.references&&(c.rawURLs=[...t.references]),t[`expert-consultants`]&&(c.expertConsultants=[...t[`expert-consultants`]])}}catch(e){c.singleConnectivityList=await l,e.name===`AbortError`||console.warn(`Unable to get the knowledge for the entity ${t}.`),f=!1}return{state:c,value:f}},this.queryMapConnectivity=async function(e,t){let n=this.flatmapAPI+`flatmap/${e}/connectivity/${t}`;try{let e=await fetch(n);if(!e.ok)throw Error(`Response status: ${e.status}`);return await e.json()}catch(e){throw Error(e,{cause:e})}},this.queryForConnectivity=function(e,t,n,r=!0){let i={sql:this.buildConnectivitySqlStatement(t)},a={method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(i),...n?{signal:n}:{}};return new Promise(t=>{fetch(`${this.flatmapAPI}knowledge/query/`,a).then(e=>e.json()).then(n=>{if(this.connectivityExists(n)){let i=JSON.parse(n.values[0][0]);r?this.processConnectivity(e,i).then(e=>{t(e)}).catch(()=>t(!1)):t(i)}else t(!1)}).catch(e=>{e.name===`AbortError`||console.error(`Error:`,e),t(!1)})})},this.checkConnectivityExists=function(e){return e&&e.connectivity?.length},this.connectivityExists=function(e){if(e.values&&e.values.length>0){let t=JSON.parse(e.values[0][0]).connectivity;return!!(t&&t.length>0)}return!1},this.findIfNodeIsSingle=function(e){return e.length===1?(console.error(`Server returns a single node`,e),e[0]):e.length===2&&e[1].length===0&&e[0]},this.createLabelFromNeuralNode=function(e,t){let n=this.findIfNodeIsSingle(e);if(n)return t[n];let r=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(e=>{t[e]==null?r+=`, ${e}`:r+=`, ${t[e]}`}),r},this._findDatasets=function(e,t,n,r,i){let a=new Set(this.flattenConnectivity(e)),o=new Set(this.flattenConnectivity(t)),s=new Set(this.flattenConnectivity(n)),c={originsWithDatasets:r.filter(e=>a.has(e.id)).sort(DK),componentsWithDatasets:r.filter(e=>o.has(e.id)).sort(DK),destinationsWithDatasets:r.filter(e=>s.has(e.id)).sort(DK),destinationsCombinations:[],originsCombinations:[],componentsCombinations:[]};if(i.length>0){let r=yK(n),a=yK(e),o=yK(t);i.forEach(e=>{let t=JSON.stringify(e.sckanNodeId),n=e.mapNodeLabel.split(`,`);r.has(t)&&kK(c.destinationsCombinations,c.destinationsWithDatasets,e,n),a.has(t)&&kK(c.originsCombinations,c.originsWithDatasets,e,n),o.has(t)&&kK(c.componentsCombinations,c.componentsWithDatasets,e,n)})}return c},this.flattenAndFindDatasets=function(e,t,n){Object.assign(this,this._findDatasets(e,t,n,this.uberons,this.singleConnectivityList))},this._processConnectivity=async function(e,t,n){let r=[],i=[],a;t&&t[`node-phenotypes`]?([`ilxtr:hasSomaLocatedIn`].forEach(e=>{e in t[`node-phenotypes`]&&r.push(...t[`node-phenotypes`][e])}),r=vK(r),[`ilxtr:hasAxonPresynapticElementIn`,`ilxtr:hasAxonSensorySubcellularElementIn`].forEach(e=>{e in t[`node-phenotypes`]&&i.push(...t[`node-phenotypes`][e])}),i=vK(i)):(i=vK(t.axons),t.somas&&t.somas.length>0&&r.push(...t.somas),t.dendrites&&t.dendrites.length>0&&r.push(...t.dendrites),r=vK(r),a=t.somas);let o=this.findComponents(t,i,r,a),s=this.findAllIdsFromConnectivity(t),{lookUp:c,uberons:l}=await this._buildLabelLookup(e,s),u=r.map(e=>this.createLabelFromNeuralNode(e,c)).sort(DK),d=o.map(e=>this.createLabelFromNeuralNode(e,c)).sort(DK),f=i.map(e=>this.createLabelFromNeuralNode(e,c)).sort(DK);return{state:{uberons:l,origins:u,components:d,destinations:f,...this._findDatasets(r,o,i,l,n)},value:{ids:{dendrites:r,components:o,axons:i},labels:{origins:u,components:d,destinations:f}}}},this.processConnectivity=async function(e,t){let{state:n,value:r}=await this._processConnectivity(e,t,this.singleConnectivityList);return Object.assign(this,n),r},this.buildPubmedSqlStatement=function(e){let t=`select distinct publication from publications where entity in (`;if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let n in e)t+=`'${e[n]}'${n>=e.length-1?`)`:`,`} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.queryKnowledge=async(e,t)=>{let n=`${this.flatmapAPI}knowledge/query/`,r=await fetch(n,{method:`POST`,headers:{Accept:`application/json`},body:JSON.stringify({sql:e,params:t})});if(!r.ok)throw Error(`Cannot access ${n}`);let i=await r.json();if(`error`in i)throw TypeError(i.error);return i.values}}})),jK,MK,NK,$Se=_((()=>{jK=[{id:0,nerve_id:`ILX:0793723`,label:`Auriculotemporal nerve`,"FMA subclasses (in human nerves)":[`FMA:53002`,`FMA:53001`],"subclass labels":[`Left auriculotemporal nerve`,`Right auriculotemporal nerve`]},{id:1,nerve_id:`ILX:0792409`,label:`gray communicating ramus of tenth thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6895`,`FMA:6894`],"subclass labels":[`Left T10 grey ramus communicans`,`Right T10 grey ramus communicans`]},{id:2,nerve_id:`UBERON:0011326`,label:`superior laryngeal nerve`,"FMA subclasses (in human nerves)":[`FMA:53530`,`FMA:53536`],"subclass labels":[`Right superior laryngeal nerve`,`Left superior laryngeal nerve`]},{id:3,nerve_id:`ILX:0793220`,label:`white communicating ramus of first lumbar spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:4,nerve_id:`ILX:0787082`,label:`gray communicating ramus of the first thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6082`,`FMA:6084`],"subclass labels":[`Right T1 grey ramus communicans`,`Left T1 grey ramus communicans`]},{id:5,nerve_id:`ILX:0793809`,label:`Clitoral cavernous nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:6,nerve_id:`UBERON:0011096`,label:`lacrimal nerve`,"FMA subclasses (in human nerves)":[`FMA:52630`,`FMA:52629`],"subclass labels":[`Left lacrimal nerve`,`Right lacrimal nerve`]},{id:7,nerve_id:`ILX:0793215`,label:`white communicating ramus of ninth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:8,nerve_id:`ILX:0795005`,label:`Posterior cutaneous nerve of arm`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:9,nerve_id:`UBERON:0001649`,label:`glossopharyngeal nerve`,"FMA subclasses (in human nerves)":[`FMA:50894`,`FMA:50892`],"subclass labels":[]},{id:10,nerve_id:`UBERON:0022302`,label:`short ciliary nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:11,nerve_id:`ILX:0785932`,label:`gray communicating ramus of third lumbar nerve`,"FMA subclasses (in human nerves)":[`FMA:65920`,`FMA:65919`],"subclass labels":[`Left L3 grey ramus communicans`,`Right L3 grey ramus communicans`]},{id:12,nerve_id:`ILX:0738293`,label:`Ganglioglomerular nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:13,nerve_id:`ILX:0739298`,label:`gray communicating ramus of twelfth thoracic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:14,nerve_id:`UBERON:0001492`,label:`radial nerve`,"FMA subclasses (in human nerves)":[`FMA:37070`,`FMA:37071`],"subclass labels":[`Right radial nerve`,`Left radial nerve`]},{id:15,nerve_id:`ILX:0793214`,label:`white communicating ramus of eighth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:16,nerve_id:`UBERON:0018681`,label:`lesser splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6957`,`FMA:6958`],"subclass labels":[`Right lesser splanchnic nerve`,`Left lesser splanchnic nerve`]},{id:17,nerve_id:`ILX:0794476`,label:`abdominal branch of vagus nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:18,nerve_id:`ILX:0791105`,label:`gray communicating ramus of the second thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6122`,`FMA:6757`],"subclass labels":[`Right T2 grey ramus communicans`,`Left T2 grey ramus communicans`]},{id:19,nerve_id:`ILX:0794853`,label:`esophageal vagus trunk`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:20,nerve_id:`ILX:0793210`,label:`white communicating ramus of fourth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:21,nerve_id:`UBERON:0001759`,label:`vagus nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:22,nerve_id:`UBERON:0009675`,label:`chorda tympani branch of facial nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:23,nerve_id:`ILX:0794949`,label:`recurrent branch of the median nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:24,nerve_id:`ILX:0789339`,label:`Pharyngeal branch of glossopharyngeal nerve`,"FMA subclasses (in human nerves)":[`FMA:53495`,`FMA:53494`],"subclass labels":[`Pharyngeal branch of left glossopharyngeal nerve`,`Pharyngeal branch of right glossopharyngeal nerve`]},{id:25,nerve_id:`ILX:0793712`,label:`Zygomatic nerve`,"FMA subclasses (in human nerves)":[`FMA:52968`,`FMA:52969`],"subclass labels":[`Right zygomatic nerve`,`Left zygomatic nerve`]},{id:26,nerve_id:`ILX:0788536`,label:`gray communicating ramus of fourth lumbar nerve`,"FMA subclasses (in human nerves)":[`FMA:65917`,`FMA:65918`],"subclass labels":[`Right L4 grey ramus communicans`,`Left L4 grey ramus communicans`]},{id:27,nerve_id:`UBERON:0018680`,label:`greater splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6956`,`FMA:6955`],"subclass labels":[`Right greater splanchnic nerve`,`Left greater splanchnic nerve`]},{id:28,nerve_id:`UBERON:0001322`,label:`sciatic nerve`,"FMA subclasses (in human nerves)":[`FMA:22111`,`FMA:22112`],"subclass labels":[`Right sciatic nerve`,`Left sciatic nerve`]},{id:29,nerve_id:`ILX:0793209`,label:`white communicating ramus of third thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:30,nerve_id:`UBERON:0011391`,label:`perineal nerve`,"FMA subclasses (in human nerves)":[`FMA:21874`,`FMA:21873`],"subclass labels":[`Left perineal nerve`,`Right perineal nerve`]},{id:31,nerve_id:`ILX:0788945`,label:`gray communicating ramus of the fourth thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6759`,`FMA:6758`],"subclass labels":[`Right T4 grey ramus communicans`,`Left T4 grey ramus communicans`]},{id:32,nerve_id:`ILX:0790497`,label:`Gray communicating ramus of cervicothoracic ganglion to first thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:33,nerve_id:`UBERON:0001323`,label:`tibial nerve`,"FMA subclasses (in human nerves)":[`FMA:22109`,`FMA:22110`],"subclass labels":[`Right tibial nerve`,`Left tibial nerve`]},{id:34,nerve_id:`ILX:0794969`,label:`deep branch of ulnar nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:35,nerve_id:`ILX:0793227`,label:`gray communicating ramus of thirteenth thoracic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:36,nerve_id:`ILX:0793228`,label:`gray communicating ramus of first sacral nerve`,"FMA subclasses (in human nerves)":[`FMA:65992`,`FMA:65991`],"subclass labels":[`Left S1 grey ramus communicans`,`Right S1 grey ramus communicans`]},{id:37,nerve_id:`UBERON:0035111`,label:`medial plantar nerve`,"FMA subclasses (in human nerves)":[`FMA:45435`,`FMA:45434`],"subclass labels":[`Left medial plantar nerve`,`Right medial plantar nerve`]},{id:38,nerve_id:`UBERON:0001780`,label:`spinal nerve`,"FMA subclasses (in human nerves)":`FMA:6117.FMA:6435.FMA:6295.FMA:6422.FMA:6417.FMA:6421.FMA:6038.FMA:6292.FMA:6439.FMA:6313.FMA:6410.FMA:6412.FMA:6088.FMA:6298.FMA:6433.FMA:6411.FMA:6438.FMA:6314.FMA:6291.FMA:6420.FMA:6116.FMA:6413.FMA:6310.FMA:6432.FMA:6305.FMA:6182.FMA:6297.FMA:6436.FMA:6418.FMA:6039.FMA:6089.FMA:6301.FMA:6294.FMA:6303.FMA:6183.FMA:6434.FMA:6429.FMA:6308.FMA:6300.FMA:6430.FMA:6428.FMA:6419.FMA:6437.FMA:6307.FMA:6311.FMA:6431`.split(`.`),"subclass labels":`Left T3 spinal nerve.Left S4 spinal nerve.Left T5 spinal nerve.Left L5 spinal nerve.Right L3 spinal nerve.Right L5 spinal nerve.Right T1 spinal nerve.Left T4 spinal nerve.Left coccygeal spinal nerve.Right T11 spinal nerve.Right L1 spinal nerve.Right L2 spinal nerve.Right T2 spinal nerve.Left T6 spinal nerve.Left S3 spinal nerve.Left L1 spinal nerve.Right coccygeal spinal nerve.Left T11 spinal nerve.Right T4 spinal nerve.Left L4 spinal nerve.Right T3 spinal nerve.Left L2 spinal nerve.Right T10 spinal nerve.Right S3 spinal nerve.Left T8 spinal nerve.Right T12 spinal nerve.Right T6 spinal nerve.Right S5 spinal nerve.Left L3 spinal nerve.Left T1 spinal nerve.Left T2 spinal nerve.Left T7 spinal nerve.Right T5 spinal nerve.Right T8 spinal nerve.Left T12 spinal nerve.Right S4 spinal nerve.Left S1 spinal nerve.Left T9 spinal nerve.Right T7 spinal nerve.Right S2 spinal nerve.Right S1 spinal nerve.Right L4 spinal nerve.Left S5 spinal nerve.Right T9 spinal nerve.Left T10 spinal nerve.Left S2 spinal nerve`.split(`.`)},{id:39,nerve_id:`UBERON:0018683`,label:`lumbar splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6924`,`FMA:6928`,`FMA:6929`,`FMA:6931`,`FMA:6925`,`FMA:6930`,`FMA:6927`,`FMA:6926`],"subclass labels":[`Right first lumbar splanchnic nerve`,`Right third lumbar splanchnic nerve`,`Left third lumbar splanchnic nerve`,`Left fourth lumbar splanchnic nerve`,`Left first lumbar splanchnic nerve`,`Right fourth lumbar splanchnic nerve`,`Left second lumbar splanchnic nerve`,`Right second lumbar splanchnic nerve`]},{id:40,nerve_id:`UBERON:0001643`,label:`oculomotor nerve`,"FMA subclasses (in human nerves)":[`FMA:50880`,`FMA:50879`],"subclass labels":[`Left oculomotor nerve`,`Right oculomotor nerve`]},{id:41,nerve_id:`ILX:0793212`,label:`white communicating ramus of sixth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:42,nerve_id:`UBERON:0003724`,label:`musculocutaneous nerve`,"FMA subclasses (in human nerves)":[`FMA:37066`,`FMA:37065`],"subclass labels":[`Left musculocutaneous nerve`,`Right musculocutaneous nerve`]},{id:43,nerve_id:`ILX:0738372`,label:`white communicating ramus of first thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:44,nerve_id:`ILX:0793563`,label:`splenic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:45,nerve_id:`UBERON:0035526`,label:`superficial fibular nerve`,"FMA subclasses (in human nerves)":[`FMA:45363`,`FMA:45364`],"subclass labels":[`Right superficial fibular nerve`,`Left superficial fibular nerve`]},{id:46,nerve_id:`ILX:0791560`,label:`gray communicating ramus of eighth thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6891`,`FMA:6890`],"subclass labels":[`Left T8 grey ramus communicans`,`Right T8 grey ramus communicans`]},{id:47,nerve_id:`ILX:0793827`,label:`posterior abdominal vagal trunk`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:48,nerve_id:`ILX:0794141`,label:`right cervical vagus nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:49,nerve_id:`ILX:0793714`,label:`Mesenteric nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:50,nerve_id:`UBERON:0001964`,label:`least splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6960`,`FMA:6959`],"subclass labels":[`Left least splanchnic nerve`,`Right least splanchnic nerve`]},{id:51,nerve_id:`UBERON:0001267`,label:`femoral nerve`,"FMA subclasses (in human nerves)":[`FMA:16499`,`FMA:16500`],"subclass labels":[`Right femoral nerve`,`Left femoral nerve`]},{id:52,nerve_id:`UBERON:0034984`,label:`nerve to quadratus femoris`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:53,nerve_id:`UBERON:0003721`,label:`lingual nerve`,"FMA subclasses (in human nerves)":[`FMA:53219`,`FMA:53220`],"subclass labels":[`Right lingual nerve`,`Left lingual nerve`]},{id:54,nerve_id:`UBERON:0036216`,label:`tympanic nerve`,"FMA subclasses (in human nerves)":[`FMA:53481`,`FMA:53482`],"subclass labels":[`Right tympanic nerve`,`Left tympanic nerve`]},{id:55,nerve_id:`ILX:0793216`,label:`white communicating ramus of tenth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:56,nerve_id:`ILX:0793362`,label:`White communicating ramus of fourth lumbar anterior ramus`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:57,nerve_id:`ILX:0793561`,label:`Internal branch of superior laryngeal nerve`,"FMA subclasses (in human nerves)":[`FMA:53539`,`FMA:53540`],"subclass labels":[`Right internal laryngeal nerve`,`Left internal laryngeal nerve`]},{id:58,nerve_id:`ILX:0738312`,label:`Aortic arch depressor nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:59,nerve_id:`ILX:0793218`,label:`white communicating ramus of twelfth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:60,nerve_id:`ILX:0738308`,label:`External branch of inferior laryngeal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:61,nerve_id:`ILX:0739299`,label:`gray communicating ramus of sixth lumbar nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:62,nerve_id:`ILX:0793559`,label:`bladder nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:63,nerve_id:`ILX:0793822`,label:`Superior ovarian nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:64,nerve_id:`ILX:0793807`,label:`Penile cavernous nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:65,nerve_id:`UBERON:0011390`,label:`pudendal nerve`,"FMA subclasses (in human nerves)":[`FMA:21863`,`FMA:21864`],"subclass labels":[`Right pudendal nerve`,`Left pudendal nerve`]},{id:66,nerve_id:`UBERON:0008810`,label:`nasopalatine nerve`,"FMA subclasses (in human nerves)":[`FMA:52799`,`FMA:52798`],"subclass labels":[`Left nasopalatine nerve`,`Right nasopalatine nerve`]},{id:67,nerve_id:`ILX:0793219`,label:`white communicating ramus of thirteenth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:68,nerve_id:`ILX:0793632`,label:`lumbar colonic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:69,nerve_id:`ILX:0784439`,label:`gray communicating ramus of the fifth thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6760`,`FMA:6761`],"subclass labels":[`Left T5 grey ramus communicans`,`Right T5 grey ramus communicans`]},{id:70,nerve_id:`ILX:0794977`,label:`deep branch of radial nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:71,nerve_id:`UBERON:0001884`,label:`phrenic nerve`,"FMA subclasses (in human nerves)":[`FMA:6193`,`FMA:6192`],"subclass labels":[`Left phrenic nerve`,`Right phrenic nerve`]},{id:72,nerve_id:`UBERON:0035110`,label:`lateral plantar nerve`,"FMA subclasses (in human nerves)":[`FMA:45450`,`FMA:45451`],"subclass labels":[`Right lateral plantar nerve`,`Left lateral plantar nerve`]},{id:73,nerve_id:`ILX:0793711`,label:`Communicating branch of zygomatic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:74,nerve_id:`ILX:0793560`,label:`External branch of superior laryngeal nerve`,"FMA subclasses (in human nerves)":[`FMA:53537`,`FMA:53538`],"subclass labels":[`Right external laryngeal nerve`,`Left external laryngeal nerve`]},{id:75,nerve_id:`ILX:0738309`,label:`Internal branch of inferior laryngeal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:76,nerve_id:`UBERON:0001021`,label:`nerve`,"FMA subclasses (in human nerves)":`FMA:6775.FMA:6894.FMA:6784.FMA:6728.FMA:65325.FMA:21873.FMA:45429.FMA:6844.FMA:53609.FMA:7116.FMA:44770.FMA:8916.FMA:52995.FMA:6071.FMA:45309.FMA:6122.FMA:6892.FMA:6767.FMA:16405.FMA:53560.FMA:6092.FMA:65343.FMA:37066.FMA:8894.FMA:8868.FMA:65341.FMA:53559.FMA:8897.FMA:82956.FMA:20633.FMA:6763.FMA:65339.FMA:8829.FMA:16493.FMA:8817.FMA:8821.FMA:11757.FMA:45456.FMA:45422.FMA:11261.FMA:65388.FMA:6192.FMA:65347.FMA:37068.FMA:65995.FMA:6764.FMA:39081.FMA:45338.FMA:53402.FMA:11210.FMA:52644.FMA:37067.FMA:65313.FMA:11153.FMA:6155.FMA:8797.FMA:53302.FMA:8883.FMA:53067.FMA:52939.FMA:53301.FMA:292889.FMA:45423.FMA:8791.FMA:45380.FMA:11759.FMA:7305.FMA:8830.FMA:78650.FMA:65389.FMA:45387.FMA:8827.FMA:8912.FMA:52941.FMA:6743.FMA:7126.FMA:53485.FMA:16492.FMA:53399.FMA:65337.FMA:11209.FMA:6772.FMA:52726.FMA:6121.FMA:52627.FMA:52974.FMA:53571.FMA:6729.FMA:8729.FMA:53606.FMA:80025.FMA:53481.FMA:53575.FMA:45451.FMA:11218.FMA:22109.FMA:6852.FMA:8909.FMA:11751.FMA:65991.FMA:8836.FMA:65350.FMA:53423.FMA:65569.FMA:65314.FMA:82957.FMA:65438.FMA:39146.FMA:8911.FMA:22111.FMA:65916.FMA:65739.FMA:65917.FMA:6779.FMA:8889.FMA:65924.FMA:65316.FMA:53002.FMA:16887.FMA:53366.FMA:6890.FMA:8790.FMA:6730.FMA:45358.FMA:52716.FMA:53494.FMA:7115.FMA:53561.FMA:78655.FMA:45366.FMA:11219.FMA:11555.FMA:7092.FMA:53220.FMA:45428.FMA:6193.FMA:20604.FMA:45433.FMA:21874.FMA:21875.FMA:53244.FMA:45432.FMA:6770.FMA:52640.FMA:11249.FMA:20630.FMA:53308.FMA:11216.FMA:65399.FMA:78649.FMA:11084.FMA:6897.FMA:53633.FMA:6085.FMA:6851.FMA:45457.FMA:6757.FMA:8732.FMA:8824.FMA:20632.FMA:6137.FMA:52730.FMA:7301.FMA:52699.FMA:53607.FMA:7300.FMA:53576.FMA:44904.FMA:65342.FMA:7127.FMA:6737.FMA:52669.FMA:21876.FMA:45425.FMA:65999.FMA:8728.FMA:21871.FMA:55172.FMA:6149.FMA:45453.FMA:44932.FMA:292832.FMA:6744.FMA:6781.FMA:44769.FMA:45326.FMA:6760.FMA:53634.FMA:53605.FMA:53530.FMA:6821.FMA:52968.FMA:53001.FMA:11552.FMA:45264.FMA:8835.FMA:6888.FMA:55160.FMA:44899.FMA:52979.FMA:45333.FMA:45310.FMA:6084.FMA:11781.FMA:82962.FMA:53280.FMA:52715.FMA:53311.FMA:16491.FMA:21880.FMA:44952.FMA:11687.FMA:11212.FMA:65335.FMA:52940.FMA:6774.FMA:8823.FMA:45388.FMA:6666.FMA:6072.FMA:16886.FMA:53312.FMA:65915.FMA:45357.FMA:11262.FMA:65921.FMA:0328826.FMA:81290.FMA:53279.FMA:11551.FMA:7293.FMA:6677.FMA:11756.FMA:53598.FMA:52732.FMA:44902.FMA:53545.FMA:6740.FMA:53502.FMA:53562.FMA:52700.FMA:7122.FMA:6118.FMA:65918.FMA:8814.FMA:16403.FMA:65346.FMA:6667.FMA:52630.FMA:52629.FMA:8871.FMA:16500.FMA:52725.FMA:6108.FMA:45363.FMA:65340.FMA:8872.FMA:11760.FMA:53604.FMA:11214.FMA:52777.FMA:21864.FMA:53503.FMA:6738.FMA:66000.FMA:6776.FMA:6777.FMA:6765.FMA:6111.FMA:8890.FMA:20607.FMA:52643.FMA:8908.FMA:65437.FMA:6762.FMA:11154.FMA:65344.FMA:52937.FMA:8919.FMA:45354.FMA:6766.FMA:53424.FMA:6145.FMA:65568.FMA:20634.FMA:6732.FMA:8893.FMA:11758.FMA:6889.FMA:11554.FMA:65922.FMA:7118.FMA:16884.FMA:45308.FMA:7290.FMA:6758.FMA:65743.FMA:11063.FMA:16885.FMA:8882.FMA:65286.FMA:291238.FMA:53482.FMA:52976.FMA:11308.FMA:53432.FMA:53540.FMA:45379.FMA:44871.FMA:6714.FMA:82955.FMA:65993.FMA:45452.FMA:52626.FMA:6083.FMA:53582.FMA:65919.FMA:52936.FMA:53506.FMA:8918.FMA:44901.FMA:6073.FMA:65315.FMA:53219.FMA:11194.FMA:6792.FMA:7119.FMA:52785.FMA:7296.FMA:53068.FMA:6845.FMA:52677.FMA:53504.FMA:53548.FMA:52698.FMA:53570.FMA:6771.FMA:7078.FMA:65997.FMA:65338.FMA:52969.FMA:16401.FMA:65416.FMA:6835.FMA:39082.FMA:8726.FMA:45254.FMA:8879.FMA:11250.FMA:53049.FMA:45382.FMA:8795.FMA:53495.FMA:45434.FMA:82963.FMA:0328827.FMA:52656.FMA:82961.FMA:11753.FMA:39147.FMA:45339.FMA:20605.FMA:20631.FMA:8898.FMA:6070.FMA:44892.FMA:16404.FMA:52942.FMA:6082.FMA:8861.FMA:82953.FMA:8808.FMA:8805.FMA:52994.FMA:65348.FMA:55173.FMA:7129.FMA:52674.FMA:44894.FMA:55159.FMA:65327.FMA:37320.FMA:6761.FMA:65349.FMA:11253.FMA:53507.FMA:11213.FMA:7307.FMA:6769.FMA:6759.FMA:55155.FMA:53675.FMA:53599.FMA:65282.FMA:53251.FMA:6731.FMA:11111.FMA:16497.FMA:8878.FMA:11211.FMA:65740.FMA:45367.FMA:53588.FMA:45365.UBERON:0011766.FMA:16502.FMA:6891.FMA:6091.FMA:11018.FMA:6090.FMA:292887.FMA:65401.FMA:65326.FMA:11215.FMA:44735.FMA:8735.FMA:53538.FMA:6849.FMA:53608.FMA:11217.FMA:8860.FMA:6134.FMA:6893.FMA:53534.FMA:45361.FMA:37321.FMA:82734.FMA:22112.FMA:7294.FMA:52987.FMA:65247.FMA:53535.FMA:6895.FMA:52787.FMA:53635.FMA:65920.FMA:55156.FMA:16498.FMA:53569.FMA:6739.FMA:8807.FMA:22110.FMA:81294.FMA:45450.FMA:8922.FMA:8725.FMA:20608.FMA:7308.FMA:65281.FMA:39084.FMA:78656.FMA:6133.FMA:53581.FMA:16494.FMA:53252.FMA:11789.FMA:45364.FMA:65345.FMA:44870.FMA:39083.FMA:45355.FMA:11193.FMA:16400.FMA:81287.FMA:52776.FMA:65747.FMA:8900.UBERON:0011767.FMA:45424.FMA:292830.FMA:44734.FMA:45381.FMA:82960.FMA:0328831.FMA:6689.FMA:7077.FMA:291236.FMA:8886.FMA:276381.FMA:6124.FMA:65336.FMA:65328.FMA:52670.FMA:53537.FMA:53636.FMA:6896.FMA:21879.FMA:8798.FMA:81288.FMA:53542.FMA:45368.FMA:53547.FMA:55157.FMA:65415.FMA:53309.FMA:65744.FMA:53367.FMA:53590.FMA:65923.FMA:53048.FMA:16499.FMA:53610.FMA:44951.FMA:44953.FMA:8832.FMA:45426.FMA:6114.FMA:52799.FMA:11039.FMA:53546.FMA:53589.FMA:8901.FMA:11681.FMA:52639.FMA:8905.FMA:52733.FMA:65992.FMA:52807.FMA:45435.FMA:53484.FMA:52975.FMA:7289.FMA:44905.FMA:37071.FMA:7130.FMA:65996.FMA:6132.FMA:8826.FMA:6741.FMA:11252.FMA:8917.FMA:82954.FMA:6832.FMA:37073.FMA:37074.FMA:44893.FMA:82959.FMA:20635.FMA:6093.FMA:65248.FMA:45362.FMA:52622.FMA:53508.FMA:11755.FMA:82958.FMA:52997.FMA:16501.FMA:65402.FMA:45427.FMA:52803.FMA:16402.FMA:8734.FMA:52784.FMA:45454.FMA:6736.FMA:7304.FMA:6742.FMA:52998.FMA:52804.FMA:11788.FMA:6713.FMA:52623.FMA:53536.FMA:11780.FMA:45334.FMA:52701.FMA:65998.FMA:11092.FMA:6684.FMA:52779.FMA:52778.FMA:78652.FMA:0328830.FMA:6733.FMA:44950.FMA:78653.FMA:45455.FMA:8864.FMA:8833.FMA:8876.FMA:8867.FMA:11752.FMA:53541.FMA:53611.FMA:8904.FMA:6745.FMA:21863.FMA:7297.FMA:52676.FMA:52798.FMA:8818.FMA:82735.FMA:52657.FMA:52786.FMA:6773.FMA:45253.FMA:6127.FMA:45263.FMA:8875.FMA:81295.FMA:11754.FMA:8812.FMA:45311.FMA:53568.FMA:276379.FMA:6842.FMA:8794.FMA:8820.FMA:53572.FMA:53409.FMA:37070.FMA:6119.FMA:53433.FMA:7123.FMA:8811.FMA:65444.FMA:52806.FMA:53245.FMA:65285.FMA:6768.FMA:8731.FMA:11220.FMA:6778.FMA:53509.FMA:55158.FMA:53567.FMA:65994.FMA:53539.FMA:45327.FMA:8865.FMA:44898.FMA:52673.FMA:80026.FMA:52980.FMA:53505.FMA:82952.FMA:21872.FMA:37065.FMA:52988.FMA:8815.FMA:53398.FMA:52729.FMA:81289.FMA:65398.FMA:52977.FMA:8887`.split(`.`),"subclass labels":`Left T9 white ramus communicans.Right T10 grey ramus communicans.Right T4 spinal nerve posterior ramus.Right fourth intercostal nerve.Right anterior interosseous nerve.Right perineal nerve.Left lateral calcaneal branch A of left sural nerve.Right C3 spinal nerve posterior ramus medial branch.Oesophageal branch of left recurrent laryngeal nerve.Anterior branch of lateral cutaneous branch of left third intercostal nerve.Left common plantar digital nerve F.Anterior cutaneous branch of right subcostal nerve.Left superior labial branch of infraorbital nerve.Left T1 spinal nerve posterior ramus.Anterior branch of left obturator nerve.Right T2 grey ramus communicans.Right T9 grey ramus communicans.Left T5 white ramus communicans.Left L3 spinal nerve posterior ramus lateral branch.Communicating branch of left vagus nerve with left glossopharyngeal nerve.Right second intercostal nerve.Right proper palmar digital nerve G.Left musculocutaneous nerve.Anterior cutaneous branch of left ninth intercostal nerve.Posterior branch of lateral cutaneous branch of left sixth intercostal nerve.Right proper palmar digital nerve H.Communicating branch of right vagus nerve with right glossopharyngeal nerve.Anterior branch of lateral cutaneous branch of right ninth intercostal nerve.Right proper plantar digital nerve C.Left genital branch of genitofemoral nerve.Left T6 grey ramus communicans.Right proper palmar digital nerve I.Right T12 spinal nerve posterior ramus.Right ilioinguinal nerve.Right T8 spinal nerve posterior ramus.Left T9 spinal nerve posterior ramus.Right T11 spinal nerve posterior ramus lateral branch.Right proper plantar digital nerve J.Right medial sural cutaneous nerve.Right T6 spinal nerve posterior ramus medial branch.Right lesser occipital nerve.Right phrenic nerve.Right proper palmar digital nerve E.Left median nerve.Right S3 grey ramus communicans.Right T4 white ramus communicans.Right medial cutaneous nerve of forearm.Right posterior femoral cutaneous nerve.Right vestibular nerve.Lateral cutaneous branch of left sixth intercostal nerve.Left supratrochlear nerve.Right median nerve.Anterior branch of right medial cutaneous nerve of forearm.Right T5 spinal nerve posterior ramus medial branch.Anterior cutaneous branch of right third intercostal nerve.Right C6 spinal nerve posterior ramus.Temporal branch of left facial nerve.Anterior cutaneous branch of left eighth intercostal nerve.Right buccal nerve.Right middle superior alveolar nerve.Temporal branch of right facial nerve.Left superficial branch of radial nerve.Left medial sural cutaneous nerve.Left C4 spinal nerve posterior ramus.Left lateral dorsal digital nerve of the third toe.Right T12 spinal nerve posterior ramus lateral branch.Anterior branch of lateral cutaneous branch of left eleventh intercostal nerve.Left T12 spinal nerve posterior ramus.Left anterior supraclavicular nerve.Left lesser occipital nerve.Right deep fibular nerve.Left T11 spinal nerve posterior ramus.Posterior branch of lateral cutaneous branch of left tenth intercostal nerve.Right anterior superior alveolar nerve.Left tenth intercostal nerve.Anterior branch of lateral cutaneous branch of right fourth intercostal nerve.Communicating branch of left glossopharyngeal nerve with auricular branch of left vagus nerve.Left iliohypogastric nerve.Cervical branch of left facial nerve.Right proper palmar digital nerve J.Lateral cutaneous branch of right sixth intercostal nerve.Right T8 white ramus communicans.Left maxillary nerve.Left intercostobrachial nerve.Left tentorial nerve.Right zygomaticotemporal nerve.Communicating branch of right internal laryngeal nerve with right recurrent laryngeal nerve.Left fourth intercostal nerve.Brachial plexus left C7 root.Vagal branch to right carotid body.Right proper plantar digital nerve G.Right tympanic nerve.Left lateral plantar nerve.Lateral cutaneous branch of left tenth intercostal nerve.Right tibial nerve.Left third occipital nerve.Anterior branch of lateral cutaneous branch of left tenth intercostal nerve.Right T8 spinal nerve posterior ramus lateral branch.Right S1 grey ramus communicans.Left L3 spinal nerve posterior ramus.Palmar cutaneous branch of left ulnar nerve.Right greater petrosal nerve.Left subcostal nerve.Anterior branch of left medial cutaneous nerve of forearm.Left proper plantar digital nerve C.Left C3 spinal nerve branch to left supraclavicular nerve.Right posterior cutaneous nerve of forearm.Posterior branch of lateral cutaneous branch of right tenth intercostal nerve.Right sciatic nerve.Left L5 grey ramus communicans.Right C4 spinal nerve posterior ramus medial branch.Right L4 grey ramus communicans.Left T11 white ramus communicans.Posterior branch of lateral cutaneous branch of right eighth intercostal nerve.Left L1 grey ramus communicans.Posterior branch of left medial cutaneous nerve of forearm.Left auriculotemporal nerve.Left L2 white ramus communicans.Marginal mandibular branch of right facial nerve.Right T8 grey ramus communicans.Right C4 spinal nerve posterior ramus.Right fifth intercostal nerve.Left common fibular nerve.Left posterior ethmoidal nerve.Pharyngeal branch of right glossopharyngeal nerve.Anterior branch of lateral cutaneous branch of right third intercostal nerve.Communicating branch of right external laryngeal nerve with right superior cardiac nerve.Right posterior supraclavicular nerve.Left medial dorsal cutaneous nerve.Lateral cutaneous branch of right eleventh intercostal nerve.Posterior branch of lateral cutaneous branch of left subcostal nerve.Anterior cutaneous branch of left second intercostal nerve.Left lingual nerve.Right lateral calcaneal branch A of right sural nerve.Left phrenic nerve.Right hypogastric nerve.Medial calcaneal branch A of left tibial nerve.Left perineal nerve.Right posterior scrotal nerve.Right inferior alveolar nerve.Medial calcaneal branch A of right tibial nerve.Right T7 white ramus communicans.Left frontal nerve.Right T1 spinal nerve posterior ramus medial branch.Right genitofemoral nerve.Zygomatic branch of right facial nerve.Lateral cutaneous branch of left ninth intercostal nerve.Left C2 spinal nerve branch to left great auricular nerve.Right anterior supraclavicular nerve.Lateral cutaneous branch of right fourth intercostal nerve.Left T11 grey ramus communicans.Lingual branch of right vagus nerve.Left T1 white ramus communicans.Left C3 spinal nerve posterior ramus medial branch.Left proper plantar digital nerve J.Left T2 grey ramus communicans.Brachial plexus left C6 root.Left T10 spinal nerve posterior ramus.Right genital branch of genitofemoral nerve.Anterior cutaneous branch of right first intercostal nerve.Left middle meningeal nerve.Anterior cutaneous branch of left eleventh intercostal nerve.Left infratrochlear nerve.Vagal branch to left carotid body.Anterior cutaneous branch of right eleventh intercostal nerve.Right proper palmar digital nerve B.Left proper palmar digital nerve H.Anterior branch of lateral cutaneous branch of left fourth intercostal nerve.Left seventh intercostal nerve.Right nasociliary nerve.Left posterior scrotal nerve.Left sural nerve.Right S5 grey ramus communicans.Brachial plexus right C7 root.Right inferior rectal nerve.Right transverse cervical nerve.Anterior cutaneous branch of left third intercostal nerve.Left proper plantar digital nerve H.Superficial branch of left ulnar nerve.Dorsal branch of left ulnar nerve.Right eleventh intercostal nerve.Right T2 white ramus communicans.Right common plantar digital nerve F.Infrapatellar branch of right saphenous nerve.Left T5 grey ramus communicans.Lingual branch of left vagus nerve.Thoracic cardiac branch of left vagus nerve.Right superior laryngeal nerve.Right C2 spinal nerve posterior ramus.Right zygomatic nerve.Right auriculotemporal nerve.Anterior branch of lateral cutaneous branch of left subcostal nerve.Left saphenous nerve.Right L3 spinal nerve posterior ramus.Right T7 grey ramus communicans.Left great auricular nerve posterior branch.Left proper palmar digital nerve A.Right infraorbital nerve.Cutaneous branch of right obturator nerve.Posterior branch of right obturator nerve.Left T1 grey ramus communicans.Right T12 white ramus communicans.Right proper plantar digital nerve F.Left posterior auricular nerve.Right posterior ethmoidal nerve.Buccal branch of right facial nerve.Right iliohypogastric nerve.Left dorsal nerve of penis.Right inferior lateral cutaneous nerve of arm.Left T7 spinal nerve posterior ramus lateral branch.Lateral cutaneous branch of left seventh intercostal nerve.Right posterior interosseous nerve.Left middle superior alveolar nerve.Right T9 white ramus communicans.Right T10 spinal nerve posterior ramus.Left deep fibular nerve.Hepatic branch of anterior vagal trunk.Left first intercostal nerve.Right L2 white ramus communicans.Buccal branch of left facial nerve.Right L5 grey ramus communicans.Right common fibular nerve.Left T6 spinal nerve posterior ramus medial branch.Right L2 grey ramus communicans.Right deep petrosal nerve.Left axillary nerve posterior branch.Right posterior auricular nerve.Anterior branch of lateral cutaneous branch of right subcostal nerve.Anterior branch of lateral cutaneous branch of right fifth intercostal nerve.Pyloric branch of greater posterior gastric nerve.Left T10 spinal nerve posterior ramus lateral branch.Superior cervical cardiac branch of right vagus nerve.Ganglionic branch of right maxillary nerve to pterygopalatine ganglion.Left proper palmar digital nerve C.Right superior cervical cardiac nerve.Right ninth intercostal nerve.Right lesser petrosal nerve.Communicating branch of left external laryngeal nerve with left superior cardiac nerve.Right long ciliary nerve B.Anterior cutaneous branch of right fourth intercostal nerve.Right third intercostal nerve.Left L4 grey ramus communicans.Right T7 spinal nerve posterior ramus.Left L2 spinal nerve posterior ramus lateral branch.Left proper palmar digital nerve F.Coeliac branch of posterior vagal trunk.Left lacrimal nerve.Right lacrimal nerve.Anterior cutaneous branch of right seventh intercostal nerve.Left femoral nerve.Right maxillary nerve.Lateral cutaneous branch of right third intercostal nerve.Right superficial fibular nerve.Left proper palmar digital nerve I.Anterior cutaneous branch of left seventh intercostal nerve.Left T12 spinal nerve posterior ramus lateral branch.Thoracic cardiac branch of right vagus nerve.Lateral cutaneous branch of left eighth intercostal nerve.Orbital branch of left maxillary nerve to left ethmoidal sinus.Left pudendal nerve.Left lesser petrosal nerve.Right eighth intercostal nerve.Left S5 grey ramus communicans.Right T10 white ramus communicans.Left T10 white ramus communicans.Left T4 white ramus communicans.Lateral cutaneous branch of left third intercostal nerve.Posterior branch of lateral cutaneous branch of left eighth intercostal nerve.Lateral cutaneous branch of right iliohypogastric nerve.Right supratrochlear nerve.Anterior branch of lateral cutaneous branch of right tenth intercostal nerve.Right C3 spinal nerve branch to right supraclavicular nerve.Right T6 grey ramus communicans.Left T5 spinal nerve posterior ramus medial branch.Left proper palmar digital nerve G.Left posterior superior alveolar nerve.Lateral cutaneous branch of left subcostal nerve.Gluteal branch A of right posterior femoral cutaneous nerve.Right T5 white ramus communicans.Left greater petrosal nerve.Left T3 spinal nerve posterior ramus.Right subcostal nerve.Right femoral branch of genitofemoral nerve.Right sixth intercostal nerve.Anterior cutaneous branch of right ninth intercostal nerve.Left T11 spinal nerve posterior ramus lateral branch.Left T7 grey ramus communicans.Posterior branch of lateral cutaneous branch of right subcostal nerve.Left L2 grey ramus communicans.Posterior branch of lateral cutaneous branch of right third intercostal nerve.Right L1 white ramus communicans.Anterior branch of right obturator nerve.Anterior cutaneous branch of left fifth intercostal nerve.Left T4 grey ramus communicans.Right C5 spinal nerve posterior ramus medial branch.Right T4 spinal nerve posterior ramus medial branch.Left L1 white ramus communicans.Anterior cutaneous branch of right eighth intercostal nerve.Left subclavian nerve.Pericardial branch of left phrenic nerve.Left tympanic nerve.Right zygomaticofacial nerve.Right intercostobrachial nerve.Right cochlear nerve.Left internal laryngeal nerve.Right lateral dorsal digital nerve of the third toe.Left proper palmar digital nerve D.Inferior cervical cardiac branch of left vagus nerve.Left proper plantar digital nerve B.Right S2 grey ramus communicans.Right proper plantar digital nerve H.Right tentorial nerve.Right T1 white ramus communicans.Inferior ramus of left internal laryngeal nerve.Right L3 grey ramus communicans.Right posterior superior alveolar nerve.Tonsillar branch of right glossopharyngeal nerve.Lateral cutaneous branch of right subcostal nerve.Right proper palmar digital nerve C.Right first intercostal nerve.Posterior branch of right medial cutaneous nerve of forearm.Right lingual nerve.Lateral cutaneous branch of right fifth intercostal nerve.Left T4 spinal nerve posterior ramus.Posterior branch of lateral cutaneous branch of left third intercostal nerve.Right posterior superior lateral nasal branch of maxillary nerve.Posterior branch of lateral cutaneous branch of right fifth intercostal nerve.Left buccal nerve.Right third occipital nerve.Left anterior ethmoidal nerve.Right lingual branch of glossopharyngeal nerve.Left laryngopharyngeal branch of superior cervical ganglion.Right infratrochlear nerve.Left external laryngeal nerve branch to pharyngeal plexus.Left T7 white ramus communicans.Left L1 spinal nerve posterior ramus.Right S4 grey ramus communicans.Left proper palmar digital nerve J.Left zygomatic nerve.Left L1 spinal nerve posterior ramus lateral branch.Left greater occipital nerve.Left medial cutaneous nerve of forearm.Brachial plexus left C8 root.Left anterior femoral cutaneous branch A.Posterior branch of lateral cutaneous branch of left seventh intercostal nerve.Left T1 spinal nerve posterior ramus medial branch.Left meningeal branch of mandibular nerve.Left medial dorsal digital nerve of the fourth toe.Left C5 spinal nerve posterior ramus.Pharyngeal branch of left glossopharyngeal nerve.Right medial plantar nerve.Left proper plantar digital nerve F.Left deep petrosal nerve.Right supraorbital nerve.Left proper plantar digital nerve E.Right T9 spinal nerve posterior ramus lateral branch.Left posterior cutaneous nerve of forearm.Left posterior femoral cutaneous nerve.Left hypogastric nerve.Left genitofemoral nerve.Anterior branch of lateral cutaneous branch of left ninth intercostal nerve.Right T1 spinal nerve posterior ramus.Right common palmar digital nerve A.Right L3 spinal nerve posterior ramus lateral branch.Left anterior superior alveolar nerve.Right T1 grey ramus communicans.Anterior cutaneous branch of left sixth intercostal nerve.Left proper plantar digital nerve A.Left T5 spinal nerve posterior ramus.Right T3 spinal nerve posterior ramus.Right superior labial branch of infraorbital nerve.Left proper palmar digital nerve E.Left transverse cervical nerve.Posterior branch of lateral cutaneous branch of right fourth intercostal nerve.Left communicating branch of nasociliary nerve with ciliary ganglion.Superficial branch of right ulnar nerve.Right great auricular nerve posterior branch.Palmar branch of right median nerve.Right ulnar nerve.Right T5 grey ramus communicans.Palmar cutaneous branch of right ulnar nerve.Left T2 spinal nerve posterior ramus medial branch.Tonsillar branch of left glossopharyngeal nerve.Lateral cutaneous branch of right eighth intercostal nerve.Posterior branch of lateral cutaneous branch of right eleventh intercostal nerve.Left T6 white ramus communicans.Right T4 grey ramus communicans.Branch of right vagus nerve to oesophageal nerve plexus.Superior cervical cardiac branch of left vagus nerve.Left long thoracic nerve.Right mental nerve.Left fifth intercostal nerve.Lateral cutaneous branch of left fourth intercostal nerve.Right lateral femoral cutaneous nerve.Posterior branch of lateral cutaneous branch of right seventh intercostal nerve.Lateral cutaneous branch of right seventh intercostal nerve.Left C4 spinal nerve posterior ramus medial branch.Right intermediate dorsal cutaneous nerve.Right medial dorsal cutaneous nerve.Left recurrent laryngeal nerve.Left obturator nerve.Left T8 grey ramus communicans.Right T2 spinal nerve posterior ramus.Right T3 spinal nerve posterior ramus medial branch.Left T2 spinal nerve posterior ramus.Right superficial branch of radial nerve.Right C3 spinal nerve branch to right great auricular nerve.Left anterior interosseous nerve.Lateral cutaneous branch of right ninth intercostal nerve.Left common plantar digital nerve E.Brachial plexus left C5 root.Left external laryngeal nerve.Left C3 spinal nerve posterior ramus.Oesophageal branch of right recurrent laryngeal nerve.Lateral cutaneous branch of right tenth intercostal nerve.Anterior cutaneous branch of right sixth intercostal nerve.Right T3 white ramus communicans.Left T9 grey ramus communicans.Auricular branch of right vagus nerve.Right lateral sural cutaneous nerve.Left ulnar nerve.Right long ciliary nerve A.Left sciatic nerve.Anterior branch of lateral cutaneous branch of left fifth intercostal nerve.Right inferior palpebral branch of infraorbital nerve.Right medial cutaneous nerve of arm.Auricular branch of left vagus nerve.Left T10 grey ramus communicans.Left medial posterior superior nasal nerve.Pharyngeal branch of right vagus nerve to pharyngeal nerve plexus.Left L3 grey ramus communicans.Left lateral femoral cutaneous nerve.Right external laryngeal nerve branch to pharyngeal plexus.Left eighth intercostal nerve.Right T5 spinal nerve posterior ramus.Left tibial nerve.Right superior lateral cutaneous nerve of arm.Right lateral plantar nerve.Anterior cutaneous branch of left first intercostal nerve.Brachial plexus right C8 root.Lateral cutaneous branch of left iliohypogastric nerve.Posterior branch of lateral cutaneous branch of left eleventh intercostal nerve.Right long thoracic nerve.Left lateral cutaneous nerve of forearm.Left posterior supraclavicular nerve.Left T3 grey ramus communicans.Left ilioinguinal nerve.Left mental nerve.Left T12 white ramus communicans.Left superficial fibular nerve.Right proper palmar digital nerve F.Right proper palmar digital nerve D.Right lateral cutaneous nerve of forearm.Gluteal branch A of left posterior femoral cutaneous nerve.Lateral cutaneous branch of left fifth intercostal nerve.Right L1 spinal nerve posterior ramus lateral branch.Right axillary nerve anterior branch.Orbital branch of right maxillary nerve to right ethmoidal sinus.Right C6 spinal nerve posterior ramus medial branch.Posterior branch of lateral cutaneous branch of right ninth intercostal nerve.Right recurrent laryngeal nerve.Right sural nerve.Dorsal branch of right ulnar nerve.Right common plantar digital nerve E.Right medial dorsal digital nerve of the fourth toe.Right proper plantar digital nerve E.Left caroticotympanic nerve.Greater posterior gastric nerve.Right L1 spinal nerve posterior ramus.Pericardial branch of right phrenic nerve.Anterior branch of lateral cutaneous branch of right eighth intercostal nerve.Left incisive branch of inferior alveolar nerve.Right T3 grey ramus communicans.Left posterior interosseous nerve.Palmar branch of left median nerve.Left nasociliary nerve.Right external laryngeal nerve.Pharyngeal branch of left vagus nerve to pharyngeal nerve plexus.Right T11 grey ramus communicans.Right dorsal nerve of penis.Left C6 spinal nerve posterior ramus.Left axillary nerve anterior branch.Meningeal branch of left vagus nerve.Left intermediate dorsal cutaneous nerve.Right laryngopharyngeal branch of superior cervical ganglion.Right great auricular nerve anterior branch.Zygomatic branch of left facial nerve.Left C5 spinal nerve posterior ramus medial branch.Marginal mandibular branch of left facial nerve.Right L1 grey ramus communicans.Right meningeal branch of mandibular nerve.Right femoral nerve.Tracheal branch of right recurrent laryngeal nerve.Left posterior cutaneous nerve of arm.Left inferior lateral cutaneous nerve of arm.Right L2 spinal nerve posterior ramus.Right lateral dorsal cutaneous nerve.Anterior cutaneous branch of right second intercostal nerve.Left nasopalatine nerve.Left T3 spinal nerve posterior ramus medial branch.Left superior cervical cardiac nerve.Posterior branch of lateral cutaneous branch of left ninth intercostal nerve.Right T7 spinal nerve posterior ramus lateral branch.Right frontal nerve.Anterior cutaneous branch of left tenth intercostal nerve.Ganglionic branch of left maxillary nerve to pterygopalatine ganglion.Left S1 grey ramus communicans.Left lesser palatine nerve.Left medial plantar nerve.Communicating branch of right glossopharyngeal nerve with auricular branch of right vagus nerve.Left zygomaticotemporal nerve.Anterior cutaneous branch of right fifth intercostal nerve.Left proper palmar digital nerve B.Left radial nerve.Posterior branch of lateral cutaneous branch of left fourth intercostal nerve.Left S3 grey ramus communicans.Left T3 white ramus communicans.Right T11 spinal nerve posterior ramus.Left ninth intercostal nerve.Right T2 spinal nerve posterior ramus medial branch.Anterior cutaneous branch of left subcostal nerve.Right proper plantar digital nerve B.Left C2 spinal nerve posterior ramus.Right axillary nerve.Left axillary nerve.Left common palmar digital nerve A.Left proper plantar digital nerve D.Left femoral branch of genitofemoral nerve.Left second intercostal nerve.Left medial cutaneous nerve of arm.Left lateral sural cutaneous nerve.Right ophthalmic nerve.Right carotid sinus nerve.Right T10 spinal nerve posterior ramus lateral branch.Right proper plantar digital nerve D.Right mandibular nerve.Right obturator nerve.Left C3 spinal nerve branch to left great auricular nerve.Left lateral dorsal cutaneous nerve.Right greater palatine nerve.Right L2 spinal nerve posterior ramus lateral branch.Brachial plexus right C5 root.Left posterior superior lateral nasal branch of maxillary nerve.Right proper plantar digital nerve I.Right seventh intercostal nerve.Anterior branch of lateral cutaneous branch of right eleventh intercostal nerve.Right tenth intercostal nerve.Left mandibular nerve.Left greater palatine nerve.Left T12 grey ramus communicans.Inferior cervical cardiac branch of right vagus nerve.Left ophthalmic nerve.Left superior laryngeal nerve.Right T12 grey ramus communicans.Cutaneous branch of left obturator nerve.Left long ciliary nerve B.Left S4 grey ramus communicans.Left T4 spinal nerve posterior ramus medial branch.Greater anterior gastric nerve.Orbital branch of left maxillary nerve to left sphenoidal sinus.Orbital branch of right maxillary nerve to right sphenoidal sinus.Right middle supraclavicular nerve.Right caroticotympanic nerve.Left sixth intercostal nerve.Right posterior cutaneous nerve of arm.Left middle supraclavicular nerve.Left proper plantar digital nerve I.Anterior branch of lateral cutaneous branch of right sixth intercostal nerve.Left L2 spinal nerve posterior ramus.Anterior branch of lateral cutaneous branch of left seventh intercostal nerve.Posterior branch of lateral cutaneous branch of right sixth intercostal nerve.Left T8 spinal nerve posterior ramus lateral branch.Meningeal branch of right vagus nerve.Tracheal branch of left recurrent laryngeal nerve.Anterior cutaneous branch of right tenth intercostal nerve.Left eleventh intercostal nerve.Right pudendal nerve.Posterior branch of lateral cutaneous branch of left fifth intercostal nerve.Right anterior ethmoidal nerve.Right nasopalatine nerve.Left T8 spinal nerve posterior ramus.Left long ciliary nerve A.Left supraorbital nerve.Right medial posterior superior nasal nerve.Left T8 white ramus communicans.Right anterior femoral cutaneous branch A.Left T2 white ramus communicans.Right saphenous nerve.Anterior branch of lateral cutaneous branch of right seventh intercostal nerve.Left superior lateral cutaneous nerve of arm.Left T9 spinal nerve posterior ramus lateral branch.Left T6 spinal nerve posterior ramus.Posterior branch of left obturator nerve.Left external laryngeal nerve branch to inferior pharyngeal constrictor.Right incisive branch of inferior alveolar nerve.Right C3 spinal nerve posterior ramus.Right C5 spinal nerve posterior ramus.Right T9 spinal nerve posterior ramus.Communicating branch of left internal laryngeal nerve with left recurrent laryngeal nerve.Left vestibular nerve.Right radial nerve.Left third intercostal nerve.Left cochlear nerve.Anterior cutaneous branch of left fourth intercostal nerve.Right T6 spinal nerve posterior ramus.Right greater occipital nerve.Right lesser palatine nerve.Left inferior alveolar nerve.Right subclavian nerve.Right T6 white ramus communicans.Brachial plexus right C6 root.Lateral cutaneous branch of left eleventh intercostal nerve.Right T11 white ramus communicans.Left carotid sinus nerve.Left great auricular nerve anterior branch.Right external laryngeal nerve branch to inferior pharyngeal constrictor.Left S2 grey ramus communicans.Right internal laryngeal nerve.Infrapatellar branch of left saphenous nerve.Anterior branch of lateral cutaneous branch of left sixth intercostal nerve.Right proper palmar digital nerve A.Right communicating branch of nasociliary nerve with ciliary ganglion.Left proper plantar digital nerve G.Left infraorbital nerve.Left lingual branch of glossopharyngeal nerve.Right proper plantar digital nerve A.Left inferior rectal nerve.Right musculocutaneous nerve.Left inferior palpebral branch of infraorbital nerve.Left T7 spinal nerve posterior ramus.Cervical branch of right facial nerve.Right middle meningeal nerve.Right axillary nerve posterior branch.Right C2 spinal nerve branch to right great auricular nerve.Left zygomaticofacial nerve.Anterior branch of lateral cutaneous branch of left eighth intercostal nerve`.split(`.`)},{id:77,nerve_id:`UBERON:0001647`,label:`facial nerve`,"FMA subclasses (in human nerves)":[`FMA:50888`,`FMA:50889`],"subclass labels":[`Right facial nerve`,`Left facial nerve`]},{id:78,nerve_id:`UBERON:0001148`,label:`median nerve`,"FMA subclasses (in human nerves)":[`FMA:37067`,`FMA:37068`],"subclass labels":[`Right median nerve`,`Left median nerve`]},{id:79,nerve_id:`UBERON:0009009`,label:`carotid sinus nerve`,"FMA subclasses (in human nerves)":[`FMA:53508`,`FMA:53509`],"subclass labels":[`Right carotid sinus nerve`,`Left carotid sinus nerve`]},{id:80,nerve_id:`UBERON:0003715`,label:`splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6924`,`FMA:6928`,`FMA:6929`,`FMA:6931`,`FMA:6930`,`FMA:6960`,`FMA:6958`,`FMA:6959`,`FMA:6925`,`FMA:6956`,`FMA:6927`,`FMA:6955`,`FMA:6926`,`FMA:6957`],"subclass labels":[`Right first lumbar splanchnic nerve`,`Right third lumbar splanchnic nerve`,`Left third lumbar splanchnic nerve`,`Left fourth lumbar splanchnic nerve`,`Right fourth lumbar splanchnic nerve`,`Left least splanchnic nerve`,`Left lesser splanchnic nerve`,`Right least splanchnic nerve`,`Left first lumbar splanchnic nerve`,`Right greater splanchnic nerve`,`Left second lumbar splanchnic nerve`,`Left greater splanchnic nerve`,`Right second lumbar splanchnic nerve`,`Right lesser splanchnic nerve`]},{id:81,nerve_id:`ILX:0793826`,label:`anterior abdominal vagal trunk`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:82,nerve_id:`UBERON:0001650`,label:`hypoglossal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:83,nerve_id:`ILX:0794967`,label:`posterior interosseous nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:84,nerve_id:`ILX:0793713`,label:`Deep petrosal nerve`,"FMA subclasses (in human nerves)":[`FMA:0328827`,`FMA:0328826`],"subclass labels":[`Left deep petrosal nerve`,`Right deep petrosal nerve`]},{id:85,nerve_id:`ILX:0793361`,label:`white communicating ramus of third lumbar spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:86,nerve_id:`ILX:0787562`,label:`gray communicating ramus of the third thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6133`,`FMA:6124`],"subclass labels":[`Left T3 grey ramus communicans`,`Right T3 grey ramus communicans`]},{id:87,nerve_id:`ILX:0793211`,label:`white communicating ramus of fifth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:88,nerve_id:`UBERON:0018679`,label:`thoracic splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6958`,`FMA:6960`,`FMA:6955`,`FMA:6959`,`FMA:6957`,`FMA:6956`],"subclass labels":[`Left lesser splanchnic nerve`,`Left least splanchnic nerve`,`Left greater splanchnic nerve`,`Right least splanchnic nerve`,`Right lesser splanchnic nerve`,`Right greater splanchnic nerve`]},{id:89,nerve_id:`ILX:0731969`,label:`least splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6960`,`FMA:6959`],"subclass labels":[`Left least splanchnic nerve`,`Right least splanchnic nerve`]},{id:90,nerve_id:`ILX:0788771`,label:`gray communicating ramus of seventh thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6888`,`FMA:6889`],"subclass labels":[`Right T7 grey ramus communicans`,`Left T7 grey ramus communicans`]},{id:91,nerve_id:`UBERON:0022301`,label:`long ciliary nerve`,"FMA subclasses (in human nerves)":[`FMA:52701`,`FMA:52700`,`FMA:82734`,`FMA:82735`],"subclass labels":[`Left long ciliary nerve B`,`Right long ciliary nerve B`,`Right long ciliary nerve A`,`Left long ciliary nerve A`]},{id:92,nerve_id:`ILX:0793221`,label:`white communicating ramus of second lumbar spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:93,nerve_id:`ILX:0785825`,label:`gray communicating ramus of first lumbar nerve`,"FMA subclasses (in human nerves)":[`FMA:65924`,`FMA:65923`],"subclass labels":[`Left L1 grey ramus communicans`,`Right L1 grey ramus communicans`]},{id:94,nerve_id:`ILX:0793208`,label:`white communicating ramus of second thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:95,nerve_id:`UBERON:0018412`,label:`vidian nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:96,nerve_id:`ILX:0739303`,label:`gray communicating ramus of second thoracic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:97,nerve_id:`ILX:0795006`,label:`Suboccipital nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:98,nerve_id:`ILX:0785733`,label:`gray communicating ramus of second lumbar nerve`,"FMA subclasses (in human nerves)":[`FMA:65921`,`FMA:65922`],"subclass labels":[`Right L2 grey ramus communicans`,`Left L2 grey ramus communicans`]},{id:99,nerve_id:`UBERON:0035207`,label:`deep fibular nerve`,"FMA subclasses (in human nerves)":[`FMA:45387`,`FMA:45388`],"subclass labels":[`Right deep fibular nerve`,`Left deep fibular nerve`]},{id:100,nerve_id:`ILX:0739304`,label:`gray communicating ramus of third thoracic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:101,nerve_id:`UBERON:0002019`,label:`accessory XI nerve`,"FMA subclasses (in human nerves)":[`FMA:50899`,`FMA:50897`],"subclass labels":[`Left accessory nerve`,`Right accessory nerve`]},{id:102,nerve_id:`ILX:0793217`,label:`white communicating ramus of eleventh thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:103,nerve_id:`ILX:0793722`,label:`Lesser petrosal nerve`,"FMA subclasses (in human nerves)":[`FMA:53503`,`FMA:53502`],"subclass labels":[`Left lesser petrosal nerve`,`Right lesser petrosal nerve`]},{id:104,nerve_id:`UBERON:0018675`,label:`pelvic splanchnic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:105,nerve_id:`ILX:0793702`,label:`Greater petrosal nerve`,"FMA subclasses (in human nerves)":[`FMA:53423`,`FMA:53424`],"subclass labels":[`Right greater petrosal nerve`,`Left greater petrosal nerve`]},{id:106,nerve_id:`ILX:0794916`,label:`white ramus communicans`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:107,nerve_id:`UBERON:0003716`,label:`Recurrent Laryngeal Nerve`,"FMA subclasses (in human nerves)":[`UBERON:0011766`,`UBERON:0011767`],"subclass labels":[`Left recurrent laryngeal nerve`,`Right recurrent laryngeal nerve`]},{id:108,nerve_id:`UBERON:0005465`,label:`obturator nerve`,"FMA subclasses (in human nerves)":[`FMA:16501`,`FMA:16502`],"subclass labels":[`Right obturator nerve`,`Left obturator nerve`]},{id:109,nerve_id:`ILX:0793213`,label:`white communicating ramus of seventh thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:110,nerve_id:`ILX:0785067`,label:`gray communicating ramus of eleventh thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6897`,`FMA:6896`],"subclass labels":[`Left T11 grey ramus communicans`,`Right T11 grey ramus communicans`]},{id:111,nerve_id:`UBERON:0001494`,label:`ulnar nerve`,"FMA subclasses (in human nerves)":[`FMA:37320`,`FMA:37321`],"subclass labels":[`Right ulnar nerve`,`Left ulnar nerve`]},{id:112,nerve_id:`ILX:0794959`,label:`posterior rami lower cervical nerves`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:113,nerve_id:`UBERON:0001493`,label:`axillary nerve`,"FMA subclasses (in human nerves)":[`FMA:37074`,`FMA:37073`],"subclass labels":[`Left axillary nerve`,`Right axillary nerve`]},{id:114,nerve_id:`ILX:0787946`,label:`gray communicating ramus of sixth thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6762`,`FMA:6763`],"subclass labels":[`Right T6 grey ramus communicans`,`Left T6 grey ramus communicans`]},{id:115,nerve_id:`ILX:0785542`,label:`gray communicating ramus of ninth thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6892`,`FMA:6893`],"subclass labels":[`Right T9 grey ramus communicans`,`Left T9 grey ramus communicans`]}],MK=()=>{let e={};return jK.forEach(t=>{let n=t.nerve_id,r=t.label.toLowerCase(),i=t[`subclass labels`];if(n&&r!==`nerve`){if(!i.length)return;n in e||(e[n]={});let t=i.map(e=>e.toLowerCase()).sort();e[n]={nerve:r,subNerves:t}}}),e},NK=()=>{let e=[],t={key:`scaffold.connectivity.nerve`,label:`Nerves`,children:[]},n=[];for(let e of jK){if(e.label===`nerve`)continue;let t={facetPropPath:`scaffold.connectivity.nerve`,label:``,children:[]},r=[];for(let[n,i]of Object.entries(e))if(n===`label`&&(t.label=i),n===`subclass labels`)for(let e of i)r.push({facetPropPath:`scaffold.connectivity.subnerve`,label:e});r.length&&(t.children=r.sort((e,t)=>e.label.localeCompare(t.label)),n.push(t))}return n.length&&(t.children=n.sort((e,t)=>e.label.localeCompare(t.label)),e.push(t)),e}}));function PK(e){return e[0].toUpperCase()+e.substring(1)}var FK,IK=_((()=>{mW(),aK(),_d(),pK(),_K(),gW(),hd(),dW(),QSe(),rK(),$Se(),eK(),FK={emits:[`flatmap-provenance-ready`,`resource-selected`,`species-changed`,`viewer-ready`],props:{entry:Object,visible:{type:Boolean,default:!0},mouseHovered:{type:Boolean,default:!1}},inject:{showGlobalSettings:{default:!0},showOpenMapButton:{default:!0},showLongLabel:{default:!0},truncateLongLabel:{default:!0},showIdInTooltip:{default:!0}},computed:{...(0,n.mapStores)(iK,gd,fK,gK),idNamePair(){return this.splitFlowStore.idNamePair},useHelpModeDialog(){return this.settingsStore.useHelpModeDialog},connectivityInfoSidebar(){return this.settingsStore.connectivityInfoSidebar},annotationSidebar(){return this.settingsStore.annotationSidebar},showLocalSettings(){return!this.showGlobalSettings}},beforeUnmount:function(){this.alive=!1,window.removeEventListener(`mousedown`,this.checkEndHelpMouseDown),clearTimeout(this.highlightDelay)},mounted:function(){this.$refs.multiflatmap&&(this.multiflatmapRef=(0,t.markRaw)(this.$refs.multiflatmap)),this.$refs.flatmap&&(this.flatmapRef=(0,t.markRaw)(this.$refs.flatmap)),this.$refs.iframe&&(this.iframeRef=(0,t.markRaw)(this.$refs.iframe)),this.$refs.plot&&(this.plotRef=(0,t.markRaw)(this.$refs.plot)),this.$refs.simulation&&(this.simulationRef=(0,t.markRaw)(this.$refs.simulation)),(this.iframeRef||this.plotRef||this.simulationRef)&&this.loadExplorerConfig(),this.connectivityKnowledge=this.connectivitiesStore.globalConnectivities,this.connectivityFilterOptions=this.connectivitiesStore.filterOptions,this.connectivityFilterSources=this.connectivitiesStore.filterSources},methods:{toggleMinimap:function(e,t){if(this.multiflatmapRef&&this.flatmapIsReady()){let n=this.multiflatmapRef.getCurrentFlatmap(),r=n?.mapImp;if(r){if(e===!0){if(t===!1){let e=r.options?.minimap||{position:`top-right`};r.createMinimap(e),n.addResizeButtonToMinimap(),n.minimapSmall=!1}}else r.closeMinimap()}}},onConnectivityItemClose(){if(this?.alive){if(this.multiflatmapRef&&this.flatmapIsReady()){let e=this.multiflatmapRef.getCurrentFlatmap();e&&e.closeTooltip()}this.flatmapRef&&this.flatmapRef.closeTooltip()}},getState:function(){},getScreenshotSources:async function(e){let t=this.getFlatmapImp?.()?.map;return t?[await md(t,e)]:[]},openMap:function(e){fW.emit(`OpenNewMap`,e),this.trackOpenMap(`open_new_${e}_map`)},onMapmanagerLoaded:function(e){this.settingsStore.updateMapManager(e)},trackOpenMap:function(e){hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_open_map`,category:e,location:`open_new_map`})},updateEntryLabel:function(e){e&&this.entriesStore.updateLabelForEntry(this.entry,e)},updateEntryTitle:function(e){e&&this.entriesStore.updateTitleForEntry(this.entry,e)},updateWithViewUrl:function(){},search:function(){return!1},searchSuggestions:function(){},resourceSelected:function(e,t){let n=t[0];if(this.resourceHasAction(n)){fW.emit(`PopoverActionClick`,n);return}let r,i=!1,a={paneIndex:this.entry.id,type:e,resource:t,internalName:void 0,eventType:void 0};if(e==`MultiFlatmap`||e==`Flatmap`){if(a.internalName=n?.feature?.label?n.feature.label:this.idNamePair[n.feature.models],n.eventType==`click`){if(a.eventType=`selected`,n.feature.type==`marker`){let t=a.internalName;if(this.settingsStore.isFeaturedMarkerIdentifier(n.feature.id))r={type:`Search`,term:this.settingsStore.featuredMarkerDoi(n.feature.id),featuredDataset:!0};else{r={type:`Facet`,facets:[t]};let e=new Set;if(n.feature[`dataset-terms`].forEach(t=>{e.add(t.label?t.label:t.term)}),e.size===0&&e.add(t),r.facets=[...e],this.settingsStore.hasAppliedFacets(e)&&this.settingsStore.appliedFacets.length<=e.size)return;if(this.settingsStore.appliedFacets.length){if(!this.settingsStore.hasAppliedFacets(e)){let t=[...new Set([...this.settingsStore.appliedFacets,...e])];this.settingsStore.updateAppliedFacets(t)}}else e.size>1&&(r.type=`Facets`),this.settingsStore.updateAppliedFacets(r.facets)}i=!0,e==`MultiFlatmap`&&this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults()}}else n.eventType==`mouseenter`&&(a.eventType=`highlighted`,i=!0)}else e==`Scaffold`&&(n&&((n.data?.id===void 0||n.data?.id===``)&&(n.data.id=n.data?.group),a.internalName=n.data.id,n.data.lastActionOnMarker===!0&&(r={type:`Facet`,facets:[PK(n.data.id)]})),a.eventType=`selected`,i=!0);r&&fW.emit(`PopoverActionClick`,r),i&&this.$emit(`resource-selected`,a)},resourceHasAction:function(e){return e&&(e.type===`URL`||e.type===`Search`||e.type===`Neuron Search`||e.type==`Facet`||e.type==`Facets`)},getDatasetAnatomyInfo:function(e){fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${e}`).then(e=>e.json()).then(t=>{let n=t.result[0],r;try{r=n.anatomy.organ[0].curie}catch{r=void 0}let i;try{i=n.item.curie}catch{i=void 0}let a;try{let e=0,t=!1;for(;!t&&e<n.organisms.subject.length;){let r=n.organisms.subject[e];r.species&&(a=r.species.name,t=!0),e+=1}}catch{a=void 0}this.settingsStore.updateFeaturedMarker({identifier:e,marker:r,doi:i,species:a})})},oldFeaturedDatasetApiHasInfo:async function(){let e=await(await fetch(`${this.apiLocation}get_featured_datasets_identifiers`)).json();return!e.identifiers||e.identifiers.length==0?!1:e.identifiers},newFeaturedDatasetApiHasInfo:async function(){let e=await(await fetch(`${this.apiLocation}get_featured_dataset`)).json();return!e.datasets||e.datasets.length==0?!1:e.datasets.map(e=>e.id)},flatmapResourceSelected:function(e,t){this.resourceSelected(e,t);let{eventType:n,feature:r}=t[0],{viewingMode:i}=this.settingsStore.globalSettings;if(n===`click`&&r.type===`feature`&&r.models?.startsWith(`ilxtr:`)){let n=[];t.forEach(e=>{let{models:t}=e.feature;n.push(t)}),hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_connectivity`,category:n.join(`, `),location:e+` `+i})}},getFeaturedDatasets:async function(){let e=[],t=await this.oldFeaturedDatasetApiHasInfo();if(t)e=t;else{let t=await this.newFeaturedDatasetApiHasInfo();t&&(e=t)}this.settingsStore.updateFeatured(e),e.forEach(e=>{this.getDatasetAnatomyInfo(e)})},flatmapMarkerUpdate(){},onResize:function(){},updateViewerSettings:function(){},startHelp:function(){this?.alive&&this.isInHelp===!1&&(this.helpMode=!0,window.addEventListener(`mousedown`,this.checkEndHelpMouseDown),this.isInHelp=!0)},endHelp:function(){window.removeEventListener(`mousedown`,this.checkEndHelpMouseDown),this.helpMode=!1,setTimeout(()=>{this.isInHelp=!1},200)},onHelpModeShowNext:function(){this.helpModeActiveItem+=1},onHelpModeLastItem:function(e){e&&(this.helpModeLastItem=!0)},onFinishHelpMode:function(){this.helpMode=!1,this.helpModeActiveItem=0,this.helpModeLastItem=!1},onTooltipShown:function(){this.$refs.multiflatmap&&this.$refs.multiflatmapHelp&&this.$refs.multiflatmapHelp.toggleTooltipHighlight(),this.$refs.flatmap&&this.$refs.flatmapHelp&&this.$refs.flatmapHelp.toggleTooltipHighlight(),this.$refs.scaffold&&this.$refs.scaffoldHelp&&this.$refs.scaffoldHelp.toggleTooltipHighlight()},onMapTooltipShown:function(){this.$refs.multiflatmap&&this.$refs.multiflatmapHelp&&this.$refs.multiflatmapHelp.toggleTooltipPinHighlight(),this.$refs.flatmap&&this.$refs.flatmapHelp&&this.$refs.flatmapHelp.toggleTooltipPinHighlight(),this.$refs.scaffold&&this.$refs.scaffoldHelp&&this.$refs.scaffoldHelp.toggleTooltipPinHighlight()},checkEndHelpMouseDown:function(e){e.target.closest(`.help-mode-dialog`)||this.endHelp()},flatmapHighlight:async function(e,t,n,r){let i=[...t,...r],a=this.settingsStore.globalSettings;if(a.highlightConnectedPaths){let n=t.length?t:r.length?r:[],a=await e.retrieveConnectedPaths(n);a&&i.push(...a)}if(a.highlightDOIPaths){let t=await e.searchConnectivitiesByReference(n);t&&i.push(...t)}return i=[...new Set(i)],i},sidebarHoverHighlight:function(e){if(this.visible&&((this.flatmapRef||this.multiflatmapRef)&&this.flatmapReady||this.scaffoldRef&&this.scaffoldLoaded)){let t=this.settingsStore.hoverAnatomies,n=this.settingsStore.hoverOrgans,r=this.settingsStore.hoverDOI,i=this.settingsStore.hoverConnectivity,a=null,o=null;this.flatmapRef&&(a=this.flatmapRef),this.multiflatmapRef&&(a=this.multiflatmapRef.getCurrentFlatmap()),this.scaffoldRef&&(o=this.scaffoldRef),clearTimeout(this.highlightDelay),!t.length&&!n.length&&!r&&!i.length&&((this.multiflatmapRef||this.flatmapRef)&&a?a.mapImp&&!a.mapImp.contextLost&&(a.mapImp?.clearSearchResults(),e.connectivityProcessed&&a.mapImp?.setPaint({dimmed:!0})):this.scaffoldRef&&o&&o.changeHighlightedByName(n,``,!1)),this.highlightDelay=setTimeout(()=>{(t.length||n.length||r||i.length)&&((this.multiflatmapRef||this.flatmapRef)&&a?this.flatmapHighlight(a,t,r,i).then(e=>{try{a.showConnectivityTooltips({connectivityInfo:{featureId:e},data:[]})}catch(t){if(console.log(t),i.length&&a.mapImp){let t=a.mapImp.uuid;e.every(e=>this.connectivityKnowledge[t].some(t=>t.id===e))||a.mapImp&&!a.mapImp.contextLost&&a.mapImp.clearSearchResults()}}}):this.scaffoldRef&&o&&o.changeHighlightedByName(n,``,!1))},100)}},onAnnotationOpen:function(e){fW.emit(`annotation-open`,e)},onAnnotationClose:function(){fW.emit(`sidebar-annotation-close`)},updateOfflineAnnotationEnabled:function(e){fW.emit(`update-offline-annotation-enabled`,e)},onConnectivityInfoOpen:function(e){fW.emit(`connectivity-info-open`,e)},onConnectivityError:function(e){fW.emit(`connectivity-error`,e)},onConnectivityInfoClose:function(){fW.emit(`connectivity-info-close`)},onSidebarAnnotationClose:function(){},onNeuronConnectionFeatureClick:function(e){fW.emit(`neuron-connection-feature-click`,e)},showConnectivity:function(){},showConnectivityTooltips:function(){},setVisibilityFilter:function(){},loadExplorerConfig:async function(){this.flatmapService=(0,t.markRaw)(await this.mockUpFlatmapService()),this.loadConnectivityExplorerConfig(this.flatmapService)},mockUpFlatmapService:async function(){let e=await VG(this.flatmapAPI,`human-flatmap_male`),n=e.uuid,r=e.sckan[`knowledge-source`],i=await HG(this.flatmapAPI,n);this.flatmapQueries=(0,t.markRaw)(new AK),this.flatmapQueries.initialise(this.flatmapAPI);let a={mapMetadata:{uuid:n,connectivity:{...e.sckan}},pathways:i,resource:this.entry.resource,knowledgeSource:r,queryKnowledge:async e=>{let t=[r,e],n=await this.flatmapQueries.queryKnowledge(`select knowledge from knowledge where (source=? or source is null) and entity=? order by source desc`,t);return JSON.parse(n)},queryLabels:async e=>{let t=`select source, entity, knowledge from knowledge where (source=? or source is null) and entity in (?${`, ?`.repeat(e.length-1)}) order by entity, source desc`,n=[r,...e],i=await this.flatmapQueries.queryKnowledge(t,n),a=[],o;for(let e of i)if(e[1]!==o){let t=JSON.parse(e[2]);a.push({entity:e[1],label:t.label||e[1]}),o=e[1]}return a}},o=NK();return{mockup:!0,getFilterOptions:async(e,t)=>{let n=await pye(this.flatmapAPI,e,t,void 0);return[...o,...n]},getTermNerveMaps:MK,mapImp:a}},loadConnectivityExplorerConfig:async function(e){let n=e.mapImp,r=tK(n),i=e.mockup?n.resource:n.uuid,a=[];if(!this.connectivityKnowledge[r]){this.flatmapQueries=(0,t.markRaw)(new AK),this.flatmapQueries.initialise(this.flatmapAPI);let e=await LSe(n,this.flatmapQueries);this.connectivityKnowledge[r]=e.filter(e=>e.connectivity?.length).sort((e,t)=>e.label.localeCompare(t.label))}if(!this.connectivityKnowledge[i]){let e=n.pathways?.paths||{};this.connectivityKnowledge[i]=this.connectivityKnowledge[r].filter(t=>t.id in e)}if(!this.connectivityFilterOptions[i]&&!e.mockup&&(this.connectivityFilterOptions[i]=await e.getFilterOptions(n,this.connectivityKnowledge[i])),e.mockup){let t=e.getTermNerveMaps()||{},r=JSON.parse(JSON.stringify(this.connectivityKnowledge[i]));this.connectivityKnowledge[i]=r.map(e=>{let n=e;if(e.nerves?.length){let r=e.nerves.flat(1/0).reduce((e,n)=>(n in t&&e.push(t[n]),e),[]);r?.length&&(a.push(...r),n[`nerve-label`]=r.sort((e,t)=>e.nerve.localeCompare(t.nerve)))}return n}).filter(e=>e[`nerve-label`]),this.connectivityFilterOptions[i]||(this.connectivityFilterOptions[i]=await e.getFilterOptions(n,this.connectivityKnowledge[i])),a=a.map(e=>e.nerve.toLowerCase());let o=JSON.parse(JSON.stringify(this.connectivityFilterOptions[i]));this.connectivityFilterOptions[i]=o.map(e=>{if(e.key===`scaffold.connectivity.nerve`){let t=e.children.filter(e=>a.includes(e.label.toLowerCase()));return{...e,children:t}}return e})}else this.connectivityFilterSources[i]||(this.connectivityFilterSources[i]=e.getFilterSources()),this.connectivitiesStore.updateFilterSources(this.connectivityFilterSources);this.connectivitiesStore.updateFilterOptions(this.connectivityFilterOptions),this.connectivitiesStore.updateGlobalConnectivities(this.connectivityKnowledge),fW.emit(`species-layout-connectivity-update`)},knowledgeTooltipQuery:async function(e){await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(this.flatmapService.mapImp,{resource:[e.id]});let t=await this.flatmapQueries.createTooltipData(this.flatmapService.mapImp,{resource:[e.id],label:e.label,provenanceTaxonomy:e.taxons,feature:[]});return t.knowledgeSource=tK(this.flatmapService.mapImp),t.mapId=this.flatmapService.mapImp.mapMetadata.id,t.mapuuid=this.flatmapService.mapImp.mapMetadata.uuid,t[`nerve-label`]=e[`nerve-label`],t.ready=!0,t},getKnowledgeTooltip:async function(e){this.tooltipEntry=[],e.data.forEach(e=>this.tooltipEntry.push({title:e.label,featureId:[e.id],ready:!1})),fW.emit(`connectivity-info-open`,this.tooltipEntry);let t=[];for(let n=0;n<e.data.length;n++)t.push(await this.knowledgeTooltipQuery(e.data[n]));this.tooltipEntry=await Promise.all(t),this.tooltipEntry.map(e=>e.featureId[0]).length>0&&fW.emit(`connectivity-info-open`,this.tooltipEntry)},changeConnectivitySource:async function(e,t){let{entry:n,connectivitySource:r}=e,i=this?.flatmapService?.mapImp?.mapMetadata.uuid;t.includes(i)||(t.push(i),await this.flatmapQueries.queryForConnectivityNew(this.flatmapService.mapImp,n.featureId[0],r),this.tooltipEntry=this.tooltipEntry.map(e=>e.featureId[0]===n.featureId[0]?this.flatmapQueries.updateTooltipData(e):e),fW.emit(`connectivity-info-open`,this.tooltipEntry))},trackEvent:function(e){hW.sendEvent(e)},tooltipPathLabelProvider:function(e){if(!(this.showLongLabel?.value??this.showLongLabel))return null;let t=Array.isArray(e)?e:[e],n=[],r=t[0]?.mapUUID,i=r?this.connectivitiesStore?.globalConnectivities?.[r]:null,a=t.filter((e,t,n)=>t===n.findIndex(t=>t.id===e.id));for(let e of a){let t=e?.id;if(!(!t||!(t.startsWith(`ilxtr:`)||t.startsWith(`ilx:`)))&&i){let e=i.find(e=>e.id===t),r=this.truncateLongLabel?.value??this.truncateLongLabel,a=[`margin-bottom: 4px`],o=[`display: -webkit-box`,`-webkit-line-clamp: 3`,`-webkit-box-orient: vertical`,`overflow: hidden`],s=[...this.showIdInTooltip?a:[],...r?o:[]].join(`;`);if(e&&e[`long-label`]){let r=[];r.push(`<div style="${s}">${PK(e[`long-label`])}</div>`),this.showIdInTooltip&&r.push(`<span class="id-tag">${t}</span>`),n.push(r.join(``))}}}return n.length>0?`<div class='flatmap-feature-label flatmap-connectivity-label'>${n.join(`<hr/>`)}</div>`:null}},data:function(){return{apiLocation:void 0,activeSpecies:FG,scaffoldCamera:void 0,mainStyle:{height:this.entry.datasetTitle?`calc(100% - 30px)`:`100%`,width:`100%`,bottom:`0px`},helpMode:!1,helpModeActiveItem:0,helpModeLastItem:!1,multiflatmapRef:null,flatmapRef:null,scaffoldRef:null,iframeRef:null,plotRef:null,simulationRef:null,scaffoldLoaded:!1,isInHelp:!1,mapManager:void 0,connectivityKnowledge:{},connectivityFilterOptions:{},connectivityFilterSources:{},highlightDelay:void 0,alive:!0,flatmapService:void 0,flatmapQueries:void 0,tooltipEntry:[]}},created:function(){this.flatmapAPI=void 0,this.apiLocation=void 0,this.settingsStore.flatmapAPI&&(this.flatmapAPI=this.settingsStore.flatmapAPI),this.settingsStore.sparcApi&&(this.apiLocation=this.settingsStore.sparcApi),this.settingsStore.mapManager&&(this.mapManager=this.settingsStore.mapManager)},watch:{helpMode:function(e){e||(this.helpModeActiveItem=0)}}}})),LK,RK,zK=_((()=>{_d(),LK=function(e){return e?[...new Set(e.map(e=>JSON.stringify(e)))].map(e=>JSON.parse(e)):[]},RK={computed:{...(0,n.mapStores)(gd)},methods:{flatmapPanZoomCallback:function(e){if(this.mouseHovered){let t={paneIndex:this.entry.id,eventType:`panZoom`,payload:e,type:this.entry.type};this.$emit(`resource-selected`,t)}},flatmapMarkerUpdate(e){if(!this.flatmapReady)return;let t=e;if(t||=this.getFlatmapImp(),t){let e=this.settingsStore.globalSettings.displayMarkers?this.settingsStore.markers:[];e=LK(e),t.clearMarkers(),t.clearClusteredAnatomicalMarkers(),t.addClusteredAnatomicalMarkers(e),this.entry.type===`MultiFlatmap`&&this.restoreFeaturedMarkers(t)}},removeMarkersNotOnFlatmap(e,t){let n=e.anatomicalIdentifiers,r=[];for(let e=0;e<t.length;e++){let i=t[e],a={id:i.id,terms:[]};for(let e=0;e<i.terms.length;e++)n.includes(i.terms[e])&&a.terms.push(i.terms[e]);r.push(a)}return r},flatmapReadyForMarkerUpdates:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0;let t=e.mapImp;this.flatmapMarkerUpdate(t)}}}}})),eCe=_((()=>{})),tCe=y({default:()=>HK});function nCe(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`FlatmapVuer`),c=(0,t.resolveComponent)(`HelpModeDialog`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,VK,[(0,t.createVNode)(s,{state:e.entry.state,entry:e.entry.resource,mapManager:e.mapManager,onResourceSelected:n[0]||=t=>e.flatmapResourceSelected(e.entry.type,t),onPanZoomCallback:e.flatmapPanZoomCallback,name:e.entry.resource,style:{height:`100%`,width:`100%`},minZoom:e.entry.minZoom,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeInitialIndex:-1,helpModeDialog:e.useHelpModeDialog,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,onAnnotationOpen:e.onAnnotationOpen,onAnnotationClose:e.onAnnotationClose,onUpdateOfflineAnnotationEnabled:e.updateOfflineAnnotationEnabled,annotationSidebar:e.annotationSidebar,onConnectivityInfoOpen:e.onConnectivityInfoOpen,onConnectivityError:e.onConnectivityError,onConnectivityInfoClose:e.onConnectivityInfoClose,onNeuronConnectionFeatureClick:e.onNeuronConnectionFeatureClick,connectivityInfoSidebar:e.connectivityInfoSidebar,pathControls:!0,ref:`flatmap`,onContextRestored:o.contextRestored,onReady:o.flatmapReadyCall,displayMinimap:e.displayMinimap,displayWarning:!1,enableOpenMapUI:!0,flatmapAPI:e.flatmapAPI,render:e.visible,sparcAPI:e.apiLocation,showLocalSettings:e.showLocalSettings,showOpenMapButton:e.showOpenMapButton,onOpenMap:e.openMap,onPathwaySelectionChanged:o.onPathwaySelectionChanged,onMapmanagerLoaded:e.onMapmanagerLoaded,showPathwayFilter:!1,tooltipContentProvider:e.tooltipPathLabelProvider,onTrackEvent:e.trackEvent},null,8,`state.entry.mapManager.onPanZoomCallback.name.minZoom.helpMode.helpModeActiveItem.helpModeDialog.onHelpModeLastItem.onShownTooltip.onShownMapTooltip.onAnnotationOpen.onAnnotationClose.onUpdateOfflineAnnotationEnabled.annotationSidebar.onConnectivityInfoOpen.onConnectivityError.onConnectivityInfoClose.onNeuronConnectionFeatureClick.connectivityInfoSidebar.onContextRestored.onReady.displayMinimap.flatmapAPI.render.sparcAPI.showLocalSettings.showOpenMapButton.onOpenMap.onPathwaySelectionChanged.onMapmanagerLoaded.tooltipContentProvider.onTrackEvent`.split(`.`)),e.helpMode&&e.useHelpModeDialog?((0,t.openBlock)(),(0,t.createBlock)(c,{key:0,ref:`flatmapHelp`,flatmapRef:e.flatmapRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,[`flatmapRef`,`lastItem`,`onShowNext`,`onFinishHelpMode`])):(0,t.createCommentVNode)(``,!0)])}var BK,VK,HK,rCe=_((()=>{gW(),mW(),IK(),zK(),dW(),_W(),eCe(),yd(),BK={name:`Flatmap`,mixins:[FK,RK],components:{FlatmapVuer:r.FlatmapVuer,HelpModeDialog:UU},data:function(){return{flatmapReady:!1,displayMinimap:!1}},methods:{getState:function(){return this.$refs.flatmap.getState()},search:function(e){return this.$refs.flatmap.searchAndShowResult(e,!0,!0)},getFlatmapImp(){return this.$refs.flatmap?.mapImp},contextRestored(e){this.flatmapReadyForMarkerUpdates(e),this.updateViewerSettings()},flatmapReadyCall:function(e){this.flatmapReady=!0,this.$emit(`viewer-ready`,!0);let t=this.getFlatmapImp();t?.mapMetadata?.name&&(this.updateEntryLabel(t?.mapMetadata?.name),this.updateEntryTitle(t?.mapMetadata?.name));let n={id:this.entry.id,prov:t.mapMetadata};fW.emit(`mapImpProv`,n),this.$emit(`flatmap-provenance-ready`,n),this.flatmapReadyForMarkerUpdates(e),this.updateViewerSettings(),this.loadConnectivityExplorerConfig(e).then(()=>{fW.emit(`mapLoaded`,e)})},onPathwaySelectionChanged:function(e){let{label:t,property:n,checked:r,selectionsTitle:i}=e;hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_pathway_change`,category:t+` [`+n+`] `+r,location:i})},onSidebarAnnotationClose:function(){this.flatmapReady&&this.$refs.flatmap&&this.$refs.flatmap.annotationEventCallback({},{type:`aborted`})},searchSuggestions:function(e,t){if(e&&this.$refs.flatmap.mapImp){let n=this.$refs.flatmap.mapImp.search(e);(n.__featureIds||n.featureIds).forEach(e=>{let n=this.$refs.flatmap.mapImp.annotation(e);n&&n.label&&t.push(n.label)})}},showConnectivity:function(e){if(this?.alive){let{featureIds:t,offset:n}=e,r=this.$refs.flatmap;r&&r.moveMap(t,{offsetX:n?-150:0,zoom:4})}},showConnectivityTooltips:function(e){this?.alive&&this.flatmapReady&&this.$refs.multiflatmap.getCurrentFlatmap().showConnectivityTooltips(e)},showConnectivitiesByReference:function(e){if(this?.alive){let t=this.$refs.flatmap;t&&t.showConnectivitiesByReference(e)}},changeConnectivitySource:function(e,t){if(this?.alive&&this.flatmapReady){let n=this.$refs.flatmap,r=n.mapImp.mapMetadata.uuid;t.includes(r)||(t.push(r),n.changeConnectivitySource(e))}},zoomToFeatures:function(e,t){let n=e.name,r=this.$refs.flatmap.mapImp;if(n){let e=r.search(n);if(e.featureIds.length){let n=r.modelForFeature(e.featureIds[0]);n?(t&&r.selectFeatures(n),r.zoomToFeatures(n)):r.clearSearchResults()}}else r.clearSearchResults()},changeViewingMode:function(e){this.$refs.flatmap&&this.$refs.flatmap.changeViewingMode(e)},updateViewerSettings:function(){let{backgroundDisplay:e,viewingMode:t,flightPathDisplay:n,organsDisplay:r,outlinesDisplay:i,connectionType:a}=this.settingsStore.globalSettings,o=this.$refs.flatmap;o&&(o.changeViewingMode(t),o.setFlightPath3D(n),o.setColour(r),o.setOutlines(i),o.backgroundChangeCallback(e),o.setConnectionType(a))},setVisibilityFilter:function(e){if(this?.alive){let t=this.$refs.flatmap;t&&t.setVisibilityFilter(e)}},getKnowledgeTooltip:async function(e){if(this?.alive){let t=this.$refs.flatmap;if(t){let n=e.data[0];t.searchAndShowResult(n.id,!0,!1)}}}},computed:{facetSpecies(){return this.settingsStore.facets.species}}},VK={class:`viewer-container`},HK=vd(BK,[[`render`,nCe],[`__scopeId`,`data-v-43840a36`]])})),iCe=_((()=>{})),aCe=y({default:()=>KK});function oCe(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,WK,[(0,t.createElementVNode)(`iframe`,{class:`my-iframe`,src:e.entry.resource.share_link,ref:`iframe`},null,8,GK)])}var UK,WK,GK,KK,sCe=_((()=>{IK(),iCe(),yd(),UK={name:`MapIframe`,mixins:[FK]},WK={class:`map-iframe-container`},GK=[`src`],KK=vd(UK,[[`render`,oCe],[`__scopeId`,`data-v-f45775de`]])})),qK,cCe=_((()=>{qK=`<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>`})),lCe=_((()=>{})),uCe=_((()=>{})),dCe=y({default:()=>ZK});function fCe(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`MultiFlatmapVuer`),c=(0,t.resolveComponent)(`HelpModeDialog`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,XK,[(0,t.createVNode)(s,{availableSpecies:e.availableSpecies,onContextRestored:o.contextRestored,onFlatmapChanged:o.flatmapChanged,onReady:o.multiFlatmapReady,state:e.entry.state,mapManager:e.mapManager,onResourceSelected:n[0]||=t=>e.flatmapResourceSelected(e.entry.type,t),style:{height:`100%`,width:`100%`},initial:e.entry.resource,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeDialog:e.useHelpModeDialog,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,onAnnotationOpen:e.onAnnotationOpen,onAnnotationClose:e.onAnnotationClose,onUpdateOfflineAnnotationEnabled:e.updateOfflineAnnotationEnabled,annotationSidebar:e.annotationSidebar,onConnectivityInfoOpen:e.onConnectivityInfoOpen,onConnectivityError:e.onConnectivityError,onConnectivityInfoClose:e.onConnectivityInfoClose,onNeuronConnectionFeatureClick:e.onNeuronConnectionFeatureClick,connectivityInfoSidebar:e.connectivityInfoSidebar,ref:`multiflatmap`,displayMinimap:o.displayMinimap,showStarInLegend:e.showStarInLegend,enableOpenMapUI:!0,openMapOptions:e.openMapOptions,flatmapAPI:e.flatmapAPI,render:e.visible,sparcAPI:e.apiLocation,showLocalSettings:e.showLocalSettings,showOpenMapButton:e.showOpenMapButton,onPanZoomCallback:o.flatmapPanZoomCallback,onOpenMap:e.openMap,onOpenMapSpecies:o.openMapSpecies,onFinishHelpMode:e.endHelp,onPathwaySelectionChanged:o.onPathwaySelectionChanged,onOpenPubmedUrl:o.onOpenPubmedUrl,onMapmanagerLoaded:e.onMapmanagerLoaded,showPathwayFilter:!1,tooltipContentProvider:e.tooltipPathLabelProvider,onTrackEvent:e.trackEvent},null,8,`availableSpecies.onContextRestored.onFlatmapChanged.onReady.state.mapManager.initial.helpMode.helpModeActiveItem.helpModeDialog.onHelpModeLastItem.onShownTooltip.onShownMapTooltip.onAnnotationOpen.onAnnotationClose.onUpdateOfflineAnnotationEnabled.annotationSidebar.onConnectivityInfoOpen.onConnectivityError.onConnectivityInfoClose.onNeuronConnectionFeatureClick.connectivityInfoSidebar.displayMinimap.showStarInLegend.openMapOptions.flatmapAPI.render.sparcAPI.showLocalSettings.showOpenMapButton.onPanZoomCallback.onOpenMap.onOpenMapSpecies.onFinishHelpMode.onPathwaySelectionChanged.onOpenPubmedUrl.onMapmanagerLoaded.tooltipContentProvider.onTrackEvent`.split(`.`)),e.helpMode&&e.useHelpModeDialog?((0,t.openBlock)(),(0,t.createBlock)(c,{key:0,ref:`multiflatmapHelp`,multiflatmapRef:e.multiflatmapRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,[`multiflatmapRef`,`lastItem`,`onShowNext`,`onFinishHelpMode`])):(0,t.createCommentVNode)(``,!0)])}var JK,YK,XK,ZK,pCe=_((()=>{gW(),IK(),mW(),eK(),zK(),cCe(),dW(),_W(),lCe(),uCe(),yd(),JK=e=>[{display:`Open AC Map`,key:`AC`},{display:`Open FC Map`,key:`FC`},{display:`Open 3D Human Map`,key:`3D`},{display:`Open Connectivity Graph`,key:`CG`}],YK={name:`MultiFlatmap`,mixins:[FK,RK],components:{MultiFlatmapVuer:r.MultiFlatmapVuer,HelpModeDialog:UU},data:function(){return{availableSpecies:qG(),flatmapReady:!1,scaffoldResource:{},showStarInLegend:!1,speciesHasChanged:!1,openMapOptions:JK(FG),zoomLevel:6}},methods:{getState:function(){if(this.flatmapReady)return this.$refs.multiflatmap.getState()},flatmapPanZoomCallback:function(e){if(this.mouseHovered){let t={paneIndex:this.entry.id,eventType:`panZoom`,payload:e,type:this.entry.type};this.$emit(`resource-selected`,t)}},search:function(e){return this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(e,!0,!0)},openMapSpecies:function(e){fW.emit(`SetCurrentEntry`,{resource:e,type:`MultiFlatmap`,mode:`main`,state:void 0,label:``,discoverId:void 0,sourceId:this.entry.id}),this.trackOpenMap(`open_new_AC_map_${e}`)},searchSuggestions:function(e,t){let n=this.$refs.multiflatmap.getCurrentFlatmap();if(e&&n.mapImp){let r=n.mapImp.search(e);(r.__featureIds||r.featureIds).forEach(e=>{let r=n.mapImp.annotation(e);r&&r.label&&t.push(r.label)})}},onPathwaySelectionChanged:function(e){let{label:t,property:n,checked:r,selectionsTitle:i}=e;hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_pathway_change`,category:t+` [`+n+`] `+r,location:i})},onSidebarAnnotationClose:function(){this.flatmapReady&&this.$refs.multiflatmap.getCurrentFlatmap().annotationEventCallback({},{type:`aborted`})},onOpenPubmedUrl:function(e){hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_pubmed_url`,file_path:e,location:`map_popup_button`})},zoomToFeatures:function(e,t){let n=e.name,r=this.getFlatmapImp();if(n){let e=r.search(n);e.featureIds.length>0?(t&&r.selectFeatures(e.featureIds),r.zoomToFeatures(e.featureIds)):r.clearSearchResults()}else r.clearSearchResults()},updateProvCard:function(){let e=this.getFlatmapImp();if(e){let t={id:this.entry.id,prov:e.mapMetadata};fW.emit(`mapImpProv`,t),this.$emit(`flatmap-provenance-ready`,t)}},contextRestored:function(e){e&&(this.flatmapMarkerUpdate(e.mapImp),this.updateViewerSettings(),this.speciesHasChanged&&(this.speciesHasChanged=!1,this.$emit(`species-changed`,this.activeSpecies)))},flatmapChanged:async function(e){this.activeSpecies=e,this.openMapOptions=JK(e),this.$emit(`viewer-ready`,!!this.$refs.multiflatmap?.getCurrentFlatmap()?.mapImp);let t=this.getFlatmapImp();this.updateProvCard(),t&&(t.contextLost?this.speciesHasChanged=!0:(this.flatmapMarkerUpdate(t),this.updateViewerSettings(),this.speciesHasChanged=!1,this.$emit(`species-changed`,e))),hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_species_change`,category:this.activeSpecies})},multiFlatmapReady:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0,this.$emit(`viewer-ready`,!0);let t=e.mapImp;this.flatmapMarkerUpdate(t),this.updateProvCard(),this.updateViewerSettings(),this.loadConnectivityExplorerConfig(e).then(()=>{fW.emit(`mapLoaded`,e)})}},getFlatmapImp:function(){if(this.entry.type===`MultiFlatmap`&&this.flatmapReady&&this.$refs.multiflatmap)return this.$refs.multiflatmap.getCurrentFlatmap().mapImp},flatmapAreaSearch(){let e={type:`Facets`,label:`Unused`,val:this.getFlatmapImp().visibleMarkerAnatomicalIds().map(e=>this.idNamePair[e])};fW.emit(`PopoverActionClick`,e)},flatmapIsReady(){return this.flatmapReady},restoreFeaturedMarkers:function(e){this.settingsStore.resetFeaturedMarkerIdentifier();let t=this.settingsStore.featuredMarkers;this.updateFeaturedMarkers(t,e)},updateFeaturedMarkers:function(e,t){this.showStarInLegend=!1;for(let n=0;n<e.length;++n)e[n]&&(this.settingsStore.featuredMarkerIdentifiers[n]||this.addFeaturedMarker(e[n],n,t)&&(this.showStarInLegend=!0))},addFeaturedMarker:function(e,t,n){let r=this.settingsStore.featuredMarkerSpecies[t];if(r&&!this.activeSpecies.startsWith(r))return!1;let i=n;if(i||=this.getFlatmapImp(),i){let n=document.createElement(`div`);n.innerHTML=qK;let r=i.addMarker(e,{element:n,className:`highlight-marker`,cluster:!1});return this.settingsStore.updateFeaturedMarkerIdentifier({index:t,markerIdentifier:r}),!0}return!1},changeViewingMode:function(e){let t=this.$refs.multiflatmap?.getCurrentFlatmap();t&&t.changeViewingMode(e)},showConnectivity:function(e){if(this?.alive&&this.flatmapReady&&this.$refs.multiflatmap){let{featureIds:t,offset:n}=e,r=this.$refs.multiflatmap.getCurrentFlatmap();r&&r.moveMap(t,{offsetX:n?-150:0,zoom:4})}},showConnectivityTooltips:function(e){this?.alive&&this.flatmapReady&&this.$refs.multiflatmap.getCurrentFlatmap().showConnectivityTooltips(e)},showConnectivitiesByReference:function(e){if(this?.alive&&this.flatmapReady&&this.$refs.multiflatmap){let t=this.$refs.multiflatmap.getCurrentFlatmap();t&&t.showConnectivitiesByReference(e)}},changeConnectivitySource:function(e,t){if(this?.alive&&this.flatmapReady){let n=this.$refs.multiflatmap.getCurrentFlatmap(),r=n.mapImp.mapMetadata.uuid;t.includes(r)||(t.push(r),n.changeConnectivitySource(e))}},updateViewerSettings:function(){let{backgroundDisplay:e,viewingMode:t,flightPathDisplay:n,organsDisplay:r,outlinesDisplay:i,connectionType:a}=this.settingsStore.globalSettings;if(this.flatmapReady){let o=this.$refs.multiflatmap.getCurrentFlatmap();o&&(o.changeViewingMode(t),o.setFlightPath3D(n),o.setColour(r),o.setOutlines(i),o.backgroundChangeCallback(e),o.setConnectionType(a))}},setVisibilityFilter:function(e){if(this?.alive&&this.flatmapReady&&this.$refs.multiflatmap){let t=this.$refs.multiflatmap.getCurrentFlatmap();t&&t.setVisibilityFilter(e)}},getKnowledgeTooltip:async function(e){if(this?.alive&&this.flatmapReady){let t=e.data[0];this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(t.id,!0,!1)}}},computed:{facetSpecies(){return this.settingsStore.facets.species},featuredMarkers(){return this.settingsStore.featuredMarkers},displayMinimap(){return this.settingsStore.displayMinimap}},watch:{featuredMarkers:function(e){this.flatmapReady&&this.updateFeaturedMarkers(e,void 0)}},mounted:function(){this.getFeaturedDatasets()}},XK={class:`viewer-container`},ZK=vd(YK,[[`render`,fCe],[`__scopeId`,`data-v-ffd110a2`]])})),mCe=_((()=>{})),hCe=y({default:()=>eq});function gCe(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`MapUtilitiesConnectivityGraph`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,$K,[(0,t.createVNode)(s,{entry:o.graphEntry,mapServer:o.mapServer,sckanVersion:o.sckanVersion,connectivityFromMap:o.connectivityFromMap,connectivityError:o.connectivityError,origins:o.origins,components:o.components,destinations:o.destinations,originsWithDatasets:o.originsWithDatasets,componentsWithDatasets:o.componentsWithDatasets,destinationsWithDatasets:o.destinationsWithDatasets,hasSingleConnectivityList:o.hasSingleConnectivityList,originsCombinations:o.originsCombinations,componentsCombinations:o.componentsCombinations,destinationsCombinations:o.destinationsCombinations,onTapNode:o.onTapNode},null,8,[`entry`,`mapServer`,`sckanVersion`,`connectivityFromMap`,`connectivityError`,`origins`,`components`,`destinations`,`originsWithDatasets`,`componentsWithDatasets`,`destinationsWithDatasets`,`hasSingleConnectivityList`,`originsCombinations`,`componentsCombinations`,`destinationsCombinations`,`onTapNode`])])}var QK,$K,eq,_Ce=_((()=>{dW(),IK(),mW(),mCe(),yd(),QK={name:`ConnectivityGraph`,mixins:[FK],components:{MapUtilitiesConnectivityGraph:mH},computed:{graphEntry(){return this.entry.resource},connectivityError(){return{}},connectivityFromMap(){return this.entry.graphPayload?.connectivityFromMap||null},origins(){return this.entry.graphPayload?.origins||[]},components(){return this.entry.graphPayload?.components||[]},destinations(){return this.entry.graphPayload?.destinations||[]},originsWithDatasets(){return this.entry.graphPayload?.originsWithDatasets||[]},componentsWithDatasets(){return this.entry.graphPayload?.componentsWithDatasets||[]},destinationsWithDatasets(){return this.entry.graphPayload?.destinationsWithDatasets||[]},hasSingleConnectivityList(){return this.entry.graphPayload?.hasSingleConnectivityList||!1},originsCombinations(){return this.entry.graphPayload?.originsCombinations||[]},componentsCombinations(){return this.entry.graphPayload?.componentsCombinations||[]},destinationsCombinations(){return this.entry.graphPayload?.destinationsCombinations||[]},mapServer(){return this.entry.mapServer||null},sckanVersion(){return this.entry.sckanVersion||null}},methods:{onTapNode:function(e){let t=e.map(e=>e.label).join(`, `);this.onConnectivityHovered(t)},onConnectivityHovered:function(e){let t={connectivityInfo:this.entry.connectivityInfo,label:e,data:e?this.getConnectivityDatasets(e):[]};fW.emit(`connectivity-hovered`,t)},getConnectivityDatasets:function(e){let t=this.entry.graphPayload?.allWithDatasets||[],n=e.split(`,`),r=[];return n.forEach(e=>{let n=t.find(t=>t.name.toLowerCase().trim()===e.toLowerCase().trim());n&&r.push({id:n.id,label:n.name})}),r}}},$K={class:`viewer-container`},eq=vd(QK,[[`render`,gCe],[`__scopeId`,`data-v-57ebb655`]])})),vCe=y({default:()=>nq});function yCe(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`PlotVuer`);return(0,t.openBlock)(),(0,t.createBlock)(s,{"data-source":e.entry.resource.dataSource,metadata:e.entry.resource.metadata,"supplemental-data":e.entry.resource.supplementalData,style:{overflow:`hidden`},ref:`plot`},null,8,[`data-source`,`metadata`,`supplemental-data`])}var tq,nq,bCe=_((()=>{IK(),yd(),tq={name:`Plot`,mixins:[FK],components:{PlotVuer:a.PlotVuer}},nq=vd(tq,[[`render`,yCe]])})),xCe=_((()=>{})),SCe=y({default:()=>aq});function CCe(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`ScaffoldVuer`),c=(0,t.resolveComponent)(`HelpModeDialog`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,iq,[e.activated?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,state:e.entry.state,url:e.entry.resource,region:e.entry.region,onScaffoldSelected:n[0]||=t=>o.scaffoldResourceSelected(e.entry.type,t),onScaffoldHighlighted:n[1]||=t=>o.scaffoldHighlighted(e.entry.type,t),onScaffoldNavigated:n[2]||=t=>o.scaffoldNavigated(e.entry.type,t),onOnReady:o.scaffoldIsReady,onOpenMap:e.openMap,ref:`scaffold`,"background-toggle":!0,traditional:!0,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeDialog:e.useHelpModeDialog,onAnnotationOpen:e.onAnnotationOpen,onAnnotationClose:e.onAnnotationClose,onUpdateOfflineAnnotationEnabled:e.updateOfflineAnnotationEnabled,annotationSidebar:e.annotationSidebar,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,render:e.visible,"display-latest-message":!0,"warning-message":o.warningMessage,"display-minimap":!1,"display-markers":!1,"display-warning":!1,enableOpenMapUI:!0,"view-u-r-l":e.entry.viewUrl,markerCluster:!0,markerLabels:o.markerLabels,flatmapAPI:e.flatmapAPI,showLocalSettings:e.showLocalSettings,showOpenMapButton:e.showOpenMapButton,usageConfig:{showTubeLinesControls:!1,tubeLines:e.entry.discoverId===`307`||e.entry.discoverId===307}},null,8,[`state`,`url`,`region`,`onOnReady`,`onOpenMap`,`helpMode`,`helpModeActiveItem`,`helpModeDialog`,`onAnnotationOpen`,`onAnnotationClose`,`onUpdateOfflineAnnotationEnabled`,`annotationSidebar`,`onHelpModeLastItem`,`onShownTooltip`,`onShownMapTooltip`,`render`,`warning-message`,`view-u-r-l`,`markerLabels`,`flatmapAPI`,`showLocalSettings`,`showOpenMapButton`,`usageConfig`])):(0,t.createCommentVNode)(``,!0),e.helpMode&&e.useHelpModeDialog?((0,t.openBlock)(),(0,t.createBlock)(c,{key:1,ref:`scaffoldHelp`,scaffoldRef:e.scaffoldRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,[`scaffoldRef`,`lastItem`,`onShowNext`,`onFinishHelpMode`])):(0,t.createCommentVNode)(``,!0)])}var rq,iq,aq,wCe=_((()=>{mW(),IK(),hd(),dW(),_W(),rK(),xCe(),yd(),rq={name:`Scaffold`,mixins:[FK],components:{ScaffoldVuer:s.ScaffoldVuer,HelpModeDialog:UU},methods:{showConnectivitiesByReference:async function(e){if(this.$refs.scaffold){let t=sessionStorage.getItem(`flatmap-knowledge`),n;n=t?await FSe(e):await ISe(this.flatmapService.mapImp,e,this.flatmapService.flatmapQueries);let r=[];for(let e of n){let t=this.nervesKnowledge.find(t=>t.id===e);if(!t)continue;let n=t[`nerve-label`];if(n){let e=n.flatMap(e=>e.subNerves);r.push(...e)}}this.$refs.scaffold.changeHighlightedByName(r,``,!1)}},setNerveGreyScale:function(){if(this.$refs.scaffold&&this.nervesKnowledge.length){let e=this.nervesKnowledge.reduce((e,t)=>e.concat(t[`nerve-label`]||[]),[]).reduce((e,t)=>e.concat(t.subNerves||[]),[]);this.$refs.scaffold.setGreyScale(!0,e)}},setVisibilityFilter:function(e){if(this.$refs.scaffold){let t=[],n=!!e;if(e){let n=[];e.OR.forEach(e=>{`AND`in e&&e.AND.length>=2&&`models`in e.AND[1]&&n.push(...e.AND[1].models)});for(let e of n){let n=this.nervesKnowledge.find(t=>t.id===e);if(n){let e=n[`nerve-label`].map(e=>e.subNerves).flat(1/0);t.push(...e)}}}this.$refs.scaffold.zoomToNerves(t,n)}},syncFilter:function(e){this.$refs.scaffold?.viewingMode===`Neuron Connection`&&(this.filter=e.filter(e=>e.facet?.toLowerCase()!==`show all`))},scaffoldResourceSelected:async function(e,t){if(this.resourceSelected(e,t,!0),t.length===1){let{id:e,isNerves:n,anatomicalId:r}=t[0].data;if(this.clickedObject={id:e,isNerves:n,anatomicalId:r},this.clickedObject.isNerves||this.clickedObject.anatomicalId){let e=this.clickedObject.id.toLowerCase();if(this.$refs.scaffold.viewingMode===`Neuron Connection`){let t=this.settingsStore.globalSettings.connectionType;if(this.clickedObject.isNerves)this.filter.push({facet:e,term:`Nerves`,facetPropPath:`scaffold.connectivity.nerve`});else{let n=t.toLowerCase(),r=this.clickedObject.anatomicalId||``;if(r)this.filter.push({facet:`["${r}",[]]`,facetPropPath:`flatmap.connectivity.source.${n}`,tagLabel:e.charAt(0).toUpperCase()+e.slice(1),term:t});else{let i=this.connectivitiesStore.filterOptions[this.entry.resource].find(e=>e.key===`flatmap.connectivity.source.${n}`),a;i?.children.forEach(t=>{t.label.toLowerCase()===e&&(a=t),t.children?.forEach(t=>{t.label.toLowerCase()===e&&(a=t)})}),a&&(r=a.key.replace(`flatmap.connectivity.source.${n}.`,``),this.filter.push({facet:r,facetPropPath:`flatmap.connectivity.source.${n}`,tagLabel:a.tagLabel,term:t}))}}fW.emit(`neuron-connection-feature-click`,{filters:this.filter,search:this.filter.length?``:e})}else if(this.$refs.scaffold.viewingMode===`Exploration`){let t=this.nervesKnowledge.filter(t=>JSON.stringify(t[`nerve-label`]).includes(e));t.length&&this.getKnowledgeTooltip({data:t,type:this.entry})}}}else t.length>1?this.$refs.scaffold.viewingMode===`Exploration`&&this.clickedObject&&this.$refs.scaffold.$module.setIgnorePicking(!1):(this.clickedObject=void 0,fW.emit(`connectivity-info-close`))},onResize:function(){this.scaffoldCamera||=(0,t.markRaw)(this.$refs.scaffold?.$module?.scene?.getZincCameraControls()),this.scaffoldCamera&&this.scaffoldCamera.onResize()},getScreenshotSources:async function(e){let t=this.$refs.scaffold?.$module?.zincRenderer;return t?[pd(t,e)]:[]},getState:function(){return this.$refs.scaffold?this.$refs.scaffold.getState():this.entry.state},search:function(e){if(this.$refs.scaffold)return this.$refs.scaffold.search(e,!0)},searchSuggestions:function(e,t){if(e===``||!this.$refs.scaffold)return t;this.$refs.scaffold.fetchSuggestions(e).forEach(e=>{e.suggestion&&t.push(e.suggestion)})},showConnectivityTooltips:function(e){if(this.$refs.scaffold){if(e.label)this.$refs.scaffold.changeHighlightedByName([e.label],``,!1),this.$refs.scaffold.showRegionTooltip(e.label,!1,!1);else{let t=e.connectivityInfo[`nerve-label`];if(t){let e=t.flatMap(e=>e.subNerves);this.$refs.scaffold.changeHighlightedByName(e,``,!1)}this.$refs.scaffold.hideRegionTooltip()}}},zoomToFeatures:function(e,t){if(this.$refs.scaffold){let n;n=Array.isArray(e)?e:[e.name],t&&this.$refs.scaffold.changeActiveByName(n,``,!1),this.$refs.scaffold.viewRegion(n)}},scaffoldIsReady:function(){this.scaffoldLoaded=!0,this.$emit(`viewer-ready`,!0),this.$refs.scaffold.$module.graphicsHighlight.highlightColour=[1,0,1],this.scaffoldRef||(this.scaffoldRef=(0,t.markRaw)(this.$refs.scaffold),this.scaffoldRef&&(this.loadExplorerConfig(),this.connectivityKnowledge=this.connectivitiesStore.globalConnectivities,this.connectivityFilterOptions=this.connectivitiesStore.filterOptions,this.connectivityFilterSources=this.connectivitiesStore.filterSources)),this.updateViewerSettings(),fW.emit(`mapLoaded`,this.$refs.scaffold),this._greyScaleTimer=setTimeout(()=>{this.setNerveGreyScale()},500)},scaffoldHighlighted:function(e,t){let n={paneIndex:this.entry.id,type:e,resource:t,internalName:void 0};t&&t[0]&&((t[0].data?.id===void 0||t[0].data?.id===``)&&(t[0].data.id=t[0].data?.group),n.internalName=t[0].data.id,n.eventType=`highlighted`),this.$emit(`resource-selected`,n)},scaffoldNavigated:function(e,t){if(this.mouseHovered){let n={paneIndex:this.entry.id,eventType:`panZoom`,payload:t,type:e};this.$emit(`resource-selected`,n)}},updateWithViewUrl:function(e){this.$refs.scaffold&&this.$refs.scaffold.updateViewURL(e)},changeViewingMode:function(e){this.$refs.scaffold&&this.$refs.scaffold.changeViewingMode(e)},updateViewerSettings:function(){if(this.$refs.scaffold){let{backgroundDisplay:e,organsDisplay:t,outlinesDisplay:n,viewingMode:r}=this.settingsStore.globalSettings;this.$refs.scaffold.backgroundChangeCallback(e),this.$refs.scaffold.changeViewingMode(r),this.$refs.scaffold.setColour(t),this.$refs.scaffold.setOutlines(n)}}},computed:{warningMessage:function(){return this.entry.discoverId===`307`||this.entry.discoverId===307?`This map displays the anatomical location and connectivity of nerves, through which the neuron populations from the ApiNATOMY models available in SCKAN can be routed.`:`Under active development`},markerLabels:function(){return this.settingsStore.globalSettings.displayMarkers?this.settingsStore.numberOfDatasetsForFacets:{}},scaffoldKnowledge:function(){return this.connectivityKnowledge?.[this.entry.resource]}},watch:{visible:{handler(e){e&&!this.activated&&(this.activated=!0,this.$nextTick(()=>{this.$refs.scaffold&&(this.scaffoldRef=(0,t.markRaw)(this.$refs.scaffold),this.scaffoldRef&&(this.loadExplorerConfig(),this.connectivityKnowledge=this.connectivitiesStore.globalConnectivities,this.connectivityFilterOptions=this.connectivitiesStore.filterOptions,this.connectivityFilterSources=this.connectivitiesStore.filterSources))}))},immediate:!0},scaffoldKnowledge:{handler(e){e&&e.length!==this.nervesKnowledge.length&&(this.nervesKnowledge=e,this.scaffoldLoaded&&this.setNerveGreyScale())},immediate:!0}},data:function(){return{activated:!1,apiLocation:process.env.VUE_APP_API_LOCATION,scaffoldCamera:void 0,scaffoldLoaded:!1,nervesKnowledge:[],clickedObject:void 0,filter:[],query:``}},beforeUnmount:function(){clearTimeout(this._greyScaleTimer)}},iq={class:`viewer-container`},aq=vd(rq,[[`render`,CCe],[`__scopeId`,`data-v-a45fd8e7`]])})),TCe=_((()=>{})),ECe=y({default:()=>cq});function DCe(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`SimulationVuer`);return e.isCrossOriginIsolated?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,apiLocation:e.apiLocation,id:o.id,ref:`simulation`},null,8,[`apiLocation`,`id`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,sq,` Simulations require a cross-origin isolated page (for SharedArrayBuffer support). This browser or host is not configured for it. `))}var oq,sq,cq,OCe=_((()=>{IK(),TCe(),yd(),oq={name:`Simulation`,mixins:[FK],components:{SimulationVuer:l.SimulationVuer},data:function(){return{isCrossOriginIsolated:window.crossOriginIsolated===!0}},computed:{id:function(){return this.entry.resource?this.entry.resource:this.entry.discoverId}}},sq={key:1,class:`simulation-unsupported`},cq=vd(oq,[[`render`,DCe],[`__scopeId`,`data-v-627e2ba4`]])}));aK(),_d(),pK(),hd(),yd();var kCe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(rCe(),tCe))),ACe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(sCe(),aCe))),jCe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(pCe(),dCe))),MCe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(_Ce(),hCe))),NCe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(bCe(),vCe))),PCe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(wCe(),SCe))),FCe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(OCe(),ECe))),ICe={name:`ContentVuer`,props:{entry:Object,visible:{type:Boolean,default:!0}},components:{ContentBar:mK,ConnectivityGraph:MCe,Flatmap:kCe,MapIframe:ACe,MultiFlatmap:jCe,Plot:NCe,Scaffold:PCe,Simulation:FCe},methods:{flatmapProvenanceReady:function(e){this.$refs.contentBar?.setupFlatmapContextCard(e),this.entriesStore.updateMapForEntry(this.entry,e)},getId:function(){return this.entry.id},getState:function(){return this.$refs.viewer?.getState()},captureScreenshot:function(e={}){let t=e.scale||this.settingsStore.screenshot.scale,n=e.legend||this.settingsStore.screenshot.legend,r=e.toolbar??this.settingsStore.screenshot.toolbar,i=this.$refs.contentBar?.getEntryTitle(this.entry)||this.entry.type;return fd(this.getScreenshotElement({legend:n,toolbar:r}),{scale:t,legend:n,toolbar:r,title:i,viewers:[this]})},hasLegend:function(){return ld(this.$refs.container).length>0},getScreenshotElement:function(e={}){let{legend:t,toolbar:n}=e;return n&&t!==`only`?this.$el:this.$refs.container},getScreenshotSources:function(e){return this.$refs.viewer?.getScreenshotSources?.(e)||[]},resourceSelected:function(e){this.$emit(`resource-selected`,e)},scaffoldViewClicked:function(e){this.entry.viewUrl===e?this.$refs.viewer?.updateWithViewUrl(e):this.entriesStore.updateViewForEntry({id:this.entry.id,viewUrl:e})},search:function(e){return this.$refs.viewer?.search(e)},searchSuggestions:function(e,t){this.$refs.viewer?.searchSuggestions(e,t)},setPanesBoundary:function(){this.$refs.contentBar?.setBoundary(this.$refs.container)},speciesChanged:function(e){this.activeSpecies=e,this.$emit(`species-changed`,e)},onResize:function(){this.$refs.viewer?.onResize()},onConnectivityItemClose:function(){this.$refs.viewer?.onConnectivityItemClose()},onConnectivitySourceChange:function(e,t){this.$refs.viewer?.changeConnectivitySource(e,t)},onFlatmapMarkerUpdate:function(){this.$refs.viewer?.flatmapMarkerUpdate()},onGlobalViewerSettingsUpdate:function(){this.$refs.viewer?.updateViewerSettings()},onHoverUpdate:function(e){this.$refs.viewer?.sidebarHoverHighlight(e)},onShowConnectivity:function(e){this.$refs.viewer?.showConnectivity(e)},onShowConnectivityTooltips:function(e){this.$refs.viewer?.showConnectivityTooltips(e)},onShowReferenceConnectivity:function(e){this.$refs.viewer?.showConnectivitiesByReference(e)},onSidebarAnnotationClose:function(){this.$refs.viewer?.onSidebarAnnotationClose()},onStartHelp:function(){this.$refs.viewer?.startHelp()},onFilterVisibility:function(e){this.$refs.viewer?.setVisibilityFilter(e)},onLoadConnectivityDetail:function(e){this.$refs.viewer?.entry.type!==`ConnectivityGraph`&&this.$refs.viewer?.getKnowledgeTooltip(e)},toggleMinimap:function(e,t){this.$refs.viewer?.toggleMinimap(e,t)}},data:function(){return{mouseHovered:!1,activeSpecies:`Rat`,viewerReady:![`Flatmap`,`MultiFlatmap`,`Scaffold`].includes(this.entry.type)}},computed:{...(0,n.mapStores)(iK,gd,fK),viewerType(){switch(this.entry.type){case`MapIframe`:return`MapIframe`;default:return this.entry.type}}}},LCe={class:`component-container`,ref:`container`};function RCe(e,n,r,i,a,o){let s=mK;return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`content-container`,onMouseover:n[1]||=t=>e.mouseHovered=!0,onMouseleave:n[2]||=t=>e.mouseHovered=!1},[(0,t.createVNode)(s,{class:`toolbar`,entry:r.entry,ref:`contentBar`,onChooserChanged:o.onResize,onScaffoldViewClicked:o.scaffoldViewClicked,captureScreenshot:o.captureScreenshot,getScreenshotTarget:o.getScreenshotElement,viewerReady:e.viewerReady,onVnodeMounted:o.setPanesBoundary},null,8,[`entry`,`onChooserChanged`,`onScaffoldViewClicked`,`captureScreenshot`,`getScreenshotTarget`,`viewerReady`,`onVnodeMounted`]),(0,t.createElementVNode)(`div`,LCe,[((0,t.openBlock)(),(0,t.createBlock)(t.Suspense,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(o.viewerType),{entry:r.entry,mouseHovered:e.mouseHovered,visible:r.visible,lazy:!0,ref:`viewer`,onFlatmapProvenanceReady:o.flatmapProvenanceReady,onResourceSelected:o.resourceSelected,onSpeciesChanged:o.speciesChanged,onViewerReady:n[0]||=t=>e.viewerReady=t},null,40,[`entry`,`mouseHovered`,`visible`,`onFlatmapProvenanceReady`,`onResourceSelected`,`onSpeciesChanged`]))]),_:1}))],512)],32)}var lq=vd(ICe,[[`render`,RCe],[`__scopeId`,`data-v-514cd63d`]]);yd();var zCe={name:`ResizeSensor`,methods:{activate:function(){!this._observer&&this.$refs.display&&(this._observer=new ResizeObserver(()=>this.displayResize()),this._observer.observe(this.$refs.display),this.displayResize())},deactivate:function(){this._observer&&(this._observer.disconnect(),this._observer=void 0,this.displayResize())},displayResize:function(){this.$emit(`resize`)}},beforeUnmount(){this.deactivate()},activated(){this.activate()},deactivated(){this.deactivate()},mounted:function(){this.activate()}},BCe={style:{height:`100%`,width:`100%`,position:`absolute`},ref:`display`};function VCe(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,BCe,null,512)}var uq=vd(zCe,[[`render`,VCe]]),HCe=Object.assign({inheritAttrs:!1},{__name:`splitpanes`,props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1},keyboardStep:{type:Number,default:5}},emits:[`ready`,`resize`,`resized`,`pane-click`,`pane-maximize`,`pane-add`,`pane-remove`,`splitter-click`,`splitter-dblclick`,`direction-changed`],setup(e,{emit:n}){let r=n,i=e,a=(0,t.useAttrs)(),o=(0,t.useSlots)(),s=(0,t.ref)([]),c=(0,t.computed)(()=>s.value.reduce((e,t)=>(e[~~t.id]=t)&&e,{})),l=(0,t.computed)(()=>s.value.length),u=(0,t.ref)(null),d=(0,t.ref)(!1),f=(0,t.ref)({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),p=(0,t.ref)({splitter:null,timeoutId:null}),m=(0,t.computed)(()=>({[`splitpanes splitpanes--${i.horizontal?`horizontal`:`vertical`}`]:!0,"splitpanes--dragging":f.value.dragging,"splitpanes--ready":d.value})),h=()=>{document.addEventListener(`mousemove`,v,{passive:!1}),document.addEventListener(`mouseup`,y),`ontouchstart`in window&&(document.addEventListener(`touchmove`,v,{passive:!1}),document.addEventListener(`touchend`,y))},g=()=>{document.removeEventListener(`mousemove`,v,{passive:!1}),document.removeEventListener(`mouseup`,y),`ontouchstart`in window&&(document.removeEventListener(`touchmove`,v,{passive:!1}),document.removeEventListener(`touchend`,y))},_=(e,t)=>{let n=e.target.closest(`.splitpanes__splitter`);if(n){let{left:t,top:r}=n.getBoundingClientRect(),{clientX:a,clientY:o}=`ontouchstart`in window&&e.touches?e.touches[0]:e;f.value.cursorOffset=i.horizontal?o-r:a-t}h(),f.value.mouseDown=!0,f.value.activeSplitter=t,document.documentElement.style.cursor=i.horizontal?`row-resize`:`col-resize`},v=e=>{f.value.mouseDown&&(e.preventDefault(),f.value.dragging||(window.getSelection()?.removeAllRanges(),f.value.dragging=!0),requestAnimationFrame(()=>{E(w(e)),K(`resize`,{event:e},!0)}))},y=e=>{f.value.dragging&&(window.getSelection()?.removeAllRanges(),K(`resized`,{event:e},!0)),f.value.mouseDown=!1,f.value.activeSplitter=null,setTimeout(()=>{f.value.dragging=!1,g(),document.documentElement.style.cursor=``},100)},b=(e,t)=>{`ontouchstart`in window&&(e.preventDefault(),p.value.splitter===t?(clearTimeout(p.value.timeoutId),p.value.timeoutId=null,x(e,t),p.value.splitter=null):(p.value.splitter=t,p.value.timeoutId=setTimeout(()=>p.value.splitter=null,500))),f.value.dragging||K(`splitter-click`,{event:e,index:t},!0)},x=(e,t)=>{if(K(`splitter-dblclick`,{event:e,index:t},!0),i.maximizePanes){let n=0;s.value=s.value.map((e,r)=>(e.size=r===t?e.max:e.min,r!==t&&(n+=e.min),e)),s.value[t].size-=n,K(`pane-maximize`,{event:e,index:t,pane:s.value[t]}),K(`resized`,{event:e,index:t},!0)}},S=(e,t)=>{if(!i.keyboardStep)return;let n=i.horizontal?e.key===`ArrowDown`:e.key===`ArrowRight`,r=i.horizontal?e.key===`ArrowUp`:e.key===`ArrowLeft`;if(!n&&!r)return;e.preventDefault(),f.value.activeSplitter=t;let a=(n?1:-1)*(i.rtl&&!i.horizontal?-1:1),o=k(t)+s.value[t].size;D(Math.min(Math.max(o+a*i.keyboardStep,0),100)),K(`resize`,{event:e},!0),K(`resized`,{event:e},!0),f.value.activeSplitter=null},C=(e,t)=>{let n=c.value[t];n&&K(`pane-click`,{event:e,index:n.index,pane:n})},w=e=>{let t=u.value.getBoundingClientRect(),{clientX:n,clientY:r}=`ontouchstart`in window&&e.touches?e.touches[0]:e;return{x:n-(i.horizontal?0:f.value.cursorOffset)-t.left,y:r-(i.horizontal?f.value.cursorOffset:0)-t.top}},T=e=>{e=e[i.horizontal?`y`:`x`];let t=u.value[i.horizontal?`clientHeight`:`clientWidth`];return i.rtl&&!i.horizontal&&(e=t-e),e*100/t},E=e=>{D(T(e))},D=e=>{let t=f.value.activeSplitter;if(t===null||t>=s.value.length-1)return;let n={prevPanesSize:k(t),nextPanesSize:A(t),prevReachedMinPanes:0,nextReachedMinPanes:0},r=0+(i.pushOtherPanes?0:n.prevPanesSize),a=100-(i.pushOtherPanes?0:n.nextPanesSize);e=Math.max(Math.min(e,a),r);let o=[t,t+1],c=s.value[o[0]]||null,l=s.value[o[1]]||null,u=c!==null&&c.max<100&&e>=c.max+n.prevPanesSize,d=l!==null&&l.max<100&&e<=100-(l.max+A(t+1));if(u||d){u?(c.size=c.max,l.size=Math.min(Math.max(100-c.max-n.prevPanesSize-n.nextPanesSize,l.min),l.max)):(c.size=Math.min(Math.max(100-l.max-n.prevPanesSize-A(t+1),c.min),c.max),l.size=l.max);return}if(i.pushOtherPanes){let t=O(n,e);if(!t)return;({sums:n,panesToResize:o}=t),c=s.value[o[0]]||null,l=s.value[o[1]]||null}c!==null&&(c.size=Math.min(Math.max(e-n.prevPanesSize-n.prevReachedMinPanes,c.min),c.max)),l!==null&&(l.size=Math.min(Math.max(100-e-n.nextPanesSize-n.nextReachedMinPanes,l.min),l.max))},O=(e,t)=>{let n=f.value.activeSplitter,r=[n,n+1];if(t<e.prevPanesSize+s.value[r[0]].min){if(r[0]=j(n).index,e.prevReachedMinPanes=0,r[0]<n&&s.value.forEach((t,i)=>{i>r[0]&&i<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)}),r[0]===void 0)return e.prevReachedMinPanes=0,s.value[0].size=s.value[0].min,s.value.forEach((t,r)=>{r>0&&r<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)}),s.value[r[1]].size=100-e.prevReachedMinPanes-s.value[0].min-e.prevPanesSize-e.nextPanesSize,null;e.prevPanesSize=k(r[0])}return t>100-e.nextPanesSize-s.value[r[1]].min&&(r[1]=M(n).index,e.nextReachedMinPanes=0,r[1]>n+1&&s.value.forEach((t,i)=>{i>n&&i<r[1]&&(t.size=t.min,e.nextReachedMinPanes+=t.min)}),e.nextPanesSize=r[1]===void 0?0:A(r[1]-1),r[1]===void 0)?(e.nextReachedMinPanes=0,s.value.forEach((t,r)=>{r>=n+1&&(t.size=t.min,e.nextReachedMinPanes+=t.min)}),r[0]!==void 0&&(s.value[r[0]].size=100-e.prevPanesSize-A(r[0]-1)),null):{sums:e,panesToResize:r}},k=e=>s.value.reduce((t,n,r)=>t+(r<e?n.size:0),0),A=e=>s.value.reduce((t,n,r)=>t+(r>e+1?n.size:0),0),j=e=>[...s.value].reverse().find(t=>t.index<e&&t.size>t.min)||{},M=e=>s.value.find(t=>t.index>e+1&&t.size>t.min)||{},N=()=>{let e=Array.from(u.value?.children||[]);for(let t of e){let e=t.classList.contains(`splitpanes__pane`),n=t.classList.contains(`splitpanes__splitter`);!e&&!n&&(t.remove(),console.warn(`Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.`))}},P=(e,t,n=!1)=>{let r=e-1,a=document.createElement(`div`);a.classList.add(`splitpanes__splitter`),n||(a.onmousedown=e=>_(e,r),typeof window<`u`&&`ontouchstart`in window&&(a.ontouchstart=e=>_(e,r)),a.onclick=e=>b(e,r+1),i.keyboardStep&&(a.setAttribute(`tabindex`,`0`),a.setAttribute(`role`,`separator`),a.setAttribute(`aria-orientation`,i.horizontal?`horizontal`:`vertical`),a.onkeydown=e=>S(e,r))),a.ondblclick=e=>x(e,r+1),t.parentNode.insertBefore(a,t)},F=e=>{e.onmousedown=null,e.onclick=null,e.ondblclick=null,e.onkeydown=null,e.remove()},I=()=>{let e=Array.from(u.value?.children||[]);for(let t of e)t.className.includes(`splitpanes__splitter`)&&F(t);let t=0;for(let n of e)n.className.includes(`splitpanes__pane`)&&(!t&&i.firstSplitter?P(t,n,!0):t&&P(t,n),t++)},L=({uid:e,...t})=>{let n=c.value[e];for(let[e,r]of Object.entries(t))n[e]=r},R=!1,z=e=>{let n=-1;Array.from(u.value?.children||[]).some(t=>(t.className.includes(`splitpanes__pane`)&&n++,t.isSameNode(e.el))),s.value.splice(n,0,{...e,index:n}),s.value.forEach((e,t)=>e.index=t),d.value&&!R&&(R=!0,(0,t.nextTick)(()=>{I(),V({addedPane:s.value[n]}),K(`pane-add`,{pane:s.value[n]}),R=!1}))},B=e=>{let n=s.value.findIndex(t=>t.id===e);s.value[n].el=null;let r=s.value.splice(n,1)[0];s.value.forEach((e,t)=>e.index=t),(0,t.nextTick)(()=>{I(),K(`pane-remove`,{pane:r}),V({removedPane:{...r,index:n}})})},V=(e={})=>{!e.addedPane&&!e.removedPane?U():s.value.some(e=>e.givenSize!==null||e.min||e.max<100)?W(e):H(),d.value&&K(`resized`)},H=()=>{let e=100/l.value,t=100,n=[],r=[];for(let i of s.value)i.size=Math.max(Math.min(e,i.max),i.min),t-=i.size,i.size>=i.max&&n.push(i.id),i.size<=i.min&&r.push(i.id);Math.abs(t)>.1&&G(t,n,r)},U=()=>{let e=100,t=[],n=[],r=0;for(let i of s.value)e-=i.size,i.givenSize!==null&&r++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id);let i=100;if(e>.1){for(let t of s.value)t.givenSize===null&&(t.size=Math.max(Math.min(e/(l.value-r),t.max),t.min)),i-=t.size;i>.1&&G(i,t,n)}},W=({addedPane:e,removedPane:t}={})=>{let n=s.value.reduce((e,t)=>e+(t.givenSize===null?0:t.givenSize),0),r=s.value.filter(e=>e.givenSize===null).length,i=r>0?(100-n)/r:0,a=0,o=[],c=[];for(let e of s.value)a-=e.size,e.size>=e.max&&o.push(e.id),e.size<=e.min&&c.push(e.id);if(!(Math.abs(a)<.1)){a=100;for(let e of s.value)e.givenSize===null&&(e.size=Math.max(Math.min(i,e.max),e.min)),a-=e.size,e.size>=e.max&&o.push(e.id),e.size<=e.min&&c.push(e.id);Math.abs(a)>.1&&G(a,o,c)}},G=(e,t,n)=>{let r;r=e>0?e/(l.value-t.length):e/(l.value-n.length),s.value.forEach((i,a)=>{if(e>0&&!t.includes(i.id)){let t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}else if(!n.includes(i.id)){let t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}}),Math.abs(e)>.1&&d.value&&console.warn(`Splitpanes: Could not resize panes correctly due to their constraints.`)},K=(e,t=void 0,n=!1)=>{let a=t?.index??f.value.activeSplitter??null;r(e,{...t,...a!==null&&{index:a},...n&&a!==null&&{prevPane:s.value[a-+!!i.firstSplitter],nextPane:s.value[a+ +!i.firstSplitter]},panes:s.value.map(e=>({min:e.min,max:e.max,size:e.size}))})};(0,t.watch)(()=>i.firstSplitter,()=>I()),(0,t.watch)(()=>i.horizontal,e=>(0,t.nextTick)(()=>{r(`direction-changed`,{horizontal:e,panes:s.value.map(e=>({min:e.min,max:e.max,size:e.size}))})})),(0,t.onMounted)(()=>{N(),I(),V(),K(`ready`),d.value=!0}),(0,t.onBeforeUnmount)(()=>d.value=!1);let q=()=>{let{class:e,...n}=a;return(0,t.h)(`div`,{ref:u,class:[m.value,e],...n},o.default?.())};return(0,t.provide)(`panes`,s),(0,t.provide)(`indexedPanes`,c),(0,t.provide)(`horizontal`,(0,t.computed)(()=>i.horizontal)),(0,t.provide)(`requestUpdate`,L),(0,t.provide)(`onPaneAdd`,z),(0,t.provide)(`onPaneRemove`,B),(0,t.provide)(`onPaneClick`,C),(e,n)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(q)))}}),UCe={__name:`pane`,props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(e){let n=e,r=(0,t.inject)(`requestUpdate`),i=(0,t.inject)(`onPaneAdd`),a=(0,t.inject)(`horizontal`),o=(0,t.inject)(`onPaneRemove`),s=(0,t.inject)(`onPaneClick`),c=(0,t.getCurrentInstance)()?.uid,l=(0,t.inject)(`indexedPanes`),u=(0,t.computed)(()=>l.value[c]),d=(0,t.ref)(null),f=(0,t.computed)(()=>{let e=isNaN(n.size)||n.size===void 0?0:parseFloat(n.size);return Math.max(Math.min(e,m.value),p.value)}),p=(0,t.computed)(()=>{let e=parseFloat(n.minSize);return isNaN(e)?0:e}),m=(0,t.computed)(()=>{let e=parseFloat(n.maxSize);return isNaN(e)?100:e}),h=(0,t.computed)(()=>{let e=u.value?.size??(n.size===void 0?void 0:f.value);return e===void 0?``:`${a.value?`height`:`width`}: ${e}%`});return(0,t.watch)(()=>f.value,e=>r({uid:c,size:e})),(0,t.watch)(()=>p.value,e=>r({uid:c,min:e})),(0,t.watch)(()=>m.value,e=>r({uid:c,max:e})),(0,t.onMounted)(()=>{i({id:c,el:d.value,min:p.value,max:m.value,givenSize:n.size===void 0?null:f.value,size:f.value})}),(0,t.onBeforeUnmount)(()=>o(c)),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`paneEl`,ref:d,class:`splitpanes__pane`,onClick:n[0]||=n=>(0,t.unref)(s)(n,e._.uid),style:(0,t.normalizeStyle)(h.value)},[(0,t.renderSlot)(e.$slots,`default`)],4))}};mW(),pK(),yd();var WCe={name:`CustomSplitter`,components:{Splitpanes:HCe,Pane:UCe,ResizeSensor:uq},props:{index:{type:String,default:function(){return`split-1`}}},methods:{requestStylesUpdate:function(e){if(this.$refs&&e in this.$refs&&this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].$el){let t=this.$refs[e][0].$el.getBoundingClientRect();fW.emit(`PaneResize`,{refName:e,rect:t})}},calculateStyles:function(e){this.$refs&&(e.startsWith(`pane`)?this.requestStylesUpdate(e):e.startsWith(`split`)&&this.customLayout[e].children.forEach(e=>{e.startsWith(`pane`)&&this.requestStylesUpdate(e)}))},childUnmounted:function(e){fW.emit(`PaneUnmounted`,{refName:e})}},computed:{...(0,n.mapStores)(fK),children(){return this.customLayout[this.index].children},customLayout(){return this.splitFlowStore.customLayout},isHorizontal(){return this.customLayout[this.index].horizontal}}},GCe={style:{height:`100%`,width:`100%`}};function KCe(e,n,r,i,a,o){let s=uq,c=(0,t.resolveComponent)(`custom-splitter`,!0),l=(0,t.resolveComponent)(`pane`),u=(0,t.resolveComponent)(`splitpanes`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,GCe,[(0,t.createVNode)(s,{onResize:n[0]||=e=>o.calculateStyles(r.index)}),(0,t.createVNode)(u,{class:`default-theme`,horizontal:o.isHorizontal,"maximize-panes":!1},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.children,e=>((0,t.openBlock)(),(0,t.createBlock)(l,{key:e,ref_for:!0,ref:e,onVnodeBeforeUnmount:t=>o.childUnmounted(e)},{default:(0,t.withCtx)(()=>[o.customLayout[e].content?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,onResize:t=>o.calculateStyles(e)},null,8,[`onResize`])):((0,t.openBlock)(),(0,t.createBlock)(c,{key:e,index:e},null,8,[`index`]))]),_:2},1032,[`onVnodeBeforeUnmount`]))),128))]),_:1},8,[`horizontal`])])}var dq=vd(WCe,[[`render`,KCe],[`__scopeId`,`data-v-01f20914`]]);mW(),pK(),_d(),_K(),dW(),eK(),yd();var qCe={name:`SplitDialog`,components:{ContentVuer:lq,CustomSplitter:dq},props:{entries:{type:Array,default:function(){return[]}}},data:function(){return{styles:{},query:``,filter:[]}},methods:{resourceSelected:function(e){this.$emit(`resource-selected`,e)},speciesChanged:function(e){this.$emit(`species-changed`,e)},getClass:function(e){return this.isIdVisible(e)?this.getRefsName(e):`inactive`},getRefsName:function(e){let t=this.splitFlowStore.getPaneNameById(e);return t&&(t in this.styles||(this.styles[t]={})),t},getStyle:function(e){let t=this.getRefsName(e);return t&&t in this.styles&&this.styles[t]?this.styles[t]:{}},getActiveContents:function(){let e=[],t=this.$refs.content;return t&&t.forEach(t=>{t.visible&&e.push(t)}),e},isIdVisible:function(e){let t=this.splitFlowStore.getPaneNameById(e),n=!1;return t!==void 0&&(n=this.splitFlowStore.isPaneActive(t)),n},getContentsWithId:function(e){let t=this.$refs.content;for(let n=0;n<t.length;n++)if(t[n].getId()==e)return t[n]},getContentsState:function(){let e=[],t=this.$refs.content;for(let n=0;n<t.length;n++)e.push(t[n].getState());return e},setStyles:function(e,t){if(this.$refs&&this.$refs.tabContainer){let n=this.$refs.tabContainer.getBoundingClientRect(),r={};r.width=`${t.width}px`,r.left=`${t.left-n.left}px`,r.height=`${t.height}px`,r.top=`${t.top-n.top}px`,r.display=`block`,this.styles[e]=r}},hidePane:function(e){if(this.$refs&&`tabContainer`in this.$refs){let t={};t.visibility=`hidden`,t[`pointer-events`]=`none`,t.opacity=`0`,this.styles[e]=t}},resize:function(){this.__userResize__=!0},resized:function(e,t){this.__userResize__&&this.splitFlowStore.setSplitter({name:e,value:t[0].size}),this.__userResize__=!1},onSpeciesLayoutConnectivityUpdate:function(){let e=this.splitFlowStore.getActivePaneIds(),t=[307,`307`],n=Object.keys(this.connectivitiesStore.globalConnectivities).find(e=>e.includes(`sckan`)),r=Array.from(new Set(this.entries.filter(n=>e.includes(n.id)&&(n.uuid&&(n.type===`Flatmap`||n.type===`MultiFlatmap`)||n.type===`Scaffold`&&n.resource&&(n.isBodyScaffold||t.includes(n.discoverId)))).map(e=>{if(e.type===`Flatmap`||e.type===`MultiFlatmap`)return e.uuid;if(e.type===`Scaffold`)return e.resource})));if(r.length){if(this.connectivitiesStore.updateActiveConnectivityKeys(r)){let e=this.connectivitiesStore.getUniqueFilterOptionsByKeys;fW.emit(`connectivity-filter-options`,e)}}else{let e=this.connectivitiesStore.globalConnectivities[n]||[];fW.emit(`connectivity-knowledge`,{data:e,highlight:[],processed:!1,isDefaultKnowledge:!0}),fW.emit(`connectivity-filter-options`,[]),this.connectivitiesStore.updateActiveConnectivityKeys([n])}},getGeneralSearchedId:function(e,t,n=`query`){let r=[];return e.forEach(e=>{let i=[JSON.stringify(e[`nerve-label`])];n===`query`&&(i=[...i,e.id,e.label,e[`long-label`],JSON.stringify(e.nerves)]),i.some(e=>e?.toLowerCase().includes(t.toLowerCase()))&&!r.includes(e.id)&&r.push(e.id)}),r},searchPathwaysByTerm:function(e,t){let n=e.mapImp.pathways?.models;if(!n||!t)return[];let r=t.toLowerCase();return/[-_:\s/]+/.test(r)?n.filter(e=>(e.id?.toLowerCase()||``).includes(r)).map(e=>e.id):r.length<3?n.filter(e=>(e.id?.toLowerCase()||``).split(/[-_:\s/]+/).includes(r)).map(e=>e.id):n.filter(e=>(e.id?.toLowerCase()||``).split(/[-_:\s/]+/).some(e=>e===r||e.length>=3&&e.includes(r))).map(e=>e.id)},getFlatmapSearchedId:function(e,t){let n=[],r=e.mapImp.search(t);return(r.__featureIds||r.featureIds).forEach(r=>{let i=e.mapImp.annotation(r);[i.id,i.name,i.label,i.models,i.source].some(e=>e&&e.toLowerCase().includes(t.toLowerCase()))&&i.models&&!n.includes(i.models)&&n.push(i.models)}),n},getLatestFlatmapUUID:async function(e,t){return(await VG(e,t)).uuid},parseSearchTerms:function(e){return e.split(`,`).map(e=>e.trim().replace(/["']/g,``)).filter(e=>e)},connectivityQueryFilter:async function(e){this.query=``,this.filter=[];let t=this.getActiveContents(),n=this.settingsStore.flatmapAPI,r=[],i=[],a=[],o=!1,s=[],c=[],l=``,u=this.connectivitiesStore.getUniqueFilterOptionsByKeys,d=this.connectivitiesStore.getUniqueFilterSourcesByKeys,f=this.connectivitiesStore.getUniqueConnectivitiesByKeys;for(let i of t){let t=i.$refs.viewer;if(t){let i=t.$refs.multiflatmap,a=t.$refs.flatmap,o=t.$refs.scaffold,p=t.$refs.iframe,m=t.$refs.plot,h=t.$refs.simulation,g=null;if(i&&t.flatmapIsReady()){let e=i.getCurrentFlatmap();e&&e.mapImp&&(g=e,l=g.mapImp.uuid)}else a&&a.mapImp?(g=a,l=g.mapImp.uuid):(g=o||p||m||h,l=await this.getLatestFlatmapUUID(n,`human-flatmap_male`));let _=a||i;if(e){if(this.query=e.query,e.query){let e=this.parseSearchTerms(this.query),t=[];for(let n=0;n<e.length;n++){let r=e[n],i=_?this.getFlatmapSearchedId(g,r):this.getGeneralSearchedId(f,r,`query`);if(t.push(i),_){let e=this.searchPathwaysByTerm(g,r);t.push(...e)}}let i=[...new Set(t.flat())];if(i.length){r.push(...i);let e=_?await Rg(n,l,i):i;s.push(...e)}}let i={origins:[],vias:[],destinations:[],all:[]},a={};if(o&&t.syncFilter(e.filter),e.filter.forEach(e=>{let t=e.facetPropPath.split(`.`).pop(),n=e.facetPropPath.includes(`flatmap.connectivity.source`);if(n&&e.facet?.toLowerCase()!==`show all`){let t=e.facet.replace(`,[`,`, [`),n=e.facetPropPath.split(`.`).pop();if(n===`origin`)i.origins.push(t);else if(n===`destination`)i.destinations.push(t);else if(n===`via`)i.vias.push(t);else{let e=JSON.parse(t).flat(1/0);i.all.push(...e)}}if(o)!n&&e.facet?.toLowerCase()!==`show all`&&(t in a||(a[t]=[]),a[t].push(...this.getGeneralSearchedId(f,e.facet,`facet`)));else if(_&&!n){let n=u.find(e=>e.key.includes(t));n&&n.children.forEach(n=>{if(n.label.toLowerCase()===e.facet.toLowerCase()&&n.key){let e=n.key.split(`.`).pop();t in a||(a[t]=[]),a[t].push(...d[t][e])}})}}),i.origins.length||i.destinations.length||i.vias.length){let e={flatmapAPI:n,knowledgeSource:l,origins:i.origins,destinations:i.destinations,vias:i.vias};`ovd`in a||(a.ovd=[]),a.ovd.push(...await oye(e))}else i.all.length&&(`all`in a||(a.all=[]),a.all.push(...await Rg(n,l,i.all)));let p=Object.values(a);this.filter=[...this.filter,...p];let m=this.filter.length?this.filter.reduce((e,t)=>e.filter(e=>t.includes(e))):[];c.push(...m)}}}let p;this.query&&!this.filter.length?p=s:!this.query&&this.filter.length?p=c:this.query&&this.filter.length&&(p=s.filter(e=>c.includes(e))),p&&(a.push(...p),f=f.filter(e=>p.includes(e.id)),o=!0),i.push(...f);let m=[...new Set(r)],h=[...new Set(a)],g=Array.from(new Map(i.map(e=>[e.id,e])).values());g=[...g.filter(e=>m.includes(e.id)),...g.filter(e=>!m.includes(e.id))];let _={data:g,highlight:h,processed:o};fW.emit(`connectivity-knowledge`,_)},updateFlatmapMinimap:function(){let e=this.splitFlowStore.getActivePaneIds(),t=this.$refs.content,n=[];for(let e=0;e<t.length;e++)t[e].viewerType===`MultiFlatmap`&&n.push(t[e]);n.sort((e,t)=>t.visible-e.visible);let r=!(e.length>4),i=this.settingsStore.displayMinimap;this.settingsStore.updateDisplayMinimap(r),n.forEach(e=>{e.toggleMinimap(r,i)})}},computed:{...(0,n.mapStores)(fK,gK,gd),horizontal(){return this.splitFlowStore.activeView===`2horpanel`},splitters(){return this.splitFlowStore.splitters}},mounted:function(){this._offBus=pW({PaneResize:e=>{this.setStyles(e.refName,e.rect),this.updateFlatmapMinimap()},PaneUnmounted:e=>{this.hidePane(e.refName)},"species-layout-connectivity-update":()=>{this.onSpeciesLayoutConnectivityUpdate()},"connectivity-query-filter":e=>{this.connectivityQueryFilter(e)},hoverUpdate:e=>{this.getActiveContents().forEach(t=>{t.onHoverUpdate(e)})},startHelp:()=>{this.getActiveContents().forEach(e=>{e.onStartHelp()})},"connectivity-item-close":()=>{this.getActiveContents().forEach(e=>{e.onConnectivityItemClose()})},"sidebar-annotation-close":()=>{this.getActiveContents().forEach(e=>{e.onSidebarAnnotationClose()})},globalViewerSettingsUpdate:()=>{this.$refs.content.forEach(e=>{e.onGlobalViewerSettingsUpdate()})},markerUpdate:()=>{this.$refs.content.forEach(e=>{e.onFlatmapMarkerUpdate()})},"connectivity-hovered":e=>{this.getActiveContents().forEach(t=>{t.onShowConnectivityTooltips(e)})},"connectivity-source-change":e=>{let t=this.getActiveContents(),n=[];t.forEach(t=>{t.onConnectivitySourceChange(e,n)})},"show-connectivity":e=>{this.getActiveContents().forEach(t=>{t.onShowConnectivity(e)})},"show-reference-connectivities":e=>{this.getActiveContents().forEach(t=>{t.onShowReferenceConnectivity(e)})},"filter-visibility":e=>{this.getActiveContents().forEach(t=>{t.onFilterVisibility(e)})}})},beforeUnmount:function(){this._offBus?.()}},JCe={class:`tab-container`,ref:`tabContainer`};function YCe(e,n,r,i,a,o){let s=dq,c=lq;return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,JCe,[(0,t.createVNode)(s,{index:`split-1`,key:`split-1`}),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.entries,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.id,style:(0,t.normalizeStyle)(o.getStyle(e.id)),class:(0,t.normalizeClass)([o.getClass(e.id),`contentvuer`])},[((0,t.openBlock)(),(0,t.createBlock)(c,{key:e.id,entry:e,ref_for:!0,ref:`content`,onResourceSelected:o.resourceSelected,onSpeciesChanged:o.speciesChanged,visible:o.isIdVisible(e.id)},null,8,[`entry`,`onResourceSelected`,`onSpeciesChanged`,`visible`]))],6))),128))],512)}var fq=vd(qCe,[[`render`,YCe],[`__scopeId`,`data-v-19d2c2d6`]]);yd();var XCe={name:`SearchControls`,props:{failedSearch:void 0},components:{MapSvgIcon:XW},methods:{fetchSuggestions:function(e,t){e===``?t([]):this.$emit(`fetch-suggestions`,{term:e,cb:t})}},data:function(){return{searchText:``}}},ZCe={class:`search-container`},QCe={key:0,class:`text not-found-text`};function $Ce(e,n,r,i,a,o){let s=sse,c=(0,t.resolveComponent)(`map-svg-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,ZCe,[n[4]||=(0,t.createElementVNode)(`div`,{class:`text search-text`},`Search within display`,-1),(0,t.createVNode)(s,{class:`search-box`,placeholder:`Search`,modelValue:e.searchText,"onUpdate:modelValue":n[0]||=t=>e.searchText=t,"fetch-suggestions":o.fetchSuggestions,onKeyup:n[1]||=(0,t.withKeys)(t=>e.$emit(`search`,e.searchText),[`enter`]),onSelect:n[2]||=t=>e.$emit(`search`,t.value),teleported:!1,"popper-class":`autocomplete-popper`},null,8,[`modelValue`,`fetch-suggestions`]),(0,t.createVNode)(c,{icon:`magnifyingGlass`,class:`magnify`,onClick:n[3]||=t=>e.$emit(`search`,e.searchText)}),r.failedSearch?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,QCe,`'`+(0,t.toDisplayString)(r.failedSearch)+`' not found`,1)):(0,t.createCommentVNode)(``,!0)])}var pq=vd(XCe,[[`render`,$Ce],[`__scopeId`,`data-v-2390b905`]]);So(),mW(),aK(),_d(),pK(),gW(),yd();var ewe={name:`DialogToolbarContent`,components:{MapSvgIcon:XW,MapSvgSpriteColor:PG,ScreenshotPopover:bd,SearchControls:pq},props:{numberOfEntries:{type:Number,default:0},showIcons:{type:Boolean,default:!1},captureScreenshot:{type:Function,default:void 0},getScreenshotTarget:{type:Function,default:void 0}},inject:[`showGlobalSettings`],computed:{...(0,n.mapStores)(iK,gd,fK),activeView(){return this.splitFlowStore.activeView},helpDelay(){return this.settingsStore.helpDelay},shareLink(){return this.settingsStore.shareLink},offlineAnnotationEnabled(){return this.settingsStore.offlineAnnotationEnabled},viewIcons(){return this.splitFlowStore.viewIcons}},watch:{shareLink:function(){this.loadingLink=!1}},data:function(){return{activeViewRef:void 0,displayShareOptions:!1,ElIconCopyDocument:(0,t.shallowRef)(Za),exportAnnotation:!1,failedSearch:void 0,globalSettings:{},globalSettingRef:void 0,isFullscreen:!1,loadingLink:!0,permalinkRef:void 0,viewingModes:{Exploration:`Find relevant research and view detail of neural pathways by selecting a pathway to view its connections and data sources`,"Neuron Connection":`Discover neuron connections by selecting a feature and viewing its associated network connections`,Annotation:[`View feature annotations`,`Add, comment on and view feature annotations`]},authorisedUser:!1,mapLoaded:!1}},methods:{loadGlobalSettings:function(){this.globalSettings={...this.globalSettings,...this.settingsStore.globalSettings}},updateViewingMode:function(e,t){let{target:n}=e;n.closest(`.el-checkbox`)||(this.globalSettings.viewingMode=t,t===`Exploration`?(this.globalSettings.displayMarkers=!0,this.globalSettings.interactiveMode=`dataset`):t===`Annotation`?(this.globalSettings.displayMarkers=!1,this.globalSettings.interactiveMode=`dataset`):(this.globalSettings.displayMarkers=!1,this.globalSettings.interactiveMode=`connectivity`),this.updateGlobalSettings(`viewingMode`))},updateGlobalSettings:function(e){let t=this.settingsStore.getUpdatedGlobalSettingsKey(this.globalSettings);this.settingsStore.updateGlobalSettings(this.globalSettings),t.includes(`displayMarkers`)&&fW.emit(`markerUpdate`),t.includes(`interactiveMode`)&&fW.emit(`modeUpdate`,this.globalSettings.interactiveMode),(t.includes(`viewingMode`)||t.includes(`connectionType`)||t.includes(`flightPathDisplay`)||t.includes(`organsDisplay`)||t.includes(`outlinesDisplay`)||t.includes(`backgroundDisplay`))&&fW.emit(`globalViewerSettingsUpdate`);let n=this.globalSettings[e];e===`flightPathDisplay`&&(n=this.globalSettings.flightPathDisplay?`3D`:`2D`),e===`organsDisplay`&&(n=this.globalSettings.organsDisplay?`Color`:`Grayscale`),e===`outlinesDisplay`&&(n=this.globalSettings.outlinesDisplay?`Show`:`Hide`),t.length&&hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_settings_${e}`,category:n,location:`map_toolbar`})},titleClicked:function(e){this.$emit(`titleClicked`,e)},startHelp:function(){fW.emit(`startHelp`),hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_toolbar_help`,category:`help_mode_start`,location:`map_toolbar`})},onFullscreen:function(){this.$emit(`onFullscreen`),this.isFullscreen=!this.isFullscreen,this.isFullscreen&&hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_toolbar_fullscreen`,category:this.isFullscreen?`enter`:`exit`,location:`map_toolbar`})},onFullscreenEsc:function(){document.fullscreenElement||(this.isFullscreen=!1,hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_toolbar_fullscreen`,category:this.isFullscreen?`enter`:`exit`,location:`map_toolbar`}))},close:function(){this.$emit(`close`)},copyShareLink:function(){document&&(this.$refs.linkInput.$el.querySelector(`input`).select(),document.execCommand(`copy`),hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_permalink`,category:`permalink_copy`,location:`map_toolbar`}))},setFailedSearch:function(e){this.failedSearch=e},requestShareLink:function(){sessionStorage.getItem(`anonymous-annotation`)?this.displayShareOptions=!0:this.getShareLink(!1)},onCaptureScreenshot:async function(e){let t=await this.captureScreenshot(e);return hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_screenshot`,category:`png_${e.scale}x`,location:e.source===`shortcut`?`keyboard_shortcut`:`map_toolbar`}),t},getShareLink:function(e){this.displayShareOptions=!1,this.loadingLink=!0,fW.emit(`updateShareLinkRequested`,e),hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_permalink`,category:`permalink_generate`,location:`map_toolbar`})},viewClicked:function(e){let t=this.activeView;if(this.splitFlowStore.updateActiveView({view:e,entries:this.entriesStore.entries}),e!==t){let t=this.viewIcons.find(t=>t.icon===e);hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_toolbar_split_view`,category:t?.name||``,location:`map_toolbar`})}this.$refs.viewPopover&&this.$refs.viewPopover.hide()}},mounted:function(){this.activeViewRef=(0,t.shallowRef)(this.$refs.activeViewRef),this.permalinkRef=(0,t.shallowRef)(this.$refs.permalinkRef),this.globalSettingRef=(0,t.shallowRef)(this.$refs.globalSettingRef),this._offBus=pW({mapLoaded:()=>{this.mapLoaded=!0}}),document.addEventListener(`fullscreenchange`,this.onFullscreenEsc),this.loadGlobalSettings()},unmounted:function(){this._offBus?.(),document.removeEventListener(`fullscreenchange`,this.onFullscreenEsc)}},twe={class:`header`},nwe={class:`viewing-mode-selector`},rwe={class:`el-dropdown-link`},iwe={class:`toolbar-dropdown-badge`},awe={class:`el-option__description`},owe={key:0,class:`setting-popover-block`},swe={class:`el-radio__description`},cwe={key:0},lwe={key:1},uwe={key:2},dwe={key:3},fwe={class:`setting-popover-inner`},pwe={key:0,class:`setting-popover-block`},mwe={key:1,class:`setting-popover-block`},hwe={key:2,class:`setting-popover-block`},gwe={key:3,class:`setting-popover-block`};function _we(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`map-svg-sprite-color`),c=pq,l=Xa,u=Do,d=po,f=no,p=za,m=jc,h=Ac,g=Ble,_=Vle,v=zle,y=(0,t.resolveComponent)(`map-svg-icon`),b=wce,x=Cce,S=Qc,C=bd,w=ic,T=fce,E=Cs,D=bce,O=uo,k=al;return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,twe,[(0,t.createVNode)(s),(0,t.createVNode)(c,{onSearch:n[0]||=t=>e.$emit(`local-search`,{term:t}),onFetchSuggestions:n[1]||=t=>e.$emit(`fetch-suggestions`,{data:t}),failedSearch:e.failedSearch},null,8,[`failedSearch`]),(0,t.createVNode)(x,{class:`icon-group`},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,nwe,[n[22]||=(0,t.createTextVNode)(` Viewing Mode: `,-1),(0,t.createVNode)(v,{teleported:!1,trigger:`hover`,class:`toolbar-dropdown`,"popper-class":`toolbar-dropdown-popper`,"hide-on-click":!1,disabled:!e.mapLoaded,placement:`bottom-end`},{dropdown:(0,t.withCtx)(()=>[n[21]||=(0,t.createElementVNode)(`h4`,null,`Viewing Mode:`,-1),(0,t.createVNode)(_,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.viewingModes,(r,i)=>((0,t.openBlock)(),(0,t.createBlock)(g,{key:i,onClick:e=>o.updateViewingMode(e,i),class:(0,t.normalizeClass)({"is-selected":e.globalSettings.viewingMode===i})},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`h5`,null,[i===`Exploration`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:0,class:`el-icon--left`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(l)]),_:1})):(0,t.createCommentVNode)(``,!0),i===`Neuron Connection`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:1,class:`el-icon--left`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(d)]),_:1})):(0,t.createCommentVNode)(``,!0),i===`Annotation`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:2,class:`el-icon--left`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(f)]),_:1})):(0,t.createCommentVNode)(``,!0),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(i),1)]),(0,t.createElementVNode)(`small`,awe,[i===`Annotation`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[e.authorisedUser?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(r[1]),1)],64)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(r[0]),1)],64)),o.offlineAnnotationEnabled?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:2},[(0,t.createTextVNode)(`(Anonymous annotate)`)],64)):(0,t.createCommentVNode)(``,!0)],64)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(r),1)],64))]),i===`Neuron Connection`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[`connectionType`in e.globalSettings?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,owe,[(0,t.createVNode)(h,{modelValue:e.globalSettings.connectionType,"onUpdate:modelValue":n[2]||=t=>e.globalSettings.connectionType=t,onChange:n[3]||=e=>o.updateGlobalSettings(`connectionType`)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(m,{value:`Origin`,size:`small`},{default:(0,t.withCtx)(()=>[...n[17]||=[(0,t.createTextVNode)(`Origin`,-1)]]),_:1}),(0,t.createVNode)(m,{value:`Via`,size:`small`},{default:(0,t.withCtx)(()=>[...n[18]||=[(0,t.createTextVNode)(`Via`,-1)]]),_:1}),(0,t.createVNode)(m,{value:`Destination`,size:`small`},{default:(0,t.withCtx)(()=>[...n[19]||=[(0,t.createTextVNode)(` Destination `,-1)]]),_:1}),(0,t.createVNode)(m,{value:`All`,size:`small`},{default:(0,t.withCtx)(()=>[...n[20]||=[(0,t.createTextVNode)(`All`,-1)]]),_:1})]),_:1},8,[`modelValue`]),(0,t.createElementVNode)(`div`,swe,[e.globalSettings.connectionType===`Origin`?((0,t.openBlock)(),(0,t.createElementBlock)(`small`,cwe,` Neuron populations beginning at a location. `)):e.globalSettings.connectionType===`Via`?((0,t.openBlock)(),(0,t.createElementBlock)(`small`,lwe,` Neuron populations that run through a location. `)):e.globalSettings.connectionType===`Destination`?((0,t.openBlock)(),(0,t.createElementBlock)(`small`,uwe,` Neuron populations terminating at a location. `)):((0,t.openBlock)(),(0,t.createElementBlock)(`small`,dwe,`Neuron populations associated with a location.`))])])):(0,t.createCommentVNode)(``,!0)],64)):(0,t.createCommentVNode)(``,!0)]),_:2},1032,[`onClick`,`class`]))),128))]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,rwe,[e.globalSettings.viewingMode===`Exploration`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:0,class:`el-icon--left`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(l)]),_:1})):(0,t.createCommentVNode)(``,!0),e.globalSettings.viewingMode===`Neuron Connection`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:1,class:`el-icon--left`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(d)]),_:1})):(0,t.createCommentVNode)(``,!0),e.globalSettings.viewingMode===`Annotation`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:2,class:`el-icon--left`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(f)]),_:1})):(0,t.createCommentVNode)(``,!0),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(e.globalSettings.viewingMode)+` `,1),e.globalSettings.viewingMode===`Neuron Connection`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:3},[n[16]||=(0,t.createTextVNode)(` \xA0 `,-1),(0,t.createElementVNode)(`small`,iwe,[(0,t.createElementVNode)(`em`,null,(0,t.toDisplayString)(e.globalSettings.connectionType),1)])],64)):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(u,{class:`el-icon--right`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(p)]),_:1})])]),_:1},8,[`disabled`])]),e.activeViewRef?((0,t.openBlock)(),(0,t.createBlock)(S,{key:0,"virtual-ref":e.activeViewRef,ref:`viewPopover`,placement:`bottom`,width:`133`,teleported:!1,trigger:`click`,"popper-class":`view-icon-popover`,"virtual-triggering":``},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.viewIcons,e=>((0,t.openBlock)(),(0,t.createBlock)(x,{gutter:20,key:e.name,class:(0,t.normalizeClass)([{active:e.icon==o.activeView},{disabled:e.min>r.numberOfEntries},`view-icon-row`]),onClick:t=>o.viewClicked(e.icon)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(b,{span:4},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(y,{icon:e.icon,class:`view-icon`},null,8,[`icon`])]),_:2},1024),(0,t.createVNode)(b,{offset:2,span:18,class:`view-text`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.name),1)]),_:2},1024)]),_:2},1032,[`class`,`onClick`]))),128))]),_:1},8,[`virtual-ref`])):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(S,{class:`tooltip`,content:`Split screen`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.createVNode)(y,{icon:o.activeView,ref:`activeViewRef`,class:(0,t.normalizeClass)([{disabled:1>=r.numberOfEntries},`header-icon`,`splitscreen-icon`])},null,8,[`icon`,`class`])]),_:1},8,[`show-after`]),(0,t.createVNode)(S,{class:`tooltip`,content:`Help`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.createVNode)(y,{icon:`tooltips`,class:`header-icon`,onClick:n[4]||=e=>o.startHelp()})]),_:1},8,[`show-after`]),(0,t.createVNode)(S,{class:`tooltip`,content:`Fullscreen`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createVNode)(y,{icon:`fullScreen`,class:`header-icon`,onClick:o.onFullscreen},null,8,[`onClick`]),[[t.vShow,!e.isFullscreen]])]),_:1},8,[`show-after`]),(0,t.createVNode)(S,{class:`tooltip`,content:`Exit fullscreen`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createVNode)(y,{icon:`closeFullScreen`,class:`header-icon`,onClick:o.onFullscreen},null,8,[`onClick`]),[[t.vShow,e.isFullscreen]])]),_:1},8,[`show-after`]),r.captureScreenshot?((0,t.openBlock)(),(0,t.createBlock)(C,{key:1,title:`Download screenshot of all views`,tooltip:`Download screenshot`,capture:o.onCaptureScreenshot,getTarget:r.getScreenshotTarget,disabled:!e.mapLoaded,shortcut:``},null,8,[`capture`,`getTarget`,`disabled`])):(0,t.createCommentVNode)(``,!0),e.permalinkRef?((0,t.openBlock)(),(0,t.createBlock)(S,{key:2,ref:`linkPopover`,"virtual-ref":e.permalinkRef,placement:`bottom-end`,width:`400`,teleported:!1,trigger:`click`,"popper-class":`link-popover`,"virtual-triggering":``},{default:(0,t.withCtx)(()=>[e.displayShareOptions?((0,t.openBlock)(),(0,t.createBlock)(x,{key:0},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(b,{offset:3,span:8},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(w,{type:`primary`,size:`small`,onClick:n[5]||=t=>o.getShareLink(e.exportAnnotation),class:`share-options`},{default:(0,t.withCtx)(()=>[...n[23]||=[(0,t.createTextVNode)(` Create Permalink `,-1)]]),_:1})]),_:1}),(0,t.createVNode)(b,{span:10},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(S,{class:`tooltip`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.createVNode)(T,{modelValue:e.exportAnnotation,"onUpdate:modelValue":n[6]||=t=>e.exportAnnotation=t,size:`small`},{default:(0,t.withCtx)(()=>[...n[24]||=[(0,t.createTextVNode)(` Export Annotations `,-1)]]),_:1},8,[`modelValue`])]),default:(0,t.withCtx)(()=>[...n[25]||=[(0,t.createTextVNode)(` Create a permalink with anonymous annotations. `,-1),(0,t.createElementVNode)(`br`,null,null,-1),(0,t.createTextVNode)(` NOTE: Annotations will only be stored for `,-1),(0,t.createElementVNode)(`br`,null,null,-1),(0,t.createTextVNode)(` 30 days on the server. `,-1)]]),_:1},8,[`show-after`])]),_:1})]),_:1})):(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(x,{key:1,gutter:20,"element-loading-text":`Creating link...`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(b,{span:20},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(E,{class:`link-input`,size:`small`,placeholder:`Permanant Link Here`,readonly:!0,modelValue:o.shareLink,"onUpdate:modelValue":n[7]||=e=>o.shareLink=e,ref:`linkInput`},null,8,[`modelValue`])]),_:1}),(0,t.createVNode)(b,{span:4},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(S,{class:`tooltip`,content:`Copy link`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.createVNode)(w,{class:`copy-button`,icon:e.ElIconCopyDocument,size:`small`,onClick:o.copyShareLink},null,8,[`icon`,`onClick`])]),_:1},8,[`show-after`])]),_:1})]),_:1})),[[k,e.loadingLink]])]),_:1},8,[`virtual-ref`])):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(S,{class:`tooltip`,content:`Get permalink`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createVNode)(y,{icon:`permalink`,ref:`permalinkRef`,class:`header-icon`,onClick:o.requestShareLink},null,8,[`onClick`]),[[t.vShow,o.shareLink]])]),_:1},8,[`show-after`]),(0,t.createVNode)(S,{class:`tooltip`,content:`Close`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createVNode)(y,{icon:`close`,class:`header-icon`,onClick:o.close},null,8,[`onClick`]),[[t.vShow,r.showIcons]])]),_:1},8,[`show-after`]),e.globalSettingRef?((0,t.openBlock)(),(0,t.createBlock)(S,{key:3,"virtual-ref":e.globalSettingRef,ref:`settingPopover`,placement:`bottom`,width:`230`,teleported:!1,trigger:`click`,"popper-class":`setting-popover`,"virtual-triggering":``,disabled:!e.mapLoaded},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,fwe,[n[39]||=(0,t.createElementVNode)(`h4`,null,`Display options:`,-1),`flightPathDisplay`in e.globalSettings?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,pwe,[n[28]||=(0,t.createElementVNode)(`h5`,null,`Flight path`,-1),(0,t.createVNode)(h,{modelValue:e.globalSettings.flightPathDisplay,"onUpdate:modelValue":n[8]||=t=>e.globalSettings.flightPathDisplay=t,onChange:n[9]||=e=>o.updateGlobalSettings(`flightPathDisplay`)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(D,{value:!1},{default:(0,t.withCtx)(()=>[...n[26]||=[(0,t.createTextVNode)(`2D`,-1)]]),_:1}),(0,t.createVNode)(D,{value:!0},{default:(0,t.withCtx)(()=>[...n[27]||=[(0,t.createTextVNode)(`3D`,-1)]]),_:1})]),_:1},8,[`modelValue`])])):(0,t.createCommentVNode)(``,!0),`organsDisplay`in e.globalSettings?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,mwe,[n[31]||=(0,t.createElementVNode)(`h5`,null,`Organs`,-1),(0,t.createVNode)(h,{modelValue:e.globalSettings.organsDisplay,"onUpdate:modelValue":n[10]||=t=>e.globalSettings.organsDisplay=t,onChange:n[11]||=e=>o.updateGlobalSettings(`organsDisplay`)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(D,{value:!0},{default:(0,t.withCtx)(()=>[...n[29]||=[(0,t.createTextVNode)(`Color`,-1)]]),_:1}),(0,t.createVNode)(D,{value:!1},{default:(0,t.withCtx)(()=>[...n[30]||=[(0,t.createTextVNode)(`Grayscale`,-1)]]),_:1})]),_:1},8,[`modelValue`])])):(0,t.createCommentVNode)(``,!0),`outlinesDisplay`in e.globalSettings?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,hwe,[n[34]||=(0,t.createElementVNode)(`h5`,null,`Apply outlines`,-1),(0,t.createVNode)(h,{modelValue:e.globalSettings.outlinesDisplay,"onUpdate:modelValue":n[12]||=t=>e.globalSettings.outlinesDisplay=t,onChange:n[13]||=e=>o.updateGlobalSettings(`outlinesDisplay`)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(D,{value:!0},{default:(0,t.withCtx)(()=>[...n[32]||=[(0,t.createTextVNode)(`Show`,-1)]]),_:1}),(0,t.createVNode)(D,{value:!1},{default:(0,t.withCtx)(()=>[...n[33]||=[(0,t.createTextVNode)(`Hide`,-1)]]),_:1})]),_:1},8,[`modelValue`])])):(0,t.createCommentVNode)(``,!0),`backgroundDisplay`in e.globalSettings?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,gwe,[n[38]||=(0,t.createElementVNode)(`h5`,null,`Background color`,-1),(0,t.createVNode)(h,{class:`bg-color-radio-group`,modelValue:e.globalSettings.backgroundDisplay,"onUpdate:modelValue":n[14]||=t=>e.globalSettings.backgroundDisplay=t,onChange:n[15]||=e=>o.updateGlobalSettings(`backgroundDisplay`)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(D,{value:`white`,class:`bg-color-radio`},{default:(0,t.withCtx)(()=>[...n[35]||=[(0,t.createElementVNode)(`span`,{style:{"--bg-color":`white`}},`white`,-1)]]),_:1}),(0,t.createVNode)(D,{value:`lightskyblue`,class:`bg-color-radio`},{default:(0,t.withCtx)(()=>[...n[36]||=[(0,t.createElementVNode)(`span`,{style:{"--bg-color":`lightskyblue`}},`lightskyblue`,-1)]]),_:1}),(0,t.createVNode)(D,{value:`black`,class:`bg-color-radio`},{default:(0,t.withCtx)(()=>[...n[37]||=[(0,t.createElementVNode)(`span`,{style:{"--bg-color":`black`}},`black`,-1)]]),_:1})]),_:1},8,[`modelValue`])])):(0,t.createCommentVNode)(``,!0)])]),_:1},8,[`virtual-ref`,`disabled`])):(0,t.createCommentVNode)(``,!0),o.showGlobalSettings?((0,t.openBlock)(),(0,t.createBlock)(S,{key:4,class:`tooltip`,content:`Global Settings`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`,disabled:!e.mapLoaded},{reference:(0,t.withCtx)(()=>[(0,t.createVNode)(u,{ref:`globalSettingRef`,disabled:!e.mapLoaded,class:(0,t.normalizeClass)([`header-icon global-settings-icon`,{disabled:!e.mapLoaded}])},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(O)]),_:1},8,[`disabled`,`class`])]),_:1},8,[`show-after`,`disabled`])):(0,t.createCommentVNode)(``,!0)]),_:1})])}var mq=vd(ewe,[[`render`,_we],[`__scopeId`,`data-v-65f7a49c`]]);So(),dW(),_W();var vwe=Object.create,hq=Object.defineProperty,ywe=Object.getOwnPropertyDescriptor,bwe=Object.getOwnPropertyNames,xwe=Object.getPrototypeOf,gq=Object.prototype.hasOwnProperty,Swe=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Cwe=(e,t)=>{let n={};for(var r in e)hq(n,r,{get:e[r],enumerable:!0});return t||hq(n,Symbol.toStringTag,{value:`Module`}),n},wwe=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=bwe(t),a=0,o=i.length,s;a<o;a++)s=i[a],!gq.call(e,s)&&s!==n&&hq(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=ywe(t,s))||r.enumerable});return e},Twe=(e,t,n)=>(n=e==null?{}:vwe(xwe(e)),wwe(t||!e||!e.__esModule||!gq.call(e,`default`)?hq(n,`default`,{value:e,enumerable:!0}):n,e)),_q={tab:`Tab`,enter:`Enter`,space:`Space`,left:`ArrowLeft`,up:`ArrowUp`,right:`ArrowRight`,down:`ArrowDown`,esc:`Escape`,delete:`Delete`,backspace:`Backspace`,numpadEnter:`NumpadEnter`,pageUp:`PageUp`,pageDown:`PageDown`,home:`Home`,end:`End`},vq=`update:modelValue`,yq=`change`,bq=`input`,xq=[``,`default`,`small`,`large`];function Sq(e,n){let r=(0,t.shallowRef)();return(0,t.watchEffect)(()=>{r.value=e()},{...n,flush:n?.flush??`sync`}),(0,t.readonly)(r)}function Cq(e,n){return(0,t.getCurrentScope)()?((0,t.onScopeDispose)(e,n),!0):!1}var wq=new WeakMap,Ewe=(...e)=>{let n=e[0],r=(0,t.getCurrentInstance)()?.proxy??(0,t.getCurrentScope)();if(r==null&&!(0,t.hasInjectionContext)())throw Error(`injectLocal must be called in setup`);return r&&wq.has(r)&&n in wq.get(r)?wq.get(r)[n]:(0,t.inject)(...e)},Tq=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var Dwe=e=>e!=null,Owe=Object.prototype.toString,kwe=e=>Owe.call(e)===`[object Object]`,Eq=(e,t,n)=>Math.min(n,Math.max(t,e)),Dq=()=>{},Oq=Awe();function Awe(){var e,t;return Tq&&!!((e=window)!=null&&(e=e.navigator)!=null&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function jwe(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return`cancel`in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}function Mwe(e,n={}){let r,i,a=Dq,o=Dq,s=(0,t.shallowRef)(!1),c=e=>{clearTimeout(e),a(),a=Dq},l;return Object.assign(u=>{let d=(0,t.toValue)(e),f=(0,t.toValue)(n.maxWait);return r&&c(r),d<=0||f!==void 0&&f<=0?(i&&=(c(i),void 0),s.value=!1,Promise.resolve(u())):(s.value=!0,new Promise((e,t)=>{a=n.rejectOnCancel?t:e,o=e,l=u,f&&!i&&(i=setTimeout(()=>{r&&c(r),i=void 0,s.value=!1,e(l())},f)),r=setTimeout(()=>{i&&c(i),i=void 0,s.value=!1,e(u())},d)}))},{cancel:()=>{r&&=(c(r),void 0),i&&=(c(i),void 0),s.value=!1,o=Dq},flush:()=>{if(s.value){r&&=(clearTimeout(r),void 0),i&&=(clearTimeout(i),void 0),s.value=!1;let e=o;a=Dq,o=Dq,e(l())}},isPending:(0,t.shallowReadonly)(s)})}function kq(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function Aq(e){return Array.isArray(e)?e:[e]}function Nwe(e){return e||(0,t.getCurrentInstance)()}function jq(e,t=200,n={}){return jwe(Mwe(t,n),e)}function Pwe(e,n=!0,r){Nwe(r)?(0,t.onMounted)(e,r):n?e():(0,t.nextTick)(e)}function Mq(e,n,r={}){let{immediate:i=!0,immediateCallback:a=!1}=r,o=(0,t.shallowRef)(!1),s;function c(){s&&=(clearTimeout(s),void 0)}function l(){o.value=!1,c()}function u(...r){a&&e(),c(),o.value=!0,s=setTimeout(()=>{o.value=!1,s=void 0,e(...r)},(0,t.toValue)(n))}return i&&(o.value=!0,Tq&&u()),Cq(l),{isPending:(0,t.shallowReadonly)(o),start:u,stop:l}}function Fwe(e,n,r){return(0,t.watch)(e,n,{...r,immediate:!0})}var Nq=Tq?window:void 0;Tq&&window.document,Tq&&window.navigator,Tq&&window.location;function Pq(e){let n=(0,t.toValue)(e);return n?.$el??n}function Fq(...e){let n=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),r=(0,t.computed)(()=>{let n=Aq((0,t.toValue)(e[0])).filter(e=>e!=null);return n.every(e=>typeof e!=`string`)?n:void 0});return Fwe(()=>[r.value?.map(e=>Pq(e))??[Nq].filter(e=>e!=null),Aq((0,t.toValue)(r.value?e[1]:e[0])),Aq((0,t.unref)(r.value?e[2]:e[1])),(0,t.toValue)(r.value?e[3]:e[2])],([e,t,r,i],a,o)=>{if(!e?.length||!t?.length||!r?.length)return;let s=kwe(i)?{...i}:i,c=e.flatMap(e=>t.flatMap(t=>r.map(r=>n(e,t,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}var Iq=!1;function Iwe(e,n,r={}){let{window:i=Nq,ignore:a=[],capture:o=!0,detectIframe:s=!1,controls:c=!1}=r;if(!i)return c?{stop:Dq,cancel:Dq,trigger:Dq}:Dq;if(Oq&&!Iq){Iq=!0;let e={passive:!0};Array.from(i.document.body.children).forEach(t=>t.addEventListener(`click`,Dq,e)),i.document.documentElement.addEventListener(`click`,Dq,e)}let l=!0,u=e=>(0,t.toValue)(a).some(t=>{if(typeof t==`string`)return Array.from(i.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{let n=Pq(t);return n&&(e.target===n||e.composedPath().includes(n))}});function d(e){let n=(0,t.toValue)(e);return n&&n.$.subTree.shapeFlag===16}function f(e,n){let r=(0,t.toValue)(e),i=r.$.subTree&&r.$.subTree.children;return i==null||!Array.isArray(i)?!1:i.some(e=>e.el===n.target||n.composedPath().includes(e.el))}let p=t=>{let r=Pq(e);if(t.target!=null&&!(!(r instanceof Element)&&d(e)&&f(e,t))&&!(!r||r===t.target||t.composedPath().includes(r))){if(`detail`in t&&t.detail===0&&(l=!u(t)),!l){l=!0;return}n(t)}},m=!1,h=[Fq(i,`click`,e=>{m||(m=!0,setTimeout(()=>{m=!1},0),p(e))},{passive:!0,capture:o}),Fq(i,`pointerdown`,t=>{let n=Pq(e);l=!u(t)&&!!(n&&!t.composedPath().includes(n))},{passive:!0}),s&&Fq(i,`blur`,t=>{setTimeout(()=>{let r=Pq(e),a=i.document.activeElement;for(;a?.shadowRoot;)a=a.shadowRoot.activeElement;a?.tagName===`IFRAME`&&!r?.contains(i.document.activeElement)&&n(t)},0)},{passive:!0})].filter(Boolean),g=()=>h.forEach(e=>e());return c?{stop:g,cancel:()=>{l=!1},trigger:e=>{l=!0,p(e),l=!1}}:g}function Lwe(){let e=(0,t.shallowRef)(!1),n=(0,t.getCurrentInstance)();return n&&(0,t.onMounted)(()=>{e.value=!0},n),e}function Lq(e){let n=Lwe();return(0,t.computed)(()=>(n.value,!!e()))}function Rq(e,n,r={}){let{window:i=Nq,...a}=r,o,s=Lq(()=>i&&`MutationObserver`in i),c=()=>{o&&=(o.disconnect(),void 0)},l=(0,t.watch)((0,t.computed)(()=>{let n=Aq((0,t.toValue)(e)).map(Pq).filter(Dwe);return new Set(n)}),e=>{c(),s.value&&e.size&&(o=new MutationObserver(n),e.forEach(e=>o.observe(e,a)))},{immediate:!0,flush:`post`}),u=()=>o?.takeRecords(),d=()=>{l(),c()};return Cq(d),{isSupported:s,stop:d,takeRecords:u}}var Rwe=Symbol(`vueuse-ssr-width`);function zwe(){let e=(0,t.hasInjectionContext)()?Ewe(Rwe,null):null;return typeof e==`number`?e:void 0}function Bwe(e,n={}){let{window:r=Nq,ssrWidth:i=zwe()}=n,a=Lq(()=>r&&`matchMedia`in r&&typeof r.matchMedia==`function`),o=(0,t.shallowRef)(typeof i==`number`),s=(0,t.shallowRef)(),c=(0,t.shallowRef)(!1);return(0,t.watchEffect)(()=>{if(o.value){o.value=!a.value;let n=(0,t.toValue)(e).split(`,`);c.value=n.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),r=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||r);return n&&a&&(a=i>=kq(n[1])),r&&a&&(a=i<=kq(r[1])),t?!a:a});return}a.value&&(s.value=r.matchMedia((0,t.toValue)(e)),c.value=s.value.matches)}),Fq(s,`change`,e=>{c.value=e.matches},{passive:!0}),(0,t.computed)(()=>c.value)}function Vwe(e,n,r={}){let{window:i=Nq,initialValue:a,observe:o=!1}=r,s=(0,t.shallowRef)(a),c=(0,t.computed)(()=>{var e;return Pq(n)||(i==null||(e=i.document)==null?void 0:e.documentElement)});function l(){let n=(0,t.toValue)(e),r=(0,t.toValue)(c);if(r&&i&&n){let e=i.getComputedStyle(r).getPropertyValue(n)?.trim();s.value=e||s.value||a}}return o&&Rq(c,l,{attributeFilter:[`style`,`class`],window:i}),(0,t.watch)([c,()=>(0,t.toValue)(e)],(e,t)=>{t[0]&&t[1]&&t[0].style.removeProperty(t[1]),l()},{immediate:!0}),(0,t.watch)([s,c],([n,r])=>{let i=(0,t.toValue)(e);r?.style&&i&&(n==null?r.style.removeProperty(i):r.style.setProperty(i,n))},{immediate:!0}),s}function zq(e,n,r={}){let{window:i=Nq,...a}=r,o,s=Lq(()=>i&&`ResizeObserver`in i),c=()=>{o&&=(o.disconnect(),void 0)},l=(0,t.watch)((0,t.computed)(()=>{let n=(0,t.toValue)(e);return Array.isArray(n)?n.map(e=>Pq(e)):[Pq(n)]}),e=>{if(c(),s.value&&i){o=new ResizeObserver(n);for(let t of e)t&&o.observe(t,a)}},{immediate:!0,flush:`post`}),u=()=>{c(),l()};return Cq(u),{isSupported:s,stop:u}}function Hwe(e={}){let{window:n=Nq,initialWidth:r=1/0,initialHeight:i=1/0,listenOrientation:a=!0,includeScrollbar:o=!0,type:s=`inner`}=e,c=(0,t.shallowRef)(r),l=(0,t.shallowRef)(i),u=()=>{if(n){if(s===`outer`)c.value=n.outerWidth,l.value=n.outerHeight;else if(s===`visual`&&n.visualViewport){let{width:e,height:t,scale:r}=n.visualViewport;c.value=Math.round(e*r),l.value=Math.round(t*r)}else o?(c.value=n.innerWidth,l.value=n.innerHeight):(c.value=n.document.documentElement.clientWidth,l.value=n.document.documentElement.clientHeight)}};u(),Pwe(u);let d={passive:!0};return Fq(`resize`,u,d),n&&s===`visual`&&n.visualViewport&&Fq(n.visualViewport,`resize`,u,d),a&&(0,t.watch)(Bwe(`(orientation: portrait)`),()=>u()),{width:c,height:l}}var Bq=()=>Tq&&/firefox/i.test(window.navigator.userAgent),Uwe=()=>Tq&&/android/i.test(window.navigator.userAgent);process.env.NODE_ENV===`production`||Object.freeze({}),process.env.NODE_ENV===`production`||Object.freeze([]);var Vq=()=>{},Wwe=Object.prototype.hasOwnProperty,Hq=(e,t)=>Wwe.call(e,t),Uq=Array.isArray,Wq=e=>typeof e==`function`,Gq=e=>typeof e==`string`,Kq=e=>typeof e==`object`&&!!e,qq=e=>(Kq(e)||Wq(e))&&Wq(e.then)&&Wq(e.catch),Gwe=Object.prototype.toString,Kwe=e=>Gwe.call(e),qwe=e=>Kwe(e)===`[object Object]`,Jq=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Jwe=/-\w/g,Ywe=Jq(e=>e.replace(Jwe,e=>e.slice(1).toUpperCase())),Xwe=/\B([A-Z])/g,Zwe=Jq(e=>e.replace(Xwe,`-$1`).toLowerCase()),Yq=typeof global==`object`&&global&&global.Object===Object&&global,Qwe=typeof self==`object`&&self&&self.Object===Object&&self,Xq=Yq||Qwe||Function(`return this`)(),Zq=Xq.Symbol,Qq=Object.prototype,$we=Qq.hasOwnProperty,eTe=Qq.toString,$q=Zq?Zq.toStringTag:void 0;function tTe(e){var t=$we.call(e,$q),n=e[$q];try{e[$q]=void 0;var r=!0}catch{}var i=eTe.call(e);return r&&(t?e[$q]=n:delete e[$q]),i}var nTe=Object.prototype.toString;function rTe(e){return nTe.call(e)}var iTe=`[object Null]`,aTe=`[object Undefined]`,eJ=Zq?Zq.toStringTag:void 0;function tJ(e){return e==null?e===void 0?aTe:iTe:eJ&&eJ in Object(e)?tTe(e):rTe(e)}function nJ(e){return typeof e==`object`&&!!e}var oTe=`[object Symbol]`;function rJ(e){return typeof e==`symbol`||nJ(e)&&tJ(e)==oTe}function iJ(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var aJ=Array.isArray,sTe=1/0,oJ=Zq?Zq.prototype:void 0,sJ=oJ?oJ.toString:void 0;function cJ(e){if(typeof e==`string`)return e;if(aJ(e))return iJ(e,cJ)+``;if(rJ(e))return sJ?sJ.call(e):``;var t=e+``;return t==`0`&&1/e==-sTe?`-0`:t}var cTe=/\s/;function lTe(e){for(var t=e.length;t--&&cTe.test(e.charAt(t)););return t}var uTe=/^\s+/;function dTe(e){return e&&e.slice(0,lTe(e)+1).replace(uTe,``)}function lJ(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var uJ=NaN,fTe=/^[-+]0x[0-9a-f]+$/i,pTe=/^0b[01]+$/i,mTe=/^0o[0-7]+$/i,hTe=parseInt;function dJ(e){if(typeof e==`number`)return e;if(rJ(e))return uJ;if(lJ(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=lJ(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=dTe(e);var n=pTe.test(e);return n||mTe.test(e)?hTe(e.slice(2),n?2:8):fTe.test(e)?uJ:+e}var fJ=1/0,gTe=17976931348623157e292;function _Te(e){return e?(e=dJ(e),e===fJ||e===-fJ?(e<0?-1:1)*gTe:e===e?e:0):e===0?e:0}function vTe(e){var t=_Te(e),n=t%1;return t===t?n?t-n:t:0}function pJ(e){return e}var yTe=`[object AsyncFunction]`,bTe=`[object Function]`,xTe=`[object GeneratorFunction]`,STe=`[object Proxy]`;function mJ(e){if(!lJ(e))return!1;var t=tJ(e);return t==bTe||t==xTe||t==yTe||t==STe}var hJ=Xq[`__core-js_shared__`],gJ=function(){var e=/[^.]+$/.exec(hJ&&hJ.keys&&hJ.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function CTe(e){return!!gJ&&gJ in e}var wTe=Function.prototype.toString;function _J(e){if(e!=null){try{return wTe.call(e)}catch{}try{return e+``}catch{}}return``}var TTe=/[\\^$.*+?()[\]{}|]/g,ETe=/^\[object .+?Constructor\]$/,DTe=Function.prototype,OTe=Object.prototype,kTe=DTe.toString,ATe=OTe.hasOwnProperty,jTe=RegExp(`^`+kTe.call(ATe).replace(TTe,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function MTe(e){return!lJ(e)||CTe(e)?!1:(mJ(e)?jTe:ETe).test(_J(e))}function NTe(e,t){return e?.[t]}function vJ(e,t){var n=NTe(e,t);return MTe(n)?n:void 0}var yJ=vJ(Xq,`WeakMap`),bJ=Object.create,PTe=function(){function e(){}return function(t){if(!lJ(t))return{};if(bJ)return bJ(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function FTe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ITe(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var LTe=800,RTe=16,zTe=Date.now;function BTe(e){var t=0,n=0;return function(){var r=zTe(),i=RTe-(r-n);if(n=r,i>0){if(++t>=LTe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function VTe(e){return function(){return e}}var xJ=function(){try{var e=vJ(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),HTe=BTe(xJ?function(e,t){return xJ(e,`toString`,{configurable:!0,enumerable:!1,value:VTe(t),writable:!0})}:pJ);function UTe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function WTe(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var GTe=9007199254740991,KTe=/^(?:0|[1-9]\d*)$/;function SJ(e,t){var n=typeof e;return t??=GTe,!!t&&(n==`number`||n!=`symbol`&&KTe.test(e))&&e>-1&&e%1==0&&e<t}function CJ(e,t,n){t==`__proto__`&&xJ?xJ(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function wJ(e,t){return e===t||e!==e&&t!==t}var qTe=Object.prototype.hasOwnProperty;function TJ(e,t,n){var r=e[t];(!(qTe.call(e,t)&&wJ(r,n))||n===void 0&&!(t in e))&&CJ(e,t,n)}function EJ(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?CJ(n,s,c):TJ(n,s,c)}return n}var DJ=Math.max;function JTe(e,t,n){return t=DJ(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=DJ(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),FTe(e,this,s)}}var YTe=9007199254740991;function OJ(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=YTe}function kJ(e){return e!=null&&OJ(e.length)&&!mJ(e)}var XTe=Object.prototype;function AJ(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||XTe)}function ZTe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var QTe=`[object Arguments]`;function jJ(e){return nJ(e)&&tJ(e)==QTe}var MJ=Object.prototype,$Te=MJ.hasOwnProperty,eEe=MJ.propertyIsEnumerable,NJ=jJ(function(){return arguments}())?jJ:function(e){return nJ(e)&&$Te.call(e,`callee`)&&!eEe.call(e,`callee`)};function tEe(){return!1}var PJ=typeof e==`object`&&e&&!e.nodeType&&e,FJ=PJ&&typeof module==`object`&&module&&!module.nodeType&&module,IJ=FJ&&FJ.exports===PJ?Xq.Buffer:void 0,LJ=(IJ?IJ.isBuffer:void 0)||tEe,nEe=`[object Arguments]`,rEe=`[object Array]`,iEe=`[object Boolean]`,aEe=`[object Date]`,oEe=`[object Error]`,sEe=`[object Function]`,cEe=`[object Map]`,lEe=`[object Number]`,uEe=`[object Object]`,dEe=`[object RegExp]`,fEe=`[object Set]`,pEe=`[object String]`,mEe=`[object WeakMap]`,hEe=`[object ArrayBuffer]`,gEe=`[object DataView]`,_Ee=`[object Float32Array]`,vEe=`[object Float64Array]`,yEe=`[object Int8Array]`,bEe=`[object Int16Array]`,xEe=`[object Int32Array]`,SEe=`[object Uint8Array]`,CEe=`[object Uint8ClampedArray]`,wEe=`[object Uint16Array]`,TEe=`[object Uint32Array]`,RJ={};RJ[_Ee]=RJ[vEe]=RJ[yEe]=RJ[bEe]=RJ[xEe]=RJ[SEe]=RJ[CEe]=RJ[wEe]=RJ[TEe]=!0,RJ[nEe]=RJ[rEe]=RJ[hEe]=RJ[iEe]=RJ[gEe]=RJ[aEe]=RJ[oEe]=RJ[sEe]=RJ[cEe]=RJ[lEe]=RJ[uEe]=RJ[dEe]=RJ[fEe]=RJ[pEe]=RJ[mEe]=!1;function EEe(e){return nJ(e)&&OJ(e.length)&&!!RJ[tJ(e)]}function zJ(e){return function(t){return e(t)}}var BJ=typeof e==`object`&&e&&!e.nodeType&&e,VJ=BJ&&typeof module==`object`&&module&&!module.nodeType&&module,HJ=VJ&&VJ.exports===BJ&&Yq.process,UJ=function(){try{return VJ&&VJ.require&&VJ.require(`util`).types||HJ&&HJ.binding&&HJ.binding(`util`)}catch{}}(),WJ=UJ&&UJ.isTypedArray,GJ=WJ?zJ(WJ):EEe,DEe=Object.prototype.hasOwnProperty;function KJ(e,t){var n=aJ(e),r=!n&&NJ(e),i=!n&&!r&&LJ(e),a=!n&&!r&&!i&&GJ(e),o=n||r||i||a,s=o?ZTe(e.length,String):[],c=s.length;for(var l in e)(t||DEe.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||SJ(l,c)))&&s.push(l);return s}function qJ(e,t){return function(n){return e(t(n))}}var OEe=qJ(Object.keys,Object),kEe=Object.prototype.hasOwnProperty;function AEe(e){if(!AJ(e))return OEe(e);var t=[];for(var n in Object(e))kEe.call(e,n)&&n!=`constructor`&&t.push(n);return t}function JJ(e){return kJ(e)?KJ(e):AEe(e)}function jEe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var MEe=Object.prototype.hasOwnProperty;function NEe(e){if(!lJ(e))return jEe(e);var t=AJ(e),n=[];for(var r in e)r==`constructor`&&(t||!MEe.call(e,r))||n.push(r);return n}function YJ(e){return kJ(e)?KJ(e,!0):NEe(e)}var PEe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FEe=/^\w*$/;function XJ(e,t){if(aJ(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||rJ(e)?!0:FEe.test(e)||!PEe.test(e)||t!=null&&e in Object(t)}var ZJ=vJ(Object,`create`);function IEe(){this.__data__=ZJ?ZJ(null):{},this.size=0}function LEe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var REe=`__lodash_hash_undefined__`,zEe=Object.prototype.hasOwnProperty;function BEe(e){var t=this.__data__;if(ZJ){var n=t[e];return n===REe?void 0:n}return zEe.call(t,e)?t[e]:void 0}var VEe=Object.prototype.hasOwnProperty;function HEe(e){var t=this.__data__;return ZJ?t[e]!==void 0:VEe.call(t,e)}var UEe=`__lodash_hash_undefined__`;function WEe(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=ZJ&&t===void 0?UEe:t,this}function QJ(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}QJ.prototype.clear=IEe,QJ.prototype.delete=LEe,QJ.prototype.get=BEe,QJ.prototype.has=HEe,QJ.prototype.set=WEe;function GEe(){this.__data__=[],this.size=0}function $J(e,t){for(var n=e.length;n--;)if(wJ(e[n][0],t))return n;return-1}var KEe=Array.prototype.splice;function qEe(e){var t=this.__data__,n=$J(t,e);return n<0?!1:(n==t.length-1?t.pop():KEe.call(t,n,1),--this.size,!0)}function JEe(e){var t=this.__data__,n=$J(t,e);return n<0?void 0:t[n][1]}function YEe(e){return $J(this.__data__,e)>-1}function XEe(e,t){var n=this.__data__,r=$J(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function eY(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}eY.prototype.clear=GEe,eY.prototype.delete=qEe,eY.prototype.get=JEe,eY.prototype.has=YEe,eY.prototype.set=XEe;var tY=vJ(Xq,`Map`);function ZEe(){this.size=0,this.__data__={hash:new QJ,map:new(tY||eY),string:new QJ}}function QEe(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function nY(e,t){var n=e.__data__;return QEe(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function $Ee(e){var t=nY(this,e).delete(e);return this.size-=+!!t,t}function eDe(e){return nY(this,e).get(e)}function tDe(e){return nY(this,e).has(e)}function nDe(e,t){var n=nY(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function rY(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rY.prototype.clear=ZEe,rY.prototype.delete=$Ee,rY.prototype.get=eDe,rY.prototype.has=tDe,rY.prototype.set=nDe;var rDe=`Expected a function`;function iY(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(rDe);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(iY.Cache||rY),n}iY.Cache=rY;var iDe=500;function aDe(e){var t=iY(e,function(e){return n.size===iDe&&n.clear(),e}),n=t.cache;return t}var oDe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sDe=/\\(\\)?/g,cDe=aDe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(oDe,function(e,n,r,i){t.push(r?i.replace(sDe,`$1`):n||e)}),t});function lDe(e){return e==null?``:cJ(e)}function aY(e,t){return aJ(e)?e:XJ(e,t)?[e]:cDe(lDe(e))}var uDe=1/0;function oY(e){if(typeof e==`string`||rJ(e))return e;var t=e+``;return t==`0`&&1/e==-uDe?`-0`:t}function sY(e,t){t=aY(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[oY(t[n++])];return n&&n==r?e:void 0}function cY(e,t,n){var r=e==null?void 0:sY(e,t);return r===void 0?n:r}function lY(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var uY=Zq?Zq.isConcatSpreadable:void 0;function dDe(e){return aJ(e)||NJ(e)||!!(uY&&e&&e[uY])}function dY(e,t,n,r,i){var a=-1,o=e.length;for(n||=dDe,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?dY(s,t-1,n,r,i):lY(i,s):r||(i[i.length]=s)}return i}function fDe(e){return e!=null&&e.length?dY(e,1):[]}function fY(e){return HTe(JTe(e,void 0,fDe),e+``)}var pY=qJ(Object.getPrototypeOf,Object),pDe=`[object Object]`,mDe=Function.prototype,hDe=Object.prototype,mY=mDe.toString,gDe=hDe.hasOwnProperty,_De=mY.call(Object);function hY(e){if(!nJ(e)||tJ(e)!=pDe)return!1;var t=pY(e);if(t===null)return!0;var n=gDe.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&mY.call(n)==_De}function vDe(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function gY(){if(!arguments.length)return[];var e=arguments[0];return aJ(e)?e:[e]}function yDe(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function _Y(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=dJ(n),n=n===n?n:0),t!==void 0&&(t=dJ(t),t=t===t?t:0),yDe(dJ(e),t,n)}function bDe(){this.__data__=new eY,this.size=0}function xDe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function SDe(e){return this.__data__.get(e)}function CDe(e){return this.__data__.has(e)}var wDe=200;function TDe(e,t){var n=this.__data__;if(n instanceof eY){var r=n.__data__;if(!tY||r.length<wDe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new rY(r)}return n.set(e,t),this.size=n.size,this}function vY(e){var t=this.__data__=new eY(e);this.size=t.size}vY.prototype.clear=bDe,vY.prototype.delete=xDe,vY.prototype.get=SDe,vY.prototype.has=CDe,vY.prototype.set=TDe;function EDe(e,t){return e&&EJ(t,JJ(t),e)}function DDe(e,t){return e&&EJ(t,YJ(t),e)}var yY=typeof e==`object`&&e&&!e.nodeType&&e,bY=yY&&typeof module==`object`&&module&&!module.nodeType&&module,xY=bY&&bY.exports===yY?Xq.Buffer:void 0,SY=xY?xY.allocUnsafe:void 0;function ODe(e,t){if(t)return e.slice();var n=e.length,r=SY?SY(n):new e.constructor(n);return e.copy(r),r}function kDe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function CY(){return[]}var ADe=Object.prototype.propertyIsEnumerable,wY=Object.getOwnPropertySymbols,TY=wY?function(e){return e==null?[]:(e=Object(e),kDe(wY(e),function(t){return ADe.call(e,t)}))}:CY;function jDe(e,t){return EJ(e,TY(e),t)}var EY=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)lY(t,TY(e)),e=pY(e);return t}:CY;function MDe(e,t){return EJ(e,EY(e),t)}function DY(e,t,n){var r=t(e);return aJ(e)?r:lY(r,n(e))}function OY(e){return DY(e,JJ,TY)}function kY(e){return DY(e,YJ,EY)}var AY=vJ(Xq,`DataView`),jY=vJ(Xq,`Promise`),MY=vJ(Xq,`Set`),NY=`[object Map]`,NDe=`[object Object]`,PY=`[object Promise]`,FY=`[object Set]`,IY=`[object WeakMap]`,LY=`[object DataView]`,PDe=_J(AY),FDe=_J(tY),IDe=_J(jY),LDe=_J(MY),RDe=_J(yJ),RY=tJ;(AY&&RY(new AY(new ArrayBuffer(1)))!=LY||tY&&RY(new tY)!=NY||jY&&RY(jY.resolve())!=PY||MY&&RY(new MY)!=FY||yJ&&RY(new yJ)!=IY)&&(RY=function(e){var t=tJ(e),n=t==NDe?e.constructor:void 0,r=n?_J(n):``;if(r)switch(r){case PDe:return LY;case FDe:return NY;case IDe:return PY;case LDe:return FY;case RDe:return IY}return t});var zY=RY,zDe=Object.prototype.hasOwnProperty;function BDe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&zDe.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var BY=Xq.Uint8Array;function VY(e){var t=new e.constructor(e.byteLength);return new BY(t).set(new BY(e)),t}function VDe(e,t){var n=t?VY(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var HDe=/\w*$/;function UDe(e){var t=new e.constructor(e.source,HDe.exec(e));return t.lastIndex=e.lastIndex,t}var HY=Zq?Zq.prototype:void 0,UY=HY?HY.valueOf:void 0;function WDe(e){return UY?Object(UY.call(e)):{}}function GDe(e,t){var n=t?VY(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var KDe=`[object Boolean]`,qDe=`[object Date]`,JDe=`[object Map]`,YDe=`[object Number]`,XDe=`[object RegExp]`,ZDe=`[object Set]`,QDe=`[object String]`,$De=`[object Symbol]`,eOe=`[object ArrayBuffer]`,tOe=`[object DataView]`,nOe=`[object Float32Array]`,rOe=`[object Float64Array]`,iOe=`[object Int8Array]`,aOe=`[object Int16Array]`,oOe=`[object Int32Array]`,sOe=`[object Uint8Array]`,cOe=`[object Uint8ClampedArray]`,lOe=`[object Uint16Array]`,uOe=`[object Uint32Array]`;function dOe(e,t,n){var r=e.constructor;switch(t){case eOe:return VY(e);case KDe:case qDe:return new r(+e);case tOe:return VDe(e,n);case nOe:case rOe:case iOe:case aOe:case oOe:case sOe:case cOe:case lOe:case uOe:return GDe(e,n);case JDe:return new r;case YDe:case QDe:return new r(e);case XDe:return UDe(e);case ZDe:return new r;case $De:return WDe(e)}}function fOe(e){return typeof e.constructor==`function`&&!AJ(e)?PTe(pY(e)):{}}var pOe=`[object Map]`;function mOe(e){return nJ(e)&&zY(e)==pOe}var WY=UJ&&UJ.isMap,hOe=WY?zJ(WY):mOe,gOe=`[object Set]`;function _Oe(e){return nJ(e)&&zY(e)==gOe}var GY=UJ&&UJ.isSet,vOe=GY?zJ(GY):_Oe,yOe=1,bOe=2,xOe=4,KY=`[object Arguments]`,SOe=`[object Array]`,COe=`[object Boolean]`,wOe=`[object Date]`,TOe=`[object Error]`,qY=`[object Function]`,EOe=`[object GeneratorFunction]`,DOe=`[object Map]`,OOe=`[object Number]`,JY=`[object Object]`,kOe=`[object RegExp]`,AOe=`[object Set]`,jOe=`[object String]`,MOe=`[object Symbol]`,NOe=`[object WeakMap]`,POe=`[object ArrayBuffer]`,FOe=`[object DataView]`,IOe=`[object Float32Array]`,LOe=`[object Float64Array]`,ROe=`[object Int8Array]`,zOe=`[object Int16Array]`,BOe=`[object Int32Array]`,VOe=`[object Uint8Array]`,HOe=`[object Uint8ClampedArray]`,UOe=`[object Uint16Array]`,WOe=`[object Uint32Array]`,YY={};YY[KY]=YY[SOe]=YY[POe]=YY[FOe]=YY[COe]=YY[wOe]=YY[IOe]=YY[LOe]=YY[ROe]=YY[zOe]=YY[BOe]=YY[DOe]=YY[OOe]=YY[JY]=YY[kOe]=YY[AOe]=YY[jOe]=YY[MOe]=YY[VOe]=YY[HOe]=YY[UOe]=YY[WOe]=!0,YY[TOe]=YY[qY]=YY[NOe]=!1;function XY(e,t,n,r,i,a){var o,s=t&yOe,c=t&bOe,l=t&xOe;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!lJ(e))return e;var u=aJ(e);if(u){if(o=BDe(e),!s)return ITe(e,o)}else{var d=zY(e),f=d==qY||d==EOe;if(LJ(e))return ODe(e,s);if(d==JY||d==KY||f&&!i){if(o=c||f?{}:fOe(e),!s)return c?MDe(e,DDe(o,e)):jDe(e,EDe(o,e))}else{if(!YY[d])return i?e:{};o=dOe(e,d,s)}}a||=new vY;var p=a.get(e);if(p)return p;a.set(e,o),vOe(e)?e.forEach(function(r){o.add(XY(r,t,n,r,e,a))}):hOe(e)&&e.forEach(function(r,i){o.set(i,XY(r,t,n,i,e,a))});var m=u?void 0:(l?c?kY:OY:c?YJ:JJ)(e);return UTe(m||e,function(r,i){m&&(i=r,r=e[i]),TJ(o,i,XY(r,t,n,i,e,a))}),o}var GOe=1,KOe=4;function ZY(e){return XY(e,GOe|KOe)}var qOe=`__lodash_hash_undefined__`;function JOe(e){return this.__data__.set(e,qOe),this}function YOe(e){return this.__data__.has(e)}function QY(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new rY;++t<n;)this.add(e[t])}QY.prototype.add=QY.prototype.push=JOe,QY.prototype.has=YOe;function XOe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ZOe(e,t){return e.has(t)}var QOe=1,$Oe=2;function $Y(e,t,n,r,i,a){var o=n&QOe,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&$Oe?new QY:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!XOe(t,function(e,t){if(!ZOe(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function eke(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function tke(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var nke=1,rke=2,ike=`[object Boolean]`,ake=`[object Date]`,oke=`[object Error]`,ske=`[object Map]`,cke=`[object Number]`,lke=`[object RegExp]`,uke=`[object Set]`,dke=`[object String]`,fke=`[object Symbol]`,pke=`[object ArrayBuffer]`,mke=`[object DataView]`,eX=Zq?Zq.prototype:void 0,tX=eX?eX.valueOf:void 0;function hke(e,t,n,r,i,a,o){switch(n){case mke:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pke:return!(e.byteLength!=t.byteLength||!a(new BY(e),new BY(t)));case ike:case ake:case cke:return wJ(+e,+t);case oke:return e.name==t.name&&e.message==t.message;case lke:case dke:return e==t+``;case ske:var s=eke;case uke:var c=r&nke;if(s||=tke,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=rke,o.set(e,t);var u=$Y(s(e),s(t),r,i,a,o);return o.delete(e),u;case fke:if(tX)return tX.call(e)==tX.call(t)}return!1}var gke=1,_ke=Object.prototype.hasOwnProperty;function vke(e,t,n,r,i,a){var o=n&gke,s=OY(e),c=s.length;if(c!=OY(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:_ke.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var yke=1,nX=`[object Arguments]`,rX=`[object Array]`,iX=`[object Object]`,aX=Object.prototype.hasOwnProperty;function bke(e,t,n,r,i,a){var o=aJ(e),s=aJ(t),c=o?rX:zY(e),l=s?rX:zY(t);c=c==nX?iX:c,l=l==nX?iX:l;var u=c==iX,d=l==iX,f=c==l;if(f&&LJ(e)){if(!LJ(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new vY,o||GJ(e)?$Y(e,t,n,r,i,a):hke(e,t,c,n,r,i,a);if(!(n&yke)){var p=u&&aX.call(e,`__wrapped__`),m=d&&aX.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new vY,i(h,g,n,r,a)}}return f?(a||=new vY,vke(e,t,n,r,i,a)):!1}function oX(e,t,n,r,i){return e===t?!0:e==null||t==null||!nJ(e)&&!nJ(t)?e!==e&&t!==t:bke(e,t,n,r,oX,i)}var xke=1,Ske=2;function Cke(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new vY;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?oX(u,l,xke|Ske,r,d):f))return!1}}return!0}function sX(e){return e===e&&!lJ(e)}function wke(e){for(var t=JJ(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,sX(i)]}return t}function cX(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function Tke(e){var t=wke(e);return t.length==1&&t[0][2]?cX(t[0][0],t[0][1]):function(n){return n===e||Cke(n,e,t)}}function Eke(e,t){return e!=null&&t in Object(e)}function Dke(e,t,n){t=aY(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=oY(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&OJ(i)&&SJ(o,i)&&(aJ(e)||NJ(e)))}function lX(e,t){return e!=null&&Dke(e,t,Eke)}var Oke=1,kke=2;function Ake(e,t){return XJ(e)&&sX(t)?cX(oY(e),t):function(n){var r=cY(n,e);return r===void 0&&r===t?lX(n,e):oX(t,r,Oke|kke)}}function jke(e){return function(t){return t?.[e]}}function Mke(e){return function(t){return sY(t,e)}}function Nke(e){return XJ(e)?jke(oY(e)):Mke(e)}function Pke(e){return typeof e==`function`?e:e==null?pJ:typeof e==`object`?aJ(e)?Ake(e[0],e[1]):Tke(e):Nke(e)}function Fke(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Ike=Math.max,Lke=Math.min;function Rke(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=r-1;return n!==void 0&&(i=vTe(n),i=n<0?Ike(r+i,0):Lke(i,r-1)),WTe(e,Pke(t,3),i,!0)}var zke=1/0;function Bke(e){return e!=null&&e.length?dY(e,zke):[]}function uX(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];CJ(r,i[0],i[1])}return r}function Vke(e,t){return t.length<2?e:sY(e,vDe(t,0,-1))}function dX(e,t){return oX(e,t)}function fX(e){return e==null}function Hke(e){return e===void 0}var Uke=Object.prototype.hasOwnProperty;function Wke(e,t){t=aY(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=oY(t[n]);if(i===`__proto__`&&!Uke.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=Vke(e,t);return a==null||delete a[oY(Fke(t))]}function Gke(e){return hY(e)?void 0:e}var Kke=1,qke=2,Jke=4,pX=fY(function(e,t){var n={};if(e==null)return n;var r=!1;t=iJ(t,function(t){return t=aY(t,e),r||=t.length>1,t}),EJ(e,kY(e),n),r&&(n=XY(n,Kke|qke|Jke,Gke));for(var i=t.length;i--;)Wke(n,t[i]);return n});function Yke(e,t,n,r){if(!lJ(e))return e;t=aY(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=oY(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=lJ(u)?u:SJ(t[i+1])?[]:{})}TJ(s,c,l),s=s[c]}return e}function Xke(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=sY(e,o);n(s,o)&&Yke(a,aY(o,e),s)}return a}function Zke(e,t){return Xke(e,t,function(t,n){return lX(e,n)})}var mX=fY(function(e,t){return e==null?{}:Zke(e,t)}),hX=e=>e===void 0,gX=e=>typeof e==`boolean`,_X=e=>typeof e==`number`,vX=e=>!e&&e!==0||Uq(e)&&e.length===0||Kq(e)&&!Object.keys(e).length,yX=e=>typeof Element>`u`?!1:e instanceof Element,bX=e=>fX(e),Qke=e=>Gq(e)?!Number.isNaN(Number(e)):!1,xX=new Map;if(Tq){let e;document.addEventListener(`mousedown`,t=>e=t),document.addEventListener(`mouseup`,t=>{if(e){for(let n of xX.values())for(let{documentHandler:r}of n)r(t,e);e=void 0}})}function SX(e,t){let n=[];return Uq(t.arg)?n=t.arg:yX(t.arg)&&n.push(t.arg),function(r,i){let a=t.instance.popperRef,o=r.target,s=i?.target,c=!t||!t.instance,l=!o||!s,u=e.contains(o)||e.contains(s),d=e===o,f=n.length&&n.some(e=>e?.contains(o))||n.length&&n.includes(s),p=a&&(a.contains(o)||a.contains(s));c||l||u||d||f||p||t.value(r,i)}}var CX={beforeMount(e,t){xX.has(e)||xX.set(e,[]),xX.get(e).push({documentHandler:SX(e,t),bindingFn:t.value})},updated(e,t){xX.has(e)||xX.set(e,[]);let n=xX.get(e),r=n.findIndex(e=>e.bindingFn===t.oldValue),i={documentHandler:SX(e,t),bindingFn:t.value};r>=0?n.splice(r,1,i):n.push(i)},unmounted(e){xX.delete(e)}},$ke=e=>typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot,wX=e=>typeof Element>`u`?!1:e instanceof Element,TX=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute(`tabIndex`)!==null)return!0;if(e.tabIndex<0||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`)return!1;switch(e.nodeName){case`A`:return!!e.href&&e.rel!==`ignore`;case`INPUT`:return e.type!==`hidden`&&e.type!==`file`;case`BUTTON`:case`SELECT`:case`TEXTAREA`:return!0;default:return!1}},EX=e=>!e.getAttribute(`aria-owns`),DX=(e,t,n)=>{let{parentNode:r}=e;if(!r)return null;let i=r.querySelectorAll(n);return i[Array.prototype.indexOf.call(i,e)+t]||null},OX=(e,t)=>{if(!e||!e.focus)return;let n=!1;wX(e)&&!TX(e)&&!e.getAttribute(`tabindex`)&&(e.setAttribute(`tabindex`,`-1`),n=!0),e.focus(t),wX(e)&&n&&e.removeAttribute(`tabindex`)},kX=e=>{e&&(OX(e),!EX(e)&&e.click())},AX=(e,t,{checkForDefaultPrevented:n=!0}={})=>r=>{let i=e?.(r);if(n===!1||!i)return t?.(r)},jX=e=>t=>t.pointerType===`mouse`?e(t):void 0,MX=e=>{if(e.code&&e.code!==`Unidentified`)return e.code;let t=eAe(e);if(t){if(Object.values(_q).includes(t))return t;switch(t){case` `:return _q.space;default:return``}}return``},eAe=e=>{let t=e.key&&e.key!==`Unidentified`?e.key:``;if(!t&&e.type===`keyup`&&Uwe()){let n=e.target;t=n.value.charAt(n.selectionStart-1)}return t},NX=e=>Object.keys(e),tAe=`__epPropKey`,Z=e=>e,nAe=e=>Kq(e)&&!!e.__epPropKey,PX=(e,n)=>{if(!Kq(e)||nAe(e))return e;let{values:r,required:i,default:a,type:o,validator:s}=e,c={type:o,required:!!i,validator:r||s?i=>{let o=!1,c=[];if(r&&(c=Array.from(r),Hq(e,`default`)&&c.push(a),o||=c.includes(i)),s&&(o||=s(i)),!o&&c.length>0){let e=[...new Set(c)].map(e=>JSON.stringify(e)).join(`, `);(0,t.warn)(`Invalid prop: validation failed${n?` for prop "${n}"`:``}. Expected one of [${e}], got value ${JSON.stringify(i)}.`)}return o}:void 0,[tAe]:!0};return Hq(e,`default`)&&(c.default=a),c},FX=e=>uX(Object.entries(e).map(([e,t])=>[e,PX(t,e)])),IX=class extends Error{constructor(e){super(e),this.name=`ElementPlusError`}};function LX(e,t){throw new IX(`[${e}] ${t}`)}function RX(e,t){{let n=Gq(e)?new IX(`[${e}] ${t}`):e;console.warn(n)}}var rAe=[`class`,`style`],iAe=/^on[A-Z]/,aAe=(e={})=>{let{excludeListeners:n=!1,excludeKeys:r}=e,i=(0,t.computed)(()=>(r?.value||[]).concat(rAe)),a=(0,t.getCurrentInstance)();return a?(0,t.computed)(()=>uX(Object.entries(a.proxy?.$attrs).filter(([e])=>!i.value.includes(e)&&!(n&&iAe.test(e))))):(RX(`use-attrs`,`getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function`),(0,t.computed)(()=>({})))};function oAe(){let e=(0,t.shallowRef)(),n=(0,t.ref)(0),r=(0,t.computed)(()=>({minWidth:`${Math.max(n.value,11)}px`}));return zq(e,()=>{n.value=e.value?.getBoundingClientRect().width??0}),{calculatorRef:e,calculatorWidth:n,inputStyle:r}}var zX=({from:e,replacement:n,scope:r,version:i,ref:a,type:o=`API`},s)=>{(0,t.watch)(()=>(0,t.unref)(s),t=>{t&&RX(r,`[${o}] ${e} is about to be deprecated in version ${i}, please use ${n} instead.
1250
+ order by source desc`;BSe();let i=sessionStorage.getItem(`flatmap-knowledge`),a=sessionStorage.getItem(`flatmap-knowledge-source`);if(!i||a!==n){let e=(await t.queryKnowledge(r)).map(e=>JSON.parse(e));return sessionStorage.setItem(`flatmap-knowledge`,JSON.stringify(e)),sessionStorage.setItem(`flatmap-knowledge-source`,n),RSe(),e}return JSON.parse(i)}function RSe(){let e=new Date().getTime()+864e5;sessionStorage.setItem(`flatmap-knowledge-expiry`,e)}function zSe(){[`flatmap-knowledge`,`flatmap-knowledge-expiry`,`flatmap-knowledge-source`].forEach(e=>{sessionStorage.removeItem(e)})}function BSe(){let e=sessionStorage.getItem(`flatmap-knowledge-expiry`);new Date().getTime()>e&&zSe()}var rK=_((()=>{dW()})),iK,aK=_((()=>{eK(),rK(),iK=(0,n.defineStore)(`entries`,{state:()=>UG(),getters:{findIndexOfId:e=>t=>{for(let n=0;n<e.entries.length;n++)if(e.entries[n].id==t)return n;return-1}},actions:{addNewEntry(e){this.entries.push(e)},destroyEntry(e){e>-1&&this.entries.splice(e,1)},setAll(e){this.entries=[],Object.assign(this.entries,e)},updateViewForEntry({id:e,viewUrl:t}){let n=this.entries.find(t=>t.id===e);n.viewUrl=t},updateMapForEntry(e,t){if(e.id===t.id){let n=nK(t.prov);e.uuid=t.prov.uuid,e.sckanVersion=n}},updateLabelForEntry(e,t){let n=this.entries.find(t=>t.id===e.id);n&&(n.label=t)},updateTitleForEntry(e,t){let n=this.entries.find(t=>t.id===e.id);n&&(n.title=t)}}})}));function VSe(){return[{id:`UBERON:0000948`,name:`Heart`,type:`simulation`},{id:`UBERON:0001156`,name:`Colon`,type:`simulation`},{id:`UBERON:0001255`,name:`Bladder`,type:`simulation`},{id:`UBERON:0000945`,name:`Stomach`,type:`simulation`},{id:`UBERON:0001759`,name:`Vagus nerve`,type:`simulation`},{id:`UBERON:0002108`,name:`Small intestines`,type:`simulation`},{id:`UBERON:0002107`,name:`Liver`,type:`simulation`}]}function HSe(){return VSe()}var USe=_((()=>{})),oK,sK,cK,lK,uK,dK,fK,pK=_((()=>{USe(),mW(),oK=e=>{switch(e){case`2horpanel`:return{"split-1":{content:!1,horizontal:!0,children:[`pane-1`,`pane-2`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2}};case`2vertpanel`:return{"split-1":{content:!1,horizontal:!1,children:[`pane-1`,`pane-2`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2}};case`3panel`:return{"split-1":{content:!1,horizontal:!1,children:[`pane-1`,`split-2`]},"split-2":{content:!1,horizontal:!0,children:[`pane-2`,`pane-3`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3}};case`4panel`:return{"split-1":{content:!1,horizontal:!1,children:[`split-3`,`split-2`]},"split-2":{content:!1,horizontal:!0,children:[`pane-2`,`pane-3`]},"split-3":{content:!1,horizontal:!0,children:[`pane-1`,`pane-4`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4}};case`5panel`:return{"split-1":{content:!1,horizontal:!0,children:[`split-3`,`split-2`]},"split-2":{content:!1,horizontal:!1,children:[`pane-2`,`pane-3`]},"split-3":{content:!1,horizontal:!1,children:[`pane-1`,`pane-4`,`pane-5`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4},"pane-5":{content:!0,id:5}};case`6panel`:return{"split-1":{content:!1,horizontal:!0,children:[`split-3`,`split-2`]},"split-2":{content:!1,horizontal:!1,children:[`pane-2`,`pane-3`,`pane-5`]},"split-3":{content:!1,horizontal:!1,children:[`pane-1`,`pane-4`,`pane-6`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4},"pane-5":{content:!0,id:5},"pane-6":{content:!0,id:6}};case`6panelVertical`:return{"split-1":{content:!1,horizontal:!1,children:[`split-3`,`split-2`]},"split-2":{content:!1,horizontal:!0,children:[`pane-2`,`pane-3`,`pane-5`]},"split-3":{content:!1,horizontal:!0,children:[`pane-1`,`pane-4`,`pane-6`]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4},"pane-5":{content:!0,id:5},"pane-6":{content:!0,id:6}};default:return{"split-1":{content:!1,horizontal:!1,children:[`pane-1`]},"pane-1":{content:!0,id:1}}}},sK=(e,t)=>{let n=[],r=[];for(let[e,i]of Object.entries(t))i.content&&(1>i.id||n.includes(i.id)?r.push(e):n.push(i.id));r.forEach(r=>{let i=!1;for(let a=0;a<e.length&&!i;a++)n.includes(e[a].id)||(t[r].id=e[a].id,n.push(e.id),i=!0)})},cK=e=>{let t={};for(let[n,r]of Object.entries(e))r.content&&(t[n]=r);return t},lK=(e,t)=>{let n=cK(e),r=oK(t);for(let[e,t]of Object.entries(n))r[e]=t;return r},uK=(e,t)=>Object.keys(e).find(n=>e[n].id===t),dK=()=>({activeView:`singlepanel`,idNamePair:{},viewIcons:[{icon:`singlepanel`,name:`Single view`,min:1},{icon:`2horpanel`,name:`Horizontal split`,min:2},{icon:`2vertpanel`,name:`Vertical split`,min:2},{icon:`3panel`,name:`Three panes`,min:3},{icon:`4panel`,name:`Four panes`,min:4},{icon:`5panel`,name:`Five panes`,min:5},{icon:`6panel`,name:`Six (horizontal)`,min:6},{icon:`6panelVertical`,name:`Six (vertical)`,min:6}],customLayout:{"split-1":{content:!1,horizontal:!1,children:[`pane-1`]},"pane-1":{content:!0,id:1}},splitters:{first:50,second:50,third:50}}),fK=(0,n.defineStore)(`splitFlow`,{state:()=>dK(),getters:{getActivePaneIds:e=>()=>{let t=[],n;for(let n in e.customLayout)e.customLayout[n].id&&t.push(e.customLayout[n].id);switch(e.activeView){case`singlepanel`:n=t.slice(0,1);break;case`2horpanel`:case`2vertpanel`:n=t.slice(0,2);break;case`3panel`:n=t.slice(0,3);break;case`4panel`:n=t.slice(0,4);break;case`5panel`:n=t.slice(0,5);break;case`6panelVertical`:case`6panel`:n=t.slice(0,6);break;default:n=[]}return n},getPaneNameById:e=>t=>uK(e.customLayout,t),getState:e=>()=>({activeView:e.activeView,splitters:e.splitters,customLayout:e.customLayout}),isPaneActive:e=>t=>{let n=oK(e.activeView);return Object.keys(n).includes(t)}},actions:{assignOrSwapPaneWithIds(e,t=!0){let n=uK(this.customLayout,e.source),r=uK(this.customLayout,e.target);r&&(this.customLayout[r].id=e.source),n&&(this.customLayout[n].id=e.target),t&&this.updateSplitPanels()},getAvailableTerms(e){let t=HSe();for(let e=0;e<t.length;e++)this.idNamePair[t[e].id]=t[e].name;if(e){this._controller&&this._controller.abort(),this._controller=new AbortController;let t=this._controller.signal;fetch(`${e}get-organ-curies`,{signal:t}).then(e=>e.json()).then(e=>{this._controller=void 0,e.uberon.array.forEach(e=>{this.idNamePair[e.id.toUpperCase()]=e.name.charAt(0).toUpperCase()+e.name.slice(1)})})}},updateActiveView(e,t=!0){this.activeView=e.view;let n=lK(this.customLayout,this.activeView);sK(e.entries,n);for(let[e,t]of Object.entries(n))this.customLayout[e]=t;t&&this.updateSplitPanels()},setSplitter(e){this.splitters[e.name]&&(this.splitters[e.name]=e.value)},setState(e){if(e){let t;if(e.activeView&&(this.activeView=e.activeView),e.customLayout)t=e.customLayout;else if(t=oK(this.activeView),e.slotInfo)for(let n=0;n<e.slotInfo.length;n++)switch(e.slotInfo[n].name){case`first`:t[`pane-1`].id=e.slotInfo[n].id;break;case`second`:`pane-2`in t&&(t[`pane-2`].id=e.slotInfo[n].id);break;case`thrid`:`pane-3`in t&&(t[`pane-3`].id=e.slotInfo[n].id);break;case`fourth`:`pane-4`in t&&(t[`pane-4`].id=e.slotInfo[n].id);break;case`fifth`:`pane-5`in t&&(t[`pane-5`].id=e.slotInfo[n].id);break;case`sixth`:`pane-6`in t&&(t[`pane-6`].id=e.slotInfo[n].id)}for(let[e,n]of Object.entries(t))this.customLayout[e]=n;for(let[t,n]of Object.entries(e.splitters))this.splitters[t]=n}},setIdToPrimaryPane(e){let t=uK(this.customLayout,e),n=this.customLayout[`pane-1`].id;this.customLayout[`pane-1`].id=e,t&&(this.customLayout[t].id=n)},placeEntryInSplitView(e){let{id:t,sourceId:n,entries:r}=e;if(this.activeView===`singlepanel`){if(uK(this.customLayout,n)!==`pane-1`){this.setIdToPrimaryPane(t);return}this.updateActiveView({view:`2vertpanel`,entries:r},!1),this.assignOrSwapPaneWithIds({source:t,target:this.customLayout[`pane-2`].id},!1)}else{let e=uK(this.customLayout,n);if(!e||!this.isPaneActive(e)){this.setIdToPrimaryPane(t);return}let r=e===`pane-1`?`pane-2`:`pane-1`;this.assignOrSwapPaneWithIds({source:t,target:this.customLayout[r].id},!1)}this.updateSplitPanels()},reset(){let e=dK();this.activeView=e.activeView,this.customLayout=e.customLayout,this.splitters=e.splitters},closeSlot(e){if(e){let t=0;if(e.entries)for(let n=0;n<e.entries.length&&t==0;n++)e.entries[n].id!==e.id&&uK(this.customLayout,e.entries[n].id)===void 0&&(t=e.entries[n].id);if(this.activeView!==`customise`){let n=this.activeView;switch(this.activeView){case`2horpanel`:case`2vertpanel`:this.activeView=`singlepanel`;break;case`3panel`:this.activeView=`2vertpanel`;break;case`4panel`:this.activeView=`3panel`;break;case`5panel`:this.activeView=`4panel`;break;case`6panelVertical`:case`6panel`:this.activeView=`5panel`}let r=lK(this.customLayout,this.activeView);switch(uK(this.customLayout,e.id)){case`pane-1`:switch(n){case`2horpanel`:case`2vertpanel`:r[`pane-1`].id=r[`pane-2`].id,r[`pane-2`].id=t;break;case`3panel`:r[`pane-1`].id=r[`pane-2`].id,r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=t;break;case`4panel`:r[`pane-1`].id=r[`pane-2`].id,r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=t;break;case`5panel`:r[`pane-1`].id=r[`pane-2`].id,r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=t;break;case`6panelVertical`:case`6panel`:r[`pane-1`].id=r[`pane-2`].id,r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=r[`pane-6`].id,r[`pane-6`].id=t}break;case`pane-2`:switch(n){case`2horpanel`:case`2vertpanel`:r[`pane-2`].id=t;break;case`3panel`:r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=t;break;case`4panel`:r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=t;break;case`5panel`:r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=t;break;case`6panelVertical`:case`6panel`:r[`pane-2`].id=r[`pane-3`].id,r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=r[`pane-6`].id,r[`pane-6`].id=t}break;case`pane-3`:switch(n){case`3panel`:r[`pane-3`].id=t;break;case`4panel`:r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=t;break;case`5panel`:r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=t;break;case`6panelVertical`:case`6panel`:r[`pane-3`].id=r[`pane-4`].id,r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=r[`pane-6`].id,r[`pane-6`].id=t}break;case`pane-4`:switch(n){case`4panel`:r[`pane-4`].id=t;break;case`5panel`:r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=t;break;case`6panelVertical`:case`6panel`:r[`pane-4`].id=r[`pane-5`].id,r[`pane-5`].id=r[`pane-6`].id,r[`pane-6`].id=t}break;case`pane-5`:switch(n){case`5panel`:r[`pane-5`].id=t;break;case`6panelVertical`:case`6panel`:r[`pane-5`].id=r[`pane-6`].id,r[`pane-6`].id=t}break;case`pane-6`:switch(n){case`6panelVertical`:case`6panel`:r[`pane-6`].id=t}}for(let[e,t]of Object.entries(r))this.customLayout[e]=t}}},updateSplitPanels(){fW.emit(`species-layout-connectivity-update`)}}})}));aK(),pK(),So(),mW(),_d(),gW(),yd();var WSe={name:`ContentBar`,components:{ElIconArrowDown:za,ElIconArrowUp:Ha,ContextCard:qW,FlatmapContextCard:JW,MapSvgIcon:XW,ScreenshotPopover:bd},props:{entry:Object,captureScreenshot:{type:Function,default:void 0},getScreenshotTarget:{type:Function,default:void 0},viewerReady:{type:Boolean,default:!1}},data:function(){return{contextCardVisible:!1,slot:{},boundariesElement:null,showDetails:!0,contextCardEntry:void 0}},computed:{...(0,n.mapStores)(iK,gd,fK),allClosable(){return this.settingsStore.allClosable},getSourceTitle:function(){if(this.entry){if(this.entry.doi)return this.entry.doi.replace(`https://doi.org/`,``);if(this.entry.connectivityInfo)return`SCKAN`}return``},hasSourceInfo(){return this.entry.doi||this.entry.connectivityInfo},helpDelay(){return this.settingsStore.helpDelay},activeView:function(){return this.splitFlowStore.activeView},envVars:function(){return{API_LOCATION:this.settingsStore.sparcApi,ALGOLIA_INDEX:this.settingsStore.algoliaIndex,ALGOLIA_KEY:this.settingsStore.algoliaKey,ALGOLIA_ID:this.settingsStore.algoliaId,PENNSIEVE_API_LOCATION:this.settingsStore.pennsieveApi,ROOT_URL:this.settingsStore.rootUrl}},popperOptions:function(){return{modifiers:[{name:`preventOverflow`,options:{boundary:this.boundariesElement}},{name:`flip`,options:{boundary:this.boundariesElement,flipVariations:!1,allowedAutoPlacements:[`bottom`]}}]}},entries:function(){return this.entriesStore.entries.map(e=>({...e,title:this.getEntryTitle(e)}))},titles:function(){return this.entries.map(e=>({id:e.id,title:e.title}))}},methods:{onCaptureScreenshot:async function(e){let t=await this.captureScreenshot(e);return hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_screenshot`,category:`png_${e.scale}x`,location:`pane_header`}),t},closeAndRemove:function(){this.splitFlowStore.closeSlot({id:this.entry.id,entries:this.entries}),fW.emit(`RemoveEntryRequest`,this.entry.id),this.$nextTick(()=>{this.splitFlowStore.updateSplitPanels()})},getEntryTitle:function(e){if(e){let t=e.label?e.label+` `:``,n=e.type;return n==`Scaffold`&&(n=`3D Scaffold`),t+=n,e.datasetId?t+=` - `+e.datasetId:e.discoverId&&(t+=` - `+e.discoverId),t}return`Viewer`},getTitle:function(e){let{id:t,title:n}=e,r=this.titles.filter(e=>e.title===n);if(r.length>1){let e=[];for(let t=0;t<r.length;t++){let n=this.getCharById(t);e.push({id:r[t].id,title:r[t].title+n})}let n=e.find(e=>e.id===t);if(n)return n.title}return n},getCharById:function(e){return` (`+String.fromCharCode(65+e)+`)`},openSourceInfo:function(){if(this.entry.doi){let e={type:`Search`,term:this.entry.doi.replace(`https://doi.org/`,``)};fW.emit(`PopoverActionClick`,e)}else this.entry.connectivityInfo&&fW.emit(`connectivity-info-open`,[this.entry.connectivityInfo])},viewerChanged:function(e){if(this.entry.id&&this.entry.id!=e){this.splitFlowStore.assignOrSwapPaneWithIds({source:this.entry.id,target:e}),this.$nextTick(()=>{this._chooserTimer=setTimeout(()=>{this.$emit(`chooser-changed`)},1200)});let t=this.entries.find(t=>t.id===e);hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_toolbar_viewer_changed`,category:t?.title||``,location:`map_toolbar`})}},setPopperWidth:function(e){let t=this.entries.find(t=>t.id===e);if(t)return t.type==`Flatmap`||t.type==`MultiFlatmap`?`240px`:`440px`},setBoundary:function(e){this.boundariesElement=e},setupFlatmapContextCard:function(e){this.contextCardVisible=!1;let t=Object.assign({mapImpProv:e.prov},this.entry);this.contextCardEntry=t},setupScaffoldContextCard:function(){this.entry.contextCardUrl&&(this.contextCardEntry={...this.entry})}},mounted:function(){this.setupScaffoldContextCard()},beforeUnmount:function(){clearTimeout(this._chooserTimer)}},GSe={class:`toolbar-flex-container`},KSe={class:`toolbar-left shrink`},qSe={key:1,class:`toolbar-title shrink`},JSe={class:`toolbar-right shrink`},YSe={class:`information-group shrink`};function XSe(e,n,r,i,a,o){let s=rce,c=nce,l=ic,u=JW,d=qW,f=Ha,p=Do,m=za,h=Qc,g=bd,_=(0,t.resolveComponent)(`map-svg-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,null,[(0,t.createElementVNode)(`div`,GSe,[(0,t.createElementVNode)(`div`,KSe,[o.entries.length>1?((0,t.openBlock)(),(0,t.createBlock)(c,{key:0,teleported:!1,"model-value":r.entry.id,placeholder:`Select`,class:`select-box`,"popper-class":`viewer_dropdown`,onChange:n[0]||=e=>o.viewerChanged(e)},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.entries,e=>((0,t.openBlock)(),(0,t.createBlock)(s,{key:e.id,label:o.getTitle(e),value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`model-value`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,qSe,(0,t.toDisplayString)(o.getEntryTitle(r.entry)),1)),o.hasSourceInfo?((0,t.openBlock)(),(0,t.createBlock)(l,{key:2,round:``,size:`small`,class:`source-chip shrink`,onClick:o.openSourceInfo},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(o.getSourceTitle),1)]),_:1},8,[`onClick`])):(0,t.createCommentVNode)(``,!0)]),(0,t.createElementVNode)(`div`,JSe,[(0,t.createElementVNode)(`div`,YSe,[(0,t.createVNode)(h,{placement:`bottom`,teleported:!1,trigger:`manual`,width:o.setPopperWidth(e.slot.id),offset:0,"popper-class":`context-card-popover`,"popper-options":o.popperOptions,visible:e.contextCardVisible},(0,t.createSlots)({reference:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createElementVNode)(`div`,null,[(0,t.withDirectives)((0,t.createElementVNode)(`div`,{class:`information`,onClick:n[3]||=t=>e.contextCardVisible=!1},[n[6]||=(0,t.createTextVNode)(` Hide information `,-1),(0,t.createVNode)(p,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(f)]),_:1})],512),[[t.vShow,e.contextCardVisible]]),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{class:`information`,onClick:n[4]||=t=>e.contextCardVisible=!0},[n[7]||=(0,t.createTextVNode)(` Show information `,-1),(0,t.createVNode)(p,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(m)]),_:1})],512),[[t.vShow,!e.contextCardVisible]])],512),[[t.vShow,e.contextCardEntry]])]),_:2},[e.contextCardEntry?{name:`default`,fn:(0,t.withCtx)(()=>[e.contextCardEntry.type==`Flatmap`||e.contextCardEntry.type==`MultiFlatmap`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:0,class:`flatmap-context-card`,mapImpProv:e.contextCardEntry.mapImpProv},null,8,[`mapImpProv`])):(0,t.createCommentVNode)(``,!0),e.contextCardEntry.type.toLowerCase()==`scaffold`?((0,t.openBlock)(),(0,t.createBlock)(d,{key:1,entry:e.contextCardEntry,envVars:o.envVars,class:`context-card`,onContextReady:n[1]||=t=>e.contextCardVisible=!0,onScaffoldViewClicked:n[2]||=t=>e.$emit(`scaffold-view-clicked`,t)},null,8,[`entry`,`envVars`])):(0,t.createCommentVNode)(``,!0)]),key:`0`}:void 0]),1032,[`width`,`popper-options`,`visible`])]),r.captureScreenshot?((0,t.openBlock)(),(0,t.createBlock)(g,{key:0,disabled:!r.viewerReady,class:`screenshot-button`,tooltip:`Download screenshot of this view`,capture:o.onCaptureScreenshot,getTarget:r.getScreenshotTarget},null,8,[`disabled`,`capture`,`getTarget`])):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(h,{class:`tooltip`,content:`Close and remove`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createVNode)(_,{icon:`close-no-bk`,class:`header-icon rightmost`,onClick:n[5]||=e=>o.closeAndRemove()},null,512),[[t.vShow,o.activeView!==`singlepanel`&&(r.entry.mode!==`main`||o.allClosable)]])]),_:1},8,[`show-after`])])])])}var mK=vd(WSe,[[`render`,XSe],[`__scopeId`,`data-v-a4a65049`]]);function hK(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e))return e.length===t.length&&e.every((e,n)=>hK(e,t[n]));let n=Object.keys(e).filter(t=>e[t]!==void 0),r=Object.keys(t).filter(e=>t[e]!==void 0);return n.length===r.length&&n.every(n=>hK(e[n],t[n]))}function ZSe(e=[],t=[]){let n=new Map;return[...e,...t].forEach(e=>{if(!e||e.id===void 0)return;let t=n.get(e.id);n.set(e.id,t?{...t,...e,"nerve-label":e[`nerve-label`]||t[`nerve-label`],"long-label":e[`long-label`]||t[`long-label`],"expert-consultants":e[`expert-consultants`]||t[`expert-consultants`]}:{...e})}),Array.from(n.values())}var gK,_K=_((()=>{eK(),gK=(0,n.defineStore)(`connectivities`,{state:()=>({activeConnectivityKeys:[],globalConnectivities:{},filterOptions:{},filterSources:{},connectivitiesUpdated:!0}),getters:{getUniqueConnectivitiesByKeys:e=>{let t=e.activeConnectivityKeys.reduce((t,n)=>{let r=e.globalConnectivities[n];if(!r)return t;for(let e of r){let n=e.id;t[n]=t[n]?{...t[n],...e}:{...e}}return t},{});return Object.values(t).sort((e,t)=>e.label.localeCompare(t.label))},getUniqueFilterOptionsByKeys:e=>{let t=e.activeConnectivityKeys.reduce((t,n)=>{let r=e.filterOptions[n];if(!r)return t;for(let e of r)if(t[e.key]){let n=[...t[e.key].children,...e.children],r=Array.from(new Map(n.map(e=>[e.key,e])).values());t[e.key].children=r}else t[e.key]={...e};return t},{});return Object.values(t)},getUniqueFilterSourcesByKeys:e=>e.activeConnectivityKeys.reduce((t,n)=>{let r=e.filterSources[n];if(!r)return t;for(let[e,n]of Object.entries(r)){t[e]||(t[e]={});for(let[r,i]of Object.entries(n))t[e][r]=t[e][r]?Array.from(new Set([...t[e][r],...i])):[...i]}return t},{})},actions:{updateActiveConnectivityKeys(e){return $G(this.activeConnectivityKeys,e)?this.connectivitiesUpdated?(this.connectivitiesUpdated=!e.every(e=>e in this.globalConnectivities),!0):!1:(this.activeConnectivityKeys=e,!0)},updateGlobalConnectivities(e){if(e){let n=(0,t.toRaw)(this.globalConnectivities),r={...n},i=!1;Object.entries((0,t.toRaw)(e)).forEach(([e,a])=>{let o=(0,t.toRaw)(n[e]),s=ZSe(o||[],(0,t.toRaw)(a)||[]);o&&hK(s,o)?(0,t.markRaw)(o):(r[e]=(0,t.markRaw)(s),i=!0)}),i&&(this.globalConnectivities=r,this.connectivitiesUpdated=!0)}},updateFilterOptions(e){this.filterOptions=e},updateFilterSources(e){this.filterSources=e}}})})),vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,QSe=_((()=>{dW(),vK=function(e){if(!e)return[];let t=new Set;return e.filter(e=>{let n=JSON.stringify(e);return!t.has(n)&&(t.add(n),!0)})},yK=function(e){return new Set((e||[]).map(e=>JSON.stringify(e)))},bK=function(e){if(!e)return[];let t=new Set,n=[];return e.forEach(e=>{let{id:r,name:i}=e,a=`${r.toLowerCase()}:${i.toLowerCase()}`;t.has(a)||(t.add(a),n.push(e))}),n},xK=new Map,SK=new Map,CK=100,wK=new Map,TK=function(e,t){if(wK.has(e)){let t=wK.get(e);return wK.delete(e),wK.set(e,t),t}let n=t().catch(t=>{throw wK.get(e)===n&&wK.delete(e),t});return wK.set(e,n),wK.size>CK&&wK.delete(wK.keys().next().value),n},EK=async function(e,t){let n=[...new Set(t)],r=n.filter(e=>!xK.has(e)&&!SK.has(e));if(r.length){let t=e.queryLabels(r).then(e=>{(e||[]).forEach(e=>{let{entity:t,label:n}=e;n===`Mammalia`&&(n=`Mammalia not otherwise specified`),xK.set(t,n)})}).finally(()=>{r.forEach(e=>SK.delete(e))});r.forEach(e=>SK.set(e,t))}let i=new Set(n.map(e=>SK.get(e)).filter(Boolean));return await Promise.all(i),n.filter(e=>xK.has(e)).map(e=>({taxon:e,label:xK.get(e)}))},DK=(e,t)=>{let n=e.name??e,r=t.name??t,i=n.toUpperCase(),a=r.toUpperCase();return i<a?-1:+(i>a)},OK=function(){return{destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],destinationsCombinations:[],originsCombinations:[],componentsCombinations:[],singleConnectivityList:[],rawURLs:[],expertConsultants:[]}},kK=function(e,t,n,r){let{sckanNodeId:i,sckanNodeLabel:a,mapNodeId:o,mapNodeLabel:s}=n;e.push({sckanId:i,sckanLabel:a,mapId:o,mapLabel:s}),o.forEach((e,n)=>{let i=typeof e==`string`?e:e[0];i&&t.push({id:i,name:r[n]})})},AK=function(){this.initialise=function(e){this.flatmapAPI=e,Object.assign(this,OK()),this.hasSingleConnectivityList=!1,this.controller=void 0,this.uberons=[],this.lookUp=[],this.connectivitySource=`map`,this.noMapConnectivity=!1,this._requestId=0},this._buildTooltipData=async function(e,t,n){let r;r=n.feature?.hyperlinks&&n.feature.hyperlinks.length>0?n.feature.hyperlinks:e.rawURLs;let i;if(n.provenanceTaxonomy){i=[];try{(await EK(t,n.provenanceTaxonomy)).forEach(e=>{i.push(e.label)})}catch(e){console.log(e)}}return{destinations:e.destinations,origins:e.origins,components:e.components,destinationsWithDatasets:bK(e.destinationsWithDatasets),originsWithDatasets:bK(e.originsWithDatasets),componentsWithDatasets:bK(e.componentsWithDatasets),destinationsCombinations:e.destinationsCombinations,originsCombinations:e.originsCombinations,componentsCombinations:e.componentsCombinations,hasSingleConnectivityList:e.singleConnectivityList.length>0,title:n.label,featureId:n.resource,hyperlinks:r,"expert-consultants":e.expertConsultants,provenanceTaxonomy:n.provenanceTaxonomy,provenanceTaxonomyLabel:i,connectivitySource:e.connectivitySource,noMapConnectivity:e.noMapConnectivity}},this.createTooltipData=async function(e,t){return this._buildTooltipData(this,e,t)},this.queryTooltipData=async function(e,t){let n=t.resource,r={...OK(),connectivitySource:`map`,noMapConnectivity:!1};if(n&&n.length>0&&n[0]){let{state:t}=await this._fetchConnectivity(e,n[0],`map`,!0);r={...r,...t}}return this._buildTooltipData(r,e,t)},this.updateTooltipData=function(e){return{...e,origins:this.origins,originsWithDatasets:bK(this.originsWithDatasets),components:this.components,componentsWithDatasets:bK(this.componentsWithDatasets),destinations:this.destinations,destinationsWithDatasets:bK(this.destinationsWithDatasets),destinationsCombinations:this.destinationsCombinations,originsCombinations:this.originsCombinations,componentsCombinations:this.componentsCombinations,connectivitySource:this.connectivitySource,noMapConnectivity:this.noMapConnectivity}},this.createComponentsLabelList=function(e,t){let n=[];return e.forEach(e=>{n.push(this.createLabelFromNeuralNode(e[0]),t),e.length===2&&n.push(this.createLabelFromNeuralNode(e[1]),t)}),n},this._buildLabelLookup=async function(e,t){let n={},r=[];return(await EK(e,t)).forEach(e=>{let{taxon:t,label:i}=e;n[t]=i,r.push({id:t,name:i})}),{lookUp:n,uberons:r}},this.createLabelLookup=async function(e,t){let{lookUp:n,uberons:r}=await this._buildLabelLookup(e,t);return this.uberons=r,n},this.buildConnectivitySqlStatement=function(e){let t=`select knowledge from knowledge where entity in (`;if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let n in e)t+=`'${e[n]}'${n>=e.length-1?`)`:`,`} `;return t},this.buildLabelSqlStatement=function(e){let t=`select entity, label from labels where entity in (`;if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let n in e)t+=`'${e[n]}'${n>=e.length-1?`)`:`,`} `;return t},this.findAllIdsFromConnectivity=function(e){return[...new Set(e.connectivity.flat(3))]},this.flattenConnectivity=function(e){return e.flat(3)},this.findComponents=function(e,t,n,r){let i=e.connectivity.flat(),a=vK(i),o=[t,r,n].filter(e=>e).map(e=>JSON.stringify(e));return a.filter(e=>{let t=JSON.stringify(e);return!o.some(e=>e.indexOf(t)!==-1)})},this.retrieveFlatmapKnowledgeForEvent=async function(e,t){this.controller&&this.controller.abort(),this.controller=new AbortController,this._requestId++;let n=t.resource;if(Object.assign(this,OK()),!(!n||n.length===0||!n[0]))return[await this.queryForConnectivityNew(e,n[0])]},this.queryForConnectivityNew=async function(e,t,n=`map`,r=!0){let i=++this._requestId,{state:a,value:o}=await this._fetchConnectivity(e,t,n,r);return i===this._requestId&&Object.assign(this,a),o},this._fetchConnectivity=async function(e,t,n,r){let i=/^sckan-(\d{4})/.exec(e.knowledgeSource||``),a=(i?Number(i[1]):0)>=2026,o=e.mapMetadata.uuid,s=this.flatmapAPI,c=OK();c.connectivitySource=a?`sckan`:n;let l=a?TK(`cq27|${s}|${o}|${t}`,()=>aye(s,o,t)).catch(()=>[]):Promise.resolve([]),u=()=>TK(`sckan|${s}|${o}|${t}`,()=>e.queryKnowledge(t)),d=c.connectivitySource===`map`?TK(`map|${s}|${o}|${t}`,()=>this.queryMapConnectivity(o,t)):u(),f=!1;try{let t=await d;if(c.singleConnectivityList=await l,this.checkConnectivityExists(t)?c.connectivitySource===`map`&&(c.noMapConnectivity=!1):c.connectivitySource===`map`?(c.connectivitySource=`sckan`,c.noMapConnectivity=!0,t=await u().catch(()=>void 0)):t=void 0,this.checkConnectivityExists(t)&&(f=t,r)){let n=await this._processConnectivity(e,t,c.singleConnectivityList);Object.assign(c,n.state),f=n.value,t.references&&(c.rawURLs=[...t.references]),t[`expert-consultants`]&&(c.expertConsultants=[...t[`expert-consultants`]])}}catch(e){c.singleConnectivityList=await l,e.name===`AbortError`||console.warn(`Unable to get the knowledge for the entity ${t}.`),f=!1}return{state:c,value:f}},this.queryMapConnectivity=async function(e,t){let n=this.flatmapAPI+`flatmap/${e}/connectivity/${t}`;try{let e=await fetch(n);if(!e.ok)throw Error(`Response status: ${e.status}`);return await e.json()}catch(e){throw Error(e,{cause:e})}},this.queryForConnectivity=function(e,t,n,r=!0){let i={sql:this.buildConnectivitySqlStatement(t)},a={method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(i),...n?{signal:n}:{}};return new Promise(t=>{fetch(`${this.flatmapAPI}knowledge/query/`,a).then(e=>e.json()).then(n=>{if(this.connectivityExists(n)){let i=JSON.parse(n.values[0][0]);r?this.processConnectivity(e,i).then(e=>{t(e)}).catch(()=>t(!1)):t(i)}else t(!1)}).catch(e=>{e.name===`AbortError`||console.error(`Error:`,e),t(!1)})})},this.checkConnectivityExists=function(e){return e&&e.connectivity?.length},this.connectivityExists=function(e){if(e.values&&e.values.length>0){let t=JSON.parse(e.values[0][0]).connectivity;return!!(t&&t.length>0)}return!1},this.findIfNodeIsSingle=function(e){return e.length===1?(console.error(`Server returns a single node`,e),e[0]):e.length===2&&e[1].length===0&&e[0]},this.createLabelFromNeuralNode=function(e,t){let n=this.findIfNodeIsSingle(e);if(n)return t[n];let r=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(e=>{t[e]==null?r+=`, ${e}`:r+=`, ${t[e]}`}),r},this._findDatasets=function(e,t,n,r,i){let a=new Set(this.flattenConnectivity(e)),o=new Set(this.flattenConnectivity(t)),s=new Set(this.flattenConnectivity(n)),c={originsWithDatasets:r.filter(e=>a.has(e.id)).sort(DK),componentsWithDatasets:r.filter(e=>o.has(e.id)).sort(DK),destinationsWithDatasets:r.filter(e=>s.has(e.id)).sort(DK),destinationsCombinations:[],originsCombinations:[],componentsCombinations:[]};if(i.length>0){let r=yK(n),a=yK(e),o=yK(t);i.forEach(e=>{let t=JSON.stringify(e.sckanNodeId),n=e.mapNodeLabel.split(`,`);r.has(t)&&kK(c.destinationsCombinations,c.destinationsWithDatasets,e,n),a.has(t)&&kK(c.originsCombinations,c.originsWithDatasets,e,n),o.has(t)&&kK(c.componentsCombinations,c.componentsWithDatasets,e,n)})}return c},this.flattenAndFindDatasets=function(e,t,n){Object.assign(this,this._findDatasets(e,t,n,this.uberons,this.singleConnectivityList))},this._processConnectivity=async function(e,t,n){let r=[],i=[],a;t&&t[`node-phenotypes`]?([`ilxtr:hasSomaLocatedIn`].forEach(e=>{e in t[`node-phenotypes`]&&r.push(...t[`node-phenotypes`][e])}),r=vK(r),[`ilxtr:hasAxonPresynapticElementIn`,`ilxtr:hasAxonSensorySubcellularElementIn`].forEach(e=>{e in t[`node-phenotypes`]&&i.push(...t[`node-phenotypes`][e])}),i=vK(i)):(i=vK(t.axons),t.somas&&t.somas.length>0&&r.push(...t.somas),t.dendrites&&t.dendrites.length>0&&r.push(...t.dendrites),r=vK(r),a=t.somas);let o=this.findComponents(t,i,r,a),s=this.findAllIdsFromConnectivity(t),{lookUp:c,uberons:l}=await this._buildLabelLookup(e,s),u=r.map(e=>this.createLabelFromNeuralNode(e,c)).sort(DK),d=o.map(e=>this.createLabelFromNeuralNode(e,c)).sort(DK),f=i.map(e=>this.createLabelFromNeuralNode(e,c)).sort(DK);return{state:{uberons:l,origins:u,components:d,destinations:f,...this._findDatasets(r,o,i,l,n)},value:{ids:{dendrites:r,components:o,axons:i},labels:{origins:u,components:d,destinations:f}}}},this.processConnectivity=async function(e,t){let{state:n,value:r}=await this._processConnectivity(e,t,this.singleConnectivityList);return Object.assign(this,n),r},this.buildPubmedSqlStatement=function(e){let t=`select distinct publication from publications where entity in (`;if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let n in e)t+=`'${e[n]}'${n>=e.length-1?`)`:`,`} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.queryKnowledge=async(e,t)=>{let n=`${this.flatmapAPI}knowledge/query/`,r=await fetch(n,{method:`POST`,headers:{Accept:`application/json`},body:JSON.stringify({sql:e,params:t})});if(!r.ok)throw Error(`Cannot access ${n}`);let i=await r.json();if(`error`in i)throw TypeError(i.error);return i.values}}})),jK,MK,NK,$Se=_((()=>{jK=[{id:0,nerve_id:`ILX:0793723`,label:`Auriculotemporal nerve`,"FMA subclasses (in human nerves)":[`FMA:53002`,`FMA:53001`],"subclass labels":[`Left auriculotemporal nerve`,`Right auriculotemporal nerve`]},{id:1,nerve_id:`ILX:0792409`,label:`gray communicating ramus of tenth thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6895`,`FMA:6894`],"subclass labels":[`Left T10 grey ramus communicans`,`Right T10 grey ramus communicans`]},{id:2,nerve_id:`UBERON:0011326`,label:`superior laryngeal nerve`,"FMA subclasses (in human nerves)":[`FMA:53530`,`FMA:53536`],"subclass labels":[`Right superior laryngeal nerve`,`Left superior laryngeal nerve`]},{id:3,nerve_id:`ILX:0793220`,label:`white communicating ramus of first lumbar spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:4,nerve_id:`ILX:0787082`,label:`gray communicating ramus of the first thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6082`,`FMA:6084`],"subclass labels":[`Right T1 grey ramus communicans`,`Left T1 grey ramus communicans`]},{id:5,nerve_id:`ILX:0793809`,label:`Clitoral cavernous nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:6,nerve_id:`UBERON:0011096`,label:`lacrimal nerve`,"FMA subclasses (in human nerves)":[`FMA:52630`,`FMA:52629`],"subclass labels":[`Left lacrimal nerve`,`Right lacrimal nerve`]},{id:7,nerve_id:`ILX:0793215`,label:`white communicating ramus of ninth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:8,nerve_id:`ILX:0795005`,label:`Posterior cutaneous nerve of arm`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:9,nerve_id:`UBERON:0001649`,label:`glossopharyngeal nerve`,"FMA subclasses (in human nerves)":[`FMA:50894`,`FMA:50892`],"subclass labels":[]},{id:10,nerve_id:`UBERON:0022302`,label:`short ciliary nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:11,nerve_id:`ILX:0785932`,label:`gray communicating ramus of third lumbar nerve`,"FMA subclasses (in human nerves)":[`FMA:65920`,`FMA:65919`],"subclass labels":[`Left L3 grey ramus communicans`,`Right L3 grey ramus communicans`]},{id:12,nerve_id:`ILX:0738293`,label:`Ganglioglomerular nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:13,nerve_id:`ILX:0739298`,label:`gray communicating ramus of twelfth thoracic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:14,nerve_id:`UBERON:0001492`,label:`radial nerve`,"FMA subclasses (in human nerves)":[`FMA:37070`,`FMA:37071`],"subclass labels":[`Right radial nerve`,`Left radial nerve`]},{id:15,nerve_id:`ILX:0793214`,label:`white communicating ramus of eighth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:16,nerve_id:`UBERON:0018681`,label:`lesser splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6957`,`FMA:6958`],"subclass labels":[`Right lesser splanchnic nerve`,`Left lesser splanchnic nerve`]},{id:17,nerve_id:`ILX:0794476`,label:`abdominal branch of vagus nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:18,nerve_id:`ILX:0791105`,label:`gray communicating ramus of the second thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6122`,`FMA:6757`],"subclass labels":[`Right T2 grey ramus communicans`,`Left T2 grey ramus communicans`]},{id:19,nerve_id:`ILX:0794853`,label:`esophageal vagus trunk`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:20,nerve_id:`ILX:0793210`,label:`white communicating ramus of fourth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:21,nerve_id:`UBERON:0001759`,label:`vagus nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:22,nerve_id:`UBERON:0009675`,label:`chorda tympani branch of facial nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:23,nerve_id:`ILX:0794949`,label:`recurrent branch of the median nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:24,nerve_id:`ILX:0789339`,label:`Pharyngeal branch of glossopharyngeal nerve`,"FMA subclasses (in human nerves)":[`FMA:53495`,`FMA:53494`],"subclass labels":[`Pharyngeal branch of left glossopharyngeal nerve`,`Pharyngeal branch of right glossopharyngeal nerve`]},{id:25,nerve_id:`ILX:0793712`,label:`Zygomatic nerve`,"FMA subclasses (in human nerves)":[`FMA:52968`,`FMA:52969`],"subclass labels":[`Right zygomatic nerve`,`Left zygomatic nerve`]},{id:26,nerve_id:`ILX:0788536`,label:`gray communicating ramus of fourth lumbar nerve`,"FMA subclasses (in human nerves)":[`FMA:65917`,`FMA:65918`],"subclass labels":[`Right L4 grey ramus communicans`,`Left L4 grey ramus communicans`]},{id:27,nerve_id:`UBERON:0018680`,label:`greater splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6956`,`FMA:6955`],"subclass labels":[`Right greater splanchnic nerve`,`Left greater splanchnic nerve`]},{id:28,nerve_id:`UBERON:0001322`,label:`sciatic nerve`,"FMA subclasses (in human nerves)":[`FMA:22111`,`FMA:22112`],"subclass labels":[`Right sciatic nerve`,`Left sciatic nerve`]},{id:29,nerve_id:`ILX:0793209`,label:`white communicating ramus of third thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:30,nerve_id:`UBERON:0011391`,label:`perineal nerve`,"FMA subclasses (in human nerves)":[`FMA:21874`,`FMA:21873`],"subclass labels":[`Left perineal nerve`,`Right perineal nerve`]},{id:31,nerve_id:`ILX:0788945`,label:`gray communicating ramus of the fourth thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6759`,`FMA:6758`],"subclass labels":[`Right T4 grey ramus communicans`,`Left T4 grey ramus communicans`]},{id:32,nerve_id:`ILX:0790497`,label:`Gray communicating ramus of cervicothoracic ganglion to first thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:33,nerve_id:`UBERON:0001323`,label:`tibial nerve`,"FMA subclasses (in human nerves)":[`FMA:22109`,`FMA:22110`],"subclass labels":[`Right tibial nerve`,`Left tibial nerve`]},{id:34,nerve_id:`ILX:0794969`,label:`deep branch of ulnar nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:35,nerve_id:`ILX:0793227`,label:`gray communicating ramus of thirteenth thoracic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:36,nerve_id:`ILX:0793228`,label:`gray communicating ramus of first sacral nerve`,"FMA subclasses (in human nerves)":[`FMA:65992`,`FMA:65991`],"subclass labels":[`Left S1 grey ramus communicans`,`Right S1 grey ramus communicans`]},{id:37,nerve_id:`UBERON:0035111`,label:`medial plantar nerve`,"FMA subclasses (in human nerves)":[`FMA:45435`,`FMA:45434`],"subclass labels":[`Left medial plantar nerve`,`Right medial plantar nerve`]},{id:38,nerve_id:`UBERON:0001780`,label:`spinal nerve`,"FMA subclasses (in human nerves)":`FMA:6117.FMA:6435.FMA:6295.FMA:6422.FMA:6417.FMA:6421.FMA:6038.FMA:6292.FMA:6439.FMA:6313.FMA:6410.FMA:6412.FMA:6088.FMA:6298.FMA:6433.FMA:6411.FMA:6438.FMA:6314.FMA:6291.FMA:6420.FMA:6116.FMA:6413.FMA:6310.FMA:6432.FMA:6305.FMA:6182.FMA:6297.FMA:6436.FMA:6418.FMA:6039.FMA:6089.FMA:6301.FMA:6294.FMA:6303.FMA:6183.FMA:6434.FMA:6429.FMA:6308.FMA:6300.FMA:6430.FMA:6428.FMA:6419.FMA:6437.FMA:6307.FMA:6311.FMA:6431`.split(`.`),"subclass labels":`Left T3 spinal nerve.Left S4 spinal nerve.Left T5 spinal nerve.Left L5 spinal nerve.Right L3 spinal nerve.Right L5 spinal nerve.Right T1 spinal nerve.Left T4 spinal nerve.Left coccygeal spinal nerve.Right T11 spinal nerve.Right L1 spinal nerve.Right L2 spinal nerve.Right T2 spinal nerve.Left T6 spinal nerve.Left S3 spinal nerve.Left L1 spinal nerve.Right coccygeal spinal nerve.Left T11 spinal nerve.Right T4 spinal nerve.Left L4 spinal nerve.Right T3 spinal nerve.Left L2 spinal nerve.Right T10 spinal nerve.Right S3 spinal nerve.Left T8 spinal nerve.Right T12 spinal nerve.Right T6 spinal nerve.Right S5 spinal nerve.Left L3 spinal nerve.Left T1 spinal nerve.Left T2 spinal nerve.Left T7 spinal nerve.Right T5 spinal nerve.Right T8 spinal nerve.Left T12 spinal nerve.Right S4 spinal nerve.Left S1 spinal nerve.Left T9 spinal nerve.Right T7 spinal nerve.Right S2 spinal nerve.Right S1 spinal nerve.Right L4 spinal nerve.Left S5 spinal nerve.Right T9 spinal nerve.Left T10 spinal nerve.Left S2 spinal nerve`.split(`.`)},{id:39,nerve_id:`UBERON:0018683`,label:`lumbar splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6924`,`FMA:6928`,`FMA:6929`,`FMA:6931`,`FMA:6925`,`FMA:6930`,`FMA:6927`,`FMA:6926`],"subclass labels":[`Right first lumbar splanchnic nerve`,`Right third lumbar splanchnic nerve`,`Left third lumbar splanchnic nerve`,`Left fourth lumbar splanchnic nerve`,`Left first lumbar splanchnic nerve`,`Right fourth lumbar splanchnic nerve`,`Left second lumbar splanchnic nerve`,`Right second lumbar splanchnic nerve`]},{id:40,nerve_id:`UBERON:0001643`,label:`oculomotor nerve`,"FMA subclasses (in human nerves)":[`FMA:50880`,`FMA:50879`],"subclass labels":[`Left oculomotor nerve`,`Right oculomotor nerve`]},{id:41,nerve_id:`ILX:0793212`,label:`white communicating ramus of sixth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:42,nerve_id:`UBERON:0003724`,label:`musculocutaneous nerve`,"FMA subclasses (in human nerves)":[`FMA:37066`,`FMA:37065`],"subclass labels":[`Left musculocutaneous nerve`,`Right musculocutaneous nerve`]},{id:43,nerve_id:`ILX:0738372`,label:`white communicating ramus of first thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:44,nerve_id:`ILX:0793563`,label:`splenic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:45,nerve_id:`UBERON:0035526`,label:`superficial fibular nerve`,"FMA subclasses (in human nerves)":[`FMA:45363`,`FMA:45364`],"subclass labels":[`Right superficial fibular nerve`,`Left superficial fibular nerve`]},{id:46,nerve_id:`ILX:0791560`,label:`gray communicating ramus of eighth thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6891`,`FMA:6890`],"subclass labels":[`Left T8 grey ramus communicans`,`Right T8 grey ramus communicans`]},{id:47,nerve_id:`ILX:0793827`,label:`posterior abdominal vagal trunk`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:48,nerve_id:`ILX:0794141`,label:`right cervical vagus nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:49,nerve_id:`ILX:0793714`,label:`Mesenteric nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:50,nerve_id:`UBERON:0001964`,label:`least splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6960`,`FMA:6959`],"subclass labels":[`Left least splanchnic nerve`,`Right least splanchnic nerve`]},{id:51,nerve_id:`UBERON:0001267`,label:`femoral nerve`,"FMA subclasses (in human nerves)":[`FMA:16499`,`FMA:16500`],"subclass labels":[`Right femoral nerve`,`Left femoral nerve`]},{id:52,nerve_id:`UBERON:0034984`,label:`nerve to quadratus femoris`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:53,nerve_id:`UBERON:0003721`,label:`lingual nerve`,"FMA subclasses (in human nerves)":[`FMA:53219`,`FMA:53220`],"subclass labels":[`Right lingual nerve`,`Left lingual nerve`]},{id:54,nerve_id:`UBERON:0036216`,label:`tympanic nerve`,"FMA subclasses (in human nerves)":[`FMA:53481`,`FMA:53482`],"subclass labels":[`Right tympanic nerve`,`Left tympanic nerve`]},{id:55,nerve_id:`ILX:0793216`,label:`white communicating ramus of tenth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:56,nerve_id:`ILX:0793362`,label:`White communicating ramus of fourth lumbar anterior ramus`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:57,nerve_id:`ILX:0793561`,label:`Internal branch of superior laryngeal nerve`,"FMA subclasses (in human nerves)":[`FMA:53539`,`FMA:53540`],"subclass labels":[`Right internal laryngeal nerve`,`Left internal laryngeal nerve`]},{id:58,nerve_id:`ILX:0738312`,label:`Aortic arch depressor nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:59,nerve_id:`ILX:0793218`,label:`white communicating ramus of twelfth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:60,nerve_id:`ILX:0738308`,label:`External branch of inferior laryngeal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:61,nerve_id:`ILX:0739299`,label:`gray communicating ramus of sixth lumbar nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:62,nerve_id:`ILX:0793559`,label:`bladder nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:63,nerve_id:`ILX:0793822`,label:`Superior ovarian nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:64,nerve_id:`ILX:0793807`,label:`Penile cavernous nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:65,nerve_id:`UBERON:0011390`,label:`pudendal nerve`,"FMA subclasses (in human nerves)":[`FMA:21863`,`FMA:21864`],"subclass labels":[`Right pudendal nerve`,`Left pudendal nerve`]},{id:66,nerve_id:`UBERON:0008810`,label:`nasopalatine nerve`,"FMA subclasses (in human nerves)":[`FMA:52799`,`FMA:52798`],"subclass labels":[`Left nasopalatine nerve`,`Right nasopalatine nerve`]},{id:67,nerve_id:`ILX:0793219`,label:`white communicating ramus of thirteenth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:68,nerve_id:`ILX:0793632`,label:`lumbar colonic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:69,nerve_id:`ILX:0784439`,label:`gray communicating ramus of the fifth thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6760`,`FMA:6761`],"subclass labels":[`Left T5 grey ramus communicans`,`Right T5 grey ramus communicans`]},{id:70,nerve_id:`ILX:0794977`,label:`deep branch of radial nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:71,nerve_id:`UBERON:0001884`,label:`phrenic nerve`,"FMA subclasses (in human nerves)":[`FMA:6193`,`FMA:6192`],"subclass labels":[`Left phrenic nerve`,`Right phrenic nerve`]},{id:72,nerve_id:`UBERON:0035110`,label:`lateral plantar nerve`,"FMA subclasses (in human nerves)":[`FMA:45450`,`FMA:45451`],"subclass labels":[`Right lateral plantar nerve`,`Left lateral plantar nerve`]},{id:73,nerve_id:`ILX:0793711`,label:`Communicating branch of zygomatic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:74,nerve_id:`ILX:0793560`,label:`External branch of superior laryngeal nerve`,"FMA subclasses (in human nerves)":[`FMA:53537`,`FMA:53538`],"subclass labels":[`Right external laryngeal nerve`,`Left external laryngeal nerve`]},{id:75,nerve_id:`ILX:0738309`,label:`Internal branch of inferior laryngeal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:76,nerve_id:`UBERON:0001021`,label:`nerve`,"FMA subclasses (in human nerves)":`FMA:6775.FMA:6894.FMA:6784.FMA:6728.FMA:65325.FMA:21873.FMA:45429.FMA:6844.FMA:53609.FMA:7116.FMA:44770.FMA:8916.FMA:52995.FMA:6071.FMA:45309.FMA:6122.FMA:6892.FMA:6767.FMA:16405.FMA:53560.FMA:6092.FMA:65343.FMA:37066.FMA:8894.FMA:8868.FMA:65341.FMA:53559.FMA:8897.FMA:82956.FMA:20633.FMA:6763.FMA:65339.FMA:8829.FMA:16493.FMA:8817.FMA:8821.FMA:11757.FMA:45456.FMA:45422.FMA:11261.FMA:65388.FMA:6192.FMA:65347.FMA:37068.FMA:65995.FMA:6764.FMA:39081.FMA:45338.FMA:53402.FMA:11210.FMA:52644.FMA:37067.FMA:65313.FMA:11153.FMA:6155.FMA:8797.FMA:53302.FMA:8883.FMA:53067.FMA:52939.FMA:53301.FMA:292889.FMA:45423.FMA:8791.FMA:45380.FMA:11759.FMA:7305.FMA:8830.FMA:78650.FMA:65389.FMA:45387.FMA:8827.FMA:8912.FMA:52941.FMA:6743.FMA:7126.FMA:53485.FMA:16492.FMA:53399.FMA:65337.FMA:11209.FMA:6772.FMA:52726.FMA:6121.FMA:52627.FMA:52974.FMA:53571.FMA:6729.FMA:8729.FMA:53606.FMA:80025.FMA:53481.FMA:53575.FMA:45451.FMA:11218.FMA:22109.FMA:6852.FMA:8909.FMA:11751.FMA:65991.FMA:8836.FMA:65350.FMA:53423.FMA:65569.FMA:65314.FMA:82957.FMA:65438.FMA:39146.FMA:8911.FMA:22111.FMA:65916.FMA:65739.FMA:65917.FMA:6779.FMA:8889.FMA:65924.FMA:65316.FMA:53002.FMA:16887.FMA:53366.FMA:6890.FMA:8790.FMA:6730.FMA:45358.FMA:52716.FMA:53494.FMA:7115.FMA:53561.FMA:78655.FMA:45366.FMA:11219.FMA:11555.FMA:7092.FMA:53220.FMA:45428.FMA:6193.FMA:20604.FMA:45433.FMA:21874.FMA:21875.FMA:53244.FMA:45432.FMA:6770.FMA:52640.FMA:11249.FMA:20630.FMA:53308.FMA:11216.FMA:65399.FMA:78649.FMA:11084.FMA:6897.FMA:53633.FMA:6085.FMA:6851.FMA:45457.FMA:6757.FMA:8732.FMA:8824.FMA:20632.FMA:6137.FMA:52730.FMA:7301.FMA:52699.FMA:53607.FMA:7300.FMA:53576.FMA:44904.FMA:65342.FMA:7127.FMA:6737.FMA:52669.FMA:21876.FMA:45425.FMA:65999.FMA:8728.FMA:21871.FMA:55172.FMA:6149.FMA:45453.FMA:44932.FMA:292832.FMA:6744.FMA:6781.FMA:44769.FMA:45326.FMA:6760.FMA:53634.FMA:53605.FMA:53530.FMA:6821.FMA:52968.FMA:53001.FMA:11552.FMA:45264.FMA:8835.FMA:6888.FMA:55160.FMA:44899.FMA:52979.FMA:45333.FMA:45310.FMA:6084.FMA:11781.FMA:82962.FMA:53280.FMA:52715.FMA:53311.FMA:16491.FMA:21880.FMA:44952.FMA:11687.FMA:11212.FMA:65335.FMA:52940.FMA:6774.FMA:8823.FMA:45388.FMA:6666.FMA:6072.FMA:16886.FMA:53312.FMA:65915.FMA:45357.FMA:11262.FMA:65921.FMA:0328826.FMA:81290.FMA:53279.FMA:11551.FMA:7293.FMA:6677.FMA:11756.FMA:53598.FMA:52732.FMA:44902.FMA:53545.FMA:6740.FMA:53502.FMA:53562.FMA:52700.FMA:7122.FMA:6118.FMA:65918.FMA:8814.FMA:16403.FMA:65346.FMA:6667.FMA:52630.FMA:52629.FMA:8871.FMA:16500.FMA:52725.FMA:6108.FMA:45363.FMA:65340.FMA:8872.FMA:11760.FMA:53604.FMA:11214.FMA:52777.FMA:21864.FMA:53503.FMA:6738.FMA:66000.FMA:6776.FMA:6777.FMA:6765.FMA:6111.FMA:8890.FMA:20607.FMA:52643.FMA:8908.FMA:65437.FMA:6762.FMA:11154.FMA:65344.FMA:52937.FMA:8919.FMA:45354.FMA:6766.FMA:53424.FMA:6145.FMA:65568.FMA:20634.FMA:6732.FMA:8893.FMA:11758.FMA:6889.FMA:11554.FMA:65922.FMA:7118.FMA:16884.FMA:45308.FMA:7290.FMA:6758.FMA:65743.FMA:11063.FMA:16885.FMA:8882.FMA:65286.FMA:291238.FMA:53482.FMA:52976.FMA:11308.FMA:53432.FMA:53540.FMA:45379.FMA:44871.FMA:6714.FMA:82955.FMA:65993.FMA:45452.FMA:52626.FMA:6083.FMA:53582.FMA:65919.FMA:52936.FMA:53506.FMA:8918.FMA:44901.FMA:6073.FMA:65315.FMA:53219.FMA:11194.FMA:6792.FMA:7119.FMA:52785.FMA:7296.FMA:53068.FMA:6845.FMA:52677.FMA:53504.FMA:53548.FMA:52698.FMA:53570.FMA:6771.FMA:7078.FMA:65997.FMA:65338.FMA:52969.FMA:16401.FMA:65416.FMA:6835.FMA:39082.FMA:8726.FMA:45254.FMA:8879.FMA:11250.FMA:53049.FMA:45382.FMA:8795.FMA:53495.FMA:45434.FMA:82963.FMA:0328827.FMA:52656.FMA:82961.FMA:11753.FMA:39147.FMA:45339.FMA:20605.FMA:20631.FMA:8898.FMA:6070.FMA:44892.FMA:16404.FMA:52942.FMA:6082.FMA:8861.FMA:82953.FMA:8808.FMA:8805.FMA:52994.FMA:65348.FMA:55173.FMA:7129.FMA:52674.FMA:44894.FMA:55159.FMA:65327.FMA:37320.FMA:6761.FMA:65349.FMA:11253.FMA:53507.FMA:11213.FMA:7307.FMA:6769.FMA:6759.FMA:55155.FMA:53675.FMA:53599.FMA:65282.FMA:53251.FMA:6731.FMA:11111.FMA:16497.FMA:8878.FMA:11211.FMA:65740.FMA:45367.FMA:53588.FMA:45365.UBERON:0011766.FMA:16502.FMA:6891.FMA:6091.FMA:11018.FMA:6090.FMA:292887.FMA:65401.FMA:65326.FMA:11215.FMA:44735.FMA:8735.FMA:53538.FMA:6849.FMA:53608.FMA:11217.FMA:8860.FMA:6134.FMA:6893.FMA:53534.FMA:45361.FMA:37321.FMA:82734.FMA:22112.FMA:7294.FMA:52987.FMA:65247.FMA:53535.FMA:6895.FMA:52787.FMA:53635.FMA:65920.FMA:55156.FMA:16498.FMA:53569.FMA:6739.FMA:8807.FMA:22110.FMA:81294.FMA:45450.FMA:8922.FMA:8725.FMA:20608.FMA:7308.FMA:65281.FMA:39084.FMA:78656.FMA:6133.FMA:53581.FMA:16494.FMA:53252.FMA:11789.FMA:45364.FMA:65345.FMA:44870.FMA:39083.FMA:45355.FMA:11193.FMA:16400.FMA:81287.FMA:52776.FMA:65747.FMA:8900.UBERON:0011767.FMA:45424.FMA:292830.FMA:44734.FMA:45381.FMA:82960.FMA:0328831.FMA:6689.FMA:7077.FMA:291236.FMA:8886.FMA:276381.FMA:6124.FMA:65336.FMA:65328.FMA:52670.FMA:53537.FMA:53636.FMA:6896.FMA:21879.FMA:8798.FMA:81288.FMA:53542.FMA:45368.FMA:53547.FMA:55157.FMA:65415.FMA:53309.FMA:65744.FMA:53367.FMA:53590.FMA:65923.FMA:53048.FMA:16499.FMA:53610.FMA:44951.FMA:44953.FMA:8832.FMA:45426.FMA:6114.FMA:52799.FMA:11039.FMA:53546.FMA:53589.FMA:8901.FMA:11681.FMA:52639.FMA:8905.FMA:52733.FMA:65992.FMA:52807.FMA:45435.FMA:53484.FMA:52975.FMA:7289.FMA:44905.FMA:37071.FMA:7130.FMA:65996.FMA:6132.FMA:8826.FMA:6741.FMA:11252.FMA:8917.FMA:82954.FMA:6832.FMA:37073.FMA:37074.FMA:44893.FMA:82959.FMA:20635.FMA:6093.FMA:65248.FMA:45362.FMA:52622.FMA:53508.FMA:11755.FMA:82958.FMA:52997.FMA:16501.FMA:65402.FMA:45427.FMA:52803.FMA:16402.FMA:8734.FMA:52784.FMA:45454.FMA:6736.FMA:7304.FMA:6742.FMA:52998.FMA:52804.FMA:11788.FMA:6713.FMA:52623.FMA:53536.FMA:11780.FMA:45334.FMA:52701.FMA:65998.FMA:11092.FMA:6684.FMA:52779.FMA:52778.FMA:78652.FMA:0328830.FMA:6733.FMA:44950.FMA:78653.FMA:45455.FMA:8864.FMA:8833.FMA:8876.FMA:8867.FMA:11752.FMA:53541.FMA:53611.FMA:8904.FMA:6745.FMA:21863.FMA:7297.FMA:52676.FMA:52798.FMA:8818.FMA:82735.FMA:52657.FMA:52786.FMA:6773.FMA:45253.FMA:6127.FMA:45263.FMA:8875.FMA:81295.FMA:11754.FMA:8812.FMA:45311.FMA:53568.FMA:276379.FMA:6842.FMA:8794.FMA:8820.FMA:53572.FMA:53409.FMA:37070.FMA:6119.FMA:53433.FMA:7123.FMA:8811.FMA:65444.FMA:52806.FMA:53245.FMA:65285.FMA:6768.FMA:8731.FMA:11220.FMA:6778.FMA:53509.FMA:55158.FMA:53567.FMA:65994.FMA:53539.FMA:45327.FMA:8865.FMA:44898.FMA:52673.FMA:80026.FMA:52980.FMA:53505.FMA:82952.FMA:21872.FMA:37065.FMA:52988.FMA:8815.FMA:53398.FMA:52729.FMA:81289.FMA:65398.FMA:52977.FMA:8887`.split(`.`),"subclass labels":`Left T9 white ramus communicans.Right T10 grey ramus communicans.Right T4 spinal nerve posterior ramus.Right fourth intercostal nerve.Right anterior interosseous nerve.Right perineal nerve.Left lateral calcaneal branch A of left sural nerve.Right C3 spinal nerve posterior ramus medial branch.Oesophageal branch of left recurrent laryngeal nerve.Anterior branch of lateral cutaneous branch of left third intercostal nerve.Left common plantar digital nerve F.Anterior cutaneous branch of right subcostal nerve.Left superior labial branch of infraorbital nerve.Left T1 spinal nerve posterior ramus.Anterior branch of left obturator nerve.Right T2 grey ramus communicans.Right T9 grey ramus communicans.Left T5 white ramus communicans.Left L3 spinal nerve posterior ramus lateral branch.Communicating branch of left vagus nerve with left glossopharyngeal nerve.Right second intercostal nerve.Right proper palmar digital nerve G.Left musculocutaneous nerve.Anterior cutaneous branch of left ninth intercostal nerve.Posterior branch of lateral cutaneous branch of left sixth intercostal nerve.Right proper palmar digital nerve H.Communicating branch of right vagus nerve with right glossopharyngeal nerve.Anterior branch of lateral cutaneous branch of right ninth intercostal nerve.Right proper plantar digital nerve C.Left genital branch of genitofemoral nerve.Left T6 grey ramus communicans.Right proper palmar digital nerve I.Right T12 spinal nerve posterior ramus.Right ilioinguinal nerve.Right T8 spinal nerve posterior ramus.Left T9 spinal nerve posterior ramus.Right T11 spinal nerve posterior ramus lateral branch.Right proper plantar digital nerve J.Right medial sural cutaneous nerve.Right T6 spinal nerve posterior ramus medial branch.Right lesser occipital nerve.Right phrenic nerve.Right proper palmar digital nerve E.Left median nerve.Right S3 grey ramus communicans.Right T4 white ramus communicans.Right medial cutaneous nerve of forearm.Right posterior femoral cutaneous nerve.Right vestibular nerve.Lateral cutaneous branch of left sixth intercostal nerve.Left supratrochlear nerve.Right median nerve.Anterior branch of right medial cutaneous nerve of forearm.Right T5 spinal nerve posterior ramus medial branch.Anterior cutaneous branch of right third intercostal nerve.Right C6 spinal nerve posterior ramus.Temporal branch of left facial nerve.Anterior cutaneous branch of left eighth intercostal nerve.Right buccal nerve.Right middle superior alveolar nerve.Temporal branch of right facial nerve.Left superficial branch of radial nerve.Left medial sural cutaneous nerve.Left C4 spinal nerve posterior ramus.Left lateral dorsal digital nerve of the third toe.Right T12 spinal nerve posterior ramus lateral branch.Anterior branch of lateral cutaneous branch of left eleventh intercostal nerve.Left T12 spinal nerve posterior ramus.Left anterior supraclavicular nerve.Left lesser occipital nerve.Right deep fibular nerve.Left T11 spinal nerve posterior ramus.Posterior branch of lateral cutaneous branch of left tenth intercostal nerve.Right anterior superior alveolar nerve.Left tenth intercostal nerve.Anterior branch of lateral cutaneous branch of right fourth intercostal nerve.Communicating branch of left glossopharyngeal nerve with auricular branch of left vagus nerve.Left iliohypogastric nerve.Cervical branch of left facial nerve.Right proper palmar digital nerve J.Lateral cutaneous branch of right sixth intercostal nerve.Right T8 white ramus communicans.Left maxillary nerve.Left intercostobrachial nerve.Left tentorial nerve.Right zygomaticotemporal nerve.Communicating branch of right internal laryngeal nerve with right recurrent laryngeal nerve.Left fourth intercostal nerve.Brachial plexus left C7 root.Vagal branch to right carotid body.Right proper plantar digital nerve G.Right tympanic nerve.Left lateral plantar nerve.Lateral cutaneous branch of left tenth intercostal nerve.Right tibial nerve.Left third occipital nerve.Anterior branch of lateral cutaneous branch of left tenth intercostal nerve.Right T8 spinal nerve posterior ramus lateral branch.Right S1 grey ramus communicans.Left L3 spinal nerve posterior ramus.Palmar cutaneous branch of left ulnar nerve.Right greater petrosal nerve.Left subcostal nerve.Anterior branch of left medial cutaneous nerve of forearm.Left proper plantar digital nerve C.Left C3 spinal nerve branch to left supraclavicular nerve.Right posterior cutaneous nerve of forearm.Posterior branch of lateral cutaneous branch of right tenth intercostal nerve.Right sciatic nerve.Left L5 grey ramus communicans.Right C4 spinal nerve posterior ramus medial branch.Right L4 grey ramus communicans.Left T11 white ramus communicans.Posterior branch of lateral cutaneous branch of right eighth intercostal nerve.Left L1 grey ramus communicans.Posterior branch of left medial cutaneous nerve of forearm.Left auriculotemporal nerve.Left L2 white ramus communicans.Marginal mandibular branch of right facial nerve.Right T8 grey ramus communicans.Right C4 spinal nerve posterior ramus.Right fifth intercostal nerve.Left common fibular nerve.Left posterior ethmoidal nerve.Pharyngeal branch of right glossopharyngeal nerve.Anterior branch of lateral cutaneous branch of right third intercostal nerve.Communicating branch of right external laryngeal nerve with right superior cardiac nerve.Right posterior supraclavicular nerve.Left medial dorsal cutaneous nerve.Lateral cutaneous branch of right eleventh intercostal nerve.Posterior branch of lateral cutaneous branch of left subcostal nerve.Anterior cutaneous branch of left second intercostal nerve.Left lingual nerve.Right lateral calcaneal branch A of right sural nerve.Left phrenic nerve.Right hypogastric nerve.Medial calcaneal branch A of left tibial nerve.Left perineal nerve.Right posterior scrotal nerve.Right inferior alveolar nerve.Medial calcaneal branch A of right tibial nerve.Right T7 white ramus communicans.Left frontal nerve.Right T1 spinal nerve posterior ramus medial branch.Right genitofemoral nerve.Zygomatic branch of right facial nerve.Lateral cutaneous branch of left ninth intercostal nerve.Left C2 spinal nerve branch to left great auricular nerve.Right anterior supraclavicular nerve.Lateral cutaneous branch of right fourth intercostal nerve.Left T11 grey ramus communicans.Lingual branch of right vagus nerve.Left T1 white ramus communicans.Left C3 spinal nerve posterior ramus medial branch.Left proper plantar digital nerve J.Left T2 grey ramus communicans.Brachial plexus left C6 root.Left T10 spinal nerve posterior ramus.Right genital branch of genitofemoral nerve.Anterior cutaneous branch of right first intercostal nerve.Left middle meningeal nerve.Anterior cutaneous branch of left eleventh intercostal nerve.Left infratrochlear nerve.Vagal branch to left carotid body.Anterior cutaneous branch of right eleventh intercostal nerve.Right proper palmar digital nerve B.Left proper palmar digital nerve H.Anterior branch of lateral cutaneous branch of left fourth intercostal nerve.Left seventh intercostal nerve.Right nasociliary nerve.Left posterior scrotal nerve.Left sural nerve.Right S5 grey ramus communicans.Brachial plexus right C7 root.Right inferior rectal nerve.Right transverse cervical nerve.Anterior cutaneous branch of left third intercostal nerve.Left proper plantar digital nerve H.Superficial branch of left ulnar nerve.Dorsal branch of left ulnar nerve.Right eleventh intercostal nerve.Right T2 white ramus communicans.Right common plantar digital nerve F.Infrapatellar branch of right saphenous nerve.Left T5 grey ramus communicans.Lingual branch of left vagus nerve.Thoracic cardiac branch of left vagus nerve.Right superior laryngeal nerve.Right C2 spinal nerve posterior ramus.Right zygomatic nerve.Right auriculotemporal nerve.Anterior branch of lateral cutaneous branch of left subcostal nerve.Left saphenous nerve.Right L3 spinal nerve posterior ramus.Right T7 grey ramus communicans.Left great auricular nerve posterior branch.Left proper palmar digital nerve A.Right infraorbital nerve.Cutaneous branch of right obturator nerve.Posterior branch of right obturator nerve.Left T1 grey ramus communicans.Right T12 white ramus communicans.Right proper plantar digital nerve F.Left posterior auricular nerve.Right posterior ethmoidal nerve.Buccal branch of right facial nerve.Right iliohypogastric nerve.Left dorsal nerve of penis.Right inferior lateral cutaneous nerve of arm.Left T7 spinal nerve posterior ramus lateral branch.Lateral cutaneous branch of left seventh intercostal nerve.Right posterior interosseous nerve.Left middle superior alveolar nerve.Right T9 white ramus communicans.Right T10 spinal nerve posterior ramus.Left deep fibular nerve.Hepatic branch of anterior vagal trunk.Left first intercostal nerve.Right L2 white ramus communicans.Buccal branch of left facial nerve.Right L5 grey ramus communicans.Right common fibular nerve.Left T6 spinal nerve posterior ramus medial branch.Right L2 grey ramus communicans.Right deep petrosal nerve.Left axillary nerve posterior branch.Right posterior auricular nerve.Anterior branch of lateral cutaneous branch of right subcostal nerve.Anterior branch of lateral cutaneous branch of right fifth intercostal nerve.Pyloric branch of greater posterior gastric nerve.Left T10 spinal nerve posterior ramus lateral branch.Superior cervical cardiac branch of right vagus nerve.Ganglionic branch of right maxillary nerve to pterygopalatine ganglion.Left proper palmar digital nerve C.Right superior cervical cardiac nerve.Right ninth intercostal nerve.Right lesser petrosal nerve.Communicating branch of left external laryngeal nerve with left superior cardiac nerve.Right long ciliary nerve B.Anterior cutaneous branch of right fourth intercostal nerve.Right third intercostal nerve.Left L4 grey ramus communicans.Right T7 spinal nerve posterior ramus.Left L2 spinal nerve posterior ramus lateral branch.Left proper palmar digital nerve F.Coeliac branch of posterior vagal trunk.Left lacrimal nerve.Right lacrimal nerve.Anterior cutaneous branch of right seventh intercostal nerve.Left femoral nerve.Right maxillary nerve.Lateral cutaneous branch of right third intercostal nerve.Right superficial fibular nerve.Left proper palmar digital nerve I.Anterior cutaneous branch of left seventh intercostal nerve.Left T12 spinal nerve posterior ramus lateral branch.Thoracic cardiac branch of right vagus nerve.Lateral cutaneous branch of left eighth intercostal nerve.Orbital branch of left maxillary nerve to left ethmoidal sinus.Left pudendal nerve.Left lesser petrosal nerve.Right eighth intercostal nerve.Left S5 grey ramus communicans.Right T10 white ramus communicans.Left T10 white ramus communicans.Left T4 white ramus communicans.Lateral cutaneous branch of left third intercostal nerve.Posterior branch of lateral cutaneous branch of left eighth intercostal nerve.Lateral cutaneous branch of right iliohypogastric nerve.Right supratrochlear nerve.Anterior branch of lateral cutaneous branch of right tenth intercostal nerve.Right C3 spinal nerve branch to right supraclavicular nerve.Right T6 grey ramus communicans.Left T5 spinal nerve posterior ramus medial branch.Left proper palmar digital nerve G.Left posterior superior alveolar nerve.Lateral cutaneous branch of left subcostal nerve.Gluteal branch A of right posterior femoral cutaneous nerve.Right T5 white ramus communicans.Left greater petrosal nerve.Left T3 spinal nerve posterior ramus.Right subcostal nerve.Right femoral branch of genitofemoral nerve.Right sixth intercostal nerve.Anterior cutaneous branch of right ninth intercostal nerve.Left T11 spinal nerve posterior ramus lateral branch.Left T7 grey ramus communicans.Posterior branch of lateral cutaneous branch of right subcostal nerve.Left L2 grey ramus communicans.Posterior branch of lateral cutaneous branch of right third intercostal nerve.Right L1 white ramus communicans.Anterior branch of right obturator nerve.Anterior cutaneous branch of left fifth intercostal nerve.Left T4 grey ramus communicans.Right C5 spinal nerve posterior ramus medial branch.Right T4 spinal nerve posterior ramus medial branch.Left L1 white ramus communicans.Anterior cutaneous branch of right eighth intercostal nerve.Left subclavian nerve.Pericardial branch of left phrenic nerve.Left tympanic nerve.Right zygomaticofacial nerve.Right intercostobrachial nerve.Right cochlear nerve.Left internal laryngeal nerve.Right lateral dorsal digital nerve of the third toe.Left proper palmar digital nerve D.Inferior cervical cardiac branch of left vagus nerve.Left proper plantar digital nerve B.Right S2 grey ramus communicans.Right proper plantar digital nerve H.Right tentorial nerve.Right T1 white ramus communicans.Inferior ramus of left internal laryngeal nerve.Right L3 grey ramus communicans.Right posterior superior alveolar nerve.Tonsillar branch of right glossopharyngeal nerve.Lateral cutaneous branch of right subcostal nerve.Right proper palmar digital nerve C.Right first intercostal nerve.Posterior branch of right medial cutaneous nerve of forearm.Right lingual nerve.Lateral cutaneous branch of right fifth intercostal nerve.Left T4 spinal nerve posterior ramus.Posterior branch of lateral cutaneous branch of left third intercostal nerve.Right posterior superior lateral nasal branch of maxillary nerve.Posterior branch of lateral cutaneous branch of right fifth intercostal nerve.Left buccal nerve.Right third occipital nerve.Left anterior ethmoidal nerve.Right lingual branch of glossopharyngeal nerve.Left laryngopharyngeal branch of superior cervical ganglion.Right infratrochlear nerve.Left external laryngeal nerve branch to pharyngeal plexus.Left T7 white ramus communicans.Left L1 spinal nerve posterior ramus.Right S4 grey ramus communicans.Left proper palmar digital nerve J.Left zygomatic nerve.Left L1 spinal nerve posterior ramus lateral branch.Left greater occipital nerve.Left medial cutaneous nerve of forearm.Brachial plexus left C8 root.Left anterior femoral cutaneous branch A.Posterior branch of lateral cutaneous branch of left seventh intercostal nerve.Left T1 spinal nerve posterior ramus medial branch.Left meningeal branch of mandibular nerve.Left medial dorsal digital nerve of the fourth toe.Left C5 spinal nerve posterior ramus.Pharyngeal branch of left glossopharyngeal nerve.Right medial plantar nerve.Left proper plantar digital nerve F.Left deep petrosal nerve.Right supraorbital nerve.Left proper plantar digital nerve E.Right T9 spinal nerve posterior ramus lateral branch.Left posterior cutaneous nerve of forearm.Left posterior femoral cutaneous nerve.Left hypogastric nerve.Left genitofemoral nerve.Anterior branch of lateral cutaneous branch of left ninth intercostal nerve.Right T1 spinal nerve posterior ramus.Right common palmar digital nerve A.Right L3 spinal nerve posterior ramus lateral branch.Left anterior superior alveolar nerve.Right T1 grey ramus communicans.Anterior cutaneous branch of left sixth intercostal nerve.Left proper plantar digital nerve A.Left T5 spinal nerve posterior ramus.Right T3 spinal nerve posterior ramus.Right superior labial branch of infraorbital nerve.Left proper palmar digital nerve E.Left transverse cervical nerve.Posterior branch of lateral cutaneous branch of right fourth intercostal nerve.Left communicating branch of nasociliary nerve with ciliary ganglion.Superficial branch of right ulnar nerve.Right great auricular nerve posterior branch.Palmar branch of right median nerve.Right ulnar nerve.Right T5 grey ramus communicans.Palmar cutaneous branch of right ulnar nerve.Left T2 spinal nerve posterior ramus medial branch.Tonsillar branch of left glossopharyngeal nerve.Lateral cutaneous branch of right eighth intercostal nerve.Posterior branch of lateral cutaneous branch of right eleventh intercostal nerve.Left T6 white ramus communicans.Right T4 grey ramus communicans.Branch of right vagus nerve to oesophageal nerve plexus.Superior cervical cardiac branch of left vagus nerve.Left long thoracic nerve.Right mental nerve.Left fifth intercostal nerve.Lateral cutaneous branch of left fourth intercostal nerve.Right lateral femoral cutaneous nerve.Posterior branch of lateral cutaneous branch of right seventh intercostal nerve.Lateral cutaneous branch of right seventh intercostal nerve.Left C4 spinal nerve posterior ramus medial branch.Right intermediate dorsal cutaneous nerve.Right medial dorsal cutaneous nerve.Left recurrent laryngeal nerve.Left obturator nerve.Left T8 grey ramus communicans.Right T2 spinal nerve posterior ramus.Right T3 spinal nerve posterior ramus medial branch.Left T2 spinal nerve posterior ramus.Right superficial branch of radial nerve.Right C3 spinal nerve branch to right great auricular nerve.Left anterior interosseous nerve.Lateral cutaneous branch of right ninth intercostal nerve.Left common plantar digital nerve E.Brachial plexus left C5 root.Left external laryngeal nerve.Left C3 spinal nerve posterior ramus.Oesophageal branch of right recurrent laryngeal nerve.Lateral cutaneous branch of right tenth intercostal nerve.Anterior cutaneous branch of right sixth intercostal nerve.Right T3 white ramus communicans.Left T9 grey ramus communicans.Auricular branch of right vagus nerve.Right lateral sural cutaneous nerve.Left ulnar nerve.Right long ciliary nerve A.Left sciatic nerve.Anterior branch of lateral cutaneous branch of left fifth intercostal nerve.Right inferior palpebral branch of infraorbital nerve.Right medial cutaneous nerve of arm.Auricular branch of left vagus nerve.Left T10 grey ramus communicans.Left medial posterior superior nasal nerve.Pharyngeal branch of right vagus nerve to pharyngeal nerve plexus.Left L3 grey ramus communicans.Left lateral femoral cutaneous nerve.Right external laryngeal nerve branch to pharyngeal plexus.Left eighth intercostal nerve.Right T5 spinal nerve posterior ramus.Left tibial nerve.Right superior lateral cutaneous nerve of arm.Right lateral plantar nerve.Anterior cutaneous branch of left first intercostal nerve.Brachial plexus right C8 root.Lateral cutaneous branch of left iliohypogastric nerve.Posterior branch of lateral cutaneous branch of left eleventh intercostal nerve.Right long thoracic nerve.Left lateral cutaneous nerve of forearm.Left posterior supraclavicular nerve.Left T3 grey ramus communicans.Left ilioinguinal nerve.Left mental nerve.Left T12 white ramus communicans.Left superficial fibular nerve.Right proper palmar digital nerve F.Right proper palmar digital nerve D.Right lateral cutaneous nerve of forearm.Gluteal branch A of left posterior femoral cutaneous nerve.Lateral cutaneous branch of left fifth intercostal nerve.Right L1 spinal nerve posterior ramus lateral branch.Right axillary nerve anterior branch.Orbital branch of right maxillary nerve to right ethmoidal sinus.Right C6 spinal nerve posterior ramus medial branch.Posterior branch of lateral cutaneous branch of right ninth intercostal nerve.Right recurrent laryngeal nerve.Right sural nerve.Dorsal branch of right ulnar nerve.Right common plantar digital nerve E.Right medial dorsal digital nerve of the fourth toe.Right proper plantar digital nerve E.Left caroticotympanic nerve.Greater posterior gastric nerve.Right L1 spinal nerve posterior ramus.Pericardial branch of right phrenic nerve.Anterior branch of lateral cutaneous branch of right eighth intercostal nerve.Left incisive branch of inferior alveolar nerve.Right T3 grey ramus communicans.Left posterior interosseous nerve.Palmar branch of left median nerve.Left nasociliary nerve.Right external laryngeal nerve.Pharyngeal branch of left vagus nerve to pharyngeal nerve plexus.Right T11 grey ramus communicans.Right dorsal nerve of penis.Left C6 spinal nerve posterior ramus.Left axillary nerve anterior branch.Meningeal branch of left vagus nerve.Left intermediate dorsal cutaneous nerve.Right laryngopharyngeal branch of superior cervical ganglion.Right great auricular nerve anterior branch.Zygomatic branch of left facial nerve.Left C5 spinal nerve posterior ramus medial branch.Marginal mandibular branch of left facial nerve.Right L1 grey ramus communicans.Right meningeal branch of mandibular nerve.Right femoral nerve.Tracheal branch of right recurrent laryngeal nerve.Left posterior cutaneous nerve of arm.Left inferior lateral cutaneous nerve of arm.Right L2 spinal nerve posterior ramus.Right lateral dorsal cutaneous nerve.Anterior cutaneous branch of right second intercostal nerve.Left nasopalatine nerve.Left T3 spinal nerve posterior ramus medial branch.Left superior cervical cardiac nerve.Posterior branch of lateral cutaneous branch of left ninth intercostal nerve.Right T7 spinal nerve posterior ramus lateral branch.Right frontal nerve.Anterior cutaneous branch of left tenth intercostal nerve.Ganglionic branch of left maxillary nerve to pterygopalatine ganglion.Left S1 grey ramus communicans.Left lesser palatine nerve.Left medial plantar nerve.Communicating branch of right glossopharyngeal nerve with auricular branch of right vagus nerve.Left zygomaticotemporal nerve.Anterior cutaneous branch of right fifth intercostal nerve.Left proper palmar digital nerve B.Left radial nerve.Posterior branch of lateral cutaneous branch of left fourth intercostal nerve.Left S3 grey ramus communicans.Left T3 white ramus communicans.Right T11 spinal nerve posterior ramus.Left ninth intercostal nerve.Right T2 spinal nerve posterior ramus medial branch.Anterior cutaneous branch of left subcostal nerve.Right proper plantar digital nerve B.Left C2 spinal nerve posterior ramus.Right axillary nerve.Left axillary nerve.Left common palmar digital nerve A.Left proper plantar digital nerve D.Left femoral branch of genitofemoral nerve.Left second intercostal nerve.Left medial cutaneous nerve of arm.Left lateral sural cutaneous nerve.Right ophthalmic nerve.Right carotid sinus nerve.Right T10 spinal nerve posterior ramus lateral branch.Right proper plantar digital nerve D.Right mandibular nerve.Right obturator nerve.Left C3 spinal nerve branch to left great auricular nerve.Left lateral dorsal cutaneous nerve.Right greater palatine nerve.Right L2 spinal nerve posterior ramus lateral branch.Brachial plexus right C5 root.Left posterior superior lateral nasal branch of maxillary nerve.Right proper plantar digital nerve I.Right seventh intercostal nerve.Anterior branch of lateral cutaneous branch of right eleventh intercostal nerve.Right tenth intercostal nerve.Left mandibular nerve.Left greater palatine nerve.Left T12 grey ramus communicans.Inferior cervical cardiac branch of right vagus nerve.Left ophthalmic nerve.Left superior laryngeal nerve.Right T12 grey ramus communicans.Cutaneous branch of left obturator nerve.Left long ciliary nerve B.Left S4 grey ramus communicans.Left T4 spinal nerve posterior ramus medial branch.Greater anterior gastric nerve.Orbital branch of left maxillary nerve to left sphenoidal sinus.Orbital branch of right maxillary nerve to right sphenoidal sinus.Right middle supraclavicular nerve.Right caroticotympanic nerve.Left sixth intercostal nerve.Right posterior cutaneous nerve of arm.Left middle supraclavicular nerve.Left proper plantar digital nerve I.Anterior branch of lateral cutaneous branch of right sixth intercostal nerve.Left L2 spinal nerve posterior ramus.Anterior branch of lateral cutaneous branch of left seventh intercostal nerve.Posterior branch of lateral cutaneous branch of right sixth intercostal nerve.Left T8 spinal nerve posterior ramus lateral branch.Meningeal branch of right vagus nerve.Tracheal branch of left recurrent laryngeal nerve.Anterior cutaneous branch of right tenth intercostal nerve.Left eleventh intercostal nerve.Right pudendal nerve.Posterior branch of lateral cutaneous branch of left fifth intercostal nerve.Right anterior ethmoidal nerve.Right nasopalatine nerve.Left T8 spinal nerve posterior ramus.Left long ciliary nerve A.Left supraorbital nerve.Right medial posterior superior nasal nerve.Left T8 white ramus communicans.Right anterior femoral cutaneous branch A.Left T2 white ramus communicans.Right saphenous nerve.Anterior branch of lateral cutaneous branch of right seventh intercostal nerve.Left superior lateral cutaneous nerve of arm.Left T9 spinal nerve posterior ramus lateral branch.Left T6 spinal nerve posterior ramus.Posterior branch of left obturator nerve.Left external laryngeal nerve branch to inferior pharyngeal constrictor.Right incisive branch of inferior alveolar nerve.Right C3 spinal nerve posterior ramus.Right C5 spinal nerve posterior ramus.Right T9 spinal nerve posterior ramus.Communicating branch of left internal laryngeal nerve with left recurrent laryngeal nerve.Left vestibular nerve.Right radial nerve.Left third intercostal nerve.Left cochlear nerve.Anterior cutaneous branch of left fourth intercostal nerve.Right T6 spinal nerve posterior ramus.Right greater occipital nerve.Right lesser palatine nerve.Left inferior alveolar nerve.Right subclavian nerve.Right T6 white ramus communicans.Brachial plexus right C6 root.Lateral cutaneous branch of left eleventh intercostal nerve.Right T11 white ramus communicans.Left carotid sinus nerve.Left great auricular nerve anterior branch.Right external laryngeal nerve branch to inferior pharyngeal constrictor.Left S2 grey ramus communicans.Right internal laryngeal nerve.Infrapatellar branch of left saphenous nerve.Anterior branch of lateral cutaneous branch of left sixth intercostal nerve.Right proper palmar digital nerve A.Right communicating branch of nasociliary nerve with ciliary ganglion.Left proper plantar digital nerve G.Left infraorbital nerve.Left lingual branch of glossopharyngeal nerve.Right proper plantar digital nerve A.Left inferior rectal nerve.Right musculocutaneous nerve.Left inferior palpebral branch of infraorbital nerve.Left T7 spinal nerve posterior ramus.Cervical branch of right facial nerve.Right middle meningeal nerve.Right axillary nerve posterior branch.Right C2 spinal nerve branch to right great auricular nerve.Left zygomaticofacial nerve.Anterior branch of lateral cutaneous branch of left eighth intercostal nerve`.split(`.`)},{id:77,nerve_id:`UBERON:0001647`,label:`facial nerve`,"FMA subclasses (in human nerves)":[`FMA:50888`,`FMA:50889`],"subclass labels":[`Right facial nerve`,`Left facial nerve`]},{id:78,nerve_id:`UBERON:0001148`,label:`median nerve`,"FMA subclasses (in human nerves)":[`FMA:37067`,`FMA:37068`],"subclass labels":[`Right median nerve`,`Left median nerve`]},{id:79,nerve_id:`UBERON:0009009`,label:`carotid sinus nerve`,"FMA subclasses (in human nerves)":[`FMA:53508`,`FMA:53509`],"subclass labels":[`Right carotid sinus nerve`,`Left carotid sinus nerve`]},{id:80,nerve_id:`UBERON:0003715`,label:`splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6924`,`FMA:6928`,`FMA:6929`,`FMA:6931`,`FMA:6930`,`FMA:6960`,`FMA:6958`,`FMA:6959`,`FMA:6925`,`FMA:6956`,`FMA:6927`,`FMA:6955`,`FMA:6926`,`FMA:6957`],"subclass labels":[`Right first lumbar splanchnic nerve`,`Right third lumbar splanchnic nerve`,`Left third lumbar splanchnic nerve`,`Left fourth lumbar splanchnic nerve`,`Right fourth lumbar splanchnic nerve`,`Left least splanchnic nerve`,`Left lesser splanchnic nerve`,`Right least splanchnic nerve`,`Left first lumbar splanchnic nerve`,`Right greater splanchnic nerve`,`Left second lumbar splanchnic nerve`,`Left greater splanchnic nerve`,`Right second lumbar splanchnic nerve`,`Right lesser splanchnic nerve`]},{id:81,nerve_id:`ILX:0793826`,label:`anterior abdominal vagal trunk`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:82,nerve_id:`UBERON:0001650`,label:`hypoglossal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:83,nerve_id:`ILX:0794967`,label:`posterior interosseous nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:84,nerve_id:`ILX:0793713`,label:`Deep petrosal nerve`,"FMA subclasses (in human nerves)":[`FMA:0328827`,`FMA:0328826`],"subclass labels":[`Left deep petrosal nerve`,`Right deep petrosal nerve`]},{id:85,nerve_id:`ILX:0793361`,label:`white communicating ramus of third lumbar spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:86,nerve_id:`ILX:0787562`,label:`gray communicating ramus of the third thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6133`,`FMA:6124`],"subclass labels":[`Left T3 grey ramus communicans`,`Right T3 grey ramus communicans`]},{id:87,nerve_id:`ILX:0793211`,label:`white communicating ramus of fifth thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:88,nerve_id:`UBERON:0018679`,label:`thoracic splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6958`,`FMA:6960`,`FMA:6955`,`FMA:6959`,`FMA:6957`,`FMA:6956`],"subclass labels":[`Left lesser splanchnic nerve`,`Left least splanchnic nerve`,`Left greater splanchnic nerve`,`Right least splanchnic nerve`,`Right lesser splanchnic nerve`,`Right greater splanchnic nerve`]},{id:89,nerve_id:`ILX:0731969`,label:`least splanchnic nerve`,"FMA subclasses (in human nerves)":[`FMA:6960`,`FMA:6959`],"subclass labels":[`Left least splanchnic nerve`,`Right least splanchnic nerve`]},{id:90,nerve_id:`ILX:0788771`,label:`gray communicating ramus of seventh thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6888`,`FMA:6889`],"subclass labels":[`Right T7 grey ramus communicans`,`Left T7 grey ramus communicans`]},{id:91,nerve_id:`UBERON:0022301`,label:`long ciliary nerve`,"FMA subclasses (in human nerves)":[`FMA:52701`,`FMA:52700`,`FMA:82734`,`FMA:82735`],"subclass labels":[`Left long ciliary nerve B`,`Right long ciliary nerve B`,`Right long ciliary nerve A`,`Left long ciliary nerve A`]},{id:92,nerve_id:`ILX:0793221`,label:`white communicating ramus of second lumbar spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:93,nerve_id:`ILX:0785825`,label:`gray communicating ramus of first lumbar nerve`,"FMA subclasses (in human nerves)":[`FMA:65924`,`FMA:65923`],"subclass labels":[`Left L1 grey ramus communicans`,`Right L1 grey ramus communicans`]},{id:94,nerve_id:`ILX:0793208`,label:`white communicating ramus of second thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:95,nerve_id:`UBERON:0018412`,label:`vidian nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:96,nerve_id:`ILX:0739303`,label:`gray communicating ramus of second thoracic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:97,nerve_id:`ILX:0795006`,label:`Suboccipital nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:98,nerve_id:`ILX:0785733`,label:`gray communicating ramus of second lumbar nerve`,"FMA subclasses (in human nerves)":[`FMA:65921`,`FMA:65922`],"subclass labels":[`Right L2 grey ramus communicans`,`Left L2 grey ramus communicans`]},{id:99,nerve_id:`UBERON:0035207`,label:`deep fibular nerve`,"FMA subclasses (in human nerves)":[`FMA:45387`,`FMA:45388`],"subclass labels":[`Right deep fibular nerve`,`Left deep fibular nerve`]},{id:100,nerve_id:`ILX:0739304`,label:`gray communicating ramus of third thoracic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:101,nerve_id:`UBERON:0002019`,label:`accessory XI nerve`,"FMA subclasses (in human nerves)":[`FMA:50899`,`FMA:50897`],"subclass labels":[`Left accessory nerve`,`Right accessory nerve`]},{id:102,nerve_id:`ILX:0793217`,label:`white communicating ramus of eleventh thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:103,nerve_id:`ILX:0793722`,label:`Lesser petrosal nerve`,"FMA subclasses (in human nerves)":[`FMA:53503`,`FMA:53502`],"subclass labels":[`Left lesser petrosal nerve`,`Right lesser petrosal nerve`]},{id:104,nerve_id:`UBERON:0018675`,label:`pelvic splanchnic nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:105,nerve_id:`ILX:0793702`,label:`Greater petrosal nerve`,"FMA subclasses (in human nerves)":[`FMA:53423`,`FMA:53424`],"subclass labels":[`Right greater petrosal nerve`,`Left greater petrosal nerve`]},{id:106,nerve_id:`ILX:0794916`,label:`white ramus communicans`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:107,nerve_id:`UBERON:0003716`,label:`Recurrent Laryngeal Nerve`,"FMA subclasses (in human nerves)":[`UBERON:0011766`,`UBERON:0011767`],"subclass labels":[`Left recurrent laryngeal nerve`,`Right recurrent laryngeal nerve`]},{id:108,nerve_id:`UBERON:0005465`,label:`obturator nerve`,"FMA subclasses (in human nerves)":[`FMA:16501`,`FMA:16502`],"subclass labels":[`Right obturator nerve`,`Left obturator nerve`]},{id:109,nerve_id:`ILX:0793213`,label:`white communicating ramus of seventh thoracic spinal nerve`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:110,nerve_id:`ILX:0785067`,label:`gray communicating ramus of eleventh thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6897`,`FMA:6896`],"subclass labels":[`Left T11 grey ramus communicans`,`Right T11 grey ramus communicans`]},{id:111,nerve_id:`UBERON:0001494`,label:`ulnar nerve`,"FMA subclasses (in human nerves)":[`FMA:37320`,`FMA:37321`],"subclass labels":[`Right ulnar nerve`,`Left ulnar nerve`]},{id:112,nerve_id:`ILX:0794959`,label:`posterior rami lower cervical nerves`,"FMA subclasses (in human nerves)":[],"subclass labels":[]},{id:113,nerve_id:`UBERON:0001493`,label:`axillary nerve`,"FMA subclasses (in human nerves)":[`FMA:37074`,`FMA:37073`],"subclass labels":[`Left axillary nerve`,`Right axillary nerve`]},{id:114,nerve_id:`ILX:0787946`,label:`gray communicating ramus of sixth thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6762`,`FMA:6763`],"subclass labels":[`Right T6 grey ramus communicans`,`Left T6 grey ramus communicans`]},{id:115,nerve_id:`ILX:0785542`,label:`gray communicating ramus of ninth thoracic nerve`,"FMA subclasses (in human nerves)":[`FMA:6892`,`FMA:6893`],"subclass labels":[`Right T9 grey ramus communicans`,`Left T9 grey ramus communicans`]}],MK=()=>{let e={};return jK.forEach(t=>{let n=t.nerve_id,r=t.label.toLowerCase(),i=t[`subclass labels`];if(n&&r!==`nerve`){if(!i.length)return;n in e||(e[n]={});let t=i.map(e=>e.toLowerCase()).sort();e[n]={nerve:r,subNerves:t}}}),e},NK=()=>{let e=[],t={key:`scaffold.connectivity.nerve`,label:`Nerves`,children:[]},n=[];for(let e of jK){if(e.label===`nerve`)continue;let t={facetPropPath:`scaffold.connectivity.nerve`,label:``,children:[]},r=[];for(let[n,i]of Object.entries(e))if(n===`label`&&(t.label=i),n===`subclass labels`)for(let e of i)r.push({facetPropPath:`scaffold.connectivity.subnerve`,label:e});r.length&&(t.children=r.sort((e,t)=>e.label.localeCompare(t.label)),n.push(t))}return n.length&&(t.children=n.sort((e,t)=>e.label.localeCompare(t.label)),e.push(t)),e}}));function PK(e){return e[0].toUpperCase()+e.substring(1)}var FK,IK=_((()=>{mW(),aK(),_d(),pK(),_K(),gW(),hd(),dW(),QSe(),rK(),$Se(),eK(),FK={emits:[`flatmap-provenance-ready`,`resource-selected`,`species-changed`,`viewer-ready`],props:{entry:Object,visible:{type:Boolean,default:!0},mouseHovered:{type:Boolean,default:!1}},inject:{showGlobalSettings:{default:!0},showOpenMapButton:{default:!0},showLongLabel:{default:!0},truncateLongLabel:{default:!0},showIdInTooltip:{default:!0}},computed:{...(0,n.mapStores)(iK,gd,fK,gK),idNamePair(){return this.splitFlowStore.idNamePair},useHelpModeDialog(){return this.settingsStore.useHelpModeDialog},connectivityInfoSidebar(){return this.settingsStore.connectivityInfoSidebar},annotationSidebar(){return this.settingsStore.annotationSidebar},showLocalSettings(){return!this.showGlobalSettings}},beforeUnmount:function(){this.alive=!1,window.removeEventListener(`mousedown`,this.checkEndHelpMouseDown),clearTimeout(this.highlightDelay)},mounted:function(){this.$refs.multiflatmap&&(this.multiflatmapRef=(0,t.markRaw)(this.$refs.multiflatmap)),this.$refs.flatmap&&(this.flatmapRef=(0,t.markRaw)(this.$refs.flatmap)),this.$refs.iframe&&(this.iframeRef=(0,t.markRaw)(this.$refs.iframe)),this.$refs.plot&&(this.plotRef=(0,t.markRaw)(this.$refs.plot)),this.$refs.simulation&&(this.simulationRef=(0,t.markRaw)(this.$refs.simulation)),(this.iframeRef||this.plotRef||this.simulationRef)&&this.loadExplorerConfig(),this.connectivityKnowledge=this.connectivitiesStore.globalConnectivities,this.connectivityFilterOptions=this.connectivitiesStore.filterOptions,this.connectivityFilterSources=this.connectivitiesStore.filterSources},methods:{toggleMinimap:function(e,t){if(this.multiflatmapRef&&this.flatmapIsReady()){let n=this.multiflatmapRef.getCurrentFlatmap(),r=n?.mapImp;if(r){if(e===!0){if(t===!1){let e=r.options?.minimap||{position:`top-right`};r.createMinimap(e),n.addResizeButtonToMinimap(),n.minimapSmall=!1}}else r.closeMinimap()}}},onConnectivityItemClose(){if(this?.alive){if(this.multiflatmapRef&&this.flatmapIsReady()){let e=this.multiflatmapRef.getCurrentFlatmap();e&&e.closeTooltip()}this.flatmapRef&&this.flatmapRef.closeTooltip()}},getState:function(){},getScreenshotSources:async function(e){let t=this.getFlatmapImp?.()?.map;return t?[await md(t,e)]:[]},openMap:function(e){fW.emit(`OpenNewMap`,e),this.trackOpenMap(`open_new_${e}_map`)},onMapmanagerLoaded:function(e){this.settingsStore.updateMapManager(e)},trackOpenMap:function(e){hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_open_map`,category:e,location:`open_new_map`})},updateEntryLabel:function(e){e&&this.entriesStore.updateLabelForEntry(this.entry,e)},updateEntryTitle:function(e){e&&this.entriesStore.updateTitleForEntry(this.entry,e)},updateWithViewUrl:function(){},search:function(){return!1},searchSuggestions:function(){},resourceSelected:function(e,t){let n=t[0];if(this.resourceHasAction(n)){fW.emit(`PopoverActionClick`,n);return}let r,i=!1,a={paneIndex:this.entry.id,type:e,resource:t,internalName:void 0,eventType:void 0};if(e==`MultiFlatmap`||e==`Flatmap`){if(a.internalName=n?.feature?.label?n.feature.label:this.idNamePair[n.feature.models],n.eventType==`click`){if(a.eventType=`selected`,n.feature.type==`marker`){let t=a.internalName;if(this.settingsStore.isFeaturedMarkerIdentifier(n.feature.id))r={type:`Search`,term:this.settingsStore.featuredMarkerDoi(n.feature.id),featuredDataset:!0};else{r={type:`Facet`,facets:[t]};let e=new Set;if(n.feature[`dataset-terms`].forEach(t=>{e.add(t.label?t.label:t.term)}),e.size===0&&e.add(t),r.facets=[...e],this.settingsStore.hasAppliedFacets(e)&&this.settingsStore.appliedFacets.length<=e.size)return;if(this.settingsStore.appliedFacets.length){if(!this.settingsStore.hasAppliedFacets(e)){let t=[...new Set([...this.settingsStore.appliedFacets,...e])];this.settingsStore.updateAppliedFacets(t)}}else e.size>1&&(r.type=`Facets`),this.settingsStore.updateAppliedFacets(r.facets)}i=!0,e==`MultiFlatmap`&&this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults()}}else n.eventType==`mouseenter`&&(a.eventType=`highlighted`,i=!0)}else e==`Scaffold`&&(n&&((n.data?.id===void 0||n.data?.id===``)&&(n.data.id=n.data?.group),a.internalName=n.data.id,n.data.lastActionOnMarker===!0&&(r={type:`Facet`,facets:[PK(n.data.id)]})),a.eventType=`selected`,i=!0);r&&fW.emit(`PopoverActionClick`,r),i&&this.$emit(`resource-selected`,a)},resourceHasAction:function(e){return e&&(e.type===`URL`||e.type===`Search`||e.type===`Neuron Search`||e.type==`Facet`||e.type==`Facets`)},getDatasetAnatomyInfo:function(e){fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${e}`).then(e=>e.json()).then(t=>{let n=t.result[0],r;try{r=n.anatomy.organ[0].curie}catch{r=void 0}let i;try{i=n.item.curie}catch{i=void 0}let a;try{let e=0,t=!1;for(;!t&&e<n.organisms.subject.length;){let r=n.organisms.subject[e];r.species&&(a=r.species.name,t=!0),e+=1}}catch{a=void 0}this.settingsStore.updateFeaturedMarker({identifier:e,marker:r,doi:i,species:a})})},oldFeaturedDatasetApiHasInfo:async function(){let e=await(await fetch(`${this.apiLocation}get_featured_datasets_identifiers`)).json();return!e.identifiers||e.identifiers.length==0?!1:e.identifiers},newFeaturedDatasetApiHasInfo:async function(){let e=await(await fetch(`${this.apiLocation}get_featured_dataset`)).json();return!e.datasets||e.datasets.length==0?!1:e.datasets.map(e=>e.id)},flatmapResourceSelected:function(e,t){this.resourceSelected(e,t);let{eventType:n,feature:r}=t[0],{viewingMode:i}=this.settingsStore.globalSettings;if(n===`click`&&r.type===`feature`&&r.models?.startsWith(`ilxtr:`)){let n=[];t.forEach(e=>{let{models:t}=e.feature;n.push(t)}),hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_connectivity`,category:n.join(`, `),location:e+` `+i})}},getFeaturedDatasets:async function(){let e=[],t=await this.oldFeaturedDatasetApiHasInfo();if(t)e=t;else{let t=await this.newFeaturedDatasetApiHasInfo();t&&(e=t)}this.settingsStore.updateFeatured(e),e.forEach(e=>{this.getDatasetAnatomyInfo(e)})},flatmapMarkerUpdate(){},onResize:function(){},updateViewerSettings:function(){},startHelp:function(){this?.alive&&this.isInHelp===!1&&(this.helpMode=!0,window.addEventListener(`mousedown`,this.checkEndHelpMouseDown),this.isInHelp=!0)},endHelp:function(){window.removeEventListener(`mousedown`,this.checkEndHelpMouseDown),this.helpMode=!1,setTimeout(()=>{this.isInHelp=!1},200)},onHelpModeShowNext:function(){this.helpModeActiveItem+=1},onHelpModeLastItem:function(e){e&&(this.helpModeLastItem=!0)},onFinishHelpMode:function(){this.helpMode=!1,this.helpModeActiveItem=0,this.helpModeLastItem=!1},onTooltipShown:function(){this.$refs.multiflatmap&&this.$refs.multiflatmapHelp&&this.$refs.multiflatmapHelp.toggleTooltipHighlight(),this.$refs.flatmap&&this.$refs.flatmapHelp&&this.$refs.flatmapHelp.toggleTooltipHighlight(),this.$refs.scaffold&&this.$refs.scaffoldHelp&&this.$refs.scaffoldHelp.toggleTooltipHighlight()},onMapTooltipShown:function(){this.$refs.multiflatmap&&this.$refs.multiflatmapHelp&&this.$refs.multiflatmapHelp.toggleTooltipPinHighlight(),this.$refs.flatmap&&this.$refs.flatmapHelp&&this.$refs.flatmapHelp.toggleTooltipPinHighlight(),this.$refs.scaffold&&this.$refs.scaffoldHelp&&this.$refs.scaffoldHelp.toggleTooltipPinHighlight()},checkEndHelpMouseDown:function(e){e.target.closest(`.help-mode-dialog`)||this.endHelp()},flatmapHighlight:async function(e,t,n,r){let i=[...t,...r],a=this.settingsStore.globalSettings;if(a.highlightConnectedPaths){let n=t.length?t:r.length?r:[],a=await e.retrieveConnectedPaths(n);a&&i.push(...a)}if(a.highlightDOIPaths){let t=await e.searchConnectivitiesByReference(n);t&&i.push(...t)}return i=[...new Set(i)],i},sidebarHoverHighlight:function(e){if(this.visible&&((this.flatmapRef||this.multiflatmapRef)&&this.flatmapReady||this.scaffoldRef&&this.scaffoldLoaded)){let t=this.settingsStore.hoverAnatomies,n=this.settingsStore.hoverOrgans,r=this.settingsStore.hoverDOI,i=this.settingsStore.hoverConnectivity,a=null,o=null;this.flatmapRef&&(a=this.flatmapRef),this.multiflatmapRef&&(a=this.multiflatmapRef.getCurrentFlatmap()),this.scaffoldRef&&(o=this.scaffoldRef),clearTimeout(this.highlightDelay),!t.length&&!n.length&&!r&&!i.length&&((this.multiflatmapRef||this.flatmapRef)&&a?a.mapImp&&!a.mapImp.contextLost&&(a.mapImp?.clearSearchResults(),e.connectivityProcessed&&a.mapImp?.setPaint({dimmed:!0})):this.scaffoldRef&&o&&o.changeHighlightedByName(n,``,!1)),this.highlightDelay=setTimeout(()=>{(t.length||n.length||r||i.length)&&((this.multiflatmapRef||this.flatmapRef)&&a?this.flatmapHighlight(a,t,r,i).then(e=>{try{a.showConnectivityTooltips({connectivityInfo:{featureId:e},data:[]})}catch(t){if(console.log(t),i.length&&a.mapImp){let t=a.mapImp.uuid;e.every(e=>this.connectivityKnowledge[t].some(t=>t.id===e))||a.mapImp&&!a.mapImp.contextLost&&a.mapImp.clearSearchResults()}}}):this.scaffoldRef&&o&&o.changeHighlightedByName(n,``,!1))},100)}},onAnnotationOpen:function(e){fW.emit(`annotation-open`,e)},onAnnotationClose:function(){fW.emit(`sidebar-annotation-close`)},updateOfflineAnnotationEnabled:function(e){fW.emit(`update-offline-annotation-enabled`,e)},onConnectivityInfoOpen:function(e){fW.emit(`connectivity-info-open`,e)},onConnectivityError:function(e){fW.emit(`connectivity-error`,e)},onConnectivityInfoClose:function(){fW.emit(`connectivity-info-close`)},onSidebarAnnotationClose:function(){},onNeuronConnectionFeatureClick:function(e){fW.emit(`neuron-connection-feature-click`,e)},showConnectivity:function(){},showConnectivityTooltips:function(){},setVisibilityFilter:function(){},loadExplorerConfig:async function(){this.flatmapService=(0,t.markRaw)(await this.mockUpFlatmapService()),this.loadConnectivityExplorerConfig(this.flatmapService)},mockUpFlatmapService:async function(){let e=await VG(this.flatmapAPI,`human-flatmap_male`),n=e.uuid,r=e.sckan[`knowledge-source`],i=await HG(this.flatmapAPI,n);this.flatmapQueries=(0,t.markRaw)(new AK),this.flatmapQueries.initialise(this.flatmapAPI);let a={mapMetadata:{uuid:n,connectivity:{...e.sckan}},pathways:i,resource:this.entry.resource,knowledgeSource:r,queryKnowledge:async e=>{let t=[r,e],n=await this.flatmapQueries.queryKnowledge(`select knowledge from knowledge where (source=? or source is null) and entity=? order by source desc`,t);return JSON.parse(n)},queryLabels:async e=>{let t=`select source, entity, knowledge from knowledge where (source=? or source is null) and entity in (?${`, ?`.repeat(e.length-1)}) order by entity, source desc`,n=[r,...e],i=await this.flatmapQueries.queryKnowledge(t,n),a=[],o;for(let e of i)if(e[1]!==o){let t=JSON.parse(e[2]);a.push({entity:e[1],label:t.label||e[1]}),o=e[1]}return a}},o=NK();return{mockup:!0,getFilterOptions:async(e,t)=>{let n=await pye(this.flatmapAPI,e,t,void 0);return[...o,...n]},getTermNerveMaps:MK,mapImp:a}},loadConnectivityExplorerConfig:async function(e){let n=e.mapImp,r=tK(n),i=e.mockup?n.resource:n.uuid,a=[];if(!this.connectivityKnowledge[r]){this.flatmapQueries||(this.flatmapQueries=(0,t.markRaw)(new AK),this.flatmapQueries.initialise(this.flatmapAPI));let e=await LSe(n,this.flatmapQueries);this.connectivityKnowledge[r]=e.filter(e=>e.connectivity?.length).sort((e,t)=>e.label.localeCompare(t.label))}if(!this.connectivityKnowledge[i]){let e=n.pathways?.paths||{};this.connectivityKnowledge[i]=this.connectivityKnowledge[r].filter(t=>t.id in e)}if(!this.connectivityFilterOptions[i]&&!e.mockup&&(this.connectivityFilterOptions[i]=await e.getFilterOptions(n,this.connectivityKnowledge[i])),e.mockup){let t=e.getTermNerveMaps()||{},r=JSON.parse(JSON.stringify(this.connectivityKnowledge[i]));this.connectivityKnowledge[i]=r.map(e=>{let n=e;if(e.nerves?.length){let r=e.nerves.flat(1/0).reduce((e,n)=>(n in t&&e.push(t[n]),e),[]);r?.length&&(a.push(...r),n[`nerve-label`]=r.sort((e,t)=>e.nerve.localeCompare(t.nerve)))}return n}).filter(e=>e[`nerve-label`]),this.connectivityFilterOptions[i]||(this.connectivityFilterOptions[i]=await e.getFilterOptions(n,this.connectivityKnowledge[i])),a=a.map(e=>e.nerve.toLowerCase());let o=JSON.parse(JSON.stringify(this.connectivityFilterOptions[i]));this.connectivityFilterOptions[i]=o.map(e=>{if(e.key===`scaffold.connectivity.nerve`){let t=e.children.filter(e=>a.includes(e.label.toLowerCase()));return{...e,children:t}}return e})}else this.connectivityFilterSources[i]||(this.connectivityFilterSources[i]=e.getFilterSources()),this.connectivitiesStore.updateFilterSources(this.connectivityFilterSources);this.connectivitiesStore.updateFilterOptions(this.connectivityFilterOptions),this.connectivitiesStore.updateGlobalConnectivities(this.connectivityKnowledge),fW.emit(`species-layout-connectivity-update`)},knowledgeTooltipQuery:async function(e){let t=await this.flatmapQueries.queryTooltipData(this.flatmapService.mapImp,{resource:[e.id],label:e.label,provenanceTaxonomy:e.taxons,feature:[]});return t.knowledgeSource=tK(this.flatmapService.mapImp),t.mapId=this.flatmapService.mapImp.mapMetadata.id,t.mapuuid=this.flatmapService.mapImp.mapMetadata.uuid,t[`nerve-label`]=e[`nerve-label`],t.ready=!0,t},getKnowledgeTooltip:async function(e){this.tooltipEntry=[],e.data.forEach(e=>this.tooltipEntry.push({title:e.label,featureId:[e.id],ready:!1})),fW.emit(`connectivity-info-open`,this.tooltipEntry),this.tooltipEntry=await Promise.all(e.data.map(e=>this.knowledgeTooltipQuery(e))),this.tooltipEntry.map(e=>e.featureId[0]).length>0&&fW.emit(`connectivity-info-open`,this.tooltipEntry)},changeConnectivitySource:async function(e,t){let{entry:n,connectivitySource:r}=e,i=this?.flatmapService?.mapImp?.mapMetadata.uuid;t.includes(i)||(t.push(i),await this.flatmapQueries.queryForConnectivityNew(this.flatmapService.mapImp,n.featureId[0],r),this.tooltipEntry=this.tooltipEntry.map(e=>e.featureId[0]===n.featureId[0]?this.flatmapQueries.updateTooltipData(e):e),fW.emit(`connectivity-info-open`,this.tooltipEntry))},trackEvent:function(e){hW.sendEvent(e)},tooltipPathLabelProvider:function(e){if(!(this.showLongLabel?.value??this.showLongLabel))return null;let t=Array.isArray(e)?e:[e],n=[],r=t[0]?.mapUUID,i=r?this.connectivitiesStore?.globalConnectivities?.[r]:null,a=t.filter((e,t,n)=>t===n.findIndex(t=>t.id===e.id));for(let e of a){let t=e?.id;if(!(!t||!(t.startsWith(`ilxtr:`)||t.startsWith(`ilx:`)))&&i){let e=i.find(e=>e.id===t),r=this.truncateLongLabel?.value??this.truncateLongLabel,a=[`margin-bottom: 4px`],o=[`display: -webkit-box`,`-webkit-line-clamp: 3`,`-webkit-box-orient: vertical`,`overflow: hidden`],s=[...this.showIdInTooltip?a:[],...r?o:[]].join(`;`);if(e&&e[`long-label`]){let r=[];r.push(`<div style="${s}">${PK(e[`long-label`])}</div>`),this.showIdInTooltip&&r.push(`<span class="id-tag">${t}</span>`),n.push(r.join(``))}}}return n.length>0?`<div class='flatmap-feature-label flatmap-connectivity-label'>${n.join(`<hr/>`)}</div>`:null}},data:function(){return{apiLocation:void 0,activeSpecies:FG,scaffoldCamera:void 0,mainStyle:{height:this.entry.datasetTitle?`calc(100% - 30px)`:`100%`,width:`100%`,bottom:`0px`},helpMode:!1,helpModeActiveItem:0,helpModeLastItem:!1,multiflatmapRef:null,flatmapRef:null,scaffoldRef:null,iframeRef:null,plotRef:null,simulationRef:null,scaffoldLoaded:!1,isInHelp:!1,mapManager:void 0,connectivityKnowledge:{},connectivityFilterOptions:{},connectivityFilterSources:{},highlightDelay:void 0,alive:!0,flatmapService:void 0,flatmapQueries:void 0,tooltipEntry:[]}},created:function(){this.flatmapAPI=void 0,this.apiLocation=void 0,this.settingsStore.flatmapAPI&&(this.flatmapAPI=this.settingsStore.flatmapAPI),this.settingsStore.sparcApi&&(this.apiLocation=this.settingsStore.sparcApi),this.settingsStore.mapManager&&(this.mapManager=this.settingsStore.mapManager)},watch:{helpMode:function(e){e||(this.helpModeActiveItem=0)}}}})),LK,RK,zK=_((()=>{_d(),LK=function(e){return e?[...new Set(e.map(e=>JSON.stringify(e)))].map(e=>JSON.parse(e)):[]},RK={computed:{...(0,n.mapStores)(gd)},methods:{flatmapPanZoomCallback:function(e){if(this.mouseHovered){let t={paneIndex:this.entry.id,eventType:`panZoom`,payload:e,type:this.entry.type};this.$emit(`resource-selected`,t)}},flatmapMarkerUpdate(e){if(!this.flatmapReady)return;let t=e;if(t||=this.getFlatmapImp(),t){let e=this.settingsStore.globalSettings.displayMarkers?this.settingsStore.markers:[];e=LK(e),t.clearMarkers(),t.clearClusteredAnatomicalMarkers(),t.addClusteredAnatomicalMarkers(e),this.entry.type===`MultiFlatmap`&&this.restoreFeaturedMarkers(t)}},removeMarkersNotOnFlatmap(e,t){let n=e.anatomicalIdentifiers,r=[];for(let e=0;e<t.length;e++){let i=t[e],a={id:i.id,terms:[]};for(let e=0;e<i.terms.length;e++)n.includes(i.terms[e])&&a.terms.push(i.terms[e]);r.push(a)}return r},flatmapReadyForMarkerUpdates:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0;let t=e.mapImp;this.flatmapMarkerUpdate(t)}}}}})),eCe=_((()=>{})),tCe=y({default:()=>HK});function nCe(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`FlatmapVuer`),c=(0,t.resolveComponent)(`HelpModeDialog`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,VK,[(0,t.createVNode)(s,{state:e.entry.state,entry:e.entry.resource,mapManager:e.mapManager,onResourceSelected:n[0]||=t=>e.flatmapResourceSelected(e.entry.type,t),onPanZoomCallback:e.flatmapPanZoomCallback,name:e.entry.resource,style:{height:`100%`,width:`100%`},minZoom:e.entry.minZoom,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeInitialIndex:-1,helpModeDialog:e.useHelpModeDialog,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,onAnnotationOpen:e.onAnnotationOpen,onAnnotationClose:e.onAnnotationClose,onUpdateOfflineAnnotationEnabled:e.updateOfflineAnnotationEnabled,annotationSidebar:e.annotationSidebar,onConnectivityInfoOpen:e.onConnectivityInfoOpen,onConnectivityError:e.onConnectivityError,onConnectivityInfoClose:e.onConnectivityInfoClose,onNeuronConnectionFeatureClick:e.onNeuronConnectionFeatureClick,connectivityInfoSidebar:e.connectivityInfoSidebar,pathControls:!0,ref:`flatmap`,onContextRestored:o.contextRestored,onReady:o.flatmapReadyCall,displayMinimap:e.displayMinimap,displayWarning:!1,enableOpenMapUI:!0,flatmapAPI:e.flatmapAPI,render:e.visible,sparcAPI:e.apiLocation,showLocalSettings:e.showLocalSettings,showOpenMapButton:e.showOpenMapButton,onOpenMap:e.openMap,onPathwaySelectionChanged:o.onPathwaySelectionChanged,onMapmanagerLoaded:e.onMapmanagerLoaded,showPathwayFilter:!1,tooltipContentProvider:e.tooltipPathLabelProvider,onTrackEvent:e.trackEvent},null,8,`state.entry.mapManager.onPanZoomCallback.name.minZoom.helpMode.helpModeActiveItem.helpModeDialog.onHelpModeLastItem.onShownTooltip.onShownMapTooltip.onAnnotationOpen.onAnnotationClose.onUpdateOfflineAnnotationEnabled.annotationSidebar.onConnectivityInfoOpen.onConnectivityError.onConnectivityInfoClose.onNeuronConnectionFeatureClick.connectivityInfoSidebar.onContextRestored.onReady.displayMinimap.flatmapAPI.render.sparcAPI.showLocalSettings.showOpenMapButton.onOpenMap.onPathwaySelectionChanged.onMapmanagerLoaded.tooltipContentProvider.onTrackEvent`.split(`.`)),e.helpMode&&e.useHelpModeDialog?((0,t.openBlock)(),(0,t.createBlock)(c,{key:0,ref:`flatmapHelp`,flatmapRef:e.flatmapRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,[`flatmapRef`,`lastItem`,`onShowNext`,`onFinishHelpMode`])):(0,t.createCommentVNode)(``,!0)])}var BK,VK,HK,rCe=_((()=>{gW(),mW(),IK(),zK(),dW(),_W(),eCe(),yd(),BK={name:`Flatmap`,mixins:[FK,RK],components:{FlatmapVuer:r.FlatmapVuer,HelpModeDialog:UU},data:function(){return{flatmapReady:!1,displayMinimap:!1}},methods:{getState:function(){return this.$refs.flatmap.getState()},search:function(e){return this.$refs.flatmap.searchAndShowResult(e,!0,!0)},getFlatmapImp(){return this.$refs.flatmap?.mapImp},contextRestored(e){this.flatmapReadyForMarkerUpdates(e),this.updateViewerSettings()},flatmapReadyCall:function(e){this.flatmapReady=!0,this.$emit(`viewer-ready`,!0);let t=this.getFlatmapImp();t?.mapMetadata?.name&&(this.updateEntryLabel(t?.mapMetadata?.name),this.updateEntryTitle(t?.mapMetadata?.name));let n={id:this.entry.id,prov:t.mapMetadata};fW.emit(`mapImpProv`,n),this.$emit(`flatmap-provenance-ready`,n),this.flatmapReadyForMarkerUpdates(e),this.updateViewerSettings(),this.loadConnectivityExplorerConfig(e).then(()=>{fW.emit(`mapLoaded`,e)})},onPathwaySelectionChanged:function(e){let{label:t,property:n,checked:r,selectionsTitle:i}=e;hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_pathway_change`,category:t+` [`+n+`] `+r,location:i})},onSidebarAnnotationClose:function(){this.flatmapReady&&this.$refs.flatmap&&this.$refs.flatmap.annotationEventCallback({},{type:`aborted`})},searchSuggestions:function(e,t){if(e&&this.$refs.flatmap.mapImp){let n=this.$refs.flatmap.mapImp.search(e);(n.__featureIds||n.featureIds).forEach(e=>{let n=this.$refs.flatmap.mapImp.annotation(e);n&&n.label&&t.push(n.label)})}},showConnectivity:function(e){if(this?.alive){let{featureIds:t,offset:n}=e,r=this.$refs.flatmap;r&&r.moveMap(t,{offsetX:n?-150:0,zoom:4})}},showConnectivityTooltips:function(e){this?.alive&&this.flatmapReady&&this.$refs.multiflatmap.getCurrentFlatmap().showConnectivityTooltips(e)},showConnectivitiesByReference:function(e){if(this?.alive){let t=this.$refs.flatmap;t&&t.showConnectivitiesByReference(e)}},changeConnectivitySource:function(e,t){if(this?.alive&&this.flatmapReady){let n=this.$refs.flatmap,r=n.mapImp.mapMetadata.uuid;t.includes(r)||(t.push(r),n.changeConnectivitySource(e))}},zoomToFeatures:function(e,t){let n=e.name,r=this.$refs.flatmap.mapImp;if(n){let e=r.search(n);if(e.featureIds.length){let n=r.modelForFeature(e.featureIds[0]);n?(t&&r.selectFeatures(n),r.zoomToFeatures(n)):r.clearSearchResults()}}else r.clearSearchResults()},changeViewingMode:function(e){this.$refs.flatmap&&this.$refs.flatmap.changeViewingMode(e)},updateViewerSettings:function(){let{backgroundDisplay:e,viewingMode:t,flightPathDisplay:n,organsDisplay:r,outlinesDisplay:i,connectionType:a}=this.settingsStore.globalSettings,o=this.$refs.flatmap;o&&(o.changeViewingMode(t),o.setFlightPath3D(n),o.setColour(r),o.setOutlines(i),o.backgroundChangeCallback(e),o.setConnectionType(a))},setVisibilityFilter:function(e){if(this?.alive){let t=this.$refs.flatmap;t&&t.setVisibilityFilter(e)}},getKnowledgeTooltip:async function(e){if(this?.alive){let t=this.$refs.flatmap;if(t){let n=e.data[0];t.searchAndShowResult(n.id,!0,!1)}}}},computed:{facetSpecies(){return this.settingsStore.facets.species}}},VK={class:`viewer-container`},HK=vd(BK,[[`render`,nCe],[`__scopeId`,`data-v-43840a36`]])})),iCe=_((()=>{})),aCe=y({default:()=>KK});function oCe(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,WK,[(0,t.createElementVNode)(`iframe`,{class:`my-iframe`,src:e.entry.resource.share_link,ref:`iframe`},null,8,GK)])}var UK,WK,GK,KK,sCe=_((()=>{IK(),iCe(),yd(),UK={name:`MapIframe`,mixins:[FK]},WK={class:`map-iframe-container`},GK=[`src`],KK=vd(UK,[[`render`,oCe],[`__scopeId`,`data-v-f45775de`]])})),qK,cCe=_((()=>{qK=`<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>`})),lCe=_((()=>{})),uCe=_((()=>{})),dCe=y({default:()=>ZK});function fCe(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`MultiFlatmapVuer`),c=(0,t.resolveComponent)(`HelpModeDialog`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,XK,[(0,t.createVNode)(s,{availableSpecies:e.availableSpecies,onContextRestored:o.contextRestored,onFlatmapChanged:o.flatmapChanged,onReady:o.multiFlatmapReady,state:e.entry.state,mapManager:e.mapManager,onResourceSelected:n[0]||=t=>e.flatmapResourceSelected(e.entry.type,t),style:{height:`100%`,width:`100%`},initial:e.entry.resource,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeDialog:e.useHelpModeDialog,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,onAnnotationOpen:e.onAnnotationOpen,onAnnotationClose:e.onAnnotationClose,onUpdateOfflineAnnotationEnabled:e.updateOfflineAnnotationEnabled,annotationSidebar:e.annotationSidebar,onConnectivityInfoOpen:e.onConnectivityInfoOpen,onConnectivityError:e.onConnectivityError,onConnectivityInfoClose:e.onConnectivityInfoClose,onNeuronConnectionFeatureClick:e.onNeuronConnectionFeatureClick,connectivityInfoSidebar:e.connectivityInfoSidebar,ref:`multiflatmap`,displayMinimap:o.displayMinimap,showStarInLegend:e.showStarInLegend,enableOpenMapUI:!0,openMapOptions:e.openMapOptions,flatmapAPI:e.flatmapAPI,render:e.visible,sparcAPI:e.apiLocation,showLocalSettings:e.showLocalSettings,showOpenMapButton:e.showOpenMapButton,onPanZoomCallback:o.flatmapPanZoomCallback,onOpenMap:e.openMap,onOpenMapSpecies:o.openMapSpecies,onFinishHelpMode:e.endHelp,onPathwaySelectionChanged:o.onPathwaySelectionChanged,onOpenPubmedUrl:o.onOpenPubmedUrl,onMapmanagerLoaded:e.onMapmanagerLoaded,showPathwayFilter:!1,tooltipContentProvider:e.tooltipPathLabelProvider,onTrackEvent:e.trackEvent},null,8,`availableSpecies.onContextRestored.onFlatmapChanged.onReady.state.mapManager.initial.helpMode.helpModeActiveItem.helpModeDialog.onHelpModeLastItem.onShownTooltip.onShownMapTooltip.onAnnotationOpen.onAnnotationClose.onUpdateOfflineAnnotationEnabled.annotationSidebar.onConnectivityInfoOpen.onConnectivityError.onConnectivityInfoClose.onNeuronConnectionFeatureClick.connectivityInfoSidebar.displayMinimap.showStarInLegend.openMapOptions.flatmapAPI.render.sparcAPI.showLocalSettings.showOpenMapButton.onPanZoomCallback.onOpenMap.onOpenMapSpecies.onFinishHelpMode.onPathwaySelectionChanged.onOpenPubmedUrl.onMapmanagerLoaded.tooltipContentProvider.onTrackEvent`.split(`.`)),e.helpMode&&e.useHelpModeDialog?((0,t.openBlock)(),(0,t.createBlock)(c,{key:0,ref:`multiflatmapHelp`,multiflatmapRef:e.multiflatmapRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,[`multiflatmapRef`,`lastItem`,`onShowNext`,`onFinishHelpMode`])):(0,t.createCommentVNode)(``,!0)])}var JK,YK,XK,ZK,pCe=_((()=>{gW(),IK(),mW(),eK(),zK(),cCe(),dW(),_W(),lCe(),uCe(),yd(),JK=e=>[{display:`Open AC Map`,key:`AC`},{display:`Open FC Map`,key:`FC`},{display:`Open 3D Human Map`,key:`3D`},{display:`Open Connectivity Graph`,key:`CG`}],YK={name:`MultiFlatmap`,mixins:[FK,RK],components:{MultiFlatmapVuer:r.MultiFlatmapVuer,HelpModeDialog:UU},data:function(){return{availableSpecies:qG(),flatmapReady:!1,scaffoldResource:{},showStarInLegend:!1,speciesHasChanged:!1,openMapOptions:JK(FG),zoomLevel:6}},methods:{getState:function(){if(this.flatmapReady)return this.$refs.multiflatmap.getState()},flatmapPanZoomCallback:function(e){if(this.mouseHovered){let t={paneIndex:this.entry.id,eventType:`panZoom`,payload:e,type:this.entry.type};this.$emit(`resource-selected`,t)}},search:function(e){return this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(e,!0,!0)},openMapSpecies:function(e){fW.emit(`SetCurrentEntry`,{resource:e,type:`MultiFlatmap`,mode:`main`,state:void 0,label:``,discoverId:void 0,sourceId:this.entry.id}),this.trackOpenMap(`open_new_AC_map_${e}`)},searchSuggestions:function(e,t){let n=this.$refs.multiflatmap.getCurrentFlatmap();if(e&&n.mapImp){let r=n.mapImp.search(e);(r.__featureIds||r.featureIds).forEach(e=>{let r=n.mapImp.annotation(e);r&&r.label&&t.push(r.label)})}},onPathwaySelectionChanged:function(e){let{label:t,property:n,checked:r,selectionsTitle:i}=e;hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_pathway_change`,category:t+` [`+n+`] `+r,location:i})},onSidebarAnnotationClose:function(){this.flatmapReady&&this.$refs.multiflatmap.getCurrentFlatmap().annotationEventCallback({},{type:`aborted`})},onOpenPubmedUrl:function(e){hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_pubmed_url`,file_path:e,location:`map_popup_button`})},zoomToFeatures:function(e,t){let n=e.name,r=this.getFlatmapImp();if(n){let e=r.search(n);e.featureIds.length>0?(t&&r.selectFeatures(e.featureIds),r.zoomToFeatures(e.featureIds)):r.clearSearchResults()}else r.clearSearchResults()},updateProvCard:function(){let e=this.getFlatmapImp();if(e){let t={id:this.entry.id,prov:e.mapMetadata};fW.emit(`mapImpProv`,t),this.$emit(`flatmap-provenance-ready`,t)}},contextRestored:function(e){e&&(this.flatmapMarkerUpdate(e.mapImp),this.updateViewerSettings(),this.speciesHasChanged&&(this.speciesHasChanged=!1,this.$emit(`species-changed`,this.activeSpecies)))},flatmapChanged:async function(e){this.activeSpecies=e,this.openMapOptions=JK(e),this.$emit(`viewer-ready`,!!this.$refs.multiflatmap?.getCurrentFlatmap()?.mapImp);let t=this.getFlatmapImp();this.updateProvCard(),t&&(t.contextLost?this.speciesHasChanged=!0:(this.flatmapMarkerUpdate(t),this.updateViewerSettings(),this.speciesHasChanged=!1,this.$emit(`species-changed`,e))),hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_species_change`,category:this.activeSpecies})},multiFlatmapReady:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0,this.$emit(`viewer-ready`,!0);let t=e.mapImp;this.flatmapMarkerUpdate(t),this.updateProvCard(),this.updateViewerSettings(),this.loadConnectivityExplorerConfig(e).then(()=>{fW.emit(`mapLoaded`,e)})}},getFlatmapImp:function(){if(this.entry.type===`MultiFlatmap`&&this.flatmapReady&&this.$refs.multiflatmap)return this.$refs.multiflatmap.getCurrentFlatmap().mapImp},flatmapAreaSearch(){let e={type:`Facets`,label:`Unused`,val:this.getFlatmapImp().visibleMarkerAnatomicalIds().map(e=>this.idNamePair[e])};fW.emit(`PopoverActionClick`,e)},flatmapIsReady(){return this.flatmapReady},restoreFeaturedMarkers:function(e){this.settingsStore.resetFeaturedMarkerIdentifier();let t=this.settingsStore.featuredMarkers;this.updateFeaturedMarkers(t,e)},updateFeaturedMarkers:function(e,t){this.showStarInLegend=!1;for(let n=0;n<e.length;++n)e[n]&&(this.settingsStore.featuredMarkerIdentifiers[n]||this.addFeaturedMarker(e[n],n,t)&&(this.showStarInLegend=!0))},addFeaturedMarker:function(e,t,n){let r=this.settingsStore.featuredMarkerSpecies[t];if(r&&!this.activeSpecies.startsWith(r))return!1;let i=n;if(i||=this.getFlatmapImp(),i){let n=document.createElement(`div`);n.innerHTML=qK;let r=i.addMarker(e,{element:n,className:`highlight-marker`,cluster:!1});return this.settingsStore.updateFeaturedMarkerIdentifier({index:t,markerIdentifier:r}),!0}return!1},changeViewingMode:function(e){let t=this.$refs.multiflatmap?.getCurrentFlatmap();t&&t.changeViewingMode(e)},showConnectivity:function(e){if(this?.alive&&this.flatmapReady&&this.$refs.multiflatmap){let{featureIds:t,offset:n}=e,r=this.$refs.multiflatmap.getCurrentFlatmap();r&&r.moveMap(t,{offsetX:n?-150:0,zoom:4})}},showConnectivityTooltips:function(e){this?.alive&&this.flatmapReady&&this.$refs.multiflatmap.getCurrentFlatmap().showConnectivityTooltips(e)},showConnectivitiesByReference:function(e){if(this?.alive&&this.flatmapReady&&this.$refs.multiflatmap){let t=this.$refs.multiflatmap.getCurrentFlatmap();t&&t.showConnectivitiesByReference(e)}},changeConnectivitySource:function(e,t){if(this?.alive&&this.flatmapReady){let n=this.$refs.multiflatmap.getCurrentFlatmap(),r=n.mapImp.mapMetadata.uuid;t.includes(r)||(t.push(r),n.changeConnectivitySource(e))}},updateViewerSettings:function(){let{backgroundDisplay:e,viewingMode:t,flightPathDisplay:n,organsDisplay:r,outlinesDisplay:i,connectionType:a}=this.settingsStore.globalSettings;if(this.flatmapReady){let o=this.$refs.multiflatmap.getCurrentFlatmap();o&&(o.changeViewingMode(t),o.setFlightPath3D(n),o.setColour(r),o.setOutlines(i),o.backgroundChangeCallback(e),o.setConnectionType(a))}},setVisibilityFilter:function(e){if(this?.alive&&this.flatmapReady&&this.$refs.multiflatmap){let t=this.$refs.multiflatmap.getCurrentFlatmap();t&&t.setVisibilityFilter(e)}},getKnowledgeTooltip:async function(e){if(this?.alive&&this.flatmapReady){let t=e.data[0];this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(t.id,!0,!1)}}},computed:{facetSpecies(){return this.settingsStore.facets.species},featuredMarkers(){return this.settingsStore.featuredMarkers},displayMinimap(){return this.settingsStore.displayMinimap}},watch:{featuredMarkers:function(e){this.flatmapReady&&this.updateFeaturedMarkers(e,void 0)}},mounted:function(){this.getFeaturedDatasets()}},XK={class:`viewer-container`},ZK=vd(YK,[[`render`,fCe],[`__scopeId`,`data-v-ffd110a2`]])})),mCe=_((()=>{})),hCe=y({default:()=>eq});function gCe(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`MapUtilitiesConnectivityGraph`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,$K,[(0,t.createVNode)(s,{entry:o.graphEntry,mapServer:o.mapServer,sckanVersion:o.sckanVersion,connectivityFromMap:o.connectivityFromMap,connectivityError:o.connectivityError,origins:o.origins,components:o.components,destinations:o.destinations,originsWithDatasets:o.originsWithDatasets,componentsWithDatasets:o.componentsWithDatasets,destinationsWithDatasets:o.destinationsWithDatasets,hasSingleConnectivityList:o.hasSingleConnectivityList,originsCombinations:o.originsCombinations,componentsCombinations:o.componentsCombinations,destinationsCombinations:o.destinationsCombinations,onTapNode:o.onTapNode},null,8,[`entry`,`mapServer`,`sckanVersion`,`connectivityFromMap`,`connectivityError`,`origins`,`components`,`destinations`,`originsWithDatasets`,`componentsWithDatasets`,`destinationsWithDatasets`,`hasSingleConnectivityList`,`originsCombinations`,`componentsCombinations`,`destinationsCombinations`,`onTapNode`])])}var QK,$K,eq,_Ce=_((()=>{dW(),IK(),mW(),mCe(),yd(),QK={name:`ConnectivityGraph`,mixins:[FK],components:{MapUtilitiesConnectivityGraph:mH},computed:{graphEntry(){return this.entry.resource},connectivityError(){return{}},connectivityFromMap(){return this.entry.graphPayload?.connectivityFromMap||null},origins(){return this.entry.graphPayload?.origins||[]},components(){return this.entry.graphPayload?.components||[]},destinations(){return this.entry.graphPayload?.destinations||[]},originsWithDatasets(){return this.entry.graphPayload?.originsWithDatasets||[]},componentsWithDatasets(){return this.entry.graphPayload?.componentsWithDatasets||[]},destinationsWithDatasets(){return this.entry.graphPayload?.destinationsWithDatasets||[]},hasSingleConnectivityList(){return this.entry.graphPayload?.hasSingleConnectivityList||!1},originsCombinations(){return this.entry.graphPayload?.originsCombinations||[]},componentsCombinations(){return this.entry.graphPayload?.componentsCombinations||[]},destinationsCombinations(){return this.entry.graphPayload?.destinationsCombinations||[]},mapServer(){return this.entry.mapServer||null},sckanVersion(){return this.entry.sckanVersion||null}},methods:{onTapNode:function(e){let t=e.map(e=>e.label).join(`, `);this.onConnectivityHovered(t)},onConnectivityHovered:function(e){let t={connectivityInfo:this.entry.connectivityInfo,label:e,data:e?this.getConnectivityDatasets(e):[]};fW.emit(`connectivity-hovered`,t)},getConnectivityDatasets:function(e){let t=this.entry.graphPayload?.allWithDatasets||[],n=e.split(`,`),r=[];return n.forEach(e=>{let n=t.find(t=>t.name.toLowerCase().trim()===e.toLowerCase().trim());n&&r.push({id:n.id,label:n.name})}),r}}},$K={class:`viewer-container`},eq=vd(QK,[[`render`,gCe],[`__scopeId`,`data-v-57ebb655`]])})),vCe=y({default:()=>nq});function yCe(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`PlotVuer`);return(0,t.openBlock)(),(0,t.createBlock)(s,{"data-source":e.entry.resource.dataSource,metadata:e.entry.resource.metadata,"supplemental-data":e.entry.resource.supplementalData,style:{overflow:`hidden`},ref:`plot`},null,8,[`data-source`,`metadata`,`supplemental-data`])}var tq,nq,bCe=_((()=>{IK(),yd(),tq={name:`Plot`,mixins:[FK],components:{PlotVuer:a.PlotVuer}},nq=vd(tq,[[`render`,yCe]])})),xCe=_((()=>{})),SCe=y({default:()=>aq});function CCe(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`ScaffoldVuer`),c=(0,t.resolveComponent)(`HelpModeDialog`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,iq,[e.activated?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,state:e.entry.state,url:e.entry.resource,region:e.entry.region,onScaffoldSelected:n[0]||=t=>o.scaffoldResourceSelected(e.entry.type,t),onScaffoldHighlighted:n[1]||=t=>o.scaffoldHighlighted(e.entry.type,t),onScaffoldNavigated:n[2]||=t=>o.scaffoldNavigated(e.entry.type,t),onOnReady:o.scaffoldIsReady,onOpenMap:e.openMap,ref:`scaffold`,"background-toggle":!0,traditional:!0,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeDialog:e.useHelpModeDialog,onAnnotationOpen:e.onAnnotationOpen,onAnnotationClose:e.onAnnotationClose,onUpdateOfflineAnnotationEnabled:e.updateOfflineAnnotationEnabled,annotationSidebar:e.annotationSidebar,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,render:e.visible,"display-latest-message":!0,"warning-message":o.warningMessage,"display-minimap":!1,"display-markers":!1,"display-warning":!1,enableOpenMapUI:!0,"view-u-r-l":e.entry.viewUrl,markerCluster:!0,markerLabels:o.markerLabels,flatmapAPI:e.flatmapAPI,showLocalSettings:e.showLocalSettings,showOpenMapButton:e.showOpenMapButton,usageConfig:{showTubeLinesControls:!1,tubeLines:e.entry.discoverId===`307`||e.entry.discoverId===307}},null,8,[`state`,`url`,`region`,`onOnReady`,`onOpenMap`,`helpMode`,`helpModeActiveItem`,`helpModeDialog`,`onAnnotationOpen`,`onAnnotationClose`,`onUpdateOfflineAnnotationEnabled`,`annotationSidebar`,`onHelpModeLastItem`,`onShownTooltip`,`onShownMapTooltip`,`render`,`warning-message`,`view-u-r-l`,`markerLabels`,`flatmapAPI`,`showLocalSettings`,`showOpenMapButton`,`usageConfig`])):(0,t.createCommentVNode)(``,!0),e.helpMode&&e.useHelpModeDialog?((0,t.openBlock)(),(0,t.createBlock)(c,{key:1,ref:`scaffoldHelp`,scaffoldRef:e.scaffoldRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,[`scaffoldRef`,`lastItem`,`onShowNext`,`onFinishHelpMode`])):(0,t.createCommentVNode)(``,!0)])}var rq,iq,aq,wCe=_((()=>{mW(),IK(),hd(),dW(),_W(),rK(),xCe(),yd(),rq={name:`Scaffold`,mixins:[FK],components:{ScaffoldVuer:s.ScaffoldVuer,HelpModeDialog:UU},methods:{showConnectivitiesByReference:async function(e){if(this.$refs.scaffold){let t=sessionStorage.getItem(`flatmap-knowledge`),n;n=t?await FSe(e):await ISe(this.flatmapService.mapImp,e,this.flatmapService.flatmapQueries);let r=[];for(let e of n){let t=this.nervesKnowledge.find(t=>t.id===e);if(!t)continue;let n=t[`nerve-label`];if(n){let e=n.flatMap(e=>e.subNerves);r.push(...e)}}this.$refs.scaffold.changeHighlightedByName(r,``,!1)}},setNerveGreyScale:function(){if(this.$refs.scaffold&&this.nervesKnowledge.length){let e=this.nervesKnowledge.reduce((e,t)=>e.concat(t[`nerve-label`]||[]),[]).reduce((e,t)=>e.concat(t.subNerves||[]),[]);this.$refs.scaffold.setGreyScale(!0,e)}},setVisibilityFilter:function(e){if(this.$refs.scaffold){let t=[],n=!!e;if(e){let n=[];e.OR.forEach(e=>{`AND`in e&&e.AND.length>=2&&`models`in e.AND[1]&&n.push(...e.AND[1].models)});for(let e of n){let n=this.nervesKnowledge.find(t=>t.id===e);if(n){let e=n[`nerve-label`].map(e=>e.subNerves).flat(1/0);t.push(...e)}}}this.$refs.scaffold.zoomToNerves(t,n)}},syncFilter:function(e){this.$refs.scaffold?.viewingMode===`Neuron Connection`&&(this.filter=e.filter(e=>e.facet?.toLowerCase()!==`show all`))},scaffoldResourceSelected:async function(e,t){if(this.resourceSelected(e,t,!0),t.length===1){let{id:e,isNerves:n,anatomicalId:r}=t[0].data;if(this.clickedObject={id:e,isNerves:n,anatomicalId:r},this.clickedObject.isNerves||this.clickedObject.anatomicalId){let e=this.clickedObject.id.toLowerCase();if(this.$refs.scaffold.viewingMode===`Neuron Connection`){let t=this.settingsStore.globalSettings.connectionType;if(this.clickedObject.isNerves)this.filter.push({facet:e,term:`Nerves`,facetPropPath:`scaffold.connectivity.nerve`});else{let n=t.toLowerCase(),r=this.clickedObject.anatomicalId||``;if(r)this.filter.push({facet:`["${r}",[]]`,facetPropPath:`flatmap.connectivity.source.${n}`,tagLabel:e.charAt(0).toUpperCase()+e.slice(1),term:t});else{let i=this.connectivitiesStore.filterOptions[this.entry.resource].find(e=>e.key===`flatmap.connectivity.source.${n}`),a;i?.children.forEach(t=>{t.label.toLowerCase()===e&&(a=t),t.children?.forEach(t=>{t.label.toLowerCase()===e&&(a=t)})}),a&&(r=a.key.replace(`flatmap.connectivity.source.${n}.`,``),this.filter.push({facet:r,facetPropPath:`flatmap.connectivity.source.${n}`,tagLabel:a.tagLabel,term:t}))}}fW.emit(`neuron-connection-feature-click`,{filters:this.filter,search:this.filter.length?``:e})}else if(this.$refs.scaffold.viewingMode===`Exploration`){let t=this.nervesKnowledge.filter(t=>JSON.stringify(t[`nerve-label`]).includes(e));t.length&&this.getKnowledgeTooltip({data:t,type:this.entry})}}}else t.length>1?this.$refs.scaffold.viewingMode===`Exploration`&&this.clickedObject&&this.$refs.scaffold.$module.setIgnorePicking(!1):(this.clickedObject=void 0,fW.emit(`connectivity-info-close`))},onResize:function(){this.scaffoldCamera||=(0,t.markRaw)(this.$refs.scaffold?.$module?.scene?.getZincCameraControls()),this.scaffoldCamera&&this.scaffoldCamera.onResize()},getScreenshotSources:async function(e){let t=this.$refs.scaffold?.$module?.zincRenderer;return t?[pd(t,e)]:[]},getState:function(){return this.$refs.scaffold?this.$refs.scaffold.getState():this.entry.state},search:function(e){if(this.$refs.scaffold)return this.$refs.scaffold.search(e,!0)},searchSuggestions:function(e,t){if(e===``||!this.$refs.scaffold)return t;this.$refs.scaffold.fetchSuggestions(e).forEach(e=>{e.suggestion&&t.push(e.suggestion)})},showConnectivityTooltips:function(e){if(this.$refs.scaffold){if(e.label)this.$refs.scaffold.changeHighlightedByName([e.label],``,!1),this.$refs.scaffold.showRegionTooltip(e.label,!1,!1);else{let t=e.connectivityInfo[`nerve-label`];if(t){let e=t.flatMap(e=>e.subNerves);this.$refs.scaffold.changeHighlightedByName(e,``,!1)}this.$refs.scaffold.hideRegionTooltip()}}},zoomToFeatures:function(e,t){if(this.$refs.scaffold){let n;n=Array.isArray(e)?e:[e.name],t&&this.$refs.scaffold.changeActiveByName(n,``,!1),this.$refs.scaffold.viewRegion(n)}},scaffoldIsReady:function(){this.scaffoldLoaded=!0,this.$emit(`viewer-ready`,!0),this.$refs.scaffold.$module.graphicsHighlight.highlightColour=[1,0,1],this.scaffoldRef||(this.scaffoldRef=(0,t.markRaw)(this.$refs.scaffold),this.scaffoldRef&&(this.loadExplorerConfig(),this.connectivityKnowledge=this.connectivitiesStore.globalConnectivities,this.connectivityFilterOptions=this.connectivitiesStore.filterOptions,this.connectivityFilterSources=this.connectivitiesStore.filterSources)),this.updateViewerSettings(),fW.emit(`mapLoaded`,this.$refs.scaffold),this._greyScaleTimer=setTimeout(()=>{this.setNerveGreyScale()},500)},scaffoldHighlighted:function(e,t){let n={paneIndex:this.entry.id,type:e,resource:t,internalName:void 0};t&&t[0]&&((t[0].data?.id===void 0||t[0].data?.id===``)&&(t[0].data.id=t[0].data?.group),n.internalName=t[0].data.id,n.eventType=`highlighted`),this.$emit(`resource-selected`,n)},scaffoldNavigated:function(e,t){if(this.mouseHovered){let n={paneIndex:this.entry.id,eventType:`panZoom`,payload:t,type:e};this.$emit(`resource-selected`,n)}},updateWithViewUrl:function(e){this.$refs.scaffold&&this.$refs.scaffold.updateViewURL(e)},changeViewingMode:function(e){this.$refs.scaffold&&this.$refs.scaffold.changeViewingMode(e)},updateViewerSettings:function(){if(this.$refs.scaffold){let{backgroundDisplay:e,organsDisplay:t,outlinesDisplay:n,viewingMode:r}=this.settingsStore.globalSettings;this.$refs.scaffold.backgroundChangeCallback(e),this.$refs.scaffold.changeViewingMode(r),this.$refs.scaffold.setColour(t),this.$refs.scaffold.setOutlines(n)}}},computed:{warningMessage:function(){return this.entry.discoverId===`307`||this.entry.discoverId===307?`This map displays the anatomical location and connectivity of nerves, through which the neuron populations from the ApiNATOMY models available in SCKAN can be routed.`:`Under active development`},markerLabels:function(){return this.settingsStore.globalSettings.displayMarkers?this.settingsStore.numberOfDatasetsForFacets:{}},scaffoldKnowledge:function(){return this.connectivityKnowledge?.[this.entry.resource]}},watch:{visible:{handler(e){e&&!this.activated&&(this.activated=!0,this.$nextTick(()=>{this.$refs.scaffold&&(this.scaffoldRef=(0,t.markRaw)(this.$refs.scaffold),this.scaffoldRef&&(this.loadExplorerConfig(),this.connectivityKnowledge=this.connectivitiesStore.globalConnectivities,this.connectivityFilterOptions=this.connectivitiesStore.filterOptions,this.connectivityFilterSources=this.connectivitiesStore.filterSources))}))},immediate:!0},scaffoldKnowledge:{handler(e){e&&e.length!==this.nervesKnowledge.length&&(this.nervesKnowledge=e,this.scaffoldLoaded&&this.setNerveGreyScale())},immediate:!0}},data:function(){return{activated:!1,apiLocation:process.env.VUE_APP_API_LOCATION,scaffoldCamera:void 0,scaffoldLoaded:!1,nervesKnowledge:[],clickedObject:void 0,filter:[],query:``}},beforeUnmount:function(){clearTimeout(this._greyScaleTimer)}},iq={class:`viewer-container`},aq=vd(rq,[[`render`,CCe],[`__scopeId`,`data-v-a45fd8e7`]])})),TCe=_((()=>{})),ECe=y({default:()=>cq});function DCe(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`SimulationVuer`);return e.isCrossOriginIsolated?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,apiLocation:e.apiLocation,id:o.id,ref:`simulation`},null,8,[`apiLocation`,`id`])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,sq,` Simulations require a cross-origin isolated page (for SharedArrayBuffer support). This browser or host is not configured for it. `))}var oq,sq,cq,OCe=_((()=>{IK(),TCe(),yd(),oq={name:`Simulation`,mixins:[FK],components:{SimulationVuer:l.SimulationVuer},data:function(){return{isCrossOriginIsolated:window.crossOriginIsolated===!0}},computed:{id:function(){return this.entry.resource?this.entry.resource:this.entry.discoverId}}},sq={key:1,class:`simulation-unsupported`},cq=vd(oq,[[`render`,DCe],[`__scopeId`,`data-v-627e2ba4`]])}));aK(),_d(),pK(),hd(),yd();var kCe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(rCe(),tCe))),ACe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(sCe(),aCe))),jCe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(pCe(),dCe))),MCe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(_Ce(),hCe))),NCe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(bCe(),vCe))),PCe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(wCe(),SCe))),FCe=(0,t.defineAsyncComponent)(()=>Promise.resolve().then(()=>(OCe(),ECe))),ICe={name:`ContentVuer`,props:{entry:Object,visible:{type:Boolean,default:!0}},components:{ContentBar:mK,ConnectivityGraph:MCe,Flatmap:kCe,MapIframe:ACe,MultiFlatmap:jCe,Plot:NCe,Scaffold:PCe,Simulation:FCe},methods:{flatmapProvenanceReady:function(e){this.$refs.contentBar?.setupFlatmapContextCard(e),this.entriesStore.updateMapForEntry(this.entry,e)},getId:function(){return this.entry.id},getState:function(){return this.$refs.viewer?.getState()},captureScreenshot:function(e={}){let t=e.scale||this.settingsStore.screenshot.scale,n=e.legend||this.settingsStore.screenshot.legend,r=e.toolbar??this.settingsStore.screenshot.toolbar,i=this.$refs.contentBar?.getEntryTitle(this.entry)||this.entry.type;return fd(this.getScreenshotElement({legend:n,toolbar:r}),{scale:t,legend:n,toolbar:r,title:i,viewers:[this]})},hasLegend:function(){return ld(this.$refs.container).length>0},getScreenshotElement:function(e={}){let{legend:t,toolbar:n}=e;return n&&t!==`only`?this.$el:this.$refs.container},getScreenshotSources:function(e){return this.$refs.viewer?.getScreenshotSources?.(e)||[]},resourceSelected:function(e){this.$emit(`resource-selected`,e)},scaffoldViewClicked:function(e){this.entry.viewUrl===e?this.$refs.viewer?.updateWithViewUrl(e):this.entriesStore.updateViewForEntry({id:this.entry.id,viewUrl:e})},search:function(e){return this.$refs.viewer?.search(e)},searchSuggestions:function(e,t){this.$refs.viewer?.searchSuggestions(e,t)},setPanesBoundary:function(){this.$refs.contentBar?.setBoundary(this.$refs.container)},speciesChanged:function(e){this.activeSpecies=e,this.$emit(`species-changed`,e)},onResize:function(){this.$refs.viewer?.onResize()},onConnectivityItemClose:function(){this.$refs.viewer?.onConnectivityItemClose()},onConnectivitySourceChange:function(e,t){this.$refs.viewer?.changeConnectivitySource(e,t)},onFlatmapMarkerUpdate:function(){this.$refs.viewer?.flatmapMarkerUpdate()},onGlobalViewerSettingsUpdate:function(){this.$refs.viewer?.updateViewerSettings()},onHoverUpdate:function(e){this.$refs.viewer?.sidebarHoverHighlight(e)},onShowConnectivity:function(e){this.$refs.viewer?.showConnectivity(e)},onShowConnectivityTooltips:function(e){this.$refs.viewer?.showConnectivityTooltips(e)},onShowReferenceConnectivity:function(e){this.$refs.viewer?.showConnectivitiesByReference(e)},onSidebarAnnotationClose:function(){this.$refs.viewer?.onSidebarAnnotationClose()},onStartHelp:function(){this.$refs.viewer?.startHelp()},onFilterVisibility:function(e){this.$refs.viewer?.setVisibilityFilter(e)},onLoadConnectivityDetail:function(e){this.$refs.viewer?.entry.type!==`ConnectivityGraph`&&this.$refs.viewer?.getKnowledgeTooltip(e)},toggleMinimap:function(e,t){this.$refs.viewer?.toggleMinimap(e,t)}},data:function(){return{mouseHovered:!1,activeSpecies:`Rat`,viewerReady:![`Flatmap`,`MultiFlatmap`,`Scaffold`].includes(this.entry.type)}},computed:{...(0,n.mapStores)(iK,gd,fK),viewerType(){switch(this.entry.type){case`MapIframe`:return`MapIframe`;default:return this.entry.type}}}},LCe={class:`component-container`,ref:`container`};function RCe(e,n,r,i,a,o){let s=mK;return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`content-container`,onMouseover:n[1]||=t=>e.mouseHovered=!0,onMouseleave:n[2]||=t=>e.mouseHovered=!1},[(0,t.createVNode)(s,{class:`toolbar`,entry:r.entry,ref:`contentBar`,onChooserChanged:o.onResize,onScaffoldViewClicked:o.scaffoldViewClicked,captureScreenshot:o.captureScreenshot,getScreenshotTarget:o.getScreenshotElement,viewerReady:e.viewerReady,onVnodeMounted:o.setPanesBoundary},null,8,[`entry`,`onChooserChanged`,`onScaffoldViewClicked`,`captureScreenshot`,`getScreenshotTarget`,`viewerReady`,`onVnodeMounted`]),(0,t.createElementVNode)(`div`,LCe,[((0,t.openBlock)(),(0,t.createBlock)(t.Suspense,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(o.viewerType),{entry:r.entry,mouseHovered:e.mouseHovered,visible:r.visible,lazy:!0,ref:`viewer`,onFlatmapProvenanceReady:o.flatmapProvenanceReady,onResourceSelected:o.resourceSelected,onSpeciesChanged:o.speciesChanged,onViewerReady:n[0]||=t=>e.viewerReady=t},null,40,[`entry`,`mouseHovered`,`visible`,`onFlatmapProvenanceReady`,`onResourceSelected`,`onSpeciesChanged`]))]),_:1}))],512)],32)}var lq=vd(ICe,[[`render`,RCe],[`__scopeId`,`data-v-514cd63d`]]);yd();var zCe={name:`ResizeSensor`,methods:{activate:function(){!this._observer&&this.$refs.display&&(this._observer=new ResizeObserver(()=>this.displayResize()),this._observer.observe(this.$refs.display),this.displayResize())},deactivate:function(){this._observer&&(this._observer.disconnect(),this._observer=void 0,this.displayResize())},displayResize:function(){this.$emit(`resize`)}},beforeUnmount(){this.deactivate()},activated(){this.activate()},deactivated(){this.deactivate()},mounted:function(){this.activate()}},BCe={style:{height:`100%`,width:`100%`,position:`absolute`},ref:`display`};function VCe(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,BCe,null,512)}var uq=vd(zCe,[[`render`,VCe]]),HCe=Object.assign({inheritAttrs:!1},{__name:`splitpanes`,props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1},keyboardStep:{type:Number,default:5}},emits:[`ready`,`resize`,`resized`,`pane-click`,`pane-maximize`,`pane-add`,`pane-remove`,`splitter-click`,`splitter-dblclick`,`direction-changed`],setup(e,{emit:n}){let r=n,i=e,a=(0,t.useAttrs)(),o=(0,t.useSlots)(),s=(0,t.ref)([]),c=(0,t.computed)(()=>s.value.reduce((e,t)=>(e[~~t.id]=t)&&e,{})),l=(0,t.computed)(()=>s.value.length),u=(0,t.ref)(null),d=(0,t.ref)(!1),f=(0,t.ref)({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),p=(0,t.ref)({splitter:null,timeoutId:null}),m=(0,t.computed)(()=>({[`splitpanes splitpanes--${i.horizontal?`horizontal`:`vertical`}`]:!0,"splitpanes--dragging":f.value.dragging,"splitpanes--ready":d.value})),h=()=>{document.addEventListener(`mousemove`,v,{passive:!1}),document.addEventListener(`mouseup`,y),`ontouchstart`in window&&(document.addEventListener(`touchmove`,v,{passive:!1}),document.addEventListener(`touchend`,y))},g=()=>{document.removeEventListener(`mousemove`,v,{passive:!1}),document.removeEventListener(`mouseup`,y),`ontouchstart`in window&&(document.removeEventListener(`touchmove`,v,{passive:!1}),document.removeEventListener(`touchend`,y))},_=(e,t)=>{let n=e.target.closest(`.splitpanes__splitter`);if(n){let{left:t,top:r}=n.getBoundingClientRect(),{clientX:a,clientY:o}=`ontouchstart`in window&&e.touches?e.touches[0]:e;f.value.cursorOffset=i.horizontal?o-r:a-t}h(),f.value.mouseDown=!0,f.value.activeSplitter=t,document.documentElement.style.cursor=i.horizontal?`row-resize`:`col-resize`},v=e=>{f.value.mouseDown&&(e.preventDefault(),f.value.dragging||(window.getSelection()?.removeAllRanges(),f.value.dragging=!0),requestAnimationFrame(()=>{E(w(e)),K(`resize`,{event:e},!0)}))},y=e=>{f.value.dragging&&(window.getSelection()?.removeAllRanges(),K(`resized`,{event:e},!0)),f.value.mouseDown=!1,f.value.activeSplitter=null,setTimeout(()=>{f.value.dragging=!1,g(),document.documentElement.style.cursor=``},100)},b=(e,t)=>{`ontouchstart`in window&&(e.preventDefault(),p.value.splitter===t?(clearTimeout(p.value.timeoutId),p.value.timeoutId=null,x(e,t),p.value.splitter=null):(p.value.splitter=t,p.value.timeoutId=setTimeout(()=>p.value.splitter=null,500))),f.value.dragging||K(`splitter-click`,{event:e,index:t},!0)},x=(e,t)=>{if(K(`splitter-dblclick`,{event:e,index:t},!0),i.maximizePanes){let n=0;s.value=s.value.map((e,r)=>(e.size=r===t?e.max:e.min,r!==t&&(n+=e.min),e)),s.value[t].size-=n,K(`pane-maximize`,{event:e,index:t,pane:s.value[t]}),K(`resized`,{event:e,index:t},!0)}},S=(e,t)=>{if(!i.keyboardStep)return;let n=i.horizontal?e.key===`ArrowDown`:e.key===`ArrowRight`,r=i.horizontal?e.key===`ArrowUp`:e.key===`ArrowLeft`;if(!n&&!r)return;e.preventDefault(),f.value.activeSplitter=t;let a=(n?1:-1)*(i.rtl&&!i.horizontal?-1:1),o=k(t)+s.value[t].size;D(Math.min(Math.max(o+a*i.keyboardStep,0),100)),K(`resize`,{event:e},!0),K(`resized`,{event:e},!0),f.value.activeSplitter=null},C=(e,t)=>{let n=c.value[t];n&&K(`pane-click`,{event:e,index:n.index,pane:n})},w=e=>{let t=u.value.getBoundingClientRect(),{clientX:n,clientY:r}=`ontouchstart`in window&&e.touches?e.touches[0]:e;return{x:n-(i.horizontal?0:f.value.cursorOffset)-t.left,y:r-(i.horizontal?f.value.cursorOffset:0)-t.top}},T=e=>{e=e[i.horizontal?`y`:`x`];let t=u.value[i.horizontal?`clientHeight`:`clientWidth`];return i.rtl&&!i.horizontal&&(e=t-e),e*100/t},E=e=>{D(T(e))},D=e=>{let t=f.value.activeSplitter;if(t===null||t>=s.value.length-1)return;let n={prevPanesSize:k(t),nextPanesSize:A(t),prevReachedMinPanes:0,nextReachedMinPanes:0},r=0+(i.pushOtherPanes?0:n.prevPanesSize),a=100-(i.pushOtherPanes?0:n.nextPanesSize);e=Math.max(Math.min(e,a),r);let o=[t,t+1],c=s.value[o[0]]||null,l=s.value[o[1]]||null,u=c!==null&&c.max<100&&e>=c.max+n.prevPanesSize,d=l!==null&&l.max<100&&e<=100-(l.max+A(t+1));if(u||d){u?(c.size=c.max,l.size=Math.min(Math.max(100-c.max-n.prevPanesSize-n.nextPanesSize,l.min),l.max)):(c.size=Math.min(Math.max(100-l.max-n.prevPanesSize-A(t+1),c.min),c.max),l.size=l.max);return}if(i.pushOtherPanes){let t=O(n,e);if(!t)return;({sums:n,panesToResize:o}=t),c=s.value[o[0]]||null,l=s.value[o[1]]||null}c!==null&&(c.size=Math.min(Math.max(e-n.prevPanesSize-n.prevReachedMinPanes,c.min),c.max)),l!==null&&(l.size=Math.min(Math.max(100-e-n.nextPanesSize-n.nextReachedMinPanes,l.min),l.max))},O=(e,t)=>{let n=f.value.activeSplitter,r=[n,n+1];if(t<e.prevPanesSize+s.value[r[0]].min){if(r[0]=j(n).index,e.prevReachedMinPanes=0,r[0]<n&&s.value.forEach((t,i)=>{i>r[0]&&i<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)}),r[0]===void 0)return e.prevReachedMinPanes=0,s.value[0].size=s.value[0].min,s.value.forEach((t,r)=>{r>0&&r<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)}),s.value[r[1]].size=100-e.prevReachedMinPanes-s.value[0].min-e.prevPanesSize-e.nextPanesSize,null;e.prevPanesSize=k(r[0])}return t>100-e.nextPanesSize-s.value[r[1]].min&&(r[1]=M(n).index,e.nextReachedMinPanes=0,r[1]>n+1&&s.value.forEach((t,i)=>{i>n&&i<r[1]&&(t.size=t.min,e.nextReachedMinPanes+=t.min)}),e.nextPanesSize=r[1]===void 0?0:A(r[1]-1),r[1]===void 0)?(e.nextReachedMinPanes=0,s.value.forEach((t,r)=>{r>=n+1&&(t.size=t.min,e.nextReachedMinPanes+=t.min)}),r[0]!==void 0&&(s.value[r[0]].size=100-e.prevPanesSize-A(r[0]-1)),null):{sums:e,panesToResize:r}},k=e=>s.value.reduce((t,n,r)=>t+(r<e?n.size:0),0),A=e=>s.value.reduce((t,n,r)=>t+(r>e+1?n.size:0),0),j=e=>[...s.value].reverse().find(t=>t.index<e&&t.size>t.min)||{},M=e=>s.value.find(t=>t.index>e+1&&t.size>t.min)||{},N=()=>{let e=Array.from(u.value?.children||[]);for(let t of e){let e=t.classList.contains(`splitpanes__pane`),n=t.classList.contains(`splitpanes__splitter`);!e&&!n&&(t.remove(),console.warn(`Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.`))}},P=(e,t,n=!1)=>{let r=e-1,a=document.createElement(`div`);a.classList.add(`splitpanes__splitter`),n||(a.onmousedown=e=>_(e,r),typeof window<`u`&&`ontouchstart`in window&&(a.ontouchstart=e=>_(e,r)),a.onclick=e=>b(e,r+1),i.keyboardStep&&(a.setAttribute(`tabindex`,`0`),a.setAttribute(`role`,`separator`),a.setAttribute(`aria-orientation`,i.horizontal?`horizontal`:`vertical`),a.onkeydown=e=>S(e,r))),a.ondblclick=e=>x(e,r+1),t.parentNode.insertBefore(a,t)},F=e=>{e.onmousedown=null,e.onclick=null,e.ondblclick=null,e.onkeydown=null,e.remove()},I=()=>{let e=Array.from(u.value?.children||[]);for(let t of e)t.className.includes(`splitpanes__splitter`)&&F(t);let t=0;for(let n of e)n.className.includes(`splitpanes__pane`)&&(!t&&i.firstSplitter?P(t,n,!0):t&&P(t,n),t++)},L=({uid:e,...t})=>{let n=c.value[e];for(let[e,r]of Object.entries(t))n[e]=r},R=!1,z=e=>{let n=-1;Array.from(u.value?.children||[]).some(t=>(t.className.includes(`splitpanes__pane`)&&n++,t.isSameNode(e.el))),s.value.splice(n,0,{...e,index:n}),s.value.forEach((e,t)=>e.index=t),d.value&&!R&&(R=!0,(0,t.nextTick)(()=>{I(),V({addedPane:s.value[n]}),K(`pane-add`,{pane:s.value[n]}),R=!1}))},B=e=>{let n=s.value.findIndex(t=>t.id===e);s.value[n].el=null;let r=s.value.splice(n,1)[0];s.value.forEach((e,t)=>e.index=t),(0,t.nextTick)(()=>{I(),K(`pane-remove`,{pane:r}),V({removedPane:{...r,index:n}})})},V=(e={})=>{!e.addedPane&&!e.removedPane?U():s.value.some(e=>e.givenSize!==null||e.min||e.max<100)?W(e):H(),d.value&&K(`resized`)},H=()=>{let e=100/l.value,t=100,n=[],r=[];for(let i of s.value)i.size=Math.max(Math.min(e,i.max),i.min),t-=i.size,i.size>=i.max&&n.push(i.id),i.size<=i.min&&r.push(i.id);Math.abs(t)>.1&&G(t,n,r)},U=()=>{let e=100,t=[],n=[],r=0;for(let i of s.value)e-=i.size,i.givenSize!==null&&r++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id);let i=100;if(e>.1){for(let t of s.value)t.givenSize===null&&(t.size=Math.max(Math.min(e/(l.value-r),t.max),t.min)),i-=t.size;i>.1&&G(i,t,n)}},W=({addedPane:e,removedPane:t}={})=>{let n=s.value.reduce((e,t)=>e+(t.givenSize===null?0:t.givenSize),0),r=s.value.filter(e=>e.givenSize===null).length,i=r>0?(100-n)/r:0,a=0,o=[],c=[];for(let e of s.value)a-=e.size,e.size>=e.max&&o.push(e.id),e.size<=e.min&&c.push(e.id);if(!(Math.abs(a)<.1)){a=100;for(let e of s.value)e.givenSize===null&&(e.size=Math.max(Math.min(i,e.max),e.min)),a-=e.size,e.size>=e.max&&o.push(e.id),e.size<=e.min&&c.push(e.id);Math.abs(a)>.1&&G(a,o,c)}},G=(e,t,n)=>{let r;r=e>0?e/(l.value-t.length):e/(l.value-n.length),s.value.forEach((i,a)=>{if(e>0&&!t.includes(i.id)){let t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}else if(!n.includes(i.id)){let t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}}),Math.abs(e)>.1&&d.value&&console.warn(`Splitpanes: Could not resize panes correctly due to their constraints.`)},K=(e,t=void 0,n=!1)=>{let a=t?.index??f.value.activeSplitter??null;r(e,{...t,...a!==null&&{index:a},...n&&a!==null&&{prevPane:s.value[a-+!!i.firstSplitter],nextPane:s.value[a+ +!i.firstSplitter]},panes:s.value.map(e=>({min:e.min,max:e.max,size:e.size}))})};(0,t.watch)(()=>i.firstSplitter,()=>I()),(0,t.watch)(()=>i.horizontal,e=>(0,t.nextTick)(()=>{r(`direction-changed`,{horizontal:e,panes:s.value.map(e=>({min:e.min,max:e.max,size:e.size}))})})),(0,t.onMounted)(()=>{N(),I(),V(),K(`ready`),d.value=!0}),(0,t.onBeforeUnmount)(()=>d.value=!1);let q=()=>{let{class:e,...n}=a;return(0,t.h)(`div`,{ref:u,class:[m.value,e],...n},o.default?.())};return(0,t.provide)(`panes`,s),(0,t.provide)(`indexedPanes`,c),(0,t.provide)(`horizontal`,(0,t.computed)(()=>i.horizontal)),(0,t.provide)(`requestUpdate`,L),(0,t.provide)(`onPaneAdd`,z),(0,t.provide)(`onPaneRemove`,B),(0,t.provide)(`onPaneClick`,C),(e,n)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(q)))}}),UCe={__name:`pane`,props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(e){let n=e,r=(0,t.inject)(`requestUpdate`),i=(0,t.inject)(`onPaneAdd`),a=(0,t.inject)(`horizontal`),o=(0,t.inject)(`onPaneRemove`),s=(0,t.inject)(`onPaneClick`),c=(0,t.getCurrentInstance)()?.uid,l=(0,t.inject)(`indexedPanes`),u=(0,t.computed)(()=>l.value[c]),d=(0,t.ref)(null),f=(0,t.computed)(()=>{let e=isNaN(n.size)||n.size===void 0?0:parseFloat(n.size);return Math.max(Math.min(e,m.value),p.value)}),p=(0,t.computed)(()=>{let e=parseFloat(n.minSize);return isNaN(e)?0:e}),m=(0,t.computed)(()=>{let e=parseFloat(n.maxSize);return isNaN(e)?100:e}),h=(0,t.computed)(()=>{let e=u.value?.size??(n.size===void 0?void 0:f.value);return e===void 0?``:`${a.value?`height`:`width`}: ${e}%`});return(0,t.watch)(()=>f.value,e=>r({uid:c,size:e})),(0,t.watch)(()=>p.value,e=>r({uid:c,min:e})),(0,t.watch)(()=>m.value,e=>r({uid:c,max:e})),(0,t.onMounted)(()=>{i({id:c,el:d.value,min:p.value,max:m.value,givenSize:n.size===void 0?null:f.value,size:f.value})}),(0,t.onBeforeUnmount)(()=>o(c)),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`paneEl`,ref:d,class:`splitpanes__pane`,onClick:n[0]||=n=>(0,t.unref)(s)(n,e._.uid),style:(0,t.normalizeStyle)(h.value)},[(0,t.renderSlot)(e.$slots,`default`)],4))}};mW(),pK(),yd();var WCe={name:`CustomSplitter`,components:{Splitpanes:HCe,Pane:UCe,ResizeSensor:uq},props:{index:{type:String,default:function(){return`split-1`}}},methods:{requestStylesUpdate:function(e){if(this.$refs&&e in this.$refs&&this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].$el){let t=this.$refs[e][0].$el.getBoundingClientRect();fW.emit(`PaneResize`,{refName:e,rect:t})}},calculateStyles:function(e){this.$refs&&(e.startsWith(`pane`)?this.requestStylesUpdate(e):e.startsWith(`split`)&&this.customLayout[e].children.forEach(e=>{e.startsWith(`pane`)&&this.requestStylesUpdate(e)}))},childUnmounted:function(e){fW.emit(`PaneUnmounted`,{refName:e})}},computed:{...(0,n.mapStores)(fK),children(){return this.customLayout[this.index].children},customLayout(){return this.splitFlowStore.customLayout},isHorizontal(){return this.customLayout[this.index].horizontal}}},GCe={style:{height:`100%`,width:`100%`}};function KCe(e,n,r,i,a,o){let s=uq,c=(0,t.resolveComponent)(`custom-splitter`,!0),l=(0,t.resolveComponent)(`pane`),u=(0,t.resolveComponent)(`splitpanes`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,GCe,[(0,t.createVNode)(s,{onResize:n[0]||=e=>o.calculateStyles(r.index)}),(0,t.createVNode)(u,{class:`default-theme`,horizontal:o.isHorizontal,"maximize-panes":!1},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.children,e=>((0,t.openBlock)(),(0,t.createBlock)(l,{key:e,ref_for:!0,ref:e,onVnodeBeforeUnmount:t=>o.childUnmounted(e)},{default:(0,t.withCtx)(()=>[o.customLayout[e].content?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,onResize:t=>o.calculateStyles(e)},null,8,[`onResize`])):((0,t.openBlock)(),(0,t.createBlock)(c,{key:e,index:e},null,8,[`index`]))]),_:2},1032,[`onVnodeBeforeUnmount`]))),128))]),_:1},8,[`horizontal`])])}var dq=vd(WCe,[[`render`,KCe],[`__scopeId`,`data-v-01f20914`]]);mW(),pK(),_d(),_K(),dW(),eK(),yd();var qCe={name:`SplitDialog`,components:{ContentVuer:lq,CustomSplitter:dq},props:{entries:{type:Array,default:function(){return[]}}},data:function(){return{styles:{},query:``,filter:[]}},methods:{resourceSelected:function(e){this.$emit(`resource-selected`,e)},speciesChanged:function(e){this.$emit(`species-changed`,e)},getClass:function(e){return this.isIdVisible(e)?this.getRefsName(e):`inactive`},getRefsName:function(e){let t=this.splitFlowStore.getPaneNameById(e);return t&&(t in this.styles||(this.styles[t]={})),t},getStyle:function(e){let t=this.getRefsName(e);return t&&t in this.styles&&this.styles[t]?this.styles[t]:{}},getActiveContents:function(){let e=[],t=this.$refs.content;return t&&t.forEach(t=>{t.visible&&e.push(t)}),e},isIdVisible:function(e){let t=this.splitFlowStore.getPaneNameById(e),n=!1;return t!==void 0&&(n=this.splitFlowStore.isPaneActive(t)),n},getContentsWithId:function(e){let t=this.$refs.content;for(let n=0;n<t.length;n++)if(t[n].getId()==e)return t[n]},getContentsState:function(){let e=[],t=this.$refs.content;for(let n=0;n<t.length;n++)e.push(t[n].getState());return e},setStyles:function(e,t){if(this.$refs&&this.$refs.tabContainer){let n=this.$refs.tabContainer.getBoundingClientRect(),r={};r.width=`${t.width}px`,r.left=`${t.left-n.left}px`,r.height=`${t.height}px`,r.top=`${t.top-n.top}px`,r.display=`block`,this.styles[e]=r}},hidePane:function(e){if(this.$refs&&`tabContainer`in this.$refs){let t={};t.visibility=`hidden`,t[`pointer-events`]=`none`,t.opacity=`0`,this.styles[e]=t}},resize:function(){this.__userResize__=!0},resized:function(e,t){this.__userResize__&&this.splitFlowStore.setSplitter({name:e,value:t[0].size}),this.__userResize__=!1},onSpeciesLayoutConnectivityUpdate:function(){let e=this.splitFlowStore.getActivePaneIds(),t=[307,`307`],n=Object.keys(this.connectivitiesStore.globalConnectivities).find(e=>e.includes(`sckan`)),r=Array.from(new Set(this.entries.filter(n=>e.includes(n.id)&&(n.uuid&&(n.type===`Flatmap`||n.type===`MultiFlatmap`)||n.type===`Scaffold`&&n.resource&&(n.isBodyScaffold||t.includes(n.discoverId)))).map(e=>{if(e.type===`Flatmap`||e.type===`MultiFlatmap`)return e.uuid;if(e.type===`Scaffold`)return e.resource})));if(r.length){if(this.connectivitiesStore.updateActiveConnectivityKeys(r)){let e=this.connectivitiesStore.getUniqueFilterOptionsByKeys;fW.emit(`connectivity-filter-options`,e)}}else{let e=this.connectivitiesStore.globalConnectivities[n]||[];fW.emit(`connectivity-knowledge`,{data:e,highlight:[],processed:!1,isDefaultKnowledge:!0}),fW.emit(`connectivity-filter-options`,[]),this.connectivitiesStore.updateActiveConnectivityKeys([n])}},getGeneralSearchedId:function(e,t,n=`query`){let r=[];return e.forEach(e=>{let i=[JSON.stringify(e[`nerve-label`])];n===`query`&&(i=[...i,e.id,e.label,e[`long-label`],JSON.stringify(e.nerves)]),i.some(e=>e?.toLowerCase().includes(t.toLowerCase()))&&!r.includes(e.id)&&r.push(e.id)}),r},searchPathwaysByTerm:function(e,t){let n=e.mapImp.pathways?.models;if(!n||!t)return[];let r=t.toLowerCase();return/[-_:\s/]+/.test(r)?n.filter(e=>(e.id?.toLowerCase()||``).includes(r)).map(e=>e.id):r.length<3?n.filter(e=>(e.id?.toLowerCase()||``).split(/[-_:\s/]+/).includes(r)).map(e=>e.id):n.filter(e=>(e.id?.toLowerCase()||``).split(/[-_:\s/]+/).some(e=>e===r||e.length>=3&&e.includes(r))).map(e=>e.id)},getFlatmapSearchedId:function(e,t){let n=[],r=e.mapImp.search(t);return(r.__featureIds||r.featureIds).forEach(r=>{let i=e.mapImp.annotation(r);[i.id,i.name,i.label,i.models,i.source].some(e=>e&&e.toLowerCase().includes(t.toLowerCase()))&&i.models&&!n.includes(i.models)&&n.push(i.models)}),n},getLatestFlatmapUUID:async function(e,t){return(await VG(e,t)).uuid},parseSearchTerms:function(e){return e.split(`,`).map(e=>e.trim().replace(/["']/g,``)).filter(e=>e)},connectivityQueryFilter:async function(e){this.query=``,this.filter=[];let t=this.getActiveContents(),n=this.settingsStore.flatmapAPI,r=[],i=[],a=[],o=!1,s=[],c=[],l=``,u=this.connectivitiesStore.getUniqueFilterOptionsByKeys,d=this.connectivitiesStore.getUniqueFilterSourcesByKeys,f=this.connectivitiesStore.getUniqueConnectivitiesByKeys;for(let i of t){let t=i.$refs.viewer;if(t){let i=t.$refs.multiflatmap,a=t.$refs.flatmap,o=t.$refs.scaffold,p=t.$refs.iframe,m=t.$refs.plot,h=t.$refs.simulation,g=null;if(i&&t.flatmapIsReady()){let e=i.getCurrentFlatmap();e&&e.mapImp&&(g=e,l=g.mapImp.uuid)}else a&&a.mapImp?(g=a,l=g.mapImp.uuid):(g=o||p||m||h,l=await this.getLatestFlatmapUUID(n,`human-flatmap_male`));let _=a||i;if(e){if(this.query=e.query,e.query){let e=this.parseSearchTerms(this.query),t=[];for(let n=0;n<e.length;n++){let r=e[n],i=_?this.getFlatmapSearchedId(g,r):this.getGeneralSearchedId(f,r,`query`);if(t.push(i),_){let e=this.searchPathwaysByTerm(g,r);t.push(...e)}}let i=[...new Set(t.flat())];if(i.length){r.push(...i);let e=_?await Rg(n,l,i):i;s.push(...e)}}let i={origins:[],vias:[],destinations:[],all:[]},a={};if(o&&t.syncFilter(e.filter),e.filter.forEach(e=>{let t=e.facetPropPath.split(`.`).pop(),n=e.facetPropPath.includes(`flatmap.connectivity.source`);if(n&&e.facet?.toLowerCase()!==`show all`){let t=e.facet.replace(`,[`,`, [`),n=e.facetPropPath.split(`.`).pop();if(n===`origin`)i.origins.push(t);else if(n===`destination`)i.destinations.push(t);else if(n===`via`)i.vias.push(t);else{let e=JSON.parse(t).flat(1/0);i.all.push(...e)}}if(o)!n&&e.facet?.toLowerCase()!==`show all`&&(t in a||(a[t]=[]),a[t].push(...this.getGeneralSearchedId(f,e.facet,`facet`)));else if(_&&!n){let n=u.find(e=>e.key.includes(t));n&&n.children.forEach(n=>{if(n.label.toLowerCase()===e.facet.toLowerCase()&&n.key){let e=n.key.split(`.`).pop();t in a||(a[t]=[]),a[t].push(...d[t][e])}})}}),i.origins.length||i.destinations.length||i.vias.length){let e={flatmapAPI:n,knowledgeSource:l,origins:i.origins,destinations:i.destinations,vias:i.vias};`ovd`in a||(a.ovd=[]),a.ovd.push(...await oye(e))}else i.all.length&&(`all`in a||(a.all=[]),a.all.push(...await Rg(n,l,i.all)));let p=Object.values(a);this.filter=[...this.filter,...p];let m=this.filter.length?this.filter.reduce((e,t)=>e.filter(e=>t.includes(e))):[];c.push(...m)}}}let p;this.query&&!this.filter.length?p=s:!this.query&&this.filter.length?p=c:this.query&&this.filter.length&&(p=s.filter(e=>c.includes(e))),p&&(a.push(...p),f=f.filter(e=>p.includes(e.id)),o=!0),i.push(...f);let m=[...new Set(r)],h=[...new Set(a)],g=Array.from(new Map(i.map(e=>[e.id,e])).values());g=[...g.filter(e=>m.includes(e.id)),...g.filter(e=>!m.includes(e.id))];let _={data:g,highlight:h,processed:o};fW.emit(`connectivity-knowledge`,_)},updateFlatmapMinimap:function(){let e=this.splitFlowStore.getActivePaneIds(),t=this.$refs.content,n=[];for(let e=0;e<t.length;e++)t[e].viewerType===`MultiFlatmap`&&n.push(t[e]);n.sort((e,t)=>t.visible-e.visible);let r=!(e.length>4),i=this.settingsStore.displayMinimap;this.settingsStore.updateDisplayMinimap(r),n.forEach(e=>{e.toggleMinimap(r,i)})}},computed:{...(0,n.mapStores)(fK,gK,gd),horizontal(){return this.splitFlowStore.activeView===`2horpanel`},splitters(){return this.splitFlowStore.splitters}},mounted:function(){this._offBus=pW({PaneResize:e=>{this.setStyles(e.refName,e.rect),this.updateFlatmapMinimap()},PaneUnmounted:e=>{this.hidePane(e.refName)},"species-layout-connectivity-update":()=>{this.onSpeciesLayoutConnectivityUpdate()},"connectivity-query-filter":e=>{this.connectivityQueryFilter(e)},hoverUpdate:e=>{this.getActiveContents().forEach(t=>{t.onHoverUpdate(e)})},startHelp:()=>{this.getActiveContents().forEach(e=>{e.onStartHelp()})},"connectivity-item-close":()=>{this.getActiveContents().forEach(e=>{e.onConnectivityItemClose()})},"sidebar-annotation-close":()=>{this.getActiveContents().forEach(e=>{e.onSidebarAnnotationClose()})},globalViewerSettingsUpdate:()=>{this.$refs.content.forEach(e=>{e.onGlobalViewerSettingsUpdate()})},markerUpdate:()=>{this.$refs.content.forEach(e=>{e.onFlatmapMarkerUpdate()})},"connectivity-hovered":e=>{this.getActiveContents().forEach(t=>{t.onShowConnectivityTooltips(e)})},"connectivity-source-change":e=>{let t=this.getActiveContents(),n=[];t.forEach(t=>{t.onConnectivitySourceChange(e,n)})},"show-connectivity":e=>{this.getActiveContents().forEach(t=>{t.onShowConnectivity(e)})},"show-reference-connectivities":e=>{this.getActiveContents().forEach(t=>{t.onShowReferenceConnectivity(e)})},"filter-visibility":e=>{this.getActiveContents().forEach(t=>{t.onFilterVisibility(e)})}})},beforeUnmount:function(){this._offBus?.()}},JCe={class:`tab-container`,ref:`tabContainer`};function YCe(e,n,r,i,a,o){let s=dq,c=lq;return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,JCe,[(0,t.createVNode)(s,{index:`split-1`,key:`split-1`}),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.entries,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.id,style:(0,t.normalizeStyle)(o.getStyle(e.id)),class:(0,t.normalizeClass)([o.getClass(e.id),`contentvuer`])},[((0,t.openBlock)(),(0,t.createBlock)(c,{key:e.id,entry:e,ref_for:!0,ref:`content`,onResourceSelected:o.resourceSelected,onSpeciesChanged:o.speciesChanged,visible:o.isIdVisible(e.id)},null,8,[`entry`,`onResourceSelected`,`onSpeciesChanged`,`visible`]))],6))),128))],512)}var fq=vd(qCe,[[`render`,YCe],[`__scopeId`,`data-v-19d2c2d6`]]);yd();var XCe={name:`SearchControls`,props:{failedSearch:void 0},components:{MapSvgIcon:XW},methods:{fetchSuggestions:function(e,t){e===``?t([]):this.$emit(`fetch-suggestions`,{term:e,cb:t})}},data:function(){return{searchText:``}}},ZCe={class:`search-container`},QCe={key:0,class:`text not-found-text`};function $Ce(e,n,r,i,a,o){let s=sse,c=(0,t.resolveComponent)(`map-svg-icon`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,ZCe,[n[4]||=(0,t.createElementVNode)(`div`,{class:`text search-text`},`Search within display`,-1),(0,t.createVNode)(s,{class:`search-box`,placeholder:`Search`,modelValue:e.searchText,"onUpdate:modelValue":n[0]||=t=>e.searchText=t,"fetch-suggestions":o.fetchSuggestions,onKeyup:n[1]||=(0,t.withKeys)(t=>e.$emit(`search`,e.searchText),[`enter`]),onSelect:n[2]||=t=>e.$emit(`search`,t.value),teleported:!1,"popper-class":`autocomplete-popper`},null,8,[`modelValue`,`fetch-suggestions`]),(0,t.createVNode)(c,{icon:`magnifyingGlass`,class:`magnify`,onClick:n[3]||=t=>e.$emit(`search`,e.searchText)}),r.failedSearch?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,QCe,`'`+(0,t.toDisplayString)(r.failedSearch)+`' not found`,1)):(0,t.createCommentVNode)(``,!0)])}var pq=vd(XCe,[[`render`,$Ce],[`__scopeId`,`data-v-2390b905`]]);So(),mW(),aK(),_d(),pK(),gW(),yd();var ewe={name:`DialogToolbarContent`,components:{MapSvgIcon:XW,MapSvgSpriteColor:PG,ScreenshotPopover:bd,SearchControls:pq},props:{numberOfEntries:{type:Number,default:0},showIcons:{type:Boolean,default:!1},captureScreenshot:{type:Function,default:void 0},getScreenshotTarget:{type:Function,default:void 0}},inject:[`showGlobalSettings`],computed:{...(0,n.mapStores)(iK,gd,fK),activeView(){return this.splitFlowStore.activeView},helpDelay(){return this.settingsStore.helpDelay},shareLink(){return this.settingsStore.shareLink},offlineAnnotationEnabled(){return this.settingsStore.offlineAnnotationEnabled},viewIcons(){return this.splitFlowStore.viewIcons}},watch:{shareLink:function(){this.loadingLink=!1}},data:function(){return{activeViewRef:void 0,displayShareOptions:!1,ElIconCopyDocument:(0,t.shallowRef)(Za),exportAnnotation:!1,failedSearch:void 0,globalSettings:{},globalSettingRef:void 0,isFullscreen:!1,loadingLink:!0,permalinkRef:void 0,viewingModes:{Exploration:`Find relevant research and view detail of neural pathways by selecting a pathway to view its connections and data sources`,"Neuron Connection":`Discover neuron connections by selecting a feature and viewing its associated network connections`,Annotation:[`View feature annotations`,`Add, comment on and view feature annotations`]},authorisedUser:!1,mapLoaded:!1}},methods:{loadGlobalSettings:function(){this.globalSettings={...this.globalSettings,...this.settingsStore.globalSettings}},updateViewingMode:function(e,t){let{target:n}=e;n.closest(`.el-checkbox`)||(this.globalSettings.viewingMode=t,t===`Exploration`?(this.globalSettings.displayMarkers=!0,this.globalSettings.interactiveMode=`dataset`):t===`Annotation`?(this.globalSettings.displayMarkers=!1,this.globalSettings.interactiveMode=`dataset`):(this.globalSettings.displayMarkers=!1,this.globalSettings.interactiveMode=`connectivity`),this.updateGlobalSettings(`viewingMode`))},updateGlobalSettings:function(e){let t=this.settingsStore.getUpdatedGlobalSettingsKey(this.globalSettings);this.settingsStore.updateGlobalSettings(this.globalSettings),t.includes(`displayMarkers`)&&fW.emit(`markerUpdate`),t.includes(`interactiveMode`)&&fW.emit(`modeUpdate`,this.globalSettings.interactiveMode),(t.includes(`viewingMode`)||t.includes(`connectionType`)||t.includes(`flightPathDisplay`)||t.includes(`organsDisplay`)||t.includes(`outlinesDisplay`)||t.includes(`backgroundDisplay`))&&fW.emit(`globalViewerSettingsUpdate`);let n=this.globalSettings[e];e===`flightPathDisplay`&&(n=this.globalSettings.flightPathDisplay?`3D`:`2D`),e===`organsDisplay`&&(n=this.globalSettings.organsDisplay?`Color`:`Grayscale`),e===`outlinesDisplay`&&(n=this.globalSettings.outlinesDisplay?`Show`:`Hide`),t.length&&hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_settings_${e}`,category:n,location:`map_toolbar`})},titleClicked:function(e){this.$emit(`titleClicked`,e)},startHelp:function(){fW.emit(`startHelp`),hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_toolbar_help`,category:`help_mode_start`,location:`map_toolbar`})},onFullscreen:function(){this.$emit(`onFullscreen`),this.isFullscreen=!this.isFullscreen,this.isFullscreen&&hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_toolbar_fullscreen`,category:this.isFullscreen?`enter`:`exit`,location:`map_toolbar`})},onFullscreenEsc:function(){document.fullscreenElement||(this.isFullscreen=!1,hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_toolbar_fullscreen`,category:this.isFullscreen?`enter`:`exit`,location:`map_toolbar`}))},close:function(){this.$emit(`close`)},copyShareLink:function(){document&&(this.$refs.linkInput.$el.querySelector(`input`).select(),document.execCommand(`copy`),hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_permalink`,category:`permalink_copy`,location:`map_toolbar`}))},setFailedSearch:function(e){this.failedSearch=e},requestShareLink:function(){sessionStorage.getItem(`anonymous-annotation`)?this.displayShareOptions=!0:this.getShareLink(!1)},onCaptureScreenshot:async function(e){let t=await this.captureScreenshot(e);return hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_screenshot`,category:`png_${e.scale}x`,location:e.source===`shortcut`?`keyboard_shortcut`:`map_toolbar`}),t},getShareLink:function(e){this.displayShareOptions=!1,this.loadingLink=!0,fW.emit(`updateShareLinkRequested`,e),hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_permalink`,category:`permalink_generate`,location:`map_toolbar`})},viewClicked:function(e){let t=this.activeView;if(this.splitFlowStore.updateActiveView({view:e,entries:this.entriesStore.entries}),e!==t){let t=this.viewIcons.find(t=>t.icon===e);hW.sendEvent({event:`interaction_event`,event_name:`portal_maps_toolbar_split_view`,category:t?.name||``,location:`map_toolbar`})}this.$refs.viewPopover&&this.$refs.viewPopover.hide()}},mounted:function(){this.activeViewRef=(0,t.shallowRef)(this.$refs.activeViewRef),this.permalinkRef=(0,t.shallowRef)(this.$refs.permalinkRef),this.globalSettingRef=(0,t.shallowRef)(this.$refs.globalSettingRef),this._offBus=pW({mapLoaded:()=>{this.mapLoaded=!0}}),document.addEventListener(`fullscreenchange`,this.onFullscreenEsc),this.loadGlobalSettings()},unmounted:function(){this._offBus?.(),document.removeEventListener(`fullscreenchange`,this.onFullscreenEsc)}},twe={class:`header`},nwe={class:`viewing-mode-selector`},rwe={class:`el-dropdown-link`},iwe={class:`toolbar-dropdown-badge`},awe={class:`el-option__description`},owe={key:0,class:`setting-popover-block`},swe={class:`el-radio__description`},cwe={key:0},lwe={key:1},uwe={key:2},dwe={key:3},fwe={class:`setting-popover-inner`},pwe={key:0,class:`setting-popover-block`},mwe={key:1,class:`setting-popover-block`},hwe={key:2,class:`setting-popover-block`},gwe={key:3,class:`setting-popover-block`};function _we(e,n,r,i,a,o){let s=(0,t.resolveComponent)(`map-svg-sprite-color`),c=pq,l=Xa,u=Do,d=po,f=no,p=za,m=jc,h=Ac,g=Ble,_=Vle,v=zle,y=(0,t.resolveComponent)(`map-svg-icon`),b=wce,x=Cce,S=Qc,C=bd,w=ic,T=fce,E=Cs,D=bce,O=uo,k=al;return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,twe,[(0,t.createVNode)(s),(0,t.createVNode)(c,{onSearch:n[0]||=t=>e.$emit(`local-search`,{term:t}),onFetchSuggestions:n[1]||=t=>e.$emit(`fetch-suggestions`,{data:t}),failedSearch:e.failedSearch},null,8,[`failedSearch`]),(0,t.createVNode)(x,{class:`icon-group`},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,nwe,[n[22]||=(0,t.createTextVNode)(` Viewing Mode: `,-1),(0,t.createVNode)(v,{teleported:!1,trigger:`hover`,class:`toolbar-dropdown`,"popper-class":`toolbar-dropdown-popper`,"hide-on-click":!1,disabled:!e.mapLoaded,placement:`bottom-end`},{dropdown:(0,t.withCtx)(()=>[n[21]||=(0,t.createElementVNode)(`h4`,null,`Viewing Mode:`,-1),(0,t.createVNode)(_,null,{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.viewingModes,(r,i)=>((0,t.openBlock)(),(0,t.createBlock)(g,{key:i,onClick:e=>o.updateViewingMode(e,i),class:(0,t.normalizeClass)({"is-selected":e.globalSettings.viewingMode===i})},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`h5`,null,[i===`Exploration`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:0,class:`el-icon--left`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(l)]),_:1})):(0,t.createCommentVNode)(``,!0),i===`Neuron Connection`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:1,class:`el-icon--left`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(d)]),_:1})):(0,t.createCommentVNode)(``,!0),i===`Annotation`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:2,class:`el-icon--left`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(f)]),_:1})):(0,t.createCommentVNode)(``,!0),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(i),1)]),(0,t.createElementVNode)(`small`,awe,[i===`Annotation`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[e.authorisedUser?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(r[1]),1)],64)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(r[0]),1)],64)),o.offlineAnnotationEnabled?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:2},[(0,t.createTextVNode)(`(Anonymous annotate)`)],64)):(0,t.createCommentVNode)(``,!0)],64)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(r),1)],64))]),i===`Neuron Connection`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[`connectionType`in e.globalSettings?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,owe,[(0,t.createVNode)(h,{modelValue:e.globalSettings.connectionType,"onUpdate:modelValue":n[2]||=t=>e.globalSettings.connectionType=t,onChange:n[3]||=e=>o.updateGlobalSettings(`connectionType`)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(m,{value:`Origin`,size:`small`},{default:(0,t.withCtx)(()=>[...n[17]||=[(0,t.createTextVNode)(`Origin`,-1)]]),_:1}),(0,t.createVNode)(m,{value:`Via`,size:`small`},{default:(0,t.withCtx)(()=>[...n[18]||=[(0,t.createTextVNode)(`Via`,-1)]]),_:1}),(0,t.createVNode)(m,{value:`Destination`,size:`small`},{default:(0,t.withCtx)(()=>[...n[19]||=[(0,t.createTextVNode)(` Destination `,-1)]]),_:1}),(0,t.createVNode)(m,{value:`All`,size:`small`},{default:(0,t.withCtx)(()=>[...n[20]||=[(0,t.createTextVNode)(`All`,-1)]]),_:1})]),_:1},8,[`modelValue`]),(0,t.createElementVNode)(`div`,swe,[e.globalSettings.connectionType===`Origin`?((0,t.openBlock)(),(0,t.createElementBlock)(`small`,cwe,` Neuron populations beginning at a location. `)):e.globalSettings.connectionType===`Via`?((0,t.openBlock)(),(0,t.createElementBlock)(`small`,lwe,` Neuron populations that run through a location. `)):e.globalSettings.connectionType===`Destination`?((0,t.openBlock)(),(0,t.createElementBlock)(`small`,uwe,` Neuron populations terminating at a location. `)):((0,t.openBlock)(),(0,t.createElementBlock)(`small`,dwe,`Neuron populations associated with a location.`))])])):(0,t.createCommentVNode)(``,!0)],64)):(0,t.createCommentVNode)(``,!0)]),_:2},1032,[`onClick`,`class`]))),128))]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,rwe,[e.globalSettings.viewingMode===`Exploration`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:0,class:`el-icon--left`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(l)]),_:1})):(0,t.createCommentVNode)(``,!0),e.globalSettings.viewingMode===`Neuron Connection`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:1,class:`el-icon--left`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(d)]),_:1})):(0,t.createCommentVNode)(``,!0),e.globalSettings.viewingMode===`Annotation`?((0,t.openBlock)(),(0,t.createBlock)(u,{key:2,class:`el-icon--left`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(f)]),_:1})):(0,t.createCommentVNode)(``,!0),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(e.globalSettings.viewingMode)+` `,1),e.globalSettings.viewingMode===`Neuron Connection`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:3},[n[16]||=(0,t.createTextVNode)(` \xA0 `,-1),(0,t.createElementVNode)(`small`,iwe,[(0,t.createElementVNode)(`em`,null,(0,t.toDisplayString)(e.globalSettings.connectionType),1)])],64)):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(u,{class:`el-icon--right`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(p)]),_:1})])]),_:1},8,[`disabled`])]),e.activeViewRef?((0,t.openBlock)(),(0,t.createBlock)(S,{key:0,"virtual-ref":e.activeViewRef,ref:`viewPopover`,placement:`bottom`,width:`133`,teleported:!1,trigger:`click`,"popper-class":`view-icon-popover`,"virtual-triggering":``},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.viewIcons,e=>((0,t.openBlock)(),(0,t.createBlock)(x,{gutter:20,key:e.name,class:(0,t.normalizeClass)([{active:e.icon==o.activeView},{disabled:e.min>r.numberOfEntries},`view-icon-row`]),onClick:t=>o.viewClicked(e.icon)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(b,{span:4},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(y,{icon:e.icon,class:`view-icon`},null,8,[`icon`])]),_:2},1024),(0,t.createVNode)(b,{offset:2,span:18,class:`view-text`},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.name),1)]),_:2},1024)]),_:2},1032,[`class`,`onClick`]))),128))]),_:1},8,[`virtual-ref`])):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(S,{class:`tooltip`,content:`Split screen`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.createVNode)(y,{icon:o.activeView,ref:`activeViewRef`,class:(0,t.normalizeClass)([{disabled:1>=r.numberOfEntries},`header-icon`,`splitscreen-icon`])},null,8,[`icon`,`class`])]),_:1},8,[`show-after`]),(0,t.createVNode)(S,{class:`tooltip`,content:`Help`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.createVNode)(y,{icon:`tooltips`,class:`header-icon`,onClick:n[4]||=e=>o.startHelp()})]),_:1},8,[`show-after`]),(0,t.createVNode)(S,{class:`tooltip`,content:`Fullscreen`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createVNode)(y,{icon:`fullScreen`,class:`header-icon`,onClick:o.onFullscreen},null,8,[`onClick`]),[[t.vShow,!e.isFullscreen]])]),_:1},8,[`show-after`]),(0,t.createVNode)(S,{class:`tooltip`,content:`Exit fullscreen`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createVNode)(y,{icon:`closeFullScreen`,class:`header-icon`,onClick:o.onFullscreen},null,8,[`onClick`]),[[t.vShow,e.isFullscreen]])]),_:1},8,[`show-after`]),r.captureScreenshot?((0,t.openBlock)(),(0,t.createBlock)(C,{key:1,title:`Download screenshot of all views`,tooltip:`Download screenshot`,capture:o.onCaptureScreenshot,getTarget:r.getScreenshotTarget,disabled:!e.mapLoaded,shortcut:``},null,8,[`capture`,`getTarget`,`disabled`])):(0,t.createCommentVNode)(``,!0),e.permalinkRef?((0,t.openBlock)(),(0,t.createBlock)(S,{key:2,ref:`linkPopover`,"virtual-ref":e.permalinkRef,placement:`bottom-end`,width:`400`,teleported:!1,trigger:`click`,"popper-class":`link-popover`,"virtual-triggering":``},{default:(0,t.withCtx)(()=>[e.displayShareOptions?((0,t.openBlock)(),(0,t.createBlock)(x,{key:0},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(b,{offset:3,span:8},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(w,{type:`primary`,size:`small`,onClick:n[5]||=t=>o.getShareLink(e.exportAnnotation),class:`share-options`},{default:(0,t.withCtx)(()=>[...n[23]||=[(0,t.createTextVNode)(` Create Permalink `,-1)]]),_:1})]),_:1}),(0,t.createVNode)(b,{span:10},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(S,{class:`tooltip`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.createVNode)(T,{modelValue:e.exportAnnotation,"onUpdate:modelValue":n[6]||=t=>e.exportAnnotation=t,size:`small`},{default:(0,t.withCtx)(()=>[...n[24]||=[(0,t.createTextVNode)(` Export Annotations `,-1)]]),_:1},8,[`modelValue`])]),default:(0,t.withCtx)(()=>[...n[25]||=[(0,t.createTextVNode)(` Create a permalink with anonymous annotations. `,-1),(0,t.createElementVNode)(`br`,null,null,-1),(0,t.createTextVNode)(` NOTE: Annotations will only be stored for `,-1),(0,t.createElementVNode)(`br`,null,null,-1),(0,t.createTextVNode)(` 30 days on the server. `,-1)]]),_:1},8,[`show-after`])]),_:1})]),_:1})):(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(x,{key:1,gutter:20,"element-loading-text":`Creating link...`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(b,{span:20},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(E,{class:`link-input`,size:`small`,placeholder:`Permanant Link Here`,readonly:!0,modelValue:o.shareLink,"onUpdate:modelValue":n[7]||=e=>o.shareLink=e,ref:`linkInput`},null,8,[`modelValue`])]),_:1}),(0,t.createVNode)(b,{span:4},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(S,{class:`tooltip`,content:`Copy link`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.createVNode)(w,{class:`copy-button`,icon:e.ElIconCopyDocument,size:`small`,onClick:o.copyShareLink},null,8,[`icon`,`onClick`])]),_:1},8,[`show-after`])]),_:1})]),_:1})),[[k,e.loadingLink]])]),_:1},8,[`virtual-ref`])):(0,t.createCommentVNode)(``,!0),(0,t.createVNode)(S,{class:`tooltip`,content:`Get permalink`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createVNode)(y,{icon:`permalink`,ref:`permalinkRef`,class:`header-icon`,onClick:o.requestShareLink},null,8,[`onClick`]),[[t.vShow,o.shareLink]])]),_:1},8,[`show-after`]),(0,t.createVNode)(S,{class:`tooltip`,content:`Close`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`},{reference:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createVNode)(y,{icon:`close`,class:`header-icon`,onClick:o.close},null,8,[`onClick`]),[[t.vShow,r.showIcons]])]),_:1},8,[`show-after`]),e.globalSettingRef?((0,t.openBlock)(),(0,t.createBlock)(S,{key:3,"virtual-ref":e.globalSettingRef,ref:`settingPopover`,placement:`bottom`,width:`230`,teleported:!1,trigger:`click`,"popper-class":`setting-popover`,"virtual-triggering":``,disabled:!e.mapLoaded},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`div`,fwe,[n[39]||=(0,t.createElementVNode)(`h4`,null,`Display options:`,-1),`flightPathDisplay`in e.globalSettings?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,pwe,[n[28]||=(0,t.createElementVNode)(`h5`,null,`Flight path`,-1),(0,t.createVNode)(h,{modelValue:e.globalSettings.flightPathDisplay,"onUpdate:modelValue":n[8]||=t=>e.globalSettings.flightPathDisplay=t,onChange:n[9]||=e=>o.updateGlobalSettings(`flightPathDisplay`)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(D,{value:!1},{default:(0,t.withCtx)(()=>[...n[26]||=[(0,t.createTextVNode)(`2D`,-1)]]),_:1}),(0,t.createVNode)(D,{value:!0},{default:(0,t.withCtx)(()=>[...n[27]||=[(0,t.createTextVNode)(`3D`,-1)]]),_:1})]),_:1},8,[`modelValue`])])):(0,t.createCommentVNode)(``,!0),`organsDisplay`in e.globalSettings?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,mwe,[n[31]||=(0,t.createElementVNode)(`h5`,null,`Organs`,-1),(0,t.createVNode)(h,{modelValue:e.globalSettings.organsDisplay,"onUpdate:modelValue":n[10]||=t=>e.globalSettings.organsDisplay=t,onChange:n[11]||=e=>o.updateGlobalSettings(`organsDisplay`)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(D,{value:!0},{default:(0,t.withCtx)(()=>[...n[29]||=[(0,t.createTextVNode)(`Color`,-1)]]),_:1}),(0,t.createVNode)(D,{value:!1},{default:(0,t.withCtx)(()=>[...n[30]||=[(0,t.createTextVNode)(`Grayscale`,-1)]]),_:1})]),_:1},8,[`modelValue`])])):(0,t.createCommentVNode)(``,!0),`outlinesDisplay`in e.globalSettings?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,hwe,[n[34]||=(0,t.createElementVNode)(`h5`,null,`Apply outlines`,-1),(0,t.createVNode)(h,{modelValue:e.globalSettings.outlinesDisplay,"onUpdate:modelValue":n[12]||=t=>e.globalSettings.outlinesDisplay=t,onChange:n[13]||=e=>o.updateGlobalSettings(`outlinesDisplay`)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(D,{value:!0},{default:(0,t.withCtx)(()=>[...n[32]||=[(0,t.createTextVNode)(`Show`,-1)]]),_:1}),(0,t.createVNode)(D,{value:!1},{default:(0,t.withCtx)(()=>[...n[33]||=[(0,t.createTextVNode)(`Hide`,-1)]]),_:1})]),_:1},8,[`modelValue`])])):(0,t.createCommentVNode)(``,!0),`backgroundDisplay`in e.globalSettings?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,gwe,[n[38]||=(0,t.createElementVNode)(`h5`,null,`Background color`,-1),(0,t.createVNode)(h,{class:`bg-color-radio-group`,modelValue:e.globalSettings.backgroundDisplay,"onUpdate:modelValue":n[14]||=t=>e.globalSettings.backgroundDisplay=t,onChange:n[15]||=e=>o.updateGlobalSettings(`backgroundDisplay`)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(D,{value:`white`,class:`bg-color-radio`},{default:(0,t.withCtx)(()=>[...n[35]||=[(0,t.createElementVNode)(`span`,{style:{"--bg-color":`white`}},`white`,-1)]]),_:1}),(0,t.createVNode)(D,{value:`lightskyblue`,class:`bg-color-radio`},{default:(0,t.withCtx)(()=>[...n[36]||=[(0,t.createElementVNode)(`span`,{style:{"--bg-color":`lightskyblue`}},`lightskyblue`,-1)]]),_:1}),(0,t.createVNode)(D,{value:`black`,class:`bg-color-radio`},{default:(0,t.withCtx)(()=>[...n[37]||=[(0,t.createElementVNode)(`span`,{style:{"--bg-color":`black`}},`black`,-1)]]),_:1})]),_:1},8,[`modelValue`])])):(0,t.createCommentVNode)(``,!0)])]),_:1},8,[`virtual-ref`,`disabled`])):(0,t.createCommentVNode)(``,!0),o.showGlobalSettings?((0,t.openBlock)(),(0,t.createBlock)(S,{key:4,class:`tooltip`,content:`Global Settings`,placement:`bottom-end`,"show-after":o.helpDelay,teleported:!1,trigger:`hover`,"popper-class":`header-popper`,disabled:!e.mapLoaded},{reference:(0,t.withCtx)(()=>[(0,t.createVNode)(u,{ref:`globalSettingRef`,disabled:!e.mapLoaded,class:(0,t.normalizeClass)([`header-icon global-settings-icon`,{disabled:!e.mapLoaded}])},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(O)]),_:1},8,[`disabled`,`class`])]),_:1},8,[`show-after`,`disabled`])):(0,t.createCommentVNode)(``,!0)]),_:1})])}var mq=vd(ewe,[[`render`,_we],[`__scopeId`,`data-v-65f7a49c`]]);So(),dW(),_W();var vwe=Object.create,hq=Object.defineProperty,ywe=Object.getOwnPropertyDescriptor,bwe=Object.getOwnPropertyNames,xwe=Object.getPrototypeOf,gq=Object.prototype.hasOwnProperty,Swe=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Cwe=(e,t)=>{let n={};for(var r in e)hq(n,r,{get:e[r],enumerable:!0});return t||hq(n,Symbol.toStringTag,{value:`Module`}),n},wwe=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=bwe(t),a=0,o=i.length,s;a<o;a++)s=i[a],!gq.call(e,s)&&s!==n&&hq(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=ywe(t,s))||r.enumerable});return e},Twe=(e,t,n)=>(n=e==null?{}:vwe(xwe(e)),wwe(t||!e||!e.__esModule||!gq.call(e,`default`)?hq(n,`default`,{value:e,enumerable:!0}):n,e)),_q={tab:`Tab`,enter:`Enter`,space:`Space`,left:`ArrowLeft`,up:`ArrowUp`,right:`ArrowRight`,down:`ArrowDown`,esc:`Escape`,delete:`Delete`,backspace:`Backspace`,numpadEnter:`NumpadEnter`,pageUp:`PageUp`,pageDown:`PageDown`,home:`Home`,end:`End`},vq=`update:modelValue`,yq=`change`,bq=`input`,xq=[``,`default`,`small`,`large`];function Sq(e,n){let r=(0,t.shallowRef)();return(0,t.watchEffect)(()=>{r.value=e()},{...n,flush:n?.flush??`sync`}),(0,t.readonly)(r)}function Cq(e,n){return(0,t.getCurrentScope)()?((0,t.onScopeDispose)(e,n),!0):!1}var wq=new WeakMap,Ewe=(...e)=>{let n=e[0],r=(0,t.getCurrentInstance)()?.proxy??(0,t.getCurrentScope)();if(r==null&&!(0,t.hasInjectionContext)())throw Error(`injectLocal must be called in setup`);return r&&wq.has(r)&&n in wq.get(r)?wq.get(r)[n]:(0,t.inject)(...e)},Tq=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var Dwe=e=>e!=null,Owe=Object.prototype.toString,kwe=e=>Owe.call(e)===`[object Object]`,Eq=(e,t,n)=>Math.min(n,Math.max(t,e)),Dq=()=>{},Oq=Awe();function Awe(){var e,t;return Tq&&!!((e=window)!=null&&(e=e.navigator)!=null&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function jwe(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return`cancel`in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}function Mwe(e,n={}){let r,i,a=Dq,o=Dq,s=(0,t.shallowRef)(!1),c=e=>{clearTimeout(e),a(),a=Dq},l;return Object.assign(u=>{let d=(0,t.toValue)(e),f=(0,t.toValue)(n.maxWait);return r&&c(r),d<=0||f!==void 0&&f<=0?(i&&=(c(i),void 0),s.value=!1,Promise.resolve(u())):(s.value=!0,new Promise((e,t)=>{a=n.rejectOnCancel?t:e,o=e,l=u,f&&!i&&(i=setTimeout(()=>{r&&c(r),i=void 0,s.value=!1,e(l())},f)),r=setTimeout(()=>{i&&c(i),i=void 0,s.value=!1,e(u())},d)}))},{cancel:()=>{r&&=(c(r),void 0),i&&=(c(i),void 0),s.value=!1,o=Dq},flush:()=>{if(s.value){r&&=(clearTimeout(r),void 0),i&&=(clearTimeout(i),void 0),s.value=!1;let e=o;a=Dq,o=Dq,e(l())}},isPending:(0,t.shallowReadonly)(s)})}function kq(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function Aq(e){return Array.isArray(e)?e:[e]}function Nwe(e){return e||(0,t.getCurrentInstance)()}function jq(e,t=200,n={}){return jwe(Mwe(t,n),e)}function Pwe(e,n=!0,r){Nwe(r)?(0,t.onMounted)(e,r):n?e():(0,t.nextTick)(e)}function Mq(e,n,r={}){let{immediate:i=!0,immediateCallback:a=!1}=r,o=(0,t.shallowRef)(!1),s;function c(){s&&=(clearTimeout(s),void 0)}function l(){o.value=!1,c()}function u(...r){a&&e(),c(),o.value=!0,s=setTimeout(()=>{o.value=!1,s=void 0,e(...r)},(0,t.toValue)(n))}return i&&(o.value=!0,Tq&&u()),Cq(l),{isPending:(0,t.shallowReadonly)(o),start:u,stop:l}}function Fwe(e,n,r){return(0,t.watch)(e,n,{...r,immediate:!0})}var Nq=Tq?window:void 0;Tq&&window.document,Tq&&window.navigator,Tq&&window.location;function Pq(e){let n=(0,t.toValue)(e);return n?.$el??n}function Fq(...e){let n=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),r=(0,t.computed)(()=>{let n=Aq((0,t.toValue)(e[0])).filter(e=>e!=null);return n.every(e=>typeof e!=`string`)?n:void 0});return Fwe(()=>[r.value?.map(e=>Pq(e))??[Nq].filter(e=>e!=null),Aq((0,t.toValue)(r.value?e[1]:e[0])),Aq((0,t.unref)(r.value?e[2]:e[1])),(0,t.toValue)(r.value?e[3]:e[2])],([e,t,r,i],a,o)=>{if(!e?.length||!t?.length||!r?.length)return;let s=kwe(i)?{...i}:i,c=e.flatMap(e=>t.flatMap(t=>r.map(r=>n(e,t,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}var Iq=!1;function Iwe(e,n,r={}){let{window:i=Nq,ignore:a=[],capture:o=!0,detectIframe:s=!1,controls:c=!1}=r;if(!i)return c?{stop:Dq,cancel:Dq,trigger:Dq}:Dq;if(Oq&&!Iq){Iq=!0;let e={passive:!0};Array.from(i.document.body.children).forEach(t=>t.addEventListener(`click`,Dq,e)),i.document.documentElement.addEventListener(`click`,Dq,e)}let l=!0,u=e=>(0,t.toValue)(a).some(t=>{if(typeof t==`string`)return Array.from(i.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{let n=Pq(t);return n&&(e.target===n||e.composedPath().includes(n))}});function d(e){let n=(0,t.toValue)(e);return n&&n.$.subTree.shapeFlag===16}function f(e,n){let r=(0,t.toValue)(e),i=r.$.subTree&&r.$.subTree.children;return i==null||!Array.isArray(i)?!1:i.some(e=>e.el===n.target||n.composedPath().includes(e.el))}let p=t=>{let r=Pq(e);if(t.target!=null&&!(!(r instanceof Element)&&d(e)&&f(e,t))&&!(!r||r===t.target||t.composedPath().includes(r))){if(`detail`in t&&t.detail===0&&(l=!u(t)),!l){l=!0;return}n(t)}},m=!1,h=[Fq(i,`click`,e=>{m||(m=!0,setTimeout(()=>{m=!1},0),p(e))},{passive:!0,capture:o}),Fq(i,`pointerdown`,t=>{let n=Pq(e);l=!u(t)&&!!(n&&!t.composedPath().includes(n))},{passive:!0}),s&&Fq(i,`blur`,t=>{setTimeout(()=>{let r=Pq(e),a=i.document.activeElement;for(;a?.shadowRoot;)a=a.shadowRoot.activeElement;a?.tagName===`IFRAME`&&!r?.contains(i.document.activeElement)&&n(t)},0)},{passive:!0})].filter(Boolean),g=()=>h.forEach(e=>e());return c?{stop:g,cancel:()=>{l=!1},trigger:e=>{l=!0,p(e),l=!1}}:g}function Lwe(){let e=(0,t.shallowRef)(!1),n=(0,t.getCurrentInstance)();return n&&(0,t.onMounted)(()=>{e.value=!0},n),e}function Lq(e){let n=Lwe();return(0,t.computed)(()=>(n.value,!!e()))}function Rq(e,n,r={}){let{window:i=Nq,...a}=r,o,s=Lq(()=>i&&`MutationObserver`in i),c=()=>{o&&=(o.disconnect(),void 0)},l=(0,t.watch)((0,t.computed)(()=>{let n=Aq((0,t.toValue)(e)).map(Pq).filter(Dwe);return new Set(n)}),e=>{c(),s.value&&e.size&&(o=new MutationObserver(n),e.forEach(e=>o.observe(e,a)))},{immediate:!0,flush:`post`}),u=()=>o?.takeRecords(),d=()=>{l(),c()};return Cq(d),{isSupported:s,stop:d,takeRecords:u}}var Rwe=Symbol(`vueuse-ssr-width`);function zwe(){let e=(0,t.hasInjectionContext)()?Ewe(Rwe,null):null;return typeof e==`number`?e:void 0}function Bwe(e,n={}){let{window:r=Nq,ssrWidth:i=zwe()}=n,a=Lq(()=>r&&`matchMedia`in r&&typeof r.matchMedia==`function`),o=(0,t.shallowRef)(typeof i==`number`),s=(0,t.shallowRef)(),c=(0,t.shallowRef)(!1);return(0,t.watchEffect)(()=>{if(o.value){o.value=!a.value;let n=(0,t.toValue)(e).split(`,`);c.value=n.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),r=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||r);return n&&a&&(a=i>=kq(n[1])),r&&a&&(a=i<=kq(r[1])),t?!a:a});return}a.value&&(s.value=r.matchMedia((0,t.toValue)(e)),c.value=s.value.matches)}),Fq(s,`change`,e=>{c.value=e.matches},{passive:!0}),(0,t.computed)(()=>c.value)}function Vwe(e,n,r={}){let{window:i=Nq,initialValue:a,observe:o=!1}=r,s=(0,t.shallowRef)(a),c=(0,t.computed)(()=>{var e;return Pq(n)||(i==null||(e=i.document)==null?void 0:e.documentElement)});function l(){let n=(0,t.toValue)(e),r=(0,t.toValue)(c);if(r&&i&&n){let e=i.getComputedStyle(r).getPropertyValue(n)?.trim();s.value=e||s.value||a}}return o&&Rq(c,l,{attributeFilter:[`style`,`class`],window:i}),(0,t.watch)([c,()=>(0,t.toValue)(e)],(e,t)=>{t[0]&&t[1]&&t[0].style.removeProperty(t[1]),l()},{immediate:!0}),(0,t.watch)([s,c],([n,r])=>{let i=(0,t.toValue)(e);r?.style&&i&&(n==null?r.style.removeProperty(i):r.style.setProperty(i,n))},{immediate:!0}),s}function zq(e,n,r={}){let{window:i=Nq,...a}=r,o,s=Lq(()=>i&&`ResizeObserver`in i),c=()=>{o&&=(o.disconnect(),void 0)},l=(0,t.watch)((0,t.computed)(()=>{let n=(0,t.toValue)(e);return Array.isArray(n)?n.map(e=>Pq(e)):[Pq(n)]}),e=>{if(c(),s.value&&i){o=new ResizeObserver(n);for(let t of e)t&&o.observe(t,a)}},{immediate:!0,flush:`post`}),u=()=>{c(),l()};return Cq(u),{isSupported:s,stop:u}}function Hwe(e={}){let{window:n=Nq,initialWidth:r=1/0,initialHeight:i=1/0,listenOrientation:a=!0,includeScrollbar:o=!0,type:s=`inner`}=e,c=(0,t.shallowRef)(r),l=(0,t.shallowRef)(i),u=()=>{if(n){if(s===`outer`)c.value=n.outerWidth,l.value=n.outerHeight;else if(s===`visual`&&n.visualViewport){let{width:e,height:t,scale:r}=n.visualViewport;c.value=Math.round(e*r),l.value=Math.round(t*r)}else o?(c.value=n.innerWidth,l.value=n.innerHeight):(c.value=n.document.documentElement.clientWidth,l.value=n.document.documentElement.clientHeight)}};u(),Pwe(u);let d={passive:!0};return Fq(`resize`,u,d),n&&s===`visual`&&n.visualViewport&&Fq(n.visualViewport,`resize`,u,d),a&&(0,t.watch)(Bwe(`(orientation: portrait)`),()=>u()),{width:c,height:l}}var Bq=()=>Tq&&/firefox/i.test(window.navigator.userAgent),Uwe=()=>Tq&&/android/i.test(window.navigator.userAgent);process.env.NODE_ENV===`production`||Object.freeze({}),process.env.NODE_ENV===`production`||Object.freeze([]);var Vq=()=>{},Wwe=Object.prototype.hasOwnProperty,Hq=(e,t)=>Wwe.call(e,t),Uq=Array.isArray,Wq=e=>typeof e==`function`,Gq=e=>typeof e==`string`,Kq=e=>typeof e==`object`&&!!e,qq=e=>(Kq(e)||Wq(e))&&Wq(e.then)&&Wq(e.catch),Gwe=Object.prototype.toString,Kwe=e=>Gwe.call(e),qwe=e=>Kwe(e)===`[object Object]`,Jq=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Jwe=/-\w/g,Ywe=Jq(e=>e.replace(Jwe,e=>e.slice(1).toUpperCase())),Xwe=/\B([A-Z])/g,Zwe=Jq(e=>e.replace(Xwe,`-$1`).toLowerCase()),Yq=typeof global==`object`&&global&&global.Object===Object&&global,Qwe=typeof self==`object`&&self&&self.Object===Object&&self,Xq=Yq||Qwe||Function(`return this`)(),Zq=Xq.Symbol,Qq=Object.prototype,$we=Qq.hasOwnProperty,eTe=Qq.toString,$q=Zq?Zq.toStringTag:void 0;function tTe(e){var t=$we.call(e,$q),n=e[$q];try{e[$q]=void 0;var r=!0}catch{}var i=eTe.call(e);return r&&(t?e[$q]=n:delete e[$q]),i}var nTe=Object.prototype.toString;function rTe(e){return nTe.call(e)}var iTe=`[object Null]`,aTe=`[object Undefined]`,eJ=Zq?Zq.toStringTag:void 0;function tJ(e){return e==null?e===void 0?aTe:iTe:eJ&&eJ in Object(e)?tTe(e):rTe(e)}function nJ(e){return typeof e==`object`&&!!e}var oTe=`[object Symbol]`;function rJ(e){return typeof e==`symbol`||nJ(e)&&tJ(e)==oTe}function iJ(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var aJ=Array.isArray,sTe=1/0,oJ=Zq?Zq.prototype:void 0,sJ=oJ?oJ.toString:void 0;function cJ(e){if(typeof e==`string`)return e;if(aJ(e))return iJ(e,cJ)+``;if(rJ(e))return sJ?sJ.call(e):``;var t=e+``;return t==`0`&&1/e==-sTe?`-0`:t}var cTe=/\s/;function lTe(e){for(var t=e.length;t--&&cTe.test(e.charAt(t)););return t}var uTe=/^\s+/;function dTe(e){return e&&e.slice(0,lTe(e)+1).replace(uTe,``)}function lJ(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var uJ=NaN,fTe=/^[-+]0x[0-9a-f]+$/i,pTe=/^0b[01]+$/i,mTe=/^0o[0-7]+$/i,hTe=parseInt;function dJ(e){if(typeof e==`number`)return e;if(rJ(e))return uJ;if(lJ(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=lJ(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=dTe(e);var n=pTe.test(e);return n||mTe.test(e)?hTe(e.slice(2),n?2:8):fTe.test(e)?uJ:+e}var fJ=1/0,gTe=17976931348623157e292;function _Te(e){return e?(e=dJ(e),e===fJ||e===-fJ?(e<0?-1:1)*gTe:e===e?e:0):e===0?e:0}function vTe(e){var t=_Te(e),n=t%1;return t===t?n?t-n:t:0}function pJ(e){return e}var yTe=`[object AsyncFunction]`,bTe=`[object Function]`,xTe=`[object GeneratorFunction]`,STe=`[object Proxy]`;function mJ(e){if(!lJ(e))return!1;var t=tJ(e);return t==bTe||t==xTe||t==yTe||t==STe}var hJ=Xq[`__core-js_shared__`],gJ=function(){var e=/[^.]+$/.exec(hJ&&hJ.keys&&hJ.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function CTe(e){return!!gJ&&gJ in e}var wTe=Function.prototype.toString;function _J(e){if(e!=null){try{return wTe.call(e)}catch{}try{return e+``}catch{}}return``}var TTe=/[\\^$.*+?()[\]{}|]/g,ETe=/^\[object .+?Constructor\]$/,DTe=Function.prototype,OTe=Object.prototype,kTe=DTe.toString,ATe=OTe.hasOwnProperty,jTe=RegExp(`^`+kTe.call(ATe).replace(TTe,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function MTe(e){return!lJ(e)||CTe(e)?!1:(mJ(e)?jTe:ETe).test(_J(e))}function NTe(e,t){return e?.[t]}function vJ(e,t){var n=NTe(e,t);return MTe(n)?n:void 0}var yJ=vJ(Xq,`WeakMap`),bJ=Object.create,PTe=function(){function e(){}return function(t){if(!lJ(t))return{};if(bJ)return bJ(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function FTe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ITe(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var LTe=800,RTe=16,zTe=Date.now;function BTe(e){var t=0,n=0;return function(){var r=zTe(),i=RTe-(r-n);if(n=r,i>0){if(++t>=LTe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function VTe(e){return function(){return e}}var xJ=function(){try{var e=vJ(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),HTe=BTe(xJ?function(e,t){return xJ(e,`toString`,{configurable:!0,enumerable:!1,value:VTe(t),writable:!0})}:pJ);function UTe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function WTe(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var GTe=9007199254740991,KTe=/^(?:0|[1-9]\d*)$/;function SJ(e,t){var n=typeof e;return t??=GTe,!!t&&(n==`number`||n!=`symbol`&&KTe.test(e))&&e>-1&&e%1==0&&e<t}function CJ(e,t,n){t==`__proto__`&&xJ?xJ(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function wJ(e,t){return e===t||e!==e&&t!==t}var qTe=Object.prototype.hasOwnProperty;function TJ(e,t,n){var r=e[t];(!(qTe.call(e,t)&&wJ(r,n))||n===void 0&&!(t in e))&&CJ(e,t,n)}function EJ(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?CJ(n,s,c):TJ(n,s,c)}return n}var DJ=Math.max;function JTe(e,t,n){return t=DJ(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=DJ(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),FTe(e,this,s)}}var YTe=9007199254740991;function OJ(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=YTe}function kJ(e){return e!=null&&OJ(e.length)&&!mJ(e)}var XTe=Object.prototype;function AJ(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||XTe)}function ZTe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var QTe=`[object Arguments]`;function jJ(e){return nJ(e)&&tJ(e)==QTe}var MJ=Object.prototype,$Te=MJ.hasOwnProperty,eEe=MJ.propertyIsEnumerable,NJ=jJ(function(){return arguments}())?jJ:function(e){return nJ(e)&&$Te.call(e,`callee`)&&!eEe.call(e,`callee`)};function tEe(){return!1}var PJ=typeof e==`object`&&e&&!e.nodeType&&e,FJ=PJ&&typeof module==`object`&&module&&!module.nodeType&&module,IJ=FJ&&FJ.exports===PJ?Xq.Buffer:void 0,LJ=(IJ?IJ.isBuffer:void 0)||tEe,nEe=`[object Arguments]`,rEe=`[object Array]`,iEe=`[object Boolean]`,aEe=`[object Date]`,oEe=`[object Error]`,sEe=`[object Function]`,cEe=`[object Map]`,lEe=`[object Number]`,uEe=`[object Object]`,dEe=`[object RegExp]`,fEe=`[object Set]`,pEe=`[object String]`,mEe=`[object WeakMap]`,hEe=`[object ArrayBuffer]`,gEe=`[object DataView]`,_Ee=`[object Float32Array]`,vEe=`[object Float64Array]`,yEe=`[object Int8Array]`,bEe=`[object Int16Array]`,xEe=`[object Int32Array]`,SEe=`[object Uint8Array]`,CEe=`[object Uint8ClampedArray]`,wEe=`[object Uint16Array]`,TEe=`[object Uint32Array]`,RJ={};RJ[_Ee]=RJ[vEe]=RJ[yEe]=RJ[bEe]=RJ[xEe]=RJ[SEe]=RJ[CEe]=RJ[wEe]=RJ[TEe]=!0,RJ[nEe]=RJ[rEe]=RJ[hEe]=RJ[iEe]=RJ[gEe]=RJ[aEe]=RJ[oEe]=RJ[sEe]=RJ[cEe]=RJ[lEe]=RJ[uEe]=RJ[dEe]=RJ[fEe]=RJ[pEe]=RJ[mEe]=!1;function EEe(e){return nJ(e)&&OJ(e.length)&&!!RJ[tJ(e)]}function zJ(e){return function(t){return e(t)}}var BJ=typeof e==`object`&&e&&!e.nodeType&&e,VJ=BJ&&typeof module==`object`&&module&&!module.nodeType&&module,HJ=VJ&&VJ.exports===BJ&&Yq.process,UJ=function(){try{return VJ&&VJ.require&&VJ.require(`util`).types||HJ&&HJ.binding&&HJ.binding(`util`)}catch{}}(),WJ=UJ&&UJ.isTypedArray,GJ=WJ?zJ(WJ):EEe,DEe=Object.prototype.hasOwnProperty;function KJ(e,t){var n=aJ(e),r=!n&&NJ(e),i=!n&&!r&&LJ(e),a=!n&&!r&&!i&&GJ(e),o=n||r||i||a,s=o?ZTe(e.length,String):[],c=s.length;for(var l in e)(t||DEe.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||SJ(l,c)))&&s.push(l);return s}function qJ(e,t){return function(n){return e(t(n))}}var OEe=qJ(Object.keys,Object),kEe=Object.prototype.hasOwnProperty;function AEe(e){if(!AJ(e))return OEe(e);var t=[];for(var n in Object(e))kEe.call(e,n)&&n!=`constructor`&&t.push(n);return t}function JJ(e){return kJ(e)?KJ(e):AEe(e)}function jEe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var MEe=Object.prototype.hasOwnProperty;function NEe(e){if(!lJ(e))return jEe(e);var t=AJ(e),n=[];for(var r in e)r==`constructor`&&(t||!MEe.call(e,r))||n.push(r);return n}function YJ(e){return kJ(e)?KJ(e,!0):NEe(e)}var PEe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FEe=/^\w*$/;function XJ(e,t){if(aJ(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||rJ(e)?!0:FEe.test(e)||!PEe.test(e)||t!=null&&e in Object(t)}var ZJ=vJ(Object,`create`);function IEe(){this.__data__=ZJ?ZJ(null):{},this.size=0}function LEe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var REe=`__lodash_hash_undefined__`,zEe=Object.prototype.hasOwnProperty;function BEe(e){var t=this.__data__;if(ZJ){var n=t[e];return n===REe?void 0:n}return zEe.call(t,e)?t[e]:void 0}var VEe=Object.prototype.hasOwnProperty;function HEe(e){var t=this.__data__;return ZJ?t[e]!==void 0:VEe.call(t,e)}var UEe=`__lodash_hash_undefined__`;function WEe(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=ZJ&&t===void 0?UEe:t,this}function QJ(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}QJ.prototype.clear=IEe,QJ.prototype.delete=LEe,QJ.prototype.get=BEe,QJ.prototype.has=HEe,QJ.prototype.set=WEe;function GEe(){this.__data__=[],this.size=0}function $J(e,t){for(var n=e.length;n--;)if(wJ(e[n][0],t))return n;return-1}var KEe=Array.prototype.splice;function qEe(e){var t=this.__data__,n=$J(t,e);return n<0?!1:(n==t.length-1?t.pop():KEe.call(t,n,1),--this.size,!0)}function JEe(e){var t=this.__data__,n=$J(t,e);return n<0?void 0:t[n][1]}function YEe(e){return $J(this.__data__,e)>-1}function XEe(e,t){var n=this.__data__,r=$J(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function eY(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}eY.prototype.clear=GEe,eY.prototype.delete=qEe,eY.prototype.get=JEe,eY.prototype.has=YEe,eY.prototype.set=XEe;var tY=vJ(Xq,`Map`);function ZEe(){this.size=0,this.__data__={hash:new QJ,map:new(tY||eY),string:new QJ}}function QEe(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function nY(e,t){var n=e.__data__;return QEe(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function $Ee(e){var t=nY(this,e).delete(e);return this.size-=+!!t,t}function eDe(e){return nY(this,e).get(e)}function tDe(e){return nY(this,e).has(e)}function nDe(e,t){var n=nY(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function rY(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rY.prototype.clear=ZEe,rY.prototype.delete=$Ee,rY.prototype.get=eDe,rY.prototype.has=tDe,rY.prototype.set=nDe;var rDe=`Expected a function`;function iY(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(rDe);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(iY.Cache||rY),n}iY.Cache=rY;var iDe=500;function aDe(e){var t=iY(e,function(e){return n.size===iDe&&n.clear(),e}),n=t.cache;return t}var oDe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sDe=/\\(\\)?/g,cDe=aDe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(oDe,function(e,n,r,i){t.push(r?i.replace(sDe,`$1`):n||e)}),t});function lDe(e){return e==null?``:cJ(e)}function aY(e,t){return aJ(e)?e:XJ(e,t)?[e]:cDe(lDe(e))}var uDe=1/0;function oY(e){if(typeof e==`string`||rJ(e))return e;var t=e+``;return t==`0`&&1/e==-uDe?`-0`:t}function sY(e,t){t=aY(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[oY(t[n++])];return n&&n==r?e:void 0}function cY(e,t,n){var r=e==null?void 0:sY(e,t);return r===void 0?n:r}function lY(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var uY=Zq?Zq.isConcatSpreadable:void 0;function dDe(e){return aJ(e)||NJ(e)||!!(uY&&e&&e[uY])}function dY(e,t,n,r,i){var a=-1,o=e.length;for(n||=dDe,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?dY(s,t-1,n,r,i):lY(i,s):r||(i[i.length]=s)}return i}function fDe(e){return e!=null&&e.length?dY(e,1):[]}function fY(e){return HTe(JTe(e,void 0,fDe),e+``)}var pY=qJ(Object.getPrototypeOf,Object),pDe=`[object Object]`,mDe=Function.prototype,hDe=Object.prototype,mY=mDe.toString,gDe=hDe.hasOwnProperty,_De=mY.call(Object);function hY(e){if(!nJ(e)||tJ(e)!=pDe)return!1;var t=pY(e);if(t===null)return!0;var n=gDe.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&mY.call(n)==_De}function vDe(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function gY(){if(!arguments.length)return[];var e=arguments[0];return aJ(e)?e:[e]}function yDe(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function _Y(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=dJ(n),n=n===n?n:0),t!==void 0&&(t=dJ(t),t=t===t?t:0),yDe(dJ(e),t,n)}function bDe(){this.__data__=new eY,this.size=0}function xDe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function SDe(e){return this.__data__.get(e)}function CDe(e){return this.__data__.has(e)}var wDe=200;function TDe(e,t){var n=this.__data__;if(n instanceof eY){var r=n.__data__;if(!tY||r.length<wDe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new rY(r)}return n.set(e,t),this.size=n.size,this}function vY(e){var t=this.__data__=new eY(e);this.size=t.size}vY.prototype.clear=bDe,vY.prototype.delete=xDe,vY.prototype.get=SDe,vY.prototype.has=CDe,vY.prototype.set=TDe;function EDe(e,t){return e&&EJ(t,JJ(t),e)}function DDe(e,t){return e&&EJ(t,YJ(t),e)}var yY=typeof e==`object`&&e&&!e.nodeType&&e,bY=yY&&typeof module==`object`&&module&&!module.nodeType&&module,xY=bY&&bY.exports===yY?Xq.Buffer:void 0,SY=xY?xY.allocUnsafe:void 0;function ODe(e,t){if(t)return e.slice();var n=e.length,r=SY?SY(n):new e.constructor(n);return e.copy(r),r}function kDe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function CY(){return[]}var ADe=Object.prototype.propertyIsEnumerable,wY=Object.getOwnPropertySymbols,TY=wY?function(e){return e==null?[]:(e=Object(e),kDe(wY(e),function(t){return ADe.call(e,t)}))}:CY;function jDe(e,t){return EJ(e,TY(e),t)}var EY=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)lY(t,TY(e)),e=pY(e);return t}:CY;function MDe(e,t){return EJ(e,EY(e),t)}function DY(e,t,n){var r=t(e);return aJ(e)?r:lY(r,n(e))}function OY(e){return DY(e,JJ,TY)}function kY(e){return DY(e,YJ,EY)}var AY=vJ(Xq,`DataView`),jY=vJ(Xq,`Promise`),MY=vJ(Xq,`Set`),NY=`[object Map]`,NDe=`[object Object]`,PY=`[object Promise]`,FY=`[object Set]`,IY=`[object WeakMap]`,LY=`[object DataView]`,PDe=_J(AY),FDe=_J(tY),IDe=_J(jY),LDe=_J(MY),RDe=_J(yJ),RY=tJ;(AY&&RY(new AY(new ArrayBuffer(1)))!=LY||tY&&RY(new tY)!=NY||jY&&RY(jY.resolve())!=PY||MY&&RY(new MY)!=FY||yJ&&RY(new yJ)!=IY)&&(RY=function(e){var t=tJ(e),n=t==NDe?e.constructor:void 0,r=n?_J(n):``;if(r)switch(r){case PDe:return LY;case FDe:return NY;case IDe:return PY;case LDe:return FY;case RDe:return IY}return t});var zY=RY,zDe=Object.prototype.hasOwnProperty;function BDe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&zDe.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var BY=Xq.Uint8Array;function VY(e){var t=new e.constructor(e.byteLength);return new BY(t).set(new BY(e)),t}function VDe(e,t){var n=t?VY(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var HDe=/\w*$/;function UDe(e){var t=new e.constructor(e.source,HDe.exec(e));return t.lastIndex=e.lastIndex,t}var HY=Zq?Zq.prototype:void 0,UY=HY?HY.valueOf:void 0;function WDe(e){return UY?Object(UY.call(e)):{}}function GDe(e,t){var n=t?VY(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var KDe=`[object Boolean]`,qDe=`[object Date]`,JDe=`[object Map]`,YDe=`[object Number]`,XDe=`[object RegExp]`,ZDe=`[object Set]`,QDe=`[object String]`,$De=`[object Symbol]`,eOe=`[object ArrayBuffer]`,tOe=`[object DataView]`,nOe=`[object Float32Array]`,rOe=`[object Float64Array]`,iOe=`[object Int8Array]`,aOe=`[object Int16Array]`,oOe=`[object Int32Array]`,sOe=`[object Uint8Array]`,cOe=`[object Uint8ClampedArray]`,lOe=`[object Uint16Array]`,uOe=`[object Uint32Array]`;function dOe(e,t,n){var r=e.constructor;switch(t){case eOe:return VY(e);case KDe:case qDe:return new r(+e);case tOe:return VDe(e,n);case nOe:case rOe:case iOe:case aOe:case oOe:case sOe:case cOe:case lOe:case uOe:return GDe(e,n);case JDe:return new r;case YDe:case QDe:return new r(e);case XDe:return UDe(e);case ZDe:return new r;case $De:return WDe(e)}}function fOe(e){return typeof e.constructor==`function`&&!AJ(e)?PTe(pY(e)):{}}var pOe=`[object Map]`;function mOe(e){return nJ(e)&&zY(e)==pOe}var WY=UJ&&UJ.isMap,hOe=WY?zJ(WY):mOe,gOe=`[object Set]`;function _Oe(e){return nJ(e)&&zY(e)==gOe}var GY=UJ&&UJ.isSet,vOe=GY?zJ(GY):_Oe,yOe=1,bOe=2,xOe=4,KY=`[object Arguments]`,SOe=`[object Array]`,COe=`[object Boolean]`,wOe=`[object Date]`,TOe=`[object Error]`,qY=`[object Function]`,EOe=`[object GeneratorFunction]`,DOe=`[object Map]`,OOe=`[object Number]`,JY=`[object Object]`,kOe=`[object RegExp]`,AOe=`[object Set]`,jOe=`[object String]`,MOe=`[object Symbol]`,NOe=`[object WeakMap]`,POe=`[object ArrayBuffer]`,FOe=`[object DataView]`,IOe=`[object Float32Array]`,LOe=`[object Float64Array]`,ROe=`[object Int8Array]`,zOe=`[object Int16Array]`,BOe=`[object Int32Array]`,VOe=`[object Uint8Array]`,HOe=`[object Uint8ClampedArray]`,UOe=`[object Uint16Array]`,WOe=`[object Uint32Array]`,YY={};YY[KY]=YY[SOe]=YY[POe]=YY[FOe]=YY[COe]=YY[wOe]=YY[IOe]=YY[LOe]=YY[ROe]=YY[zOe]=YY[BOe]=YY[DOe]=YY[OOe]=YY[JY]=YY[kOe]=YY[AOe]=YY[jOe]=YY[MOe]=YY[VOe]=YY[HOe]=YY[UOe]=YY[WOe]=!0,YY[TOe]=YY[qY]=YY[NOe]=!1;function XY(e,t,n,r,i,a){var o,s=t&yOe,c=t&bOe,l=t&xOe;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!lJ(e))return e;var u=aJ(e);if(u){if(o=BDe(e),!s)return ITe(e,o)}else{var d=zY(e),f=d==qY||d==EOe;if(LJ(e))return ODe(e,s);if(d==JY||d==KY||f&&!i){if(o=c||f?{}:fOe(e),!s)return c?MDe(e,DDe(o,e)):jDe(e,EDe(o,e))}else{if(!YY[d])return i?e:{};o=dOe(e,d,s)}}a||=new vY;var p=a.get(e);if(p)return p;a.set(e,o),vOe(e)?e.forEach(function(r){o.add(XY(r,t,n,r,e,a))}):hOe(e)&&e.forEach(function(r,i){o.set(i,XY(r,t,n,i,e,a))});var m=u?void 0:(l?c?kY:OY:c?YJ:JJ)(e);return UTe(m||e,function(r,i){m&&(i=r,r=e[i]),TJ(o,i,XY(r,t,n,i,e,a))}),o}var GOe=1,KOe=4;function ZY(e){return XY(e,GOe|KOe)}var qOe=`__lodash_hash_undefined__`;function JOe(e){return this.__data__.set(e,qOe),this}function YOe(e){return this.__data__.has(e)}function QY(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new rY;++t<n;)this.add(e[t])}QY.prototype.add=QY.prototype.push=JOe,QY.prototype.has=YOe;function XOe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ZOe(e,t){return e.has(t)}var QOe=1,$Oe=2;function $Y(e,t,n,r,i,a){var o=n&QOe,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&$Oe?new QY:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!XOe(t,function(e,t){if(!ZOe(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function eke(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function tke(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var nke=1,rke=2,ike=`[object Boolean]`,ake=`[object Date]`,oke=`[object Error]`,ske=`[object Map]`,cke=`[object Number]`,lke=`[object RegExp]`,uke=`[object Set]`,dke=`[object String]`,fke=`[object Symbol]`,pke=`[object ArrayBuffer]`,mke=`[object DataView]`,eX=Zq?Zq.prototype:void 0,tX=eX?eX.valueOf:void 0;function hke(e,t,n,r,i,a,o){switch(n){case mke:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pke:return!(e.byteLength!=t.byteLength||!a(new BY(e),new BY(t)));case ike:case ake:case cke:return wJ(+e,+t);case oke:return e.name==t.name&&e.message==t.message;case lke:case dke:return e==t+``;case ske:var s=eke;case uke:var c=r&nke;if(s||=tke,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=rke,o.set(e,t);var u=$Y(s(e),s(t),r,i,a,o);return o.delete(e),u;case fke:if(tX)return tX.call(e)==tX.call(t)}return!1}var gke=1,_ke=Object.prototype.hasOwnProperty;function vke(e,t,n,r,i,a){var o=n&gke,s=OY(e),c=s.length;if(c!=OY(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:_ke.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var yke=1,nX=`[object Arguments]`,rX=`[object Array]`,iX=`[object Object]`,aX=Object.prototype.hasOwnProperty;function bke(e,t,n,r,i,a){var o=aJ(e),s=aJ(t),c=o?rX:zY(e),l=s?rX:zY(t);c=c==nX?iX:c,l=l==nX?iX:l;var u=c==iX,d=l==iX,f=c==l;if(f&&LJ(e)){if(!LJ(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new vY,o||GJ(e)?$Y(e,t,n,r,i,a):hke(e,t,c,n,r,i,a);if(!(n&yke)){var p=u&&aX.call(e,`__wrapped__`),m=d&&aX.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new vY,i(h,g,n,r,a)}}return f?(a||=new vY,vke(e,t,n,r,i,a)):!1}function oX(e,t,n,r,i){return e===t?!0:e==null||t==null||!nJ(e)&&!nJ(t)?e!==e&&t!==t:bke(e,t,n,r,oX,i)}var xke=1,Ske=2;function Cke(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new vY;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?oX(u,l,xke|Ske,r,d):f))return!1}}return!0}function sX(e){return e===e&&!lJ(e)}function wke(e){for(var t=JJ(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,sX(i)]}return t}function cX(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function Tke(e){var t=wke(e);return t.length==1&&t[0][2]?cX(t[0][0],t[0][1]):function(n){return n===e||Cke(n,e,t)}}function Eke(e,t){return e!=null&&t in Object(e)}function Dke(e,t,n){t=aY(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=oY(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&OJ(i)&&SJ(o,i)&&(aJ(e)||NJ(e)))}function lX(e,t){return e!=null&&Dke(e,t,Eke)}var Oke=1,kke=2;function Ake(e,t){return XJ(e)&&sX(t)?cX(oY(e),t):function(n){var r=cY(n,e);return r===void 0&&r===t?lX(n,e):oX(t,r,Oke|kke)}}function jke(e){return function(t){return t?.[e]}}function Mke(e){return function(t){return sY(t,e)}}function Nke(e){return XJ(e)?jke(oY(e)):Mke(e)}function Pke(e){return typeof e==`function`?e:e==null?pJ:typeof e==`object`?aJ(e)?Ake(e[0],e[1]):Tke(e):Nke(e)}function Fke(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Ike=Math.max,Lke=Math.min;function Rke(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=r-1;return n!==void 0&&(i=vTe(n),i=n<0?Ike(r+i,0):Lke(i,r-1)),WTe(e,Pke(t,3),i,!0)}var zke=1/0;function Bke(e){return e!=null&&e.length?dY(e,zke):[]}function uX(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];CJ(r,i[0],i[1])}return r}function Vke(e,t){return t.length<2?e:sY(e,vDe(t,0,-1))}function dX(e,t){return oX(e,t)}function fX(e){return e==null}function Hke(e){return e===void 0}var Uke=Object.prototype.hasOwnProperty;function Wke(e,t){t=aY(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=oY(t[n]);if(i===`__proto__`&&!Uke.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=Vke(e,t);return a==null||delete a[oY(Fke(t))]}function Gke(e){return hY(e)?void 0:e}var Kke=1,qke=2,Jke=4,pX=fY(function(e,t){var n={};if(e==null)return n;var r=!1;t=iJ(t,function(t){return t=aY(t,e),r||=t.length>1,t}),EJ(e,kY(e),n),r&&(n=XY(n,Kke|qke|Jke,Gke));for(var i=t.length;i--;)Wke(n,t[i]);return n});function Yke(e,t,n,r){if(!lJ(e))return e;t=aY(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=oY(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=lJ(u)?u:SJ(t[i+1])?[]:{})}TJ(s,c,l),s=s[c]}return e}function Xke(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=sY(e,o);n(s,o)&&Yke(a,aY(o,e),s)}return a}function Zke(e,t){return Xke(e,t,function(t,n){return lX(e,n)})}var mX=fY(function(e,t){return e==null?{}:Zke(e,t)}),hX=e=>e===void 0,gX=e=>typeof e==`boolean`,_X=e=>typeof e==`number`,vX=e=>!e&&e!==0||Uq(e)&&e.length===0||Kq(e)&&!Object.keys(e).length,yX=e=>typeof Element>`u`?!1:e instanceof Element,bX=e=>fX(e),Qke=e=>Gq(e)?!Number.isNaN(Number(e)):!1,xX=new Map;if(Tq){let e;document.addEventListener(`mousedown`,t=>e=t),document.addEventListener(`mouseup`,t=>{if(e){for(let n of xX.values())for(let{documentHandler:r}of n)r(t,e);e=void 0}})}function SX(e,t){let n=[];return Uq(t.arg)?n=t.arg:yX(t.arg)&&n.push(t.arg),function(r,i){let a=t.instance.popperRef,o=r.target,s=i?.target,c=!t||!t.instance,l=!o||!s,u=e.contains(o)||e.contains(s),d=e===o,f=n.length&&n.some(e=>e?.contains(o))||n.length&&n.includes(s),p=a&&(a.contains(o)||a.contains(s));c||l||u||d||f||p||t.value(r,i)}}var CX={beforeMount(e,t){xX.has(e)||xX.set(e,[]),xX.get(e).push({documentHandler:SX(e,t),bindingFn:t.value})},updated(e,t){xX.has(e)||xX.set(e,[]);let n=xX.get(e),r=n.findIndex(e=>e.bindingFn===t.oldValue),i={documentHandler:SX(e,t),bindingFn:t.value};r>=0?n.splice(r,1,i):n.push(i)},unmounted(e){xX.delete(e)}},$ke=e=>typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot,wX=e=>typeof Element>`u`?!1:e instanceof Element,TX=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute(`tabIndex`)!==null)return!0;if(e.tabIndex<0||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`)return!1;switch(e.nodeName){case`A`:return!!e.href&&e.rel!==`ignore`;case`INPUT`:return e.type!==`hidden`&&e.type!==`file`;case`BUTTON`:case`SELECT`:case`TEXTAREA`:return!0;default:return!1}},EX=e=>!e.getAttribute(`aria-owns`),DX=(e,t,n)=>{let{parentNode:r}=e;if(!r)return null;let i=r.querySelectorAll(n);return i[Array.prototype.indexOf.call(i,e)+t]||null},OX=(e,t)=>{if(!e||!e.focus)return;let n=!1;wX(e)&&!TX(e)&&!e.getAttribute(`tabindex`)&&(e.setAttribute(`tabindex`,`-1`),n=!0),e.focus(t),wX(e)&&n&&e.removeAttribute(`tabindex`)},kX=e=>{e&&(OX(e),!EX(e)&&e.click())},AX=(e,t,{checkForDefaultPrevented:n=!0}={})=>r=>{let i=e?.(r);if(n===!1||!i)return t?.(r)},jX=e=>t=>t.pointerType===`mouse`?e(t):void 0,MX=e=>{if(e.code&&e.code!==`Unidentified`)return e.code;let t=eAe(e);if(t){if(Object.values(_q).includes(t))return t;switch(t){case` `:return _q.space;default:return``}}return``},eAe=e=>{let t=e.key&&e.key!==`Unidentified`?e.key:``;if(!t&&e.type===`keyup`&&Uwe()){let n=e.target;t=n.value.charAt(n.selectionStart-1)}return t},NX=e=>Object.keys(e),tAe=`__epPropKey`,Z=e=>e,nAe=e=>Kq(e)&&!!e.__epPropKey,PX=(e,n)=>{if(!Kq(e)||nAe(e))return e;let{values:r,required:i,default:a,type:o,validator:s}=e,c={type:o,required:!!i,validator:r||s?i=>{let o=!1,c=[];if(r&&(c=Array.from(r),Hq(e,`default`)&&c.push(a),o||=c.includes(i)),s&&(o||=s(i)),!o&&c.length>0){let e=[...new Set(c)].map(e=>JSON.stringify(e)).join(`, `);(0,t.warn)(`Invalid prop: validation failed${n?` for prop "${n}"`:``}. Expected one of [${e}], got value ${JSON.stringify(i)}.`)}return o}:void 0,[tAe]:!0};return Hq(e,`default`)&&(c.default=a),c},FX=e=>uX(Object.entries(e).map(([e,t])=>[e,PX(t,e)])),IX=class extends Error{constructor(e){super(e),this.name=`ElementPlusError`}};function LX(e,t){throw new IX(`[${e}] ${t}`)}function RX(e,t){{let n=Gq(e)?new IX(`[${e}] ${t}`):e;console.warn(n)}}var rAe=[`class`,`style`],iAe=/^on[A-Z]/,aAe=(e={})=>{let{excludeListeners:n=!1,excludeKeys:r}=e,i=(0,t.computed)(()=>(r?.value||[]).concat(rAe)),a=(0,t.getCurrentInstance)();return a?(0,t.computed)(()=>uX(Object.entries(a.proxy?.$attrs).filter(([e])=>!i.value.includes(e)&&!(n&&iAe.test(e))))):(RX(`use-attrs`,`getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function`),(0,t.computed)(()=>({})))};function oAe(){let e=(0,t.shallowRef)(),n=(0,t.ref)(0),r=(0,t.computed)(()=>({minWidth:`${Math.max(n.value,11)}px`}));return zq(e,()=>{n.value=e.value?.getBoundingClientRect().width??0}),{calculatorRef:e,calculatorWidth:n,inputStyle:r}}var zX=({from:e,replacement:n,scope:r,version:i,ref:a,type:o=`API`},s)=>{(0,t.watch)(()=>(0,t.unref)(s),t=>{t&&RX(r,`[${o}] ${e} is about to be deprecated in version ${i}, please use ${n} instead.
1251
1251
  For more detail, please visit: ${a}
1252
1252
  `)},{immediate:!0})},sAe=(e=``)=>e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`),cAe=`utils/dom/style`,BX=(e=``)=>e.split(` `).filter(e=>!!e.trim()),lAe=(e,t)=>{if(!e||!t)return!1;if(t.includes(` `))throw Error(`className should not contain space.`);return e.classList.contains(t)},VX=(e,t)=>{!e||!t.trim()||e.classList.add(...BX(t))},HX=(e,t)=>{!e||!t.trim()||e.classList.remove(...BX(t))},UX=(e,t)=>{if(!Tq||!e||!t||$ke(e))return``;let n=Ywe(t);n===`float`&&(n=`cssFloat`);try{let t=e.style[n];if(t)return t;let r=document.defaultView?.getComputedStyle(e,``);return r?r[n]:``}catch{return e.style[n]}};function WX(e,t=`px`){if(!e&&e!==0)return``;if(_X(e)||Qke(e))return`${e}${t}`;if(Gq(e))return e;RX(cAe,`binding value must be a string or number`)}var uAe={name:`en`,el:{breadcrumb:{label:`Breadcrumb`},colorpicker:{confirm:`OK`,clear:`Clear`,defaultLabel:`color picker`,description:`current color is {color}. press enter to select a new color.`,alphaLabel:`pick alpha value`,alphaDescription:`alpha {alpha}, current color is {color}`,hueLabel:`pick hue value`,hueDescription:`hue {hue}, current color is {color}`,svLabel:`pick saturation and brightness value`,svDescription:`saturation {saturation}, brightness {brightness}, current color is {color}`,predefineDescription:`select {value} as the color`},datepicker:{now:`Now`,today:`Today`,cancel:`Cancel`,clear:`Clear`,confirm:`OK`,dateTablePrompt:`Use the arrow keys and enter to select the day of the month`,monthTablePrompt:`Use the arrow keys and enter to select the month`,quarterTablePrompt:`Use the arrow keys and enter to select the quarter`,yearTablePrompt:`Use the arrow keys and enter to select the year`,selectedDate:`Selected date`,selectDate:`Select date`,selectTime:`Select time`,startDate:`Start Date`,startTime:`Start Time`,endDate:`End Date`,endTime:`End Time`,prevYear:`Previous Year`,nextYear:`Next Year`,prevMonth:`Previous Month`,nextMonth:`Next Month`,year:``,month1:`January`,month2:`February`,month3:`March`,month4:`April`,month5:`May`,month6:`June`,month7:`July`,month8:`August`,month9:`September`,month10:`October`,month11:`November`,month12:`December`,weeks:{sun:`Sun`,mon:`Mon`,tue:`Tue`,wed:`Wed`,thu:`Thu`,fri:`Fri`,sat:`Sat`},weeksFull:{sun:`Sunday`,mon:`Monday`,tue:`Tuesday`,wed:`Wednesday`,thu:`Thursday`,fri:`Friday`,sat:`Saturday`},months:{jan:`Jan`,feb:`Feb`,mar:`Mar`,apr:`Apr`,may:`May`,jun:`Jun`,jul:`Jul`,aug:`Aug`,sep:`Sep`,oct:`Oct`,nov:`Nov`,dec:`Dec`}},input:{characters:`{count} / {max} characters`},inputNumber:{decrease:`decrease number`,increase:`increase number`},select:{loading:`Loading`,noMatch:`No matching data`,noData:`No data`,placeholder:`Select`},mention:{loading:`Loading`},dropdown:{toggleDropdown:`Toggle Dropdown`},cascader:{noMatch:`No matching data`,loading:`Loading`,placeholder:`Select`,noData:`No data`},pagination:{goto:`Go to`,pagesize:`/page`,total:`Total {total}`,pageClassifier:``,page:`Page`,prev:`Go to previous page`,next:`Go to next page`,currentPage:`page {pager}`,prevPages:`Previous {pager} pages`,nextPages:`Next {pager} pages`,deprecationWarning:`Deprecated usages detected, please refer to the el-pagination documentation for more details`},dialog:{close:`Close this dialog`},drawer:{close:`Close this dialog`},messagebox:{title:`Message`,confirm:`OK`,cancel:`Cancel`,error:`Illegal input`,close:`Close this dialog`},upload:{deleteTip:`press delete to remove`,delete:`Delete`,preview:`Preview`,continue:`Continue`},slider:{defaultLabel:`slider between {min} and {max}`,defaultRangeStartLabel:`pick start value`,defaultRangeEndLabel:`pick end value`},table:{emptyText:`No Data`,confirmFilter:`Confirm`,resetFilter:`Reset`,clearFilter:`All`,sumText:`Sum`,selectAllLabel:`Select all rows`,selectRowLabel:`Select this row`,expandRowLabel:`Expand this row`,collapseRowLabel:`Collapse this row`,sortLabel:`Sort by {column}`,filterLabel:`Filter by {column}`},tag:{close:`Close this tag`},tour:{next:`Next`,previous:`Previous`,finish:`Finish`,close:`Close this dialog`},tree:{emptyText:`No Data`},transfer:{noMatch:`No matching data`,noData:`No data`,titles:[`List 1`,`List 2`],filterPlaceholder:`Enter keyword`,noCheckedFormat:`{total} items`,hasCheckedFormat:`{checked}/{total} checked`},image:{error:`FAILED`},pageHeader:{title:`Back`},popconfirm:{confirmButtonText:`Yes`,cancelButtonText:`No`},carousel:{leftArrow:`Carousel arrow left`,rightArrow:`Carousel arrow right`,indicator:`Carousel switch to index {index}`},inputOTP:{groupLabel:`OTP Input`,defaultLabel:`Please enter OTP character {index}`}}},dAe=e=>(n,r)=>fAe(n,r,(0,t.unref)(e)),fAe=(e,t,n)=>cY(n,e,e).replace(/\{(\w+)\}/g,(e,n)=>`${t?.[n]??`{${n}}`}`),pAe=e=>({lang:(0,t.computed)(()=>(0,t.unref)(e).name),locale:(0,t.isRef)(e)?e:(0,t.ref)(e),t:dAe(e)}),GX=Symbol(`localeContextKey`),KX=e=>{let n=e||(0,t.inject)(GX,(0,t.ref)());return pAe((0,t.computed)(()=>n.value||uAe))},mAe=`is-`,qX=(e,t,n,r,i)=>{let a=`${e}-${t}`;return n&&(a+=`-${n}`),r&&(a+=`__${r}`),i&&(a+=`--${i}`),a},JX=Symbol(`namespaceContextKey`),YX=e=>{let n=e||((0,t.getCurrentInstance)()?(0,t.inject)(JX,(0,t.ref)(`el`)):(0,t.ref)(`el`));return(0,t.computed)(()=>(0,t.unref)(n)||`el`)},XX=(e,t)=>{let n=YX(t);return{namespace:n,b:(t=``)=>qX(n.value,e,t,``,``),e:t=>t?qX(n.value,e,``,t,``):``,m:t=>t?qX(n.value,e,``,``,t):``,be:(t,r)=>t&&r?qX(n.value,e,t,r,``):``,em:(t,r)=>t&&r?qX(n.value,e,``,t,r):``,bm:(t,r)=>t&&r?qX(n.value,e,t,``,r):``,bem:(t,r,i)=>t&&r&&i?qX(n.value,e,t,r,i):``,is:(e,...t)=>{let n=t.length>=1?t[0]:!0;return e&&n?`${mAe}${e}`:``},cssVar:e=>{let t={};for(let r in e)e[r]&&(t[`--${n.value}-${r}`]=e[r]);return t},cssVarName:e=>`--${n.value}-${e}`,cssVarBlock:t=>{let r={};for(let i in t)t[i]&&(r[`--${n.value}-${e}-${i}`]=t[i]);return r},cssVarBlockName:t=>`--${n.value}-${e}-${t}`}},ZX=e=>Tq?window.requestAnimationFrame(e):setTimeout(e,16),QX=e=>Tq?window.cancelAnimationFrame(e):clearTimeout(e),$X,hAe=e=>{if(!Tq)return 0;if($X!==void 0)return $X;let t=document.createElement(`div`);t.className=`${e}-scrollbar__wrap`,t.style.visibility=`hidden`,t.style.width=`100px`,t.style.position=`absolute`,t.style.top=`-9999px`,document.body.appendChild(t);let n=t.offsetWidth;t.style.overflow=`scroll`;let r=document.createElement(`div`);r.style.width=`100%`,t.appendChild(r);let i=r.offsetWidth;return t.parentNode?.removeChild(t),$X=n-i,$X};function eZ(e,t){if(!Tq)return;if(!t){e.scrollTop=0;return}let n=[],r=t.offsetParent;for(;r!==null&&e!==r&&e.contains(r);)n.push(r),r=r.offsetParent;let i=t.offsetTop+n.reduce((e,t)=>e+t.offsetTop,0),a=i+t.offsetHeight,o=e.scrollTop,s=o+e.clientHeight;i<o?e.scrollTop=i:a>s&&(e.scrollTop=a-e.clientHeight)}var gAe=(e,n={})=>{(0,t.isRef)(e)||LX(`[useLockscreen]`,`You need to pass a ref param to this function`);let r=n.ns||XX(`popup`),i=(0,t.computed)(()=>r.bm(`parent`,`hidden`)),a=0,o=!1,s=`0`,c=!1,l=()=>{c||(c=!0,setTimeout(()=>{typeof document>`u`||o&&document&&(document.body.style.width=s,HX(document.body,i.value))},200))};(0,t.watch)(e,e=>{if(!e){l();return}c=!1,o=!lAe(document.body,i.value),o&&(s=document.body.style.width,VX(document.body,i.value)),a=hAe(r.namespace.value);let t=document.documentElement.clientHeight<document.body.scrollHeight,n=UX(document.body,`overflowY`);a>0&&(t||n===`scroll`)&&o&&(document.body.style.width=`calc(100% - ${a}px)`)}),(0,t.onScopeDispose)(()=>l())},_Ae=PX({type:Z(Boolean),default:null}),vAe=PX({type:Z(Function)}),tZ=e=>{let n=`update:${e}`,r=`onUpdate:${e}`,i=[n];return{useModelToggle:({indicator:i,toggleReason:a,shouldHideWhenRouteChanges:o,shouldProceed:s,onShow:c,onHide:l})=>{let u=(0,t.getCurrentInstance)(),{emit:d}=u,f=u.props,p=(0,t.computed)(()=>Wq(f[r])),m=(0,t.computed)(()=>f[e]===null),h=e=>{i.value!==!0&&(i.value=!0,a&&(a.value=e),Wq(c)&&c(e))},g=e=>{i.value!==!1&&(i.value=!1,a&&(a.value=e),Wq(l)&&l(e))},_=e=>{if(f.disabled===!0||Wq(s)&&!s())return;let t=p.value&&Tq;t&&d(n,!0),(m.value||!t)&&h(e)},v=e=>{if(f.disabled===!0||!Tq)return;let t=p.value&&Tq;t&&d(n,!1),(m.value||!t)&&g(e)},y=e=>{gX(e)&&(f.disabled&&e?p.value&&d(n,!1):i.value!==e&&(e?h():g()))};return(0,t.watch)(()=>f[e],y),o&&u.appContext.config.globalProperties.$route!==void 0&&(0,t.watch)(()=>({...u.proxy.$route}),()=>{o.value&&i.value&&v()}),(0,t.onMounted)(()=>{y(f[e])}),{hide:v,show:_,toggle:()=>{i.value?v():_()},hasUpdateHandler:p}},useModelToggleProps:{[e]:_Ae,[r]:vAe},useModelToggleEmits:i}},{useModelToggle:yAe,useModelToggleProps:bAe,useModelToggleEmits:xAe}=tZ(`modelValue`),nZ=e=>{let n=(0,t.getCurrentInstance)();return(0,t.computed)(()=>n?.proxy?.$props?.[e])},rZ=`bottom`,iZ=`right`,aZ=`left`,SAe=`auto`,oZ=[`top`,rZ,iZ,aZ],sZ=`start`,CAe=`clippingParents`,wAe=`viewport`,cZ=`popper`,TAe=`reference`,lZ=oZ.reduce(function(e,t){return e.concat([t+`-`+sZ,t+`-end`])},[]),uZ=[].concat(oZ,[SAe]).reduce(function(e,t){return e.concat([t,t+`-`+sZ,t+`-end`])},[]),EAe=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function dZ(e){return e?(e.nodeName||``).toLowerCase():null}function fZ(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pZ(e){return e instanceof fZ(e).Element||e instanceof Element}function mZ(e){return e instanceof fZ(e).HTMLElement||e instanceof HTMLElement}function hZ(e){return typeof ShadowRoot>`u`?!1:e instanceof fZ(e).ShadowRoot||e instanceof ShadowRoot}function DAe(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!mZ(i)||!dZ(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function OAe(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!mZ(r)||!dZ(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var gZ={name:`applyStyles`,enabled:!0,phase:`write`,fn:DAe,effect:OAe,requires:[`computeStyles`]};function _Z(e){return e.split(`-`)[0]}var vZ=Math.max,yZ=Math.min,bZ=Math.round;function xZ(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function SZ(){return!/^((?!chrome|android).)*safari/i.test(xZ())}function CZ(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&mZ(e)&&(i=e.offsetWidth>0&&bZ(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&bZ(r.height)/e.offsetHeight||1);var o=(pZ(e)?fZ(e):window).visualViewport,s=!SZ()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function wZ(e){var t=CZ(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function TZ(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&hZ(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function EZ(e){return fZ(e).getComputedStyle(e)}function kAe(e){return[`table`,`td`,`th`].indexOf(dZ(e))>=0}function DZ(e){return((pZ(e)?e.ownerDocument:e.document)||window.document).documentElement}function OZ(e){return dZ(e)===`html`?e:e.assignedSlot||e.parentNode||(hZ(e)?e.host:null)||DZ(e)}function kZ(e){return!mZ(e)||EZ(e).position===`fixed`?null:e.offsetParent}function AAe(e){var t=/firefox/i.test(xZ());if(/Trident/i.test(xZ())&&mZ(e)&&EZ(e).position===`fixed`)return null;var n=OZ(e);for(hZ(n)&&(n=n.host);mZ(n)&&[`html`,`body`].indexOf(dZ(n))<0;){var r=EZ(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function AZ(e){for(var t=fZ(e),n=kZ(e);n&&kAe(n)&&EZ(n).position===`static`;)n=kZ(n);return n&&(dZ(n)===`html`||dZ(n)===`body`&&EZ(n).position===`static`)?t:n||AAe(e)||t}function jZ(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function MZ(e,t,n){return vZ(e,yZ(t,n))}function jAe(e,t,n){var r=MZ(e,t,n);return r>n?n:r}function NZ(){return{top:0,right:0,bottom:0,left:0}}function PZ(e){return Object.assign({},NZ(),e)}function FZ(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var MAe=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,PZ(typeof e==`number`?FZ(e,oZ):e)};function NAe(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=_Z(n.placement),c=jZ(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=MAe(i.padding,n),d=wZ(a),f=c===`y`?`top`:aZ,p=c===`y`?rZ:iZ,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=AZ(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=MZ(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function PAe(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||TZ(t.elements.popper,r)&&(t.elements.arrow=r))}var FAe={name:`arrow`,enabled:!0,phase:`main`,fn:NAe,effect:PAe,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function IZ(e){return e.split(`-`)[1]}var IAe={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function LAe(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:bZ(n*i)/i||0,y:bZ(r*i)/i||0}}function LZ(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=aZ,b=`top`,x=window;if(l){var S=AZ(n),C=`clientHeight`,w=`clientWidth`;if(S===fZ(n)&&(S=DZ(n),EZ(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=rZ;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=iZ;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&IAe),O=u===!0?LAe({x:p,y:h},fZ(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function RAe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:_Z(t.placement),variation:IZ(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,LZ(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,LZ(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var RZ={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:RAe,data:{}},zZ={passive:!0};function zAe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=fZ(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,zZ)}),s&&c.addEventListener(`resize`,n.update,zZ),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,zZ)}),s&&c.removeEventListener(`resize`,n.update,zZ)}}var BZ={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:zAe,data:{}},BAe={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function VZ(e){return e.replace(/left|right|bottom|top/g,function(e){return BAe[e]})}var VAe={start:`end`,end:`start`};function HZ(e){return e.replace(/start|end/g,function(e){return VAe[e]})}function UZ(e){var t=fZ(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function WZ(e){return CZ(DZ(e)).left+UZ(e).scrollLeft}function HAe(e,t){var n=fZ(e),r=DZ(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=SZ();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+WZ(e),y:c}}function UAe(e){var t=DZ(e),n=UZ(e),r=e.ownerDocument?.body,i=vZ(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=vZ(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+WZ(e),s=-n.scrollTop;return EZ(r||t).direction===`rtl`&&(o+=vZ(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function GZ(e){var t=EZ(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function KZ(e){return[`html`,`body`,`#document`].indexOf(dZ(e))>=0?e.ownerDocument.body:mZ(e)&&GZ(e)?e:KZ(OZ(e))}function qZ(e,t){t===void 0&&(t=[]);var n=KZ(e),r=n===e.ownerDocument?.body,i=fZ(n),a=r?[i].concat(i.visualViewport||[],GZ(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(qZ(OZ(a)))}function JZ(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function WAe(e,t){var n=CZ(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function YZ(e,t,n){return t===`viewport`?JZ(HAe(e,n)):pZ(t)?WAe(t,n):JZ(UAe(DZ(e)))}function GAe(e){var t=qZ(OZ(e)),n=[`absolute`,`fixed`].indexOf(EZ(e).position)>=0&&mZ(e)?AZ(e):e;return pZ(n)?t.filter(function(e){return pZ(e)&&TZ(e,n)&&dZ(e)!==`body`}):[]}function KAe(e,t,n,r){var i=t===`clippingParents`?GAe(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=YZ(e,n,r);return t.top=vZ(i.top,t.top),t.right=yZ(i.right,t.right),t.bottom=yZ(i.bottom,t.bottom),t.left=vZ(i.left,t.left),t},YZ(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function XZ(e){var t=e.reference,n=e.element,r=e.placement,i=r?_Z(r):null,a=r?IZ(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case rZ:c={x:o,y:t.y+t.height};break;case iZ:c={x:t.x+t.width,y:s};break;case aZ:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?jZ(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case sZ:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2)}}return c}function ZZ(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?CAe:s,l=n.rootBoundary,u=l===void 0?wAe:l,d=n.elementContext,f=d===void 0?cZ:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=PZ(typeof g==`number`?FZ(g,oZ):g),v=f===`popper`?TAe:cZ,y=e.rects.popper,b=e.elements[m?v:f],x=KAe(pZ(b)?b:b.contextElement||DZ(e.elements.popper),c,u,o),S=CZ(e.elements.reference),C=XZ({reference:S,element:y,placement:i}),w=JZ(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function qAe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?uZ:c,u=IZ(r),d=u?s?lZ:lZ.filter(function(e){return IZ(e)===u}):oZ,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=ZZ(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[_Z(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function JAe(e){if(_Z(e)===`auto`)return[];var t=VZ(e);return[HZ(e),t,HZ(t)]}function YAe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=_Z(g)===g,v=c||(_||!m?[VZ(g)]:JAe(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(_Z(n)===`auto`?qAe(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],D=_Z(E),O=IZ(E)===sZ,k=[`top`,rZ].indexOf(D)>=0,A=k?`width`:`height`,j=ZZ(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),M=k?O?iZ:aZ:O?rZ:`top`;b[A]>x[A]&&(M=VZ(M));var N=VZ(M),P=[];if(a&&P.push(j[D]<=0),s&&P.push(j[M]<=0,j[N]<=0),P.every(function(e){return e})){w=E,C=!1;break}S.set(E,P)}if(C)for(var F=m?3:1,I=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},L=F;L>0&&I(L)!==`break`;L--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var XAe={name:`flip`,enabled:!0,phase:`main`,fn:YAe,requiresIfExists:[`offset`],data:{_skip:!1}};function QZ(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function $Z(e){return[`top`,iZ,rZ,aZ].some(function(t){return e[t]>=0})}function ZAe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=ZZ(t,{elementContext:`reference`}),s=ZZ(t,{altBoundary:!0}),c=QZ(o,r),l=QZ(s,i,a),u=$Z(c),d=$Z(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var QAe={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:ZAe};function $Ae(e,t,n){var r=_Z(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function eje(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=uZ.reduce(function(e,n){return e[n]=$Ae(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var tje={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:eje};function nje(e){var t=e.state,n=e.name;t.modifiersData[n]=XZ({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var eQ={name:`popperOffsets`,enabled:!0,phase:`read`,fn:nje,data:{}};function rje(e){return e===`x`?`y`:`x`}function ije(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=ZZ(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=_Z(t.placement),v=IZ(t.placement),y=!v,b=jZ(_),x=rje(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:aZ,A=b===`y`?rZ:iZ,j=b===`y`?`height`:`width`,M=S[b],N=M+g[k],P=M-g[A],F=p?-w[j]/2:0,I=v===`start`?C[j]:w[j],L=v===`start`?-w[j]:-C[j],R=t.elements.arrow,z=p&&R?wZ(R):{width:0,height:0},B=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:NZ(),V=B[k],H=B[A],U=MZ(0,C[j],z[j]),W=y?C[j]/2-F-U-V-E.mainAxis:I-U-V-E.mainAxis,G=y?-C[j]/2+F+U+H+E.mainAxis:L+U+H+E.mainAxis,K=t.elements.arrow&&AZ(t.elements.arrow),q=K?b===`y`?K.clientTop||0:K.clientLeft||0:0,ee=D?.[b]??0,te=M+W-ee-q,ne=M+G-ee,re=MZ(p?yZ(N,te):N,M,p?vZ(P,ne):P);S[b]=re,O[b]=re-M}if(s){var ie=b===`x`?`top`:aZ,ae=b===`x`?rZ:iZ,oe=S[x],se=x===`y`?`height`:`width`,ce=oe+g[ie],le=oe-g[ae],ue=[`top`,aZ].indexOf(_)!==-1,de=D?.[x]??0,fe=ue?ce:oe-C[se]-w[se]-de+E.altAxis,pe=ue?oe+C[se]+w[se]-de-E.altAxis:le,me=p&&ue?jAe(fe,oe,pe):MZ(p?fe:ce,oe,p?pe:le);S[x]=me,O[x]=me-oe}t.modifiersData[r]=O}}var aje={name:`preventOverflow`,enabled:!0,phase:`main`,fn:ije,requiresIfExists:[`offset`]};function oje(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function sje(e){return e===fZ(e)||!mZ(e)?UZ(e):oje(e)}function cje(e){var t=e.getBoundingClientRect(),n=bZ(t.width)/e.offsetWidth||1,r=bZ(t.height)/e.offsetHeight||1;return n!==1||r!==1}function lje(e,t,n){n===void 0&&(n=!1);var r=mZ(t),i=mZ(t)&&cje(t),a=DZ(t),o=CZ(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((dZ(t)!==`body`||GZ(a))&&(s=sje(t)),mZ(t)?(c=CZ(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=WZ(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function uje(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function dje(e){var t=uje(e);return EAe.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function fje(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function pje(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var tQ={placement:`bottom`,modifiers:[],strategy:`absolute`};function nQ(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function rQ(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?tQ:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},tQ,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:pZ(e)?qZ(e):e.contextElement?qZ(e.contextElement):[],popper:qZ(t)};var s=dje(pje([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(nQ(t,n)){i.rects={reference:lje(t,AZ(n),i.options.strategy===`fixed`),popper:wZ(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++){if(i.reset===!0){i.reset=!1,r=-1;continue}var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:fje(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!nQ(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}rQ(),rQ({defaultModifiers:[BZ,eQ,RZ,gZ]});var mje=rQ({defaultModifiers:[BZ,eQ,RZ,gZ,tje,XAe,aje,FAe,QAe]}),hje=(e,n,r={})=>{let i={name:`updateState`,enabled:!0,phase:`write`,fn:({state:e})=>{let t=gje(e);Object.assign(s.value,t)},requires:[`computeStyles`]},a=(0,t.computed)(()=>{let{onFirstUpdate:e,placement:n,strategy:a,modifiers:o}=(0,t.unref)(r);return{onFirstUpdate:e,placement:n||`bottom`,strategy:a||`absolute`,modifiers:[...o||[],i,{name:`applyStyles`,enabled:!1}]}}),o=(0,t.shallowRef)(),s=(0,t.ref)({styles:{popper:{position:(0,t.unref)(a).strategy,left:`0`,top:`0`},arrow:{position:`absolute`}},attributes:{}}),c=()=>{o.value&&=(o.value.destroy(),void 0)};return(0,t.watch)(a,e=>{let n=(0,t.unref)(o);n&&n.setOptions(e)},{deep:!0}),(0,t.watch)([e,n],([e,n])=>{c(),!(!e||!n)&&(o.value=mje(e,n,(0,t.unref)(a)))}),(0,t.onBeforeUnmount)(()=>{c()}),{state:(0,t.computed)(()=>({...(0,t.unref)(o)?.state||{}})),styles:(0,t.computed)(()=>(0,t.unref)(s).styles),attributes:(0,t.computed)(()=>(0,t.unref)(s).attributes),update:()=>(0,t.unref)(o)?.update(),forceUpdate:()=>(0,t.unref)(o)?.forceUpdate(),instanceRef:(0,t.computed)(()=>(0,t.unref)(o))}};function gje(e){let t=Object.keys(e.elements);return{styles:uX(t.map(t=>[t,e.styles[t]||{}])),attributes:uX(t.map(t=>[t,e.attributes[t]]))}}var _je=e=>{if(!e)return{onClick:Vq,onMousedown:Vq,onMouseup:Vq};let t=!1,n=!1;return{onClick:r=>{t&&n&&e(r),t=n=!1},onMousedown:e=>{t=e.target===e.currentTarget},onMouseup:e=>{n=e.target===e.currentTarget}}};function iQ(){let e,t=(t,r)=>{n(),e=globalThis.setTimeout(t,r)},n=()=>{e!==void 0&&(globalThis.clearTimeout(e),e=void 0)};return Cq(()=>n()),{registerTimeout:t,cancelTimeout:n}}var aQ={prefix:Math.floor(Math.random()*1e4),current:0},vje=Symbol(`elIdInjection`),oQ=()=>(0,t.getCurrentInstance)()?(0,t.inject)(vje,aQ):aQ,sQ=e=>{let n=oQ();!Tq&&n===aQ&&RX(`IdInjection`,`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
1253
1253
  usage: app.provide(ID_INJECTION_KEY, {