"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[5200],{55200:(e,o,r)=>{r.r(o),r.d(o,{breadcrumbsClasses:()=>v,default:()=>R,getBreadcrumbsUtilityClass:()=>S});var t=r(30984),l=r(55559),s=r(66204),a=(r(5356),r(56317)),n=r(58029),c=r(42142),i=r(61125),p=r(57369),d=r(80013),m=r(73330),u=r(50968),h=r(43188);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 b=r(42870);const f=["slots","slotProps"],x=(0,i.ZP)(b.Z)((({theme:e})=>(0,t.Z)({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},"light"===e.palette.mode?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":(0,t.Z)({},"light"===e.palette.mode?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":(0,t.Z)({boxShadow:e.shadows[0]},"light"===e.palette.mode?{backgroundColor:(0,m._4)(e.palette.grey[200],.12)}:{backgroundColor:(0,m._4)(e.palette.grey[600],.12)})}))),C=(0,i.ZP)(g)({width:24,height:16}),Z=function(e){const{slots:o={},slotProps:r={}}=e,s=(0,l.Z)(e,f),a=e;return(0,h.jsx)("li",{children:(0,h.jsx)(x,(0,t.Z)({focusRipple:!0},s,{ownerState:a,children:(0,h.jsx)(C,(0,t.Z)({as:o.CollapsedIcon,ownerState:a},r.collapsedIcon))}))})};var w=r(58109),y=r(95201);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)=>[{[`& .${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,r,t){return e.reduce(((l,s,a)=>(a<e.length-1?l=l.concat(s,(0,h.jsx)(P,{"aria-hidden":!0,className:o,ownerState:t,children:r},`separator-${a}`)):l.push(s),l)),[])}const R=s.forwardRef((function(e,o){const r=(0,p.Z)({props:e,name:"MuiBreadcrumbs"}),{children:i,className:d,component:m="nav",slots:u={},slotProps:g={},expandText:b="Show path",itemsAfterCollapse:f=1,itemsBeforeCollapse:x=1,maxItems:C=8,separator:w="/"}=r,y=(0,l.Z)(r,j),[v,P]=s.useState(!1),R=(0,t.Z)({},r,{component:m,expanded:v,expandText:b,itemsAfterCollapse:f,itemsBeforeCollapse:x,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}),T=s.useRef(null),_=s.Children.toArray(i).filter((e=>s.isValidElement(e))).map(((e,o)=>(0,h.jsx)("li",{className:M.li,children:e},`child-${o}`)));return(0,h.jsx)(k,(0,t.Z)({ref:o,component:m,color:"text.secondary",className:(0,a.Z)(M.root,d),ownerState:R},y,{children:(0,h.jsx)(I,{className:M.ol,ref:T,ownerState:R,children:B(v||C&&_.length<=C?_:(e=>x+f>=e.length?e:[...e.slice(0,x),(0,h.jsx)(Z,{"aria-label":b,slots:{CollapsedIcon:u.CollapsedIcon},slotProps:{collapsedIcon:N},onClick:()=>{P(!0);const e=T.current.querySelector("a[href],button,[tabindex]");e&&e.focus()}},"ellipsis"),...e.slice(e.length-f,e.length)])(_),M.separator,w,R)})}))}))}}]);
//# sourceMappingURL=5200.629cb9b4.chunk.js.map