"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[2655],{2655:(e,o,r)=>{r.r(o),r.d(o,{breadcrumbsClasses:()=>A,default:()=>I,getBreadcrumbsUtilityClass:()=>w});var t=r(7552),a=r(93878),l=r(75100),s=r(7798),n=r(80317),c=r(50864),i=r(61282),p=r(62266),d=r(21928),u=r(29772),m=r(69500);const g=(0,u.A)((0,m.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 h=r(43124);const b=(0,n.Ay)(h.A,{name:"MuiBreadcrumbCollapsed"})((0,d.A)(({theme:e})=>({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":{..."light"===e.palette.mode?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}},"&:active":{boxShadow:e.shadows[0],..."light"===e.palette.mode?{backgroundColor:(0,p.tL)(e.palette.grey[200],.12)}:{backgroundColor:(0,p.tL)(e.palette.grey[600],.12)}}}))),f=(0,n.Ay)(g)({width:24,height:16}),x=function(e){const{slots:o={},slotProps:r={},...t}=e,a=e;return(0,m.jsx)("li",{children:(0,m.jsx)(b,{focusRipple:!0,...t,ownerState:a,children:(0,m.jsx)(f,{as:o.CollapsedIcon,ownerState:a,...r.collapsedIcon})})})};var y=r(51062),C=r(2958);function w(e){return(0,C.Ay)("MuiBreadcrumbs",e)}const A=(0,y.A)("MuiBreadcrumbs",["root","ol","li","separator"]),S=(0,n.Ay)(i.A,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,o)=>[{[`& .${A.li}`]:o.li},o.root]})({}),j=(0,n.Ay)("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),k=(0,n.Ay)("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function B(e,o,r,t){return e.reduce((a,l,s)=>(s<e.length-1?a=a.concat(l,(0,m.jsx)(k,{"aria-hidden":!0,className:o,ownerState:t,children:r},`separator-${s}`)):a.push(l),a),[])}const I=t.forwardRef(function(e,o){const r=(0,c.b)({props:e,name:"MuiBreadcrumbs"}),{children:n,className:i,component:p="nav",slots:d={},slotProps:u={},expandText:g="Show path",itemsAfterCollapse:h=1,itemsBeforeCollapse:b=1,maxItems:f=8,separator:y="/",...C}=r,[A,k]=t.useState(!1),I={...r,component:p,expanded:A,expandText:g,itemsAfterCollapse:h,itemsBeforeCollapse:b,maxItems:f,separator:y},M=(e=>{const{classes:o}=e;return(0,l.A)({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},w,o)})(I),v=(0,s.A)({elementType:d.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:I}),R=t.useRef(null),N=t.Children.toArray(n).filter(e=>t.isValidElement(e)).map((e,o)=>(0,m.jsx)("li",{className:M.li,children:e},`child-${o}`));return(0,m.jsx)(S,{ref:o,component:p,color:"textSecondary",className:(0,a.A)(M.root,i),ownerState:I,...C,children:(0,m.jsx)(j,{className:M.ol,ref:R,ownerState:I,children:B(A||f&&N.length<=f?N:(e=>b+h>=e.length?e:[...e.slice(0,b),(0,m.jsx)(x,{"aria-label":g,slots:{CollapsedIcon:d.CollapsedIcon},slotProps:{collapsedIcon:v},onClick:()=>{k(!0);const e=R.current.querySelector("a[href],button,[tabindex]");e&&e.focus()}},"ellipsis"),...e.slice(e.length-h,e.length)])(N),M.separator,y,I)})})})}}]);
//# sourceMappingURL=2655.a7c033f8.chunk.js.map