view x/static/js/1110.702cba94.chunk.js @ 125:49f3d3878413 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author fubar
date Sat, 05 Oct 2024 23:58:05 +0000
parents
children
line wrap: on
line source

"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[1110],{91110:(e,t,o)=>{o.r(t),o.d(t,{default:()=>Y,getTabsUtilityClass:()=>I,tabsClasses:()=>T});var r=o(7552),l=(o(19487),o(93878)),n=o(70799),s=o(93876),a=o(1045),i=o(51148),c=o(48231),d=o(60129),u=o(4785),b=o(987);function f(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var h=o(82910),p=o(46689),v=o(69500);const S={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var m=o(129),w=o(20168),y=o(48054),A=o(33761),g=o(85693);function B(e){return(0,g.Ay)("MuiTabScrollButton",e)}const x=(0,A.A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),C=(0,i.Ay)(y.A,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.orientation&&t[o.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${x.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),M=r.forwardRef((function(e,t){const o=(0,u.b)({props:e,name:"MuiTabScrollButton"}),{className:r,slots:i={},slotProps:c={},direction:d,orientation:b,disabled:f,...h}=o,p=(0,s.I)(),S={isRtl:p,...o},y=(e=>{const{classes:t,orientation:o,disabled:r}=e,l={root:["root",o,r&&"disabled"]};return(0,n.A)(l,B,t)})(S),A=i.StartScrollButtonIcon??m.A,g=i.EndScrollButtonIcon??w.A,x=(0,a.A)({elementType:A,externalSlotProps:c.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S}),M=(0,a.A)({elementType:g,externalSlotProps:c.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S});return(0,v.jsx)(C,{component:"div",className:(0,l.A)(y.root,r),ref:t,role:null,ownerState:S,tabIndex:null,...h,style:{...h.style,..."vertical"===b&&{"--TabScrollButton-svgRotate":`rotate(${p?-90:90}deg)`}},children:"left"===d?(0,v.jsx)(A,{...x}):(0,v.jsx)(g,{...M})})}));var E=o(87422);function I(e){return(0,g.Ay)("MuiTabs",e)}const T=(0,A.A)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);var R=o(6676);const k=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,z=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,L=(e,t,o)=>{let r=!1,l=o(e,t);for(;l;){if(l===e.firstChild){if(r)return;r=!0}const t=l.disabled||"true"===l.getAttribute("aria-disabled");if(l.hasAttribute("tabindex")&&!t)return void l.focus();l=o(e,l)}},j=(0,i.Ay)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[{[`& .${T.scrollButtons}`]:t.scrollButtons},{[`& .${T.scrollButtons}`]:o.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,o.vertical&&t.vertical]}})((0,d.A)((({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${T.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]})))),N=(0,i.Ay)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.scroller,o.fixed&&t.fixed,o.hideScrollbar&&t.hideScrollbar,o.scrollableX&&t.scrollableX,o.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),P=(0,i.Ay)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.flexContainer,o.vertical&&t.flexContainerVertical,o.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),X=(0,i.Ay)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((0,d.A)((({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]})))),H=(0,i.Ay)((function(e){const{onChange:t,...o}=e,l=r.useRef(),n=r.useRef(null),s=()=>{l.current=n.current.offsetHeight-n.current.clientHeight};return(0,h.A)((()=>{const e=(0,b.A)((()=>{const e=l.current;s(),e!==l.current&&t(l.current)})),o=(0,p.A)(n.current);return o.addEventListener("resize",e),()=>{e.clear(),o.removeEventListener("resize",e)}}),[t]),r.useEffect((()=>{s(),t(l.current)}),[t]),(0,v.jsx)("div",{style:S,ref:n,...o})}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),W={},Y=r.forwardRef((function(e,t){const o=(0,u.b)({props:e,name:"MuiTabs"}),i=(0,c.A)(),d=(0,s.I)(),{"aria-label":h,"aria-labelledby":S,action:m,centered:w=!1,children:y,className:A,component:g="div",allowScrollButtonsMobile:B=!1,indicatorColor:x="primary",onChange:C,orientation:T="horizontal",ScrollButtonComponent:Y=M,scrollButtons:D="auto",selectionFollowsFocus:F,slots:O={},slotProps:$={},TabIndicatorProps:V={},TabScrollButtonProps:_={},textColor:q="primary",value:K,variant:U="standard",visibleScrollbar:G=!1,...J}=o,Q="scrollable"===U,Z="vertical"===T,ee=Z?"scrollTop":"scrollLeft",te=Z?"top":"left",oe=Z?"bottom":"right",re=Z?"clientHeight":"clientWidth",le=Z?"height":"width",ne={...o,component:g,allowScrollButtonsMobile:B,indicatorColor:x,orientation:T,vertical:Z,scrollButtons:D,textColor:q,variant:U,visibleScrollbar:G,fixed:!Q,hideScrollbar:Q&&!G,scrollableX:Q&&!Z,scrollableY:Q&&Z,centered:w&&!Q,scrollButtonsHideMobile:!B},se=(e=>{const{vertical:t,fixed:o,hideScrollbar:r,scrollableX:l,scrollableY:s,centered:a,scrollButtonsHideMobile:i,classes:c}=e,d={root:["root",t&&"vertical"],scroller:["scroller",o&&"fixed",r&&"hideScrollbar",l&&"scrollableX",s&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",i&&"scrollButtonsHideMobile"],scrollableX:[l&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return(0,n.A)(d,I,c)})(ne),ae=(0,a.A)({elementType:O.StartScrollButtonIcon,externalSlotProps:$.startScrollButtonIcon,ownerState:ne}),ie=(0,a.A)({elementType:O.EndScrollButtonIcon,externalSlotProps:$.endScrollButtonIcon,ownerState:ne}),[ce,de]=r.useState(!1),[ue,be]=r.useState(W),[fe,he]=r.useState(!1),[pe,ve]=r.useState(!1),[Se,me]=r.useState(!1),[we,ye]=r.useState({overflow:"hidden",scrollbarWidth:0}),Ae=new Map,ge=r.useRef(null),Be=r.useRef(null),xe=()=>{const e=ge.current;let t,o;if(e){const o=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:o.top,bottom:o.bottom,left:o.left,right:o.right}}if(e&&!1!==K){const e=Be.current.children;if(e.length>0){const t=e[Ae.get(K)];o=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:o}},Ce=(0,E.A)((()=>{const{tabsMeta:e,tabMeta:t}=xe();let o,r=0;Z?(o="top",t&&e&&(r=t.top-e.top+e.scrollTop)):(o=d?"right":"left",t&&e&&(r=(d?-1:1)*(t[o]-e[o]+e.scrollLeft)));const l={[o]:r,[le]:t?t[le]:0};if("number"!=typeof ue[o]||"number"!=typeof ue[le])be(l);else{const e=Math.abs(ue[o]-l[o]),t=Math.abs(ue[le]-l[le]);(e>=1||t>=1)&&be(l)}})),Me=(e,{animation:t=!0}={})=>{t?function(e,t,o,r={},l=()=>{}){const{ease:n=f,duration:s=300}=r;let a=null;const i=t[e];let c=!1;const d=r=>{if(c)return void l(new Error("Animation cancelled"));null===a&&(a=r);const u=Math.min(1,(r-a)/s);t[e]=n(u)*(o-i)+i,u>=1?requestAnimationFrame((()=>{l(null)})):requestAnimationFrame(d)};i===o?l(new Error("Element already at target position")):requestAnimationFrame(d)}(ee,ge.current,e,{duration:i.transitions.duration.standard}):ge.current[ee]=e},Ee=e=>{let t=ge.current[ee];t+=Z?e:e*(d?-1:1),Me(t)},Ie=()=>{const e=ge.current[re];let t=0;const o=Array.from(Be.current.children);for(let r=0;r<o.length;r+=1){const l=o[r];if(t+l[re]>e){0===r&&(t=e);break}t+=l[re]}return t},Te=()=>{Ee(-1*Ie())},Re=()=>{Ee(Ie())},ke=r.useCallback((e=>{ye({overflow:null,scrollbarWidth:e})}),[]),ze=(0,E.A)((e=>{const{tabsMeta:t,tabMeta:o}=xe();if(o&&t)if(o[te]<t[te]){const r=t[ee]+(o[te]-t[te]);Me(r,{animation:e})}else if(o[oe]>t[oe]){const r=t[ee]+(o[oe]-t[oe]);Me(r,{animation:e})}})),Le=(0,E.A)((()=>{Q&&!1!==D&&me(!Se)}));r.useEffect((()=>{const e=(0,b.A)((()=>{ge.current&&Ce()}));let t;const o=(0,p.A)(ge.current);let r;return o.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(Be.current.children).forEach((e=>{t.observe(e)}))),"undefined"!=typeof MutationObserver&&(r=new MutationObserver((o=>{o.forEach((e=>{e.removedNodes.forEach((e=>{t?.unobserve(e)})),e.addedNodes.forEach((e=>{t?.observe(e)}))})),e(),Le()})),r.observe(Be.current,{childList:!0})),()=>{e.clear(),o.removeEventListener("resize",e),r?.disconnect(),t?.disconnect()}}),[Ce,Le]),r.useEffect((()=>{const e=Array.from(Be.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&Q&&!1!==D){const o=e[0],r=e[t-1],l={root:ge.current,threshold:.99},n=new IntersectionObserver((e=>{he(!e[0].isIntersecting)}),l);n.observe(o);const s=new IntersectionObserver((e=>{ve(!e[0].isIntersecting)}),l);return s.observe(r),()=>{n.disconnect(),s.disconnect()}}}),[Q,D,Se,y?.length]),r.useEffect((()=>{de(!0)}),[]),r.useEffect((()=>{Ce()})),r.useEffect((()=>{ze(W!==ue)}),[ze,ue]),r.useImperativeHandle(m,(()=>({updateIndicator:Ce,updateScrollButtons:Le})),[Ce,Le]);const je=(0,v.jsx)(X,{...V,className:(0,l.A)(se.indicator,V.className),ownerState:ne,style:{...ue,...V.style}});let Ne=0;const Pe=r.Children.map(y,(e=>{if(!r.isValidElement(e))return null;const t=void 0===e.props.value?Ne:e.props.value;Ae.set(t,Ne);const o=t===K;return Ne+=1,r.cloneElement(e,{fullWidth:"fullWidth"===U,indicator:o&&!ce&&je,selected:o,selectionFollowsFocus:F,onChange:C,textColor:q,value:t,...1!==Ne||!1!==K||e.props.tabIndex?{}:{tabIndex:0}})})),Xe=(()=>{const e={};e.scrollbarSizeListener=Q?(0,v.jsx)(H,{onChange:ke,className:(0,l.A)(se.scrollableX,se.hideScrollbar)}):null;const t=Q&&("auto"===D&&(fe||pe)||!0===D);return e.scrollButtonStart=t?(0,v.jsx)(Y,{slots:{StartScrollButtonIcon:O.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:ae},orientation:T,direction:d?"right":"left",onClick:Te,disabled:!fe,..._,className:(0,l.A)(se.scrollButtons,_.className)}):null,e.scrollButtonEnd=t?(0,v.jsx)(Y,{slots:{EndScrollButtonIcon:O.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ie},orientation:T,direction:d?"left":"right",onClick:Re,disabled:!pe,..._,className:(0,l.A)(se.scrollButtons,_.className)}):null,e})();return(0,v.jsxs)(j,{className:(0,l.A)(se.root,A),ownerState:ne,ref:t,as:g,...J,children:[Xe.scrollButtonStart,Xe.scrollbarSizeListener,(0,v.jsxs)(N,{className:se.scroller,ownerState:ne,style:{overflow:we.overflow,[Z?"margin"+(d?"Left":"Right"):"marginBottom"]:G?void 0:-we.scrollbarWidth},ref:ge,children:[(0,v.jsx)(P,{"aria-label":h,"aria-labelledby":S,"aria-orientation":"vertical"===T?"vertical":null,className:se.flexContainer,ownerState:ne,onKeyDown:e=>{const t=Be.current,o=(0,R.A)(t).activeElement;if("tab"!==o.getAttribute("role"))return;let r="horizontal"===T?"ArrowLeft":"ArrowUp",l="horizontal"===T?"ArrowRight":"ArrowDown";switch("horizontal"===T&&d&&(r="ArrowRight",l="ArrowLeft"),e.key){case r:e.preventDefault(),L(t,o,z);break;case l:e.preventDefault(),L(t,o,k);break;case"Home":e.preventDefault(),L(t,null,k);break;case"End":e.preventDefault(),L(t,null,z)}},ref:Be,role:"tablist",children:Pe}),ce&&je]}),Xe.scrollButtonEnd]})}))},129:(e,t,o)=>{o.d(t,{A:()=>n}),o(7552);var r=o(74893),l=o(69500);const n=(0,r.A)((0,l.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},20168:(e,t,o)=>{o.d(t,{A:()=>n}),o(7552);var r=o(74893),l=o(69500);const n=(0,r.A)((0,l.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")}}]);
//# sourceMappingURL=1110.702cba94.chunk.js.map