"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[8539],{78539:(e,o,t)=>{t.r(o),t.d(o,{breadcrumbsClasses:()=>v,default:()=>R,getBreadcrumbsUtilityClass:()=>S});var r=t(7896),s=t(31461),a=t(41867),l=(t(47617),t(66184)),n=t(92705),c=t(14034),i=t(75693),p=t(90293),d=t(51590),m=t(71939),u=t(17886),h=t(80838);const g=(0,u.Z)((0,h.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz");var f=t(15543);const x=["slots","slotProps"],b=(0,i.ZP)(f.Z)((e=>{let{theme:o}=e;return(0,r.Z)({display:"flex",marginLeft:"calc(".concat(o.spacing(1)," * 0.5)"),marginRight:"calc(".concat(o.spacing(1)," * 0.5)")},"light"===o.palette.mode?{backgroundColor:o.palette.grey[100],color:o.palette.grey[700]}:{backgroundColor:o.palette.grey[700],color:o.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":(0,r.Z)({},"light"===o.palette.mode?{backgroundColor:o.palette.grey[200]}:{backgroundColor:o.palette.grey[600]}),"&:active":(0,r.Z)({boxShadow:o.shadows[0]},"light"===o.palette.mode?{backgroundColor:(0,m._4)(o.palette.grey[200],.12)}:{backgroundColor:(0,m._4)(o.palette.grey[600],.12)})})})),C=(0,i.ZP)(g)({width:24,height:16});const Z=function(e){const{slots:o={},slotProps:t={}}=e,a=(0,s.Z)(e,x),l=e;return(0,h.jsx)("li",{children:(0,h.jsx)(b,(0,r.Z)({focusRipple:!0},a,{ownerState:l,children:(0,h.jsx)(C,(0,r.Z)({as:o.CollapsedIcon,ownerState:l},t.collapsedIcon))}))})};var w=t(70101),y=t(88498);function S(e){return(0,y.Z)("MuiBreadcrumbs",e)}const v=(0,w.Z)("MuiBreadcrumbs",["root","ol","li","separator"]),j=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],k=(0,i.ZP)(d.Z,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,o)=>[{["& .".concat(v.li)]:o.li},o.root]})({}),I=(0,i.ZP)("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,o)=>o.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),P=(0,i.ZP)("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,o)=>o.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function B(e,o,t,r){return e.reduce(((s,a,l)=>(l<e.length-1?s=s.concat(a,(0,h.jsx)(P,{"aria-hidden":!0,className:o,ownerState:r,children:t},"separator-".concat(l))):s.push(a),s)),[])}const R=a.forwardRef((function(e,o){const t=(0,p.Z)({props:e,name:"MuiBreadcrumbs"}),{children:i,className:d,component:m="nav",slots:u={},slotProps:g={},expandText:f="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:b=1,maxItems:C=8,separator:w="/"}=t,y=(0,s.Z)(t,j),[v,P]=a.useState(!1),R=(0,r.Z)({},t,{component:m,expanded:v,expandText:f,itemsAfterCollapse:x,itemsBeforeCollapse:b,maxItems:C,separator:w}),M=(e=>{const{classes:o}=e;return(0,n.Z)({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},S,o)})(R),N=(0,c.y)({elementType:u.CollapsedIcon,externalSlotProps:g.collapsedIcon,ownerState:R}),_=a.useRef(null),z=a.Children.toArray(i).filter((e=>a.isValidElement(e))).map(((e,o)=>(0,h.jsx)("li",{className:M.li,children:e},"child-".concat(o))));return(0,h.jsx)(k,(0,r.Z)({ref:o,component:m,color:"text.secondary",className:(0,l.Z)(M.root,d),ownerState:R},y,{children:(0,h.jsx)(I,{className:M.ol,ref:_,ownerState:R,children:B(v||C&&z.length<=C?z:(e=>b+x>=e.length?e:[...e.slice(0,b),(0,h.jsx)(Z,{"aria-label":f,slots:{CollapsedIcon:u.CollapsedIcon},slotProps:{collapsedIcon:N},onClick:()=>{P(!0);const e=_.current.querySelector("a[href],button,[tabindex]");e&&e.focus()}},"ellipsis"),...e.slice(e.length-x,e.length)])(z),M.separator,w,R)})}))}))}}]);
//# sourceMappingURL=8539.86f0a344.chunk.js.map