@jbrowse/react-circular-genome-view2 3.6.0 → 3.6.2

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.
@@ -225,5 +225,5 @@
225
225
  }
226
226
  `,S="string"!=typeof w?s.AH`
227
227
  animation: ${w} 3s infinite linear;
228
- `:null,A=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?(0,a.a)(e.palette[t].main,.62):(0,a.e$)(e.palette[t].main,.5),O=(0,c.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${(0,p.A)(r.color)}`],t[r.variant]]}})((0,u.A)(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter((0,f.A)()).map(([t])=>({props:{color:t},style:{backgroundColor:A(e,t)}})),{props:({ownerState:e})=>"inherit"===e.color&&"buffer"!==e.variant,style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),x=(0,c.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.dashed,t[`dashedColor${(0,p.A)(r.color)}`]]}})((0,u.A)(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter((0,f.A)()).map(([t])=>{const r=A(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`}}})]})),S||{animation:`${w} 3s infinite linear`}),k=(0,c.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.bar,t.bar1,t[`barColor${(0,p.A)(r.color)}`],("indeterminate"===r.variant||"query"===r.variant)&&t.bar1Indeterminate,"determinate"===r.variant&&t.bar1Determinate,"buffer"===r.variant&&t.bar1Buffer]}})((0,u.A)(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter((0,f.A)()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:"transform .4s linear"}},{props:{variant:"buffer"},style:{zIndex:1,transition:"transform .4s linear"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:b||{animation:`${y} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),C=(0,c.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.bar,t.bar2,t[`barColor${(0,p.A)(r.color)}`],("indeterminate"===r.variant||"query"===r.variant)&&t.bar2Indeterminate,"buffer"===r.variant&&t.bar2Buffer]}})((0,u.A)(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter((0,f.A)()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"!==e.color,style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"===e.color,style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter((0,f.A)()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:A(e,t),transition:"transform .4s linear"}})),{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:g||{animation:`${v} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),P=n.forwardRef(function(e,t){const r=(0,d.b)({props:e,name:"MuiLinearProgress"}),{className:n,color:a="primary",value:s,valueBuffer:c,variant:u="indeterminate",...f}=r,y={...r,color:a,variant:u},b=(e=>{const{classes:t,variant:r,color:n}=e,o={root:["root",`color${(0,p.A)(n)}`,r],dashed:["dashed",`dashedColor${(0,p.A)(n)}`],bar1:["bar","bar1",`barColor${(0,p.A)(n)}`,("indeterminate"===r||"query"===r)&&"bar1Indeterminate","determinate"===r&&"bar1Determinate","buffer"===r&&"bar1Buffer"],bar2:["bar","bar2","buffer"!==r&&`barColor${(0,p.A)(n)}`,"buffer"===r&&`color${(0,p.A)(n)}`,("indeterminate"===r||"query"===r)&&"bar2Indeterminate","buffer"===r&&"bar2Buffer"]};return(0,i.A)(o,h.l,t)})(y),v=(0,l.I)(),g={},w={bar1:{},bar2:{}};if(("determinate"===u||"buffer"===u)&&void 0!==s){g["aria-valuenow"]=Math.round(s),g["aria-valuemin"]=0,g["aria-valuemax"]=100;let e=s-100;v&&(e=-e),w.bar1.transform=`translateX(${e}%)`}if("buffer"===u&&void 0!==c){let e=(c||0)-100;v&&(e=-e),w.bar2.transform=`translateX(${e}%)`}return(0,m.jsxs)(O,{className:(0,o.A)(b.root,n),ownerState:y,role:"progressbar",...g,ref:t,...f,children:["buffer"===u?(0,m.jsx)(x,{className:b.dashed,ownerState:y}):null,(0,m.jsx)(k,{className:b.bar1,ownerState:y,style:w.bar1}),"determinate"===u?null:(0,m.jsx)(C,{className:b.bar2,ownerState:y,style:w.bar2})]})})},91786:(e,t,r)=>{"use strict";r.d(t,{T:()=>b});var n=r(89575),o=r(17502),i=r(54357),a=r(14041),l=r(96674),s=r(10591),c=r(7763),u=r(48731),f=r(43433),d=r(9919),p=r(31085);const h=["hideMenu","colDef","id","labelledby","className","children","open"],m=(0,l.Ay)(u.p)(()=>({minWidth:248}));function y(e){e.currentTarget.contains(e.target)&&e.stopPropagation()}const b=(0,s.R)(function(e,t){const{hideMenu:r,id:l,labelledby:s,className:u,children:b,open:v}=e,g=(0,o.A)(e,h),w=(0,d.A)(),S=a.useCallback(e=>{"Tab"===e.key&&e.preventDefault(),(0,c.HF)(e.key)&&r(e)},[r]);return(0,p.jsx)(m,(0,n.A)({as:w.slots.baseMenuList,id:l,className:(0,i.A)(f.x.menuList,u),"aria-labelledby":s,onKeyDown:S,onWheel:y,onTouchMove:y,autoFocus:v},g,{ref:t,children:b}))})},91793:(e,t)=>{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},91847:(e,t,r)=>{"use strict";r.d(t,{m:()=>p});var n=r(89575),o=r(17502),i=r(14041),a=r(10591),l=r(97165),s=r(1769),c=r(9919),u=r(44844),f=r(31085);const d=["render","className","onClick"],p=(0,a.R)(function(e,t){const{render:r,className:a,onClick:p}=e,h=(0,o.A)(e,d),m=(0,c.A)(),{state:y,controlId:b,onExpandedChange:v,triggerRef:g}=(0,u.q)(),w="function"==typeof a?a(y):a,S=(0,s.A)(g,t),A=(0,l._)(m.slots.baseButton,r,(0,n.A)({},m.slotProps?.baseButton,{className:w,"aria-controls":b,"aria-expanded":y.expanded},h,{onClick:e=>{v(!y.expanded),p?.(e)},ref:S}),y);return(0,f.jsx)(i.Fragment,{children:A})})},91877:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r(14041),o=r(54357),i=r(31593),a=r(96674),l=r(42014),s=r(40979),c=r(23523),u=r(31085);const f=(0,c.A)((0,u.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");var d=r(6517),p=r(39455);const h=(0,a.Ay)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],r.colorDefault&&t.colorDefault]}})((0,l.A)(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),m=(0,a.Ay)("img",{name:"MuiAvatar",slot:"Img"})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),y=(0,a.Ay)(f,{name:"MuiAvatar",slot:"Fallback"})({width:"75%",height:"75%"}),b=n.forwardRef(function(e,t){const r=(0,s.b)({props:e,name:"MuiAvatar"}),{alt:a,children:l,className:c,component:f="div",slots:b={},slotProps:v={},imgProps:g,sizes:w,src:S,srcSet:A,variant:O="circular",...x}=r;let k=null;const C={...r,component:f,variant:O},P=function({crossOrigin:e,referrerPolicy:t,src:r,srcSet:o}){const[i,a]=n.useState(!1);return n.useEffect(()=>{if(!r&&!o)return;a(!1);let n=!0;const i=new Image;return i.onload=()=>{n&&a("loaded")},i.onerror=()=>{n&&a("error")},i.crossOrigin=e,i.referrerPolicy=t,i.src=r,o&&(i.srcset=o),()=>{n=!1}},[e,t,r,o]),i}({...g,..."function"==typeof v.img?v.img(C):v.img,src:S,srcSet:A}),E=S||A,j=E&&"error"!==P;C.colorDefault=!j,delete C.ownerState;const T=(e=>{const{classes:t,variant:r,colorDefault:n}=e,o={root:["root",r,n&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,i.A)(o,d.k,t)})(C),[_,R]=(0,p.A)("root",{ref:t,className:(0,o.A)(T.root,c),elementType:h,externalForwardedProps:{slots:b,slotProps:v,component:f,...x},ownerState:C}),[M,I]=(0,p.A)("img",{className:T.img,elementType:m,externalForwardedProps:{slots:b,slotProps:{img:{...g,...v.img}}},additionalProps:{alt:a,src:S,srcSet:A,sizes:w},ownerState:C}),[N,D]=(0,p.A)("fallback",{className:T.fallback,elementType:y,externalForwardedProps:{slots:b,slotProps:v},shouldForwardComponentProp:!0,ownerState:C});return k=j?(0,u.jsx)(M,{...I}):l||0===l?l:E&&a?a[0]:(0,u.jsx)(N,{...D}),(0,u.jsx)(_,{...R,children:k})})},92371:(e,t,r)=>{"use strict";function n(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}r.d(t,{A:()=>n})},92427:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,n:()=>i});var n=r(42395),o=r(3807);function i(e){return(0,o.Ay)("MuiAccordionDetails",e)}const a=(0,n.A)("MuiAccordionDetails",["root"])},92709:(e,t,r)=>{"use strict";r.d(t,{J:()=>l,h:()=>a});var n=r(92927),o=r(39755);const i=e=>null==e?null:Number(e),a=e=>null==e||Number.isNaN(e)||""===e?null:t=>i(t)===i(e),l=()=>[{value:"=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>i(t)===e.value,InputComponent:n.y,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>i(t)!==e.value,InputComponent:n.y,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&i(t)>e.value,InputComponent:n.y,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&i(t)>=e.value,InputComponent:n.y,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&i(t)<e.value,InputComponent:n.y,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&i(t)<=e.value,InputComponent:n.y,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:o.M,InputComponentProps:{type:"number"}}]},92739:(e,t,r)=>{"use strict";r.d(t,{W:()=>n});const n=(0,r(16190).gz)(e=>e.listViewColumn)},92819:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(14041);function o(e){return n.Children.toArray(e).filter(e=>n.isValidElement(e))}},92847:(e,t,r)=>{"use strict";r.d(t,{O:()=>s});var n=r(89575),o=r(14041),i=r(63e3),a=r(5483),l=r(31085);function s(e){return(0,l.jsxs)(o.Fragment,{children:[(0,l.jsx)(i.l,(0,n.A)({},e)),(0,l.jsx)(a.s,(0,n.A)({},e))]})}},92857:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>A});var n=r(14041),o=r(9810),i=r(95305),a=r(8837),l=r(68805),s=r(89025),c=r(60595),u=r(53125),f=r(82464),d=r(97469),p=r(98819),h=r(22980),m=r(28730),y=r(14041);function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var g=(0,m.n9)()(function(e){return{formElt:{margin:e.spacing(3),width:400},dialogContent:{width:"80em"},root:{padding:4}}});function w(e){return y.createElement("div",null,y.createElement(i.A,e))}function S(e){var t=e.children;return y.createElement("div",null,y.createElement(a.A,null,t))}const A=(0,h.observer)(function(e){var t=e.handleClose,r=e.model,i=g().classes,a=r.upperCaseCDS,h=b((0,n.useState)("".concat(r.intronBp)),2),m=h[0],v=h[1],A=b((0,n.useState)("".concat(r.upDownBp)),2),O=A[0],x=A[1],k=!Number.isNaN(+m),C=!Number.isNaN(+O);return y.createElement(o.Dialog,{maxWidth:"xl",open:!0,onClose:function(){t()},title:"Feature sequence settings"},y.createElement(l.A,{className:i.dialogContent},y.createElement(w,{label:"Number of intronic bases around splice site to display",className:i.formElt,value:m,helperText:k?"":"Not a number",error:!k,onChange:function(e){v(e.target.value)}}),y.createElement(w,{label:"Number of bases up/down stream of feature to display",className:i.formElt,value:O,helperText:C?"":"Not a number",error:!C,onChange:function(e){x(e.target.value)}}),y.createElement(S,null,y.createElement(s.A,null,"Sequence capitalization"),y.createElement(c.A,{value:a?"cds":"unchanged",onChange:function(e){r.setUpperCaseCDS("cds"===e.target.value)}},y.createElement(u.A,{value:"cds",control:y.createElement(f.A,{className:i.root,size:"small"}),label:"Capitalize CDS and lower case everything else"}),y.createElement(u.A,{value:"unchanged",control:y.createElement(f.A,{className:i.root,size:"small"}),label:"Capitalization from reference genome sequence"})))),y.createElement(d.A,null,y.createElement(p.A,{onClick:function(){r.setIntronBp(+m),r.setUpDownBp(+O),t()},disabled:!k||!C,color:"primary",variant:"contained"},"Submit"),y.createElement(p.A,{onClick:function(){t()},color:"secondary",autoFocus:!0,variant:"contained"},"Cancel")))})},92869:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r(14041),o=r(31593),i=r(10749),a=r(88581),l=r(96674),s=r(40979),c=r(51517),u=r(39455),f=r(31085);const d=(0,l.Ay)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>[{[`& .${c.A.title}`]:t.title},{[`& .${c.A.subheader}`]:t.subheader},t.root]})({display:"flex",alignItems:"center",padding:16}),p=(0,l.Ay)("div",{name:"MuiCardHeader",slot:"Avatar"})({display:"flex",flex:"0 0 auto",marginRight:16}),h=(0,l.Ay)("div",{name:"MuiCardHeader",slot:"Action"})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),m=(0,l.Ay)("div",{name:"MuiCardHeader",slot:"Content"})({flex:"1 1 auto",[`.${i.A.root}:where(& .${c.A.title})`]:{display:"block"},[`.${i.A.root}:where(& .${c.A.subheader})`]:{display:"block"}}),y=n.forwardRef(function(e,t){const r=(0,s.b)({props:e,name:"MuiCardHeader"}),{action:n,avatar:i,component:l="div",disableTypography:y=!1,subheader:b,subheaderTypographyProps:v,title:g,titleTypographyProps:w,slots:S={},slotProps:A={},...O}=r,x={...r,component:l,disableTypography:y},k=(e=>{const{classes:t}=e;return(0,o.A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},c.u,t)})(x),C={slots:S,slotProps:{title:w,subheader:v,...A}};let P=g;const[E,j]=(0,u.A)("title",{className:k.title,elementType:a.A,externalForwardedProps:C,ownerState:x,additionalProps:{variant:i?"body2":"h5",component:"span"}});null==P||P.type===a.A||y||(P=(0,f.jsx)(E,{...j,children:P}));let T=b;const[_,R]=(0,u.A)("subheader",{className:k.subheader,elementType:a.A,externalForwardedProps:C,ownerState:x,additionalProps:{variant:i?"body2":"body1",color:"textSecondary",component:"span"}});null==T||T.type===a.A||y||(T=(0,f.jsx)(_,{...R,children:T}));const[M,I]=(0,u.A)("root",{ref:t,className:k.root,elementType:d,externalForwardedProps:{...C,...O,component:l},ownerState:x}),[N,D]=(0,u.A)("avatar",{className:k.avatar,elementType:p,externalForwardedProps:C,ownerState:x}),[F,L]=(0,u.A)("content",{className:k.content,elementType:m,externalForwardedProps:C,ownerState:x}),[z,B]=(0,u.A)("action",{className:k.action,elementType:h,externalForwardedProps:C,ownerState:x});return(0,f.jsxs)(M,{...I,children:[i&&(0,f.jsx)(N,{...D,children:i}),(0,f.jsxs)(F,{...L,children:[P,T]}),n&&(0,f.jsx)(z,{...B,children:n})]})})},92891:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>R,getSpeedDialUtilityClass:()=>k,speedDialClasses:()=>C});var n=r(14041),o=r(54357),i=r(31593),a=r(17941),l=r(39731),s=r(96674),c=r(90389),u=r(42014),f=r(40979),d=r(32258),p=r(20789),h=r(45172),m=r(38870),y=r(31085);const b={entering:{transform:"none"},entered:{transform:"none"}},v=n.forwardRef(function(e,t){const r=(0,c.A)(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:l,easing:s,in:u,onEnter:f,onEntered:v,onEntering:g,onExit:w,onExited:S,onExiting:A,style:O,timeout:x=o,TransitionComponent:k=d.Ay,...C}=e,P=n.useRef(null),E=(0,m.A)(P,(0,p.A)(l),t),j=e=>t=>{if(e){const r=P.current;void 0===t?e(r):e(r,t)}},T=j(g),_=j((e,t)=>{(0,h.q)(e);const n=(0,h.c)({style:O,timeout:x,easing:s},{mode:"enter"});e.style.webkitTransition=r.transitions.create("transform",n),e.style.transition=r.transitions.create("transform",n),f&&f(e,t)}),R=j(v),M=j(A),I=j(e=>{const t=(0,h.c)({style:O,timeout:x,easing:s},{mode:"exit"});e.style.webkitTransition=r.transitions.create("transform",t),e.style.transition=r.transitions.create("transform",t),w&&w(e)}),N=j(S);return(0,y.jsx)(k,{appear:a,in:u,nodeRef:P,onEnter:_,onEntered:R,onEntering:T,onExit:I,onExited:N,onExiting:M,addEndListener:e=>{i&&i(P.current,e)},timeout:x,...C,children:(e,{ownerState:t,...r})=>n.cloneElement(l,{style:{transform:"scale(0)",visibility:"exited"!==e||u?void 0:"hidden",...b[e],...O,...l.props.style},ref:E,...r})})});var g=r(82165),w=r(38216),S=r(71589),A=r(25337),O=r(42395),x=r(3807);function k(e){return(0,x.Ay)("MuiSpeedDial",e)}const C=(0,O.A)("MuiSpeedDial",["root","fab","directionUp","directionDown","directionLeft","directionRight","actions","actionsClosed"]);var P=r(39455);function E(e){return"up"===e||"down"===e?"vertical":"right"===e||"left"===e?"horizontal":void 0}const j=(0,s.Ay)("div",{name:"MuiSpeedDial",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`direction${(0,w.A)(r.direction)}`]]}})((0,u.A)(({theme:e})=>({zIndex:(e.vars||e).zIndex.speedDial,display:"flex",alignItems:"center",pointerEvents:"none",variants:[{props:{direction:"up"},style:{flexDirection:"column-reverse",[`& .${C.actions}`]:{flexDirection:"column-reverse",marginBottom:-32,paddingBottom:48}}},{props:{direction:"down"},style:{flexDirection:"column",[`& .${C.actions}`]:{flexDirection:"column",marginTop:-32,paddingTop:48}}},{props:{direction:"left"},style:{flexDirection:"row-reverse",[`& .${C.actions}`]:{flexDirection:"row-reverse",marginRight:-32,paddingRight:48}}},{props:{direction:"right"},style:{flexDirection:"row",[`& .${C.actions}`]:{flexDirection:"row",marginLeft:-32,paddingLeft:48}}}]}))),T=(0,s.Ay)(g.A,{name:"MuiSpeedDial",slot:"Fab"})({pointerEvents:"auto"}),_=(0,s.Ay)("div",{name:"MuiSpeedDial",slot:"Actions",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.actions,!r.open&&t.actionsClosed]}})({display:"flex",pointerEvents:"auto",variants:[{props:({ownerState:e})=>!e.open,style:{transition:"top 0s linear 0.2s",pointerEvents:"none"}}]}),R=n.forwardRef(function(e,t){const r=(0,f.b)({props:e,name:"MuiSpeedDial"}),s=(0,c.A)(),u={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{ariaLabel:d,FabProps:{ref:p,...h}={},children:b,className:g,direction:O="up",hidden:x=!1,icon:C,onBlur:R,onClose:M,onFocus:I,onKeyDown:N,onMouseEnter:D,onMouseLeave:F,onOpen:L,open:z,openIcon:B,slots:$={},slotProps:G={},TransitionComponent:H,TransitionProps:V,transitionDuration:W=u,...U}=r,[q,X]=(0,A.A)({controlled:z,default:!1,name:"SpeedDial",state:"open"}),K={...r,open:q,direction:O},Y=(e=>{const{classes:t,open:r,direction:n}=e,o={root:["root",`direction${(0,w.A)(n)}`],fab:["fab"],actions:["actions",!r&&"actionsClosed"]};return(0,i.A)(o,k,t)})(K),J=(0,a.A)(),Z=n.useRef(0),Q=n.useRef(),ee=n.useRef([]);ee.current=[ee.current[0]];const te=n.useCallback(e=>{ee.current[0]=e},[]),re=(0,m.A)(p,te),ne=(e,t)=>r=>{ee.current[e+1]=r,t&&t(r)};n.useEffect(()=>{q||(Z.current=0,Q.current=void 0)},[q]);const oe=e=>{"mouseleave"===e.type&&F&&F(e),"blur"===e.type&&R&&R(e),J.clear(),"blur"===e.type?J.start(0,()=>{X(!1),M&&M(e,"blur")}):(X(!1),M&&M(e,"mouseLeave"))},ie=e=>{"mouseenter"===e.type&&D&&D(e),"focus"===e.type&&I&&I(e),J.clear(),q||J.start(0,()=>{X(!0),L&&L(e,{focus:"focus",mouseenter:"mouseEnter"}[e.type])})},ae=d.replace(/^[^a-z]+|[^\w:.-]+/gi,""),le=n.Children.toArray(b).filter(e=>n.isValidElement(e)),se=le.map((e,t)=>{const{FabProps:{ref:r,...o}={},tooltipPlacement:i}=e.props,a=i||("vertical"===E(O)?"left":"top");return n.cloneElement(e,{FabProps:{...o,ref:ne(t,r)},delay:30*(q?t:le.length-t),open:q,tooltipPlacement:a,id:`${ae}-action-${t}`})}),ce={slots:{transition:H,...$},slotProps:{transition:V,...G}},[ue,fe]=(0,P.A)("root",{elementType:j,externalForwardedProps:{...ce,...U},ownerState:K,ref:t,className:(0,o.A)(Y.root,g),additionalProps:{role:"presentation"},getSlotProps:e=>({...e,onKeyDown:t=>{e.onKeyDown?.(t),(e=>{N&&N(e);const t=e.key.replace("Arrow","").toLowerCase(),{current:r=t}=Q;if("Escape"===e.key)return X(!1),ee.current[0].focus(),void(M&&M(e,"escapeKeyDown"));if(E(t)===E(r)&&void 0!==E(t)){e.preventDefault();const n=t===r?1:-1,o=(0,l.A)(Z.current+n,0,ee.current.length-1);ee.current[o].focus(),Z.current=o,Q.current=r}})(t)},onBlur:t=>{e.onBlur?.(t),oe(t)},onFocus:t=>{e.onFocus?.(t),ie(t)},onMouseEnter:t=>{e.onMouseEnter?.(t),ie(t)},onMouseLeave:t=>{e.onMouseLeave?.(t),oe(t)}})}),[de,pe]=(0,P.A)("transition",{elementType:v,externalForwardedProps:ce,ownerState:K});return(0,y.jsxs)(ue,{...fe,children:[(0,y.jsx)(de,{in:!x,timeout:W,unmountOnExit:!0,...pe,children:(0,y.jsx)(T,{color:"primary","aria-label":d,"aria-haspopup":"true","aria-expanded":q,"aria-controls":`${ae}-actions`,...h,onClick:e=>{h.onClick&&h.onClick(e),J.clear(),q?(X(!1),M&&M(e,"toggle")):(X(!0),L&&L(e,"toggle"))},className:(0,o.A)(Y.fab,h.className),ref:re,ownerState:K,children:n.isValidElement(C)&&(0,S.A)(C,["SpeedDialIcon"])?n.cloneElement(C,{open:q}):C})}),(0,y.jsx)(_,{id:`${ae}-actions`,role:"menu","aria-orientation":E(O),className:(0,o.A)(Y.actions,!q&&Y.actionsClosed),ownerState:K,children:se})]})})},92892:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,getTableContainerUtilityClass:()=>o.I,tableContainerClasses:()=>o.A});var n=r(16089),o=r(51849)},92927:(e,t,r)=>{"use strict";r.d(t,{y:()=>f});var n=r(89575),o=r(17502),i=r(14041),a=r(58203),l=r(17941),s=r(9919),c=r(31085);const u=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","slotProps","clearButton","headerFilterMenu"];function f(e){const{item:t,applyValue:r,type:f,apiRef:p,focusElementRef:h,tabIndex:m,disabled:y,slotProps:b,clearButton:v,headerFilterMenu:g}=e,w=(0,o.A)(e,u),S=b?.root,A=(0,l.A)(),[O,x]=i.useState(d(t.value)),[k,C]=i.useState(!1),P=(0,a.A)(),E=(0,s.A)(),j=i.useCallback(e=>{const o=d(e.target.value);x(o),C(!0),A.start(E.filterDebounceMs,()=>{const e=(0,n.A)({},t,{value:"number"!==f||Number.isNaN(Number(o))?o:Number(o),fromInput:P});r(e),C(!1)})},[A,E.filterDebounceMs,t,f,P,r]);return i.useEffect(()=>{t.fromInput===P&&null!=t.value||x(d(t.value))},[P,t]),(0,c.jsxs)(i.Fragment,{children:[(0,c.jsx)(E.slots.baseTextField,(0,n.A)({id:P,label:p.current.getLocaleText("filterPanelInputLabel"),placeholder:p.current.getLocaleText("filterPanelInputPlaceholder"),value:O??"",onChange:j,type:f||"text",disabled:y,slotProps:(0,n.A)({},S?.slotProps,{input:(0,n.A)({endAdornment:k?(0,c.jsx)(E.slots.loadIcon,{fontSize:"small",color:"action"}):null},S?.slotProps?.input),htmlInput:(0,n.A)({tabIndex:m},S?.slotProps?.htmlInput)}),inputRef:h},E.slotProps?.baseTextField,w,S)),g,v]})}function d(e){if(null!=e&&""!==e)return String(e)}},92944:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>b,HX:()=>v,tT:()=>w});var n=r(89575),o=r(8539),i=r(85557),a=r(16558),l=r(85780),s=r(14041),c=r(34556),u=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,f=(0,c.A)(function(e){return u.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),d=function(e){return"theme"!==e},p=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?f:d},h=function(e,t,r){var n;if(t){var o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},m=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,l.SF)(t,r,n),(0,a.s)(function(){return(0,l.sk)(t,r,n)}),null},y=function e(t,r){var a,c,u=t.__emotion_real===t,f=u&&t.__emotion_base||t;void 0!==r&&(a=r.label,c=r.target);var d=h(t,r,u),y=d||p(f),b=!y("as");return function(){var v=arguments,g=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&g.push("label:"+a+";"),null==v[0]||void 0===v[0].raw)g.push.apply(g,v);else{var w=v[0];g.push(w[0]);for(var S=v.length,A=1;A<S;A++)g.push(v[A],w[A])}var O=(0,o.w)(function(e,t,r){var n=b&&e.as||f,a="",u=[],h=e;if(null==e.theme){for(var v in h={},e)h[v]=e[v];h.theme=s.useContext(o.T)}"string"==typeof e.className?a=(0,l.Rk)(t.registered,u,e.className):null!=e.className&&(a=e.className+" ");var w=(0,i.J)(g.concat(u),t.registered,h);a+=t.key+"-"+w.name,void 0!==c&&(a+=" "+c);var S=b&&void 0===d?p(n):y,A={};for(var O in e)b&&"as"===O||S(O)&&(A[O]=e[O]);return A.className=a,r&&(A.ref=r),s.createElement(s.Fragment,null,s.createElement(m,{cache:t,serialized:w,isStringTag:"string"==typeof n}),s.createElement(n,A))});return O.displayName=void 0!==a?a:"Styled("+("string"==typeof f?f:f.displayName||f.name||"Component")+")",O.defaultProps=t.defaultProps,O.__emotion_real=O,O.__emotion_base=f,O.__emotion_styles=g,O.__emotion_forwardProp=d,Object.defineProperty(O,"toString",{value:function(){return"."+c}}),O.withComponent=function(t,o){return e(t,(0,n.A)({},r,o,{shouldForwardProp:h(O,o,!0)})).apply(void 0,g)},O}}.bind(null);function b(e,t){return y(e,t)}function v(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){y[e]=y(e)});const g=[];function w(e){return g[0]=e,(0,i.J)(g)}},92975:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getDefaultValue:()=>l,getEnumerationValues:()=>s,getPropertyType:()=>a,getSubType:()=>o,getUnionSubTypes:()=>i,resolveLateType:()=>c});var n=r(77099);function o(e){var t;if((0,n.isOptionalType)(e))t=e._subtype||e.type;else{if(!(0,n.isArrayType)(e)&&!(0,n.isMapType)(e)){if("function"==typeof e.getSubType)return e.getSubType();throw new TypeError("unsupported mst type")}t=e._subtype||e._subType||e.subType}if(!t)throw new Error("failed to get subtype");return t}function i(e){if(!(0,n.isUnionType)(e))throw new TypeError("not an MST union type");var t=e._types||e.types||o(e)._types||o(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}function a(e,t){return e.properties[t]}function l(e){if(!(0,n.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue}function s(e){return i(e).map(function(e){return e.value})}function c(e){return(0,n.isUnionType)(e)||(0,n.isArrayType)(e)||!(0,n.isLateType)(e)?e:e.getSubType()}},93085:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,getStepLabelUtilityClass:()=>o.p,stepLabelClasses:()=>o.A});var n=r(97573),o=r(72701)},93206:(e,t,r)=>{"use strict";r.d(t,{x:()=>i});var n=r(49758),o=r(14460);function i(e){return(0,o.T)(null==e?void 0:e[n.l])}},93296:(e,t,r)=>{"use strict";var n=r(14041),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,a=n.useEffect,l=n.useLayoutEffect,s=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o(e,r)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),o=n[0].inst,u=n[1];return l(function(){o.value=r,o.getSnapshot=t,c(o)&&u({inst:o})},[e,r,t]),a(function(){return c(o)&&u({inst:o}),e(function(){c(o)&&u({inst:o})})},[e]),s(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u},93307:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ae});var n=r(9810),o=r(68805),i=r(22980),a=r(27313),l=r(28730),s=r(14041),c=r(81296),u=r(88912),f=r(60758),d=r(4431),p=r(81453),h=r(43557),m=r(8837),y=r(88581),b=r(79177),v=r(14041);function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(e){if("string"==typeof e)return S(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var A=(0,l.n9)()(function(e){return{facet:{margin:0,marginLeft:e.spacing(2)},select:{marginBottom:e.spacing(2)}}});function O(e){var t=e.onClick;return v.createElement(p.A,{title:"Clear selection on this facet filter"},v.createElement(h.A,{onClick:function(){t()},size:"small"},v.createElement(f.A,null)))}function x(e){var t=e.visible,r=e.onClick;return v.createElement(p.A,{title:"Minimize/expand this facet filter"},v.createElement(h.A,{onClick:function(){r()},size:"small"},t?v.createElement(d.A,null):v.createElement(u.A,null)))}const k=(0,i.observer)(function(e){var t=e.column,r=e.vals,n=e.model,o=A().classes,i=g((0,s.useState)(!0),2),a=i[0],l=i[1],u=n.faceted,f=u.filters,d=t.field;return v.createElement(m.A,{className:o.facet,fullWidth:!0},v.createElement("div",null,v.createElement(y.A,{component:"span"},d),v.createElement(O,{onClick:function(){u.setFilter(d,[])}}),v.createElement(x,{visible:a,onClick:function(){l(!a)}})),a?v.createElement(b.A,{multiple:!0,native:!0,className:o.select,value:f.get(t.field)||[],onChange:function(e){var r;u.setFilter(t.field,(r=e.target.options,function(e){if(Array.isArray(e))return S(e)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||w(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter(function(e){return e.selected}).map(function(e){return e.value}))}},r.sort(function(e,t){return e[0].localeCompare(t[0])}).map(function(e){var t=g(e,2),r=t[0],n=t[1];return v.createElement("option",{key:r,value:r},(0,c.coarseStripHTML)(r)," (",n,")")})):null)});var C=r(19779),P=r(14041);function E(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=j(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function j(e,t){if(e){if("string"==typeof e)return T(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const _=(0,i.observer)(function(e){var t,r=e.rows,n=e.columns,o=e.model,i=o.faceted,a=i.filters,l=n.slice(1),s=new Map(n.slice(1).map(function(e){return[e.field,new Map]})),c=i.filters.keys(),u=l.map(function(e){return e.field}),f=new Set,d=E(c);try{for(d.s();!(t=d.n()).done;){var p,h=t.value;null!==(p=a.get(h))&&void 0!==p&&p.length&&f.add(h)}}catch(e){d.e(e)}finally{d.f()}var m,y=E(u);try{for(y.s();!(m=y.n()).done;){var b=m.value;f.add(b)}}catch(e){y.e(e)}finally{y.f()}var v,g=r,w=E(f);try{var S=function(){var e,t=v.value,r=s.get(t);if(r){var n,o=E(g);try{for(o.s();!(n=o.n()).done;){var i=n.value,l=(0,C.a)(t,i),c=r.get(l);l&&(void 0===c?r.set(l,1):r.set(l,c+1))}}catch(e){o.e(e)}finally{o.f()}}var u=null!==(e=a.get(t))&&void 0!==e&&e.length?new Set(a.get(t)):void 0;g=g.filter(function(e){return void 0===u||u.has((0,C.a)(t,e))})};for(w.s();!(v=w.n()).done;)S()}catch(e){w.e(e)}finally{w.f()}return P.createElement("div",null,l.map(function(e){return P.createElement(k,{key:e.field,vals:(t=s.get(e.field),function(e){if(Array.isArray(e))return T(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||j(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),column:e,model:o});var t}))});var R=r(64773),M=r(83794),I=r(77099),N=r(14041);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function F(e){return function(e){if(Array.isArray(e))return G(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach(function(t){B(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function B(e,t,r){return(t=function(e){var t=function(e){if("object"!=D(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=D(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==D(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $(e,t){if(e){if("string"==typeof e)return G(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?G(e,t):void 0}}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const H=(0,i.observer)(function(e){var t,r,n=e.model,o=e.columns,i=e.shownTrackIds,a=e.selection,l=(0,c.getEnv)(n).pluginManager,u=n.view,f=n.faceted,d=f.rows,p=f.useShoppingCart,h=f.showOptions,m=f.filteredRows,y=f.filteredNonMetadataKeys,b=f.filteredMetadataKeys,v=f.visible,g=(t=(0,s.useState)(z(z({name:(0,c.measureGridWidth)(d.map(function(e){return e.name}),{maxWidth:500,stripHTML:!0})+15},Object.fromEntries(y.filter(function(e){return v[e]}).map(function(e){return[e,(0,c.measureGridWidth)(d.map(function(t){return t[e]}),{maxWidth:400,stripHTML:!0})]}))),Object.fromEntries(b.filter(function(e){return v["metadata.".concat(e)]}).map(function(e){return["metadata.".concat(e),(0,c.measureGridWidth)(d.map(function(t){return t.metadata[e]}),{maxWidth:400,stripHTML:!0})]})))),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||$(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),w=g[0],S=g[1];return N.createElement(R.z,{rowHeight:25,columnHeaderHeight:35,checkboxSelection:!0,disableRowSelectionOnClick:!0,keepNonExistentRowsSelected:!0,rows:m,columnVisibilityModel:v,showToolbar:h,onColumnWidthChange:function(e){S(z(z({},w),{},B({},e.colDef.field,e.width)))},onColumnVisibilityModelChange:function(e){n.faceted.setVisible(e)},onRowSelectionModelChange:function(e){if(p){var t=(0,I.getRoot)(n),r=l.pluggableConfigSchemaType("track");n.setSelection(F(e.ids).map(function(e){return(0,I.resolveIdentifier)(r,t,e)}))}else{var o=i,a=e.ids;(0,M.transaction)(function(){F(o).filter(function(e){return!a.has(e)}).map(function(e){return u.hideTrack(e)}),F(a).filter(function(e){return!o.has(e)}).map(function(e){u.showTrack(e),n.addToRecentlyUsed(e)})})}},rowSelectionModel:{type:"include",ids:new Set(p?a.map(function(e){return e.trackId}):F(i))},columns:o.map(function(e){return z(z({},e),{},{width:w[e.field]})})})});var V=r(61041),W=r(41885),U=r(95305),q=r(12935),X=r(1687),K=r(14041);function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function J(e){var t,r,o=e.model,i=o.faceted,a=(t=(0,s.useState)(null),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return Y(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=a[0],c=a[1],u=i.showOptions,d=i.showFilters,p=i.showSparse,m=i.useShoppingCart;return K.createElement(K.Fragment,null,K.createElement(W.A,{container:!0,spacing:4,alignItems:"center"},K.createElement(U.A,{label:"Search...",value:i.filterText,onChange:function(e){i.setFilterText(e.target.value)},slotProps:{input:{endAdornment:K.createElement(q.A,{position:"end"},K.createElement(h.A,{onClick:function(){i.setFilterText("")}},K.createElement(f.A,null)))}}}),K.createElement(h.A,{onClick:function(e){c(e.currentTarget)}},K.createElement(V.A,null)),K.createElement(X.A,{model:o})),K.createElement(n.Menu,{anchorEl:l,open:!!l,onClose:function(){c(null)},onMenuItemClick:function(e,t){t(),c(null)},menuItems:[{label:"Add tracks to selection instead of turning them on/off",onClick:function(){i.setUseShoppingCart(!m)},type:"checkbox",checked:m},{label:"Show sparse metadata columns",onClick:function(){i.setShowSparse(!p)},checked:p,type:"checkbox"},{label:"Show facet filters",onClick:function(){i.setShowFilters(!d)},checked:d,type:"checkbox"},{label:"Show extra table options",onClick:function(){i.setShowOptions(!u)},checked:u,type:"checkbox"}]}))}var Z=r(67313),Q=r(14041);function ee(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return te(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?te(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var re=(0,l.n9)()({cell:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},resizeHandle:{marginLeft:5,background:"grey",width:5}}),ne=.75;const oe=(0,i.observer)(function(e){var t=e.model,r=re().classes,o=t.selection,i=t.shownTrackIds,l=t.faceted,s=l.rows,c=l.panelWidth,u=l.showFilters,f=l.filteredNonMetadataKeys,d=l.filteredMetadataKeys,p=[{field:"name",hideable:!1,renderCell:function(e){var n=e.value,o=e.row,i=o.id,l=o.conf;return Q.createElement("div",{className:r.cell},Q.createElement(a.A,{html:n}),Q.createElement(Z.A,{id:i,conf:l,trackId:i,model:t}))}}].concat(ee(f.map(function(e){return{field:e,renderCell:function(e){var t=e.value;return t?Q.createElement(a.A,{className:r.cell,html:t}):""}}})),ee(d.map(function(e){return{field:"metadata.".concat(e),headerName:["name"].concat(ee(f)).includes(e)?"".concat(e," (from metadata)"):e,valueGetter:function(t,r){var n;return"".concat(null!==(n=r.metadata[e])&&void 0!==n?n:"")},renderCell:function(e){var t=e.value;return t?Q.createElement(a.A,{className:r.cell,html:t}):""}}})));return Q.createElement(Q.Fragment,null,Q.createElement(J,{model:t}),Q.createElement("div",{style:{display:"flex",overflow:"hidden",height:window.innerHeight*ne,width:window.innerWidth*ne}},Q.createElement("div",{style:{height:window.innerHeight*ne,width:window.innerWidth*ne-(u?c:0)}},Q.createElement(H,{model:t,columns:p,shownTrackIds:i,selection:o})),u?Q.createElement(Q.Fragment,null,Q.createElement(n.ResizeHandle,{vertical:!0,onDrag:function(e){return l.setPanelWidth(c-e)},className:r.resizeHandle}),Q.createElement("div",{style:{width:c,overflow:"auto"}},Q.createElement(_,{model:t,rows:s,columns:p}))):null))});var ie=r(14041);const ae=(0,i.observer)(function(e){var t=e.handleClose;return ie.createElement(n.Dialog,{open:!0,onClose:t,maxWidth:"xl",title:"Faceted track selector"},ie.createElement(o.A,null,ie.createElement(oe,e)))})},93539:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E});const n=class e{constructor(e,t){this.low=e,this.high=t}clone(){return new e(this.low,this.high)}get max(){return this.clone()}less_than(e){return this.low<e.low||this.low===e.low&&this.high<e.high}equal_to(e){return this.low===e.low&&this.high===e.high}intersect(e){return!this.not_intersect(e)}not_intersect(e){return this.high<e.low||e.high<this.low}merge(t){return new e(void 0===this.low?t.low:this.low<t.low?this.low:t.low,void 0===this.high?t.high:this.high>t.high?this.high:t.high)}output(){return[this.low,this.high]}static comparable_max(e,t){return e.merge(t)}static comparable_less_than(e,t){return e<t}};class o{constructor(e=void 0,t=void 0,r=null,o=null,i=null,a=1){if(this.left=r,this.right=o,this.parent=i,this.color=a,this.item={key:e,value:t},e&&e instanceof Array&&2===e.length&&!Number.isNaN(e[0])&&!Number.isNaN(e[1])){let[t,r]=e;t>r&&([t,r]=[r,t]),this.item.key=new n(t,r)}this.max=this.item.key?this.item.key.max:void 0}isNil(){return void 0===this.item.key&&void 0===this.item.value&&null===this.left&&null===this.right&&1===this.color}_value_less_than(e){return this.item.value&&e.item.value&&this.item.value.less_than?this.item.value.less_than(e.item.value):this.item.value<e.item.value}less_than(e){return this.item.value===this.item.key&&e.item.value===e.item.key?this.item.key.less_than(e.item.key):this.item.key.less_than(e.item.key)||this.item.key.equal_to(e.item.key)&&this._value_less_than(e)}_value_equal(e){return this.item.value&&e.item.value&&this.item.value.equal_to?this.item.value.equal_to(e.item.value):this.item.value===e.item.value}equal_to(e){return this.item.value===this.item.key&&e.item.value===e.item.key?this.item.key.equal_to(e.item.key):this.item.key.equal_to(e.item.key)&&this._value_equal(e)}intersect(e){return this.item.key.intersect(e.item.key)}copy_data(e){this.item.key=e.item.key,this.item.value=e.item.value}update_max(){if(this.max=this.item.key?this.item.key.max:void 0,this.right&&this.right.max){const e=this.item.key.constructor.comparable_max;this.max=e(this.max,this.right.max)}if(this.left&&this.left.max){const e=this.item.key.constructor.comparable_max;this.max=e(this.max,this.left.max)}}not_intersect_left_subtree(e){return(0,this.item.key.constructor.comparable_less_than)(void 0!==this.left.max.high?this.left.max.high:this.left.max,e.item.key.low)}not_intersect_right_subtree(e){const t=this.item.key.constructor.comparable_less_than;let r=void 0!==this.right.max.low?this.right.max.low:this.right.item.key.low;return t(e.item.key.high,r)}}class i{constructor(){this.root=null,this.nil_node=new o}get size(){let e=0;return this.tree_walk(this.root,()=>e++),e}get keys(){let e=[];return this.tree_walk(this.root,t=>e.push(t.item.key.output?t.item.key.output():t.item.key)),e}get values(){let e=[];return this.tree_walk(this.root,t=>e.push(t.item.value)),e}get items(){let e=[];return this.tree_walk(this.root,t=>e.push({key:t.item.key.output?t.item.key.output():t.item.key,value:t.item.value})),e}isEmpty(){return null==this.root||this.root===this.nil_node}clear(){this.root=null}insert(e,t=e){if(void 0===e)return;let r=new o(e,t,this.nil_node,this.nil_node,null,0);return this.tree_insert(r),this.recalc_max(r),r}exist(e,t=e){let r=new o(e,t);return!!this.tree_search(this.root,r)}remove(e,t=e){let r=new o(e,t),n=this.tree_search(this.root,r);return n&&this.tree_delete(n),n}search(e,t=(e,t)=>e===t?t.output():e){let r=new o(e),n=[];return this.tree_search_interval(this.root,r,n),n.map(e=>t(e.item.value,e.item.key))}intersect_any(e){let t=new o(e);return this.tree_find_any_interval(this.root,t)}forEach(e){this.tree_walk(this.root,t=>e(t.item.key,t.item.value))}map(e){const t=new i;return this.tree_walk(this.root,r=>t.insert(r.item.key,e(r.item.value,r.item.key))),t}*iterate(e,t=(e,t)=>e===t?t.output():e){let r;for(e?r=this.tree_search_nearest_forward(this.root,new o(e)):this.root&&(r=this.local_minimum(this.root));r;)yield t(r.item.value,r.item.key),r=this.tree_successor(r)}recalc_max(e){let t=e;for(;null!=t.parent;)t.parent.update_max(),t=t.parent}tree_insert(e){let t=this.root,r=null;if(null==this.root||this.root===this.nil_node)this.root=e;else{for(;t!==this.nil_node;)r=t,t=e.less_than(t)?t.left:t.right;e.parent=r,e.less_than(r)?r.left=e:r.right=e}this.insert_fixup(e)}insert_fixup(e){let t,r;for(t=e;t!==this.root&&0===t.parent.color;)t.parent===t.parent.parent.left?(r=t.parent.parent.right,0===r.color?(t.parent.color=1,r.color=1,t.parent.parent.color=0,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,this.rotate_left(t)),t.parent.color=1,t.parent.parent.color=0,this.rotate_right(t.parent.parent))):(r=t.parent.parent.left,0===r.color?(t.parent.color=1,r.color=1,t.parent.parent.color=0,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,this.rotate_right(t)),t.parent.color=1,t.parent.parent.color=0,this.rotate_left(t.parent.parent)));this.root.color=1}tree_delete(e){let t,r;t=e.left===this.nil_node||e.right===this.nil_node?e:this.tree_successor(e),r=t.left!==this.nil_node?t.left:t.right,r.parent=t.parent,t===this.root?this.root=r:(t===t.parent.left?t.parent.left=r:t.parent.right=r,t.parent.update_max()),this.recalc_max(r),t!==e&&(e.copy_data(t),e.update_max(),this.recalc_max(e)),1===t.color&&this.delete_fixup(r)}delete_fixup(e){let t,r=e;for(;r!==this.root&&null!=r.parent&&1===r.color;)r===r.parent.left?(t=r.parent.right,0===t.color&&(t.color=1,r.parent.color=0,this.rotate_left(r.parent),t=r.parent.right),1===t.left.color&&1===t.right.color?(t.color=0,r=r.parent):(1===t.right.color&&(t.color=0,t.left.color=1,this.rotate_right(t),t=r.parent.right),t.color=r.parent.color,r.parent.color=1,t.right.color=1,this.rotate_left(r.parent),r=this.root)):(t=r.parent.left,0===t.color&&(t.color=1,r.parent.color=0,this.rotate_right(r.parent),t=r.parent.left),1===t.left.color&&1===t.right.color?(t.color=0,r=r.parent):(1===t.left.color&&(t.color=0,t.right.color=1,this.rotate_left(t),t=r.parent.left),t.color=r.parent.color,r.parent.color=1,t.left.color=1,this.rotate_right(r.parent),r=this.root));r.color=1}tree_search(e,t){if(null!=e&&e!==this.nil_node)return t.equal_to(e)?e:t.less_than(e)?this.tree_search(e.left,t):this.tree_search(e.right,t)}tree_search_nearest_forward(e,t){let r,n=e;for(;n&&n!==this.nil_node;)n.less_than(t)?n.intersect(t)?(r=n,n=n.left):n=n.right:(r&&!n.less_than(r)||(r=n),n=n.left);return r||null}tree_search_interval(e,t,r){null!=e&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(t)||this.tree_search_interval(e.left,t,r),e.intersect(t)&&r.push(e),e.right===this.nil_node||e.not_intersect_right_subtree(t)||this.tree_search_interval(e.right,t,r))}tree_find_any_interval(e,t){let r=!1;return null!=e&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(t)||(r=this.tree_find_any_interval(e.left,t)),r||(r=e.intersect(t)),r||e.right===this.nil_node||e.not_intersect_right_subtree(t)||(r=this.tree_find_any_interval(e.right,t))),r}local_minimum(e){let t=e;for(;null!=t.left&&t.left!==this.nil_node;)t=t.left;return t}local_maximum(e){let t=e;for(;null!=t.right&&t.right!==this.nil_node;)t=t.right;return t}tree_successor(e){let t,r,n;if(e.right!==this.nil_node)t=this.local_minimum(e.right);else{for(r=e,n=e.parent;null!=n&&n.right===r;)r=n,n=n.parent;t=n}return t}rotate_left(e){let t=e.right;e.right=t.left,t.left!==this.nil_node&&(t.left.parent=e),t.parent=e.parent,e===this.root?this.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,null!=e&&e!==this.nil_node&&e.update_max(),t=e.parent,null!=t&&t!==this.nil_node&&t.update_max()}rotate_right(e){let t=e.left;e.left=t.right,t.right!==this.nil_node&&(t.right.parent=e),t.parent=e.parent,e===this.root?this.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.right=e,e.parent=t,null!==e&&e!==this.nil_node&&e.update_max(),t=e.parent,null!=t&&t!==this.nil_node&&t.update_max()}tree_walk(e,t){null!=e&&e!==this.nil_node&&(this.tree_walk(e.left,t),t(e),this.tree_walk(e.right,t))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(t){0===t.color&&(1===t.left.color&&1===t.right.color||(e=!1))}),e}testBlackHeightProperty(e){let t=0,r=0,n=0;if(1===e.color&&t++,r=e.left!==this.nil_node?this.testBlackHeightProperty(e.left):1,n=e.right!==this.nil_node?this.testBlackHeightProperty(e.right):1,r!==n)throw new Error("Red-black height property violated");return t+=r,t}}var a=r(49554),l=r(60654),s=r(81296),c=r(68020),u=r(98412),f=r(35545);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){C(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function m(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function y(e,t){if(e){if("string"==typeof e)return b(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function v(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return g(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(g(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,g(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,g(f,"constructor",c),g(c,"constructor",s),s.displayName="GeneratorFunction",g(c,o,"GeneratorFunction"),g(f),g(f,o,"Generator"),g(f,n,function(){return this}),g(f,"toString",function(){return"[object Generator]"}),(v=function(){return{w:i,m:d}})()}function g(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}g=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){g(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},g(e,t,r,n)}function w(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function S(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){w(i,n,o,a,l,"next",e)}function l(e){w(i,n,o,a,l,"throw",e)}a(void 0)})}}function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,P(n.key),n)}}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(O=function(){return!!e})()}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function C(e,t,r){return(t=P(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}var E=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return C((r=this,n=t,o=[].concat(a),n=x(n),e=function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,O()?Reflect.construct(n,o||[],x(r).constructor):n.apply(r,o))),"calculatedIntervalTreeMap",{}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(t,e),r=t,n=[{key:"getHeader",value:(w=S(v().m(function e(){var t,r;return v().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.setup();case 1:return t=e.v,r=t.header,e.a(2,r)}},e,this)})),function(){return w.apply(this,arguments)})},{key:"getMetadata",value:(g=S(v().m(function e(){var t,r;return v().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.setup();case 1:return t=e.v,r=t.parser,e.a(2,r.getMetadata())}},e,this)})),function(){return g.apply(this,arguments)})},{key:"setupP",value:(b=S(v().m(function e(t){var r,n,o,l,u,d,p,h,b,g,w,S,A,O,x,k,C,P=this;return v().w(function(e){for(;;)switch(e.n){case 0:return r=(t||{}).statusCallback,n=void 0===r?function(){}:r,o=(0,c.openLocation)(this.getConf("vcfLocation"),this.pluginManager),e.n=1,(0,s.fetchAndMaybeUnzip)(o,t);case 1:for(l=e.v,u=[],d={},p=0,h=new TextDecoder("utf8"),b=0;p<l.length;)g=l.indexOf(10,p),w=-1===g?l.subarray(p):l.subarray(p,g),(S=h.decode(w).trim())&&(S.startsWith("#")?u.push(S):(A=S.indexOf("\t"),O=S.slice(0,A),d[O]||(d[O]=[]),d[O].push(S))),b++%1e4==0&&n("Loading ".concat((0,s.getProgressDisplayStr)(p,l.length))),p=g+1;return x=u.join("\n"),k=new a.A({header:x}),C=Object.fromEntries(Object.entries(d).map(function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||y(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],a=n[1];return[o,function(e){if(!P.calculatedIntervalTreeMap[o]){null==e||e("Parsing VCF data");var t,r=0,n=new i,l=m(a);try{for(l.s();!(t=l.n()).done;){var s=t.value,c=new f.A({variant:k.parseLine(s),parser:k,id:"".concat(P.id,"-").concat(o,"-").concat(r++)});n.insert([c.get("start"),c.get("end")],c)}}catch(e){l.e(e)}finally{l.f()}P.calculatedIntervalTreeMap[o]=n}return P.calculatedIntervalTreeMap[o]}]})),e.a(2,{header:x,parser:k,intervalTreeMap:C})}},e,this)})),function(e){return b.apply(this,arguments)})},{key:"setup",value:(p=S(v().m(function e(){var t=this;return v().w(function(e){for(;;)if(0===e.n)return this.vcfFeatures||(this.vcfFeatures=this.setupP().catch(function(e){throw t.vcfFeatures=void 0,e})),e.a(2,this.vcfFeatures)},e,this)})),function(){return p.apply(this,arguments)})},{key:"getRefNames",value:(l=S(v().m(function e(){var t,r;return v().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.setup();case 1:return t=e.v,r=t.intervalTreeMap,e.a(2,Object.keys(r))}},e,this)})),function(){return l.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.ObservableCreate)(function(){var n=S(v().m(function n(o){var i,a,l,s,c,u,f,d,p,h;return v().w(function(n){for(;;)switch(n.n){case 0:return n.p=0,a=e.start,l=e.end,s=e.refName,n.n=1,t.setup();case 1:c=n.v,u=c.intervalTreeMap,f=m((null===(i=u[s])||void 0===i?void 0:i.call(u,r.statusCallback).search([a,l]))||[]);try{for(f.s();!(d=f.n()).done;)p=d.value,o.next(p)}catch(e){f.e(e)}finally{f.f()}o.complete(),n.n=3;break;case 2:n.p=2,h=n.v,o.error(h);case 3:return n.a(2)}},n,null,[[0,2]])}));return function(e){return n.apply(this,arguments)}}(),r.stopToken)}},{key:"getSources",value:(o=S(v().m(function e(){var t,r,n,o,i,a,l,s,u;return v().w(function(e){for(;;)switch(e.n){case 0:if(""!==(t=this.getConf("samplesTsvLocation")).uri&&"/path/to/samples.tsv"!==t.uri){e.n=2;break}return e.n=1,this.setup();case 1:return r=e.v,n=r.parser,e.a(2,n.samples.map(function(e){return{name:e}}));case 2:return e.n=3,(0,c.openLocation)(t).readFile("utf8");case 3:return o=e.v,i=o.split(/\n|\r\n|\r/),a=i[0].split("\t"),e.n=4,this.setup();case 4:return l=e.v,s=l.parser,u=new Set(s.samples),e.a(2,i.slice(1).map(function(e){var t=e.split("\t");return h({name:t[0]},Object.fromEntries(t.slice(1).map(function(e,t){return[a[t+1],e]})))}).filter(function(e){return u.has(e.name)}));case 5:return e.a(2)}},e,this)})),function(){return o.apply(this,arguments)})}],n&&A(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,l,p,b,g,w}(l.BaseFeatureDataAdapter);C(E,"capabilities",["getFeatures","getRefNames"])},93821:(e,t,r)=>{"use strict";function n(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const r=e.length;if(r!==t.length)return!1;for(let o=0;o<r;o+=1)if(!n(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const r=Array.from(e.entries());for(let e=0;e<r.length;e+=1)if(!t.has(r[e][0]))return!1;for(let e=0;e<r.length;e+=1){const o=r[e];if(!n(o[1],t.get(o[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const r=Array.from(e.entries());for(let e=0;e<r.length;e+=1)if(!t.has(r[e][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const r=e.length;if(r!==t.length)return!1;for(let n=0;n<r;n+=1)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),o=r.length;if(o!==Object.keys(t).length)return!1;for(let e=0;e<o;e+=1)if(!Object.prototype.hasOwnProperty.call(t,r[e]))return!1;for(let i=0;i<o;i+=1){const o=r[i];if(!n(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}r.d(t,{H:()=>n})},94042:(e,t,r)=>{"use strict";r.d(t,{L:()=>o,o:()=>i});var n=r(34051);const o=(e,t,r,o,i)=>{const a=t===r-1;return!(e!==n.yL.LEFT||!a)||!!o&&(e===n.yL.LEFT||(e===n.yL.RIGHT?!a:!a||i))},i=(e,t)=>e===n.yL.RIGHT&&0===t},94263:(e,t,r)=>{"use strict";r.d(t,{A:()=>S});var n=r(14041),o=r(54357),i=r(31593),a=r(83589),l=r(48156),s=r(96674),c=r(42014),u=r(40979),f=r(60224),d=r(59054),p=r(38256),h=r(38870),m=r(10997),y=r(54195),b=r(14779),v=r(53827),g=r(31085);const w=(0,s.Ay)(d.A,{shouldForwardProp:e=>(0,l.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})((0,c.A)(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${v.A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,a.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${v.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,a.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${v.A.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,a.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,a.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${v.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${v.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${m.A.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${m.A.inset}`]:{marginLeft:52},[`& .${b.A.root}`]:{marginTop:0,marginBottom:0},[`& .${b.A.inset}`]:{paddingLeft:36},[`& .${y.A.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${y.A.root} svg`]:{fontSize:"1.25rem"}}}]}))),S=n.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiMenuItem"}),{autoFocus:a=!1,component:l="li",dense:s=!1,divider:c=!1,disableGutters:d=!1,focusVisibleClassName:m,role:y="menuitem",tabIndex:b,className:S,...A}=r,O=n.useContext(f.A),x=n.useMemo(()=>({dense:s||O.dense||!1,disableGutters:d}),[O.dense,s,d]),k=n.useRef(null);(0,p.A)(()=>{a&&k.current&&k.current.focus()},[a]);const C={...r,dense:x.dense,divider:c,disableGutters:d},P=(e=>{const{disabled:t,dense:r,divider:n,disableGutters:o,selected:a,classes:l}=e,s={root:["root",r&&"dense",t&&"disabled",!o&&"gutters",n&&"divider",a&&"selected"]},c=(0,i.A)(s,v.Z,l);return{...l,...c}})(r),E=(0,h.A)(k,t);let j;return r.disabled||(j=void 0!==b?b:-1),(0,g.jsx)(f.A.Provider,{value:x,children:(0,g.jsx)(w,{ref:E,role:y,tabIndex:j,component:l,focusVisibleClassName:(0,o.A)(P.focusVisible,m),className:(0,o.A)(P.root,S),...A,ownerState:C,classes:P})})})},94460:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>F,getRatingUtilityClass:()=>x,ratingClasses:()=>k});var n=r(14041),o=r(54357),i=r(39731),a=r(46667),l=r(31593),s=r(37570),c=r(16681),u=r(38216),f=r(65866),d=r(25337),p=r(38870),h=r(23523),m=r(31085);const y=(0,h.A)((0,m.jsx)("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),b=(0,h.A)((0,m.jsx)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarBorder");var v=r(96674),g=r(42014),w=r(40979),S=r(89516),A=r(42395),O=r(3807);function x(e){return(0,O.Ay)("MuiRating",e)}const k=(0,A.A)("MuiRating",["root","sizeSmall","sizeMedium","sizeLarge","readOnly","disabled","focusVisible","visuallyHidden","pristine","label","labelEmptyValueActive","icon","iconEmpty","iconFilled","iconHover","iconFocus","iconActive","decimal"]);var C=r(39455);function P(e,t){if(null==e)return e;const r=Math.round(e/t)*t;return Number(r.toFixed(function(e){const t=e.toString().split(".")[1];return t?t.length:0}(t)))}const E=(0,v.Ay)("span",{name:"MuiRating",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${k.visuallyHidden}`]:t.visuallyHidden},t.root,t[`size${(0,u.A)(r.size)}`],r.readOnly&&t.readOnly]}})((0,g.A)(({theme:e})=>({display:"inline-flex",position:"relative",fontSize:e.typography.pxToRem(24),color:"#faaf00",cursor:"pointer",textAlign:"left",width:"min-content",WebkitTapHighlightColor:"transparent",[`&.${k.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${k.focusVisible} .${k.iconActive}`]:{outline:"1px solid #999"},[`& .${k.visuallyHidden}`]:a.A,variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(30)}},{props:({ownerState:e})=>e.readOnly,style:{pointerEvents:"none"}}]}))),j=(0,v.Ay)("label",{name:"MuiRating",slot:"Label",overridesResolver:({ownerState:e},t)=>[t.label,e.emptyValueFocused&&t.labelEmptyValueActive]})({cursor:"inherit",variants:[{props:({ownerState:e})=>e.emptyValueFocused,style:{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"}}]}),T=(0,v.Ay)("span",{name:"MuiRating",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.iconEmpty&&t.iconEmpty,r.iconFilled&&t.iconFilled,r.iconHover&&t.iconHover,r.iconFocus&&t.iconFocus,r.iconActive&&t.iconActive]}})((0,g.A)(({theme:e})=>({display:"flex",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),pointerEvents:"none",variants:[{props:({ownerState:e})=>e.iconActive,style:{transform:"scale(1.2)"}},{props:({ownerState:e})=>e.iconEmpty,style:{color:(e.vars||e).palette.action.disabled}}]}))),_=(0,v.Ay)("span",{name:"MuiRating",slot:"Decimal",shouldForwardProp:e=>(0,S.A)(e)&&"iconActive"!==e,overridesResolver:(e,t)=>{const{iconActive:r}=e;return[t.decimal,r&&t.iconActive]}})({position:"relative",variants:[{props:({iconActive:e})=>e,style:{transform:"scale(1.2)"}}]});function R(e){const{value:t,...r}=e;return(0,m.jsx)("span",{...r})}function M(e){const{classes:t,disabled:r,emptyIcon:i,focus:a,getLabelText:l,highlightSelectedOnly:s,hover:c,icon:u,IconContainerComponent:d,isActive:p,itemValue:h,labelProps:y,name:b,onBlur:v,onChange:g,onClick:w,onFocus:S,readOnly:A,ownerState:O,ratingValue:x,ratingValueRounded:k,slots:P={},slotProps:E={}}=e,_=s?h===x:h<=x,R=h<=c,M=h<=a,I=h===k,N=`${b}-${(0,f.A)()}`,D={slots:P,slotProps:E},[F,L]=(0,C.A)("icon",{elementType:T,className:(0,o.A)(t.icon,_?t.iconFilled:t.iconEmpty,R&&t.iconHover,M&&t.iconFocus,p&&t.iconActive),externalForwardedProps:D,ownerState:{...O,iconEmpty:!_,iconFilled:_,iconHover:R,iconFocus:M,iconActive:p},additionalProps:{value:h},internalForwardedProps:{as:d}}),[z,B]=(0,C.A)("label",{elementType:j,externalForwardedProps:D,ownerState:{...O,emptyValueFocused:void 0},additionalProps:{style:y?.style,htmlFor:N}}),$=(0,m.jsx)(F,{...L,children:i&&!_?i:u});return A?(0,m.jsx)("span",{...y,children:$}):(0,m.jsxs)(n.Fragment,{children:[(0,m.jsxs)(z,{...B,children:[$,(0,m.jsx)("span",{className:t.visuallyHidden,children:l(h)})]}),(0,m.jsx)("input",{className:t.visuallyHidden,onFocus:S,onBlur:v,onChange:g,onClick:w,disabled:r,value:h,id:N,type:"radio",name:b,checked:I})]})}const I=(0,m.jsx)(y,{fontSize:"inherit"}),N=(0,m.jsx)(b,{fontSize:"inherit"});function D(e){return`${e||"0"} Star${1!==e?"s":""}`}const F=n.forwardRef(function(e,t){const r=(0,w.b)({name:"MuiRating",props:e}),{component:a="span",className:h,defaultValue:y=null,disabled:b=!1,emptyIcon:v=N,emptyLabelText:g="Empty",getLabelText:S=D,highlightSelectedOnly:A=!1,icon:O=I,IconContainerComponent:k=R,max:T=5,name:F,onChange:L,onChangeActive:z,onMouseLeave:B,onMouseMove:$,precision:G=1,readOnly:H=!1,size:V="medium",value:W,slots:U={},slotProps:q={},...X}=r,K=(0,f.A)(F),[Y,J]=(0,d.A)({controlled:W,default:y,name:"Rating"}),Z=P(Y,G),Q=(0,s.I)(),[{hover:ee,focus:te},re]=n.useState({hover:-1,focus:-1});let ne=Z;-1!==ee&&(ne=ee),-1!==te&&(ne=te);const[oe,ie]=n.useState(!1),ae=n.useRef(),le=(0,p.A)(ae,t),se=e=>{let t=""===e.target.value?null:parseFloat(e.target.value);-1!==ee&&(t=ee),J(t),L&&L(e,t)},ce=e=>{0===e.clientX&&0===e.clientY||(re({hover:-1,focus:-1}),J(null),L&&parseFloat(e.target.value)===Z&&L(e,null))},ue=e=>{(0,c.A)(e.target)&&ie(!0);const t=parseFloat(e.target.value);re(e=>({hover:e.hover,focus:t}))},fe=e=>{-1===ee&&((0,c.A)(e.target)||ie(!1),re(e=>({hover:e.hover,focus:-1})))},[de,pe]=n.useState(!1),he={...r,component:a,defaultValue:y,disabled:b,emptyIcon:v,emptyLabelText:g,emptyValueFocused:de,focusVisible:oe,getLabelText:S,icon:O,IconContainerComponent:k,max:T,precision:G,readOnly:H,size:V},me=(e=>{const{classes:t,size:r,readOnly:n,disabled:o,emptyValueFocused:i,focusVisible:a}=e,s={root:["root",`size${(0,u.A)(r)}`,o&&"disabled",a&&"focusVisible",n&&"readOnly"],label:["label","pristine"],labelEmptyValue:[i&&"labelEmptyValueActive"],icon:["icon"],iconEmpty:["iconEmpty"],iconFilled:["iconFilled"],iconHover:["iconHover"],iconFocus:["iconFocus"],iconActive:["iconActive"],decimal:["decimal"],visuallyHidden:["visuallyHidden"]};return(0,l.A)(s,x,t)})(he),ye={slots:U,slotProps:q},[be,ve]=(0,C.A)("root",{ref:le,className:(0,o.A)(me.root,h),elementType:E,externalForwardedProps:{...ye,...X,component:a},getSlotProps:e=>({...e,onMouseMove:t=>{(e=>{$&&$(e);const t=ae.current,{right:r,left:n,width:o}=t.getBoundingClientRect();let a;a=Q?(r-e.clientX)/o:(e.clientX-n)/o;let l=P(T*a+G/2,G);l=(0,i.A)(l,G,T),re(e=>e.hover===l&&e.focus===l?e:{hover:l,focus:l}),ie(!1),z&&ee!==l&&z(e,l)})(t),e.onMouseMove?.(t)},onMouseLeave:t=>{(e=>{B&&B(e),re({hover:-1,focus:-1}),z&&-1!==ee&&z(e,-1)})(t),e.onMouseLeave?.(t)}}),ownerState:he,additionalProps:{role:H?"img":null,"aria-label":H?S(ne):null}}),[ge,we]=(0,C.A)("label",{className:(0,o.A)(me.label,me.labelEmptyValue),elementType:j,externalForwardedProps:ye,ownerState:he}),[Se,Ae]=(0,C.A)("decimal",{className:me.decimal,elementType:_,externalForwardedProps:ye,ownerState:he});return(0,m.jsxs)(be,{...ve,children:[Array.from(new Array(T)).map((e,t)=>{const r=t+1,i={classes:me,disabled:b,emptyIcon:v,focus:te,getLabelText:S,highlightSelectedOnly:A,hover:ee,icon:O,IconContainerComponent:k,name:K,onBlur:fe,onChange:se,onClick:ce,onFocus:ue,ratingValue:ne,ratingValueRounded:Z,readOnly:H,ownerState:he,slots:U,slotProps:q},a=r===Math.ceil(ne)&&(-1!==ee||-1!==te);if(G<1){const e=Array.from(new Array(1/G));return(0,n.createElement)(Se,{...Ae,key:r,className:(0,o.A)(Ae.className,a&&me.iconActive),iconActive:a},e.map((t,n)=>{const o=P(r-1+(n+1)*G,G);return(0,m.jsx)(M,{...i,isActive:!1,itemValue:o,labelProps:{style:e.length-1===n?{}:{width:o===ne?(n+1)*G*100+"%":"0%",overflow:"hidden",position:"absolute"}}},o)}))}return(0,m.jsx)(M,{...i,isActive:a,itemValue:r},r)}),!H&&!b&&(0,m.jsxs)(ge,{...we,children:[(0,m.jsx)("input",{className:me.visuallyHidden,value:"",id:`${K}-empty`,type:"radio",name:K,checked:null==Z,onFocus:()=>pe(!0),onBlur:()=>pe(!1),onChange:se}),(0,m.jsx)("span",{className:me.visuallyHidden,children:g})]})]})})},94466:(e,t,r)=>{"use strict";r.d(t,{A:()=>L});var n=r(14041),o=r(23523),i=r(31085);const a=(0,o.A)((0,i.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");var l=r(94263),s=r(87495),c=r(88303),u=r(87373),f=r(89981),d=r(26629);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h.apply(null,arguments)}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function b(e,t,r){return(t=function(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const v=n.forwardRef(function(e,t){return n.createElement(u.A,h({},e,{ref:t,style:y({pointerEvents:"none"},e.style),slotProps:y(y({},e.slotProps),{},{paper:{style:{pointerEvents:"auto"}}})}))});var g=r(40129),w=r(44775),S=r(14041),A=["onClick","closeAfterItemClick"],O=["title","Icon","inset"],x=["popupState","onMenuItemClick","menuItems","classes"],k=["popupState","onMenuItemClick","menuItems"],C=["onMenuItemClick","closeAfterItemClick","menuItems"],P=["closeAfterItemClick"];function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(null,arguments)}function j(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var T=(0,n.createContext)({parentPopupState:void 0,rootPopupState:void 0});function _(e){var t=e.onClick,r=e.closeAfterItemClick,o=j(e,A),i=(0,n.useContext)(T),a=i.rootPopupState,s=i.parentPopupState;if(!a)throw new Error("must be used inside a CascadingMenu");return S.createElement(l.A,E({},o,{onClick:function(e){r&&a.close(),null==t||t(e)},onMouseOver:function(){null!=s&&s.childHandle&&(s.childHandle.close(),s.setChildHandle(void 0))}}))}function R(e){var t=e.title,r=e.Icon,o=e.inset,i=j(e,O),u=(0,n.useContext)(T).parentPopupState,f=(0,w.T6)({parentPopupState:u});return S.createElement(S.Fragment,null,S.createElement(l.A,E({},(0,w.oe)(f),{onMouseOver:function(e){null!=u&&u.childHandle&&(u.childHandle.close(),u.setChildHandle(void 0)),(0,w._k)(f).onMouseOver(e)}}),r?S.createElement(s.A,null,S.createElement(r,null)):null,S.createElement(c.A,{primary:t,inset:o}),S.createElement(a,null)),S.createElement(M,E({},i,{anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},popupState:f})))}function M(e){var t=e.popupState,r=(e.onMenuItemClick,e.menuItems,e.classes,j(e,x)),o=(0,n.useContext)(T).rootPopupState,i=(0,n.useMemo)(function(){return{rootPopupState:o||t,parentPopupState:t}},[o,t]);return S.createElement(T.Provider,{value:i},S.createElement(v,E({},r,(0,w.NA)(t))))}function I(e){var t=e.popupState,r=(e.onMenuItemClick,e.menuItems,j(e,k)),o=(0,n.useContext)(T).rootPopupState,i=(0,n.useMemo)(function(){return{rootPopupState:o||t,parentPopupState:t}},[o,t]);return S.createElement(T.Provider,{value:i},S.createElement(u.A,E({},r,(0,w.NA)(t))))}function N(e){var t=e.item;return"subMenu"in t?S.createElement(g.m,{type:"subMenu"}):"checkbox"===t.type||"radio"===t.type?S.createElement(g.m,{type:t.type,checked:t.checked,disabled:t.disabled}):null}function D(e){var t=e.onMenuItemClick,r=e.closeAfterItemClick,n=e.menuItems,o=j(e,C),i=n.some(function(e){return"icon"in e&&e.icon});return S.createElement(S.Fragment,null,n.toSorted(function(e,t){return(t.priority||0)-(e.priority||0)}).map(function(e,n){return"subMenu"in e?S.createElement(R,{key:"subMenu-".concat(e.label,"-").concat(n),title:e.label,Icon:e.icon,inset:i&&!e.icon,onMenuItemClick:t,menuItems:e.subMenu},S.createElement(D,E({},o,{closeAfterItemClick:r,onMenuItemClick:t,menuItems:e.subMenu}))):"divider"===e.type?S.createElement(f.A,{key:"divider-".concat(JSON.stringify(e),"-").concat(n),component:"li"}):"subHeader"===e.type?S.createElement(d.A,{key:"subHeader-".concat(e.label,"-").concat(n)},e.label):S.createElement(_,{key:"".concat(e.label,"-").concat(n),closeAfterItemClick:r,onClick:"onClick"in e?function(r){t(r,e.onClick)}:void 0,disabled:Boolean(e.disabled)},e.icon?S.createElement(s.A,null,S.createElement(e.icon,null)):null," ",S.createElement(c.A,{primary:e.label,secondary:e.subLabel,inset:i&&!e.icon}),S.createElement(F,null),S.createElement(N,{item:e}))}))}function F(){return S.createElement("div",{style:{flexGrow:1,minWidth:10}})}const L=function(e){var t=e.closeAfterItemClick,r=void 0===t||t,n=j(e,P);return S.createElement(I,n,S.createElement(D,E({},n,{closeAfterItemClick:r})))}},94497:(e,t,r)=>{"use strict";var n=r(4293)(r(90147)),o={functions:"Jexl Function",transforms:"Transform"};t.ArrayLiteral=function(e){return this.evalArray(e.value)},t.BinaryExpression=function(e){var t=this,r=this._grammar.elements[e.operator];if(r.evalOnDemand){var n=function(e){return{eval:function(){return t.eval(e)}}};return r.evalOnDemand(n(e.left),n(e.right))}return this.Promise.all([this.eval(e.left),this.eval(e.right)]).then(function(e){return r.eval(e[0],e[1])})},t.ConditionalExpression=function(e){var t=this;return this.eval(e.test).then(function(r){return r?e.consequent?t.eval(e.consequent):r:t.eval(e.alternate)})},t.FilterExpression=function(e){var t=this;return this.eval(e.subject).then(function(r){return e.relative?t._filterRelative(r,e.expr):t._filterStatic(r,e.expr)})},t.Identifier=function(e){return e.from?this.eval(e.from).then(function(t){if(null!=t)return Array.isArray(t)&&(t=t[0]),t[e.value]}):e.relative?this._relContext[e.value]:this._context[e.value]},t.Literal=function(e){return e.value},t.ObjectLiteral=function(e){return this.evalMap(e.value)},t.FunctionCall=function(e){var t=o[e.pool];if(!t)throw new Error("Corrupt AST: Pool '".concat(e.pool,"' not found"));var r=this._grammar[e.pool][e.name];if(!r)throw new Error("".concat(t," ").concat(e.name," is not defined."));return this.evalArray(e.args||[]).then(function(e){return r.apply(void 0,(0,n.default)(e))})},t.UnaryExpression=function(e){var t=this;return this.eval(e.right).then(function(r){return t._grammar.elements[e.operator].eval(r)})}},94521:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(14041),o=r(31593),i=r(38216),a=r(48156),l=r(96674),s=r(25337),c=r(31042),u=r(59054),f=r(42395),d=r(3807);function p(e){return(0,d.Ay)("PrivateSwitchBase",e)}(0,f.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var h=r(39455),m=r(31085);const y=(0,l.Ay)(u.A,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),b=(0,l.Ay)("input",{name:"MuiSwitchBase",shouldForwardProp:a.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),v=n.forwardRef(function(e,t){const{autoFocus:r,checked:n,checkedIcon:a,defaultChecked:l,disabled:u,disableFocusRipple:f=!1,edge:d=!1,icon:v,id:g,inputProps:w,inputRef:S,name:A,onBlur:O,onChange:x,onFocus:k,readOnly:C,required:P=!1,tabIndex:E,type:j,value:T,slots:_={},slotProps:R={},...M}=e,[I,N]=(0,s.A)({controlled:n,default:Boolean(l),name:"SwitchBase",state:"checked"}),D=(0,c.A)();let F=u;D&&void 0===F&&(F=D.disabled);const L="checkbox"===j||"radio"===j,z={...e,checked:I,disabled:F,disableFocusRipple:f,edge:d},B=(e=>{const{classes:t,checked:r,disabled:n,edge:a}=e,l={root:["root",r&&"checked",n&&"disabled",a&&`edge${(0,i.A)(a)}`],input:["input"]};return(0,o.A)(l,p,t)})(z),$={slots:_,slotProps:{input:w,...R}},[G,H]=(0,h.A)("root",{ref:t,elementType:y,className:B.root,shouldForwardComponentProp:!0,externalForwardedProps:{...$,component:"span",...M},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{k&&k(e),D&&D.onFocus&&D.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{O&&O(e),D&&D.onBlur&&D.onBlur(e)})(t)}}),ownerState:z,additionalProps:{centerRipple:!0,focusRipple:!f,disabled:F,role:void 0,tabIndex:null}}),[V,W]=(0,h.A)("input",{ref:S,elementType:b,className:B.input,externalForwardedProps:$,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;N(t),x&&x(e,t)})(t)}}),ownerState:z,additionalProps:{autoFocus:r,checked:n,defaultChecked:l,disabled:F,id:L?g:void 0,name:A,readOnly:C,required:P,tabIndex:E,type:j,..."checkbox"===j&&void 0===T?{}:{value:T}}});return(0,m.jsxs)(G,{...H,children:[(0,m.jsx)(V,{...W}),I?a:v]})})},94571:(e,t,r)=>{"use strict";r.d(t,{h:()=>x});var n=r(88357),o=r(24254),i=r(46195),a=r(38509),l=new a.c(function(e){return e.complete()}),s=r(14460);function c(e){return e[e.length-1]}var u=r(54184),f=r(22185),d=r(869);function p(e,t){return void 0===t&&(t=0),(0,f.N)(function(r,n){r.subscribe((0,d._)(n,function(r){return(0,u.N)(n,e,function(){return n.next(r)},t)},function(){return(0,u.N)(n,e,function(){return n.complete()},t)},function(r){return(0,u.N)(n,e,function(){return n.error(r)},t)}))})}function h(e,t){return void 0===t&&(t=0),(0,f.N)(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}var m=r(49758);function y(e,t){if(!e)throw new Error("Iterable cannot be null");return new a.c(function(r){(0,u.N)(r,t,function(){var n=e[Symbol.asyncIterator]();(0,u.N)(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}var b=r(23330),v=r(26691),g=r(31604),w=r(93206),S=r(74956),A=r(64904),O=r(98523);function x(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=function(e){return(t=c(e))&&(0,s.T)(t.schedule)?e.pop():void 0;var t}(e),f=function(e){return"number"==typeof c(e)?e.pop():1/0}(e),d=e;return d.length?1===d.length?(0,i.Tg)(d[0]):function(e){return void 0===e&&(e=1/0),(0,n.Z)(o.D,e)}(f)(function(e,t){return t?function(e,t){if(null!=e){if((0,b.l)(e))return function(e,t){return(0,i.Tg)(e).pipe(h(t),p(t))}(e,t);if((0,g.X)(e))return function(e,t){return new a.c(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}(e,t);if((0,v.y)(e))return function(e,t){return(0,i.Tg)(e).pipe(h(t),p(t))}(e,t);if((0,S.T)(e))return y(e,t);if((0,w.x)(e))return function(e,t){return new a.c(function(r){var n;return(0,u.N)(r,t,function(){n=e[m.l](),(0,u.N)(r,t,function(){var e,t,o;try{t=(e=n.next()).value,o=e.done}catch(e){return void r.error(e)}o?r.complete():r.next(t)},0,!0)}),function(){return(0,s.T)(null==n?void 0:n.return)&&n.return()}})}(e,t);if((0,O.U)(e))return function(e,t){return y((0,O.C)(e),t)}(e,t)}throw(0,A.L)(e)}(e,t):(0,i.Tg)(e)}(d,r)):l}},94820:(e,t,r)=>{"use strict";r.d(t,{Gh:()=>s,HZ:()=>c,Mk:()=>l,OL:()=>i,Oq:()=>S,Qy:()=>w,SN:()=>v,TW:()=>p,VO:()=>h,Z:()=>f,Ze:()=>b,e$:()=>u,fS:()=>d,gb:()=>a,l_:()=>y,nF:()=>m,nW:()=>A,ro:()=>g});var n=r(89575),o=r(38036);const i="auto-generated-group-node-root",a=Symbol("mui.id_autogenerated"),l=()=>({type:"group",id:i,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function s(e,t,r="A row was provided without id in the rows prop:"){if(null==e)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",r,JSON.stringify(t)].join("\n"))}const c=(e,t,r)=>{const n=t?t(e):e.id;return s(n,e,r),n},u=(e,t,r)=>{const n=t.field;if(!t||!t.valueGetter)return e[n];const o=e[t.field];return t.valueGetter(o,e,t,r)},f=({rows:e,getRowId:t,loading:r,rowCount:n})=>{const o={type:"full",rows:[]},i={};for(let r=0;r<e.length;r+=1){const n=e[r],a=c(n,t);i[a]=n,o.rows.push(a)}return{rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:r,rowCountPropBeforePartialUpdates:n,updates:o,dataRowIdToModelLookup:i}},d=({tree:e,rowCountProp:t=0})=>{const r=e[i];return Math.max(t,r.children.length+(null==r.footerId?0:1))},p=({apiRef:e,rowCountProp:t=0,loadingProp:r,previousTree:o,previousTreeDepths:i,previousGroupsToFetch:a})=>{const l=e.current.caches.rows,{tree:s,treeDepths:c,dataRowIds:u,groupingName:f,groupsToFetch:p=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:o,previousTreeDepths:i,updates:l.updates,dataRowIdToModelLookup:l.dataRowIdToModelLookup,previousGroupsToFetch:a}),h=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:c,dataRowIds:u,dataRowIdToModelLookup:l.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},(0,n.A)({},h,{totalRowCount:Math.max(t,h.dataRowIds.length),totalTopLevelRowCount:d({tree:h.tree,rowCountProp:t}),groupingName:f,loading:r,groupsToFetch:p})},h=e=>a in e,m=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,y=(e,t,r)=>{const n=e[t];if("group"!==n.type)return[];const o=[];for(let t=0;t<n.children.length;t+=1){const i=n.children[t];r&&m(e[i])||o.push(i);const a=y(e,i,r);for(let e=0;e<a.length;e+=1)o.push(a[e])}return r||null==n.footerId||o.push(n.footerId),o},b=({previousCache:e,getRowId:t,updates:r,groupKeys:o})=>{if("full"===e.updates.type)throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const i=new Map;r.forEach(e=>{const r=c(e,t,"A row was provided without id when calling updateRows():");i.has(r)?i.set(r,(0,n.A)({},i.get(r),e)):i.set(r,e)});const a={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:(0,n.A)({},e.updates.idToActionLookup),groupKeys:o},l=(0,n.A)({},e.dataRowIdToModelLookup),s={insert:{},modify:{},remove:{}};i.forEach((e,t)=>{const r=a.idToActionLookup[t];if("delete"===e._action){if("remove"===r||!l[t])return;return null!=r&&(s[r][t]=!0),a.actions.remove.push(t),void delete l[t]}const o=l[t];if(o)return"remove"===r?(s.remove[t]=!0,a.actions.modify.push(t)):null==r&&a.actions.modify.push(t),void(l[t]=(0,n.A)({},o,e));"remove"===r?(s.remove[t]=!0,a.actions.insert.push(t)):null==r&&a.actions.insert.push(t),l[t]=e});const u=Object.keys(s);for(let e=0;e<u.length;e+=1){const t=u[e],r=s[t];Object.keys(r).length>0&&(a.actions[t]=a.actions[t].filter(e=>!r[e]))}return{dataRowIdToModelLookup:l,updates:a,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}},v="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function g(e,t,r){const i=[];return t.forEach(t=>{const a=c(t,r,"A row was provided without id when calling updateRows():"),l=(0,o.Qu)(e,a);if("pinnedRow"===l?.type){const r=e.current.caches.pinnedRows,o=r.idLookup[a];o&&(r.idLookup[a]=(0,n.A)({},o,t))}else i.push(t)}),i}const w=(e,t,r)=>"number"==typeof e&&e>0?e:t,S=["MUI X: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),A=["MUI X: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n")},95305:(e,t,r)=>{"use strict";r.d(t,{A:()=>S});var n=r(14041),o=r(54357),i=r(31593),a=r(58203),l=r(96674),s=r(40979),c=r(14133),u=r(38617),f=r(24e3),d=r(89327),p=r(8837),h=r(21733),m=r(79177),y=r(42777),b=r(39455),v=r(31085);const g={standard:c.A,filled:u.A,outlined:f.A},w=(0,l.Ay)(p.A,{name:"MuiTextField",slot:"Root"})({}),S=n.forwardRef(function(e,t){const r=(0,s.b)({props:e,name:"MuiTextField"}),{autoComplete:n,autoFocus:l=!1,children:c,className:u,color:f="primary",defaultValue:p,disabled:S=!1,error:A=!1,FormHelperTextProps:O,fullWidth:x=!1,helperText:k,id:C,InputLabelProps:P,inputProps:E,InputProps:j,inputRef:T,label:_,maxRows:R,minRows:M,multiline:I=!1,name:N,onBlur:D,onChange:F,onFocus:L,placeholder:z,required:B=!1,rows:$,select:G=!1,SelectProps:H,slots:V={},slotProps:W={},type:U,value:q,variant:X="outlined",...K}=r,Y={...r,autoFocus:l,color:f,disabled:S,error:A,fullWidth:x,multiline:I,required:B,select:G,variant:X},J=(e=>{const{classes:t}=e;return(0,i.A)({root:["root"]},y._,t)})(Y),Z=(0,a.A)(C),Q=k&&Z?`${Z}-helper-text`:void 0,ee=_&&Z?`${Z}-label`:void 0,te=g[X],re={slots:V,slotProps:{input:j,inputLabel:P,htmlInput:E,formHelperText:O,select:H,...W}},ne={},oe=re.slotProps.inputLabel;"outlined"===X&&(oe&&void 0!==oe.shrink&&(ne.notched=oe.shrink),ne.label=_),G&&(H&&H.native||(ne.id=void 0),ne["aria-describedby"]=void 0);const[ie,ae]=(0,b.A)("root",{elementType:w,shouldForwardComponentProp:!0,externalForwardedProps:{...re,...K},ownerState:Y,className:(0,o.A)(J.root,u),ref:t,additionalProps:{disabled:S,error:A,fullWidth:x,required:B,color:f,variant:X}}),[le,se]=(0,b.A)("input",{elementType:te,externalForwardedProps:re,additionalProps:ne,ownerState:Y}),[ce,ue]=(0,b.A)("inputLabel",{elementType:d.A,externalForwardedProps:re,ownerState:Y}),[fe,de]=(0,b.A)("htmlInput",{elementType:"input",externalForwardedProps:re,ownerState:Y}),[pe,he]=(0,b.A)("formHelperText",{elementType:h.A,externalForwardedProps:re,ownerState:Y}),[me,ye]=(0,b.A)("select",{elementType:m.A,externalForwardedProps:re,ownerState:Y}),be=(0,v.jsx)(le,{"aria-describedby":Q,autoComplete:n,autoFocus:l,defaultValue:p,fullWidth:x,multiline:I,name:N,rows:$,maxRows:R,minRows:M,type:U,value:q,id:Z,inputRef:T,onBlur:D,onChange:F,onFocus:L,placeholder:z,inputProps:de,slots:{input:V.htmlInput?fe:void 0},...se});return(0,v.jsxs)(ie,{...ae,children:[null!=_&&""!==_&&(0,v.jsx)(ce,{htmlFor:Z,id:ee,...ue,children:_}),G?(0,v.jsx)(me,{"aria-describedby":Q,id:Z,labelId:ee,value:q,input:be,...ye,children:c}):be,k&&(0,v.jsx)(pe,{id:Q,...he,children:k})]})})},95381:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e,t=[]){if(void 0===e)return{};const r={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r)).forEach(t=>{r[t]=e[t]}),r}},95689:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,N:()=>i});var n=r(42395),o=r(3807);function i(e){return(0,o.Ay)("MuiFilledInput",e)}const a={...r(18913).A,...(0,n.A)("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])}},95725:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LEFT=t.BOTTOM=t.RIGHT=t.TOP=t.Axis=t.axisPropsFromTickScale=void 0;var o=r(72887);Object.defineProperty(t,"axisPropsFromTickScale",{enumerable:!0,get:function(){return n(o).default}});var i=r(49104);Object.defineProperty(t,"Axis",{enumerable:!0,get:function(){return n(i).default}}),Object.defineProperty(t,"TOP",{enumerable:!0,get:function(){return i.TOP}}),Object.defineProperty(t,"RIGHT",{enumerable:!0,get:function(){return i.RIGHT}}),Object.defineProperty(t,"BOTTOM",{enumerable:!0,get:function(){return i.BOTTOM}}),Object.defineProperty(t,"LEFT",{enumerable:!0,get:function(){return i.LEFT}})},95733:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,h:()=>i});var n=r(42395),o=r(3807);function i(e){return(0,o.Ay)("MuiCardContent",e)}const a=(0,n.A)("MuiCardContent",["root"])},95734:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(14041).createContext({})},95790:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>b,getTabUtilityClass:()=>p,tabClasses:()=>h});var n=r(14041),o=r(54357),i=r(31593),a=r(59054),l=r(38216),s=r(96674),c=r(42014),u=r(40979),f=r(42395),d=r(3807);function p(e){return(0,d.Ay)("MuiTab",e)}const h=(0,f.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]);var m=r(31085);const y=(0,s.Ay)(a.A,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t[`textColor${(0,l.A)(r.textColor)}`],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped,{[`& .${h.iconWrapper}`]:t.iconWrapper},{[`& .${h.icon}`]:t.icon}]}})((0,c.A)(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${h.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${h.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${h.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${h.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${h.selected}`]:{opacity:1},[`&.${h.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${h.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${h.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${h.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${h.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),b=n.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiTab"}),{className:a,disabled:s=!1,disableFocusRipple:c=!1,fullWidth:f,icon:d,iconPosition:h="top",indicator:b,label:v,onChange:g,onClick:w,onFocus:S,selected:A,selectionFollowsFocus:O,textColor:x="inherit",value:k,wrapped:C=!1,...P}=r,E={...r,disabled:s,disableFocusRipple:c,selected:A,icon:!!d,iconPosition:h,label:!!v,fullWidth:f,textColor:x,wrapped:C},j=(e=>{const{classes:t,textColor:r,fullWidth:n,wrapped:o,icon:a,label:s,selected:c,disabled:u}=e,f={root:["root",a&&s&&"labelIcon",`textColor${(0,l.A)(r)}`,n&&"fullWidth",o&&"wrapped",c&&"selected",u&&"disabled"],icon:["iconWrapper","icon"]};return(0,i.A)(f,p,t)})(E),T=d&&v&&n.isValidElement(d)?n.cloneElement(d,{className:(0,o.A)(j.icon,d.props.className)}):d;return(0,m.jsxs)(y,{focusRipple:!c,className:(0,o.A)(j.root,a),ref:t,role:"tab","aria-selected":A,disabled:s,onClick:e=>{!A&&g&&g(e,k),w&&w(e)},onFocus:e=>{O&&!A&&g&&g(e,k),S&&S(e)},ownerState:E,tabIndex:A?0:-1,...P,children:["top"===h||"start"===h?(0,m.jsxs)(n.Fragment,{children:[T,v]}):(0,m.jsxs)(n.Fragment,{children:[v,T]}),b]})})},95818:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(14041).createContext()},95924:(e,t,r)=>{"use strict";r.d(t,{$c:()=>O,AP:()=>a,Bx:()=>p,Dq:()=>y,Dy:()=>o,Rb:()=>m,Rv:()=>h,TA:()=>f,Tq:()=>d,YI:()=>b,Zw:()=>A,dL:()=>x,fl:()=>i,iF:()=>g,j4:()=>k,mH:()=>w,u:()=>l,v_:()=>c,xE:()=>u});var n=r(43433);function o(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function i(e,t){return e.closest(`.${t}`)}function a(e){return e.replace(/["\\]/g,"\\$&")}function l(e,t){return e.querySelector(`[role="columnheader"][data-field="${a(t)}"]`)}function s(e){return`.${n.x.row}[data-id="${a(String(e))}"]`}function c(e,t){return e.querySelector(s(t))}function u(e,{id:t,field:r}){const o=`${s(t)} .${n.x.cell}[data-field="${a(r)}"]`;return e.querySelector(o)}function f(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}function d(e){return e.getAttribute("data-field")}function p(e,t){return e.querySelector(`[data-field="${a(t)}"]`)}function h(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function m(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${a(t)}-|"]`)??[])}function y(e,t){if(!i(e,n.x.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,a=[];return t.virtualScrollerRef?.current?(C(t).forEach(e=>{const r=e.getAttribute("data-id");if(!r)return;let n=o;const i=t.unstable_getCellColSpanInfo(r,o);i&&i.spannedByColSpan&&(n=i.leftVisibleCellIndex);const l=e.querySelector(`[data-colindex="${n}"]`);l&&a.push(l)}),a):[]}function b(e,t){return e.rootElementRef.current.querySelector(`.${n.x[t]}`)}const v=({api:e,colIndex:t,position:r,filterFn:o})=>{if(null===t)return[];const i=[];return C(e).forEach(e=>{e.getAttribute("data-id")&&e.querySelectorAll(`.${n.x["left"===r?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(e=>{const t=P(e);null!==t&&o(t)&&i.push(e)})}),i};function g(e,t,r){const n=P(t);return v({api:e,colIndex:n,position:r?"right":"left",filterFn:e=>r?e<n:e>n})}function w(e,t,r){const n=P(t);return v({api:e,colIndex:n,position:r?"left":"right",filterFn:e=>r?e>n:e<n})}const S=({api:e,colIndex:t,position:r,filterFn:o})=>{if(!e.columnHeadersContainerRef?.current)return[];if(null===t)return[];const i=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${n.x["left"===r?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(e=>{const t=P(e);null!==t&&o(t,e)&&i.push(e)}),i};function A(e,t,r){const n=P(t);return S({api:e,position:r?"right":"left",colIndex:n,filterFn:e=>r?e<n:e>n})}function O(e,t,r){const o=P(t);return S({api:e,position:r?"left":"right",colIndex:o,filterFn:(e,t)=>!t.classList.contains(n.x["columnHeader--last"])&&(r?e>o:e<o)})}function x(e,t){return e.columnHeadersContainerRef.current.querySelector(`:scope > div > [data-field="${a(t)}"][role="columnheader"]`)}function k(e,t){const r=e.virtualScrollerRef.current;return Array.from(r.querySelectorAll(`:scope > div > div > div > [data-field="${a(t)}"][role="gridcell"]`))}function C(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${n.x.row}`)}function P(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}},95944:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(35979),o=r.n(n);function i(){var e=new(o().Jexl);return e.addFunction("get",function(e,t){return e.get(t)}),e.addFunction("parent",function(e){return e.parent()}),e.addFunction("id",function(e){return e.id()}),e.addFunction("cast",function(e){return e}),e.addFunction("log",function(e){return console.log(e),e}),e.addFunction("max",Math.max),e.addFunction("min",Math.min),e.addFunction("sqrt",Math.sqrt),e.addFunction("ceil",Math.ceil),e.addFunction("floor",Math.floor),e.addFunction("round",Math.round),e.addFunction("abs",Math.abs),e.addFunction("log10",Math.log10),e.addFunction("parseInt",Number.parseInt),e.addFunction("parseFloat",Number.parseFloat),e.addFunction("split",function(e,t){return e.split(t)}),e.addFunction("charAt",function(e,t){return e.charAt(t)}),e.addFunction("charCodeAt",function(e,t){return e.charCodeAt(t)}),e.addFunction("codePointAt",function(e,t){return e.codePointAt(t)}),e.addFunction("startsWith",function(e,t,r){return e.startsWith(t,r)}),e.addFunction("endsWith",function(e,t,r){return e.endsWith(t,r)}),e.addFunction("padEnd",function(e,t,r){return e.padEnd(t,r)}),e.addFunction("padStart",function(e,t,r){return e.padStart(t,r)}),e.addFunction("repeat",function(e,t){return e.repeat(t)}),e.addFunction("replace",function(e,t,r){return e.replace(t,r)}),e.addFunction("replaceAll",function(e,t,r){return e.replaceAll(t,r)}),e.addFunction("slice",function(e,t,r){return e.slice(t,r)}),e.addFunction("startsWith",function(e,t,r){return e.startsWith(t,r)}),e.addFunction("substring",function(e,t,r){return e.substring(t,r)}),e.addFunction("toLowerCase",function(e){return e.toLowerCase()}),e.addFunction("toUpperCase",function(e){return e.toUpperCase()}),e.addFunction("jsonParse",function(e){return JSON.parse(e)}),e.addFunction("trim",function(e){return e.trim()}),e.addFunction("trimEnd",function(e){return e.trimEnd()}),e.addFunction("trimStart",function(e){return e.trimStart()}),e.addFunction("getTag",function(e,t){var r=e.get("tags");return r?r[t]:e.get(t)}),e.addBinaryOp("&",15,function(e,t){return e&t}),e}},96024:(e,t,r)=>{"use strict";r.d(t,{f:()=>G});var n=r(89575),o=r(17502),i=r(14041),a=r(41491),l=r(10591),s=r(54357),c=r(96674),u=r(57936),f=r(9919),d=r(58385),p=r(67591),h=r(37047),m=r(61651),y=r(53283),b=r(16037),v=r(58203),g=r(31593),w=r(37570),S=r(43433),A=r(97909),O=r(5334),x=r(72370),k=r(95924),C=r(34051),P=r(54012),E=r(31085);function j(e){const{groupId:t,width:r,depth:o,maxDepth:a,fields:l,height:s,colIndex:c,hasFocus:d,tabIndex:p,isLastColumn:h,pinnedPosition:m,pinnedOffset:y}=e,b=(0,f.A)(),j=(0,w.I)(),T=i.useRef(null),_=(0,O.h)(),R=(0,u.Nc)(_,A.ED),M=t?R[t]:{},{headerName:I=t??"",description:N="",headerAlign:D}=M;let F;const L=t&&R[t]?.renderHeaderGroup,z=i.useMemo(()=>({groupId:t,headerName:I,description:N,depth:o,maxDepth:a,fields:l,colIndex:c,isLastColumn:h}),[t,I,N,o,a,l,c,h]);t&&L&&(F=L(z));const B=(0,n.A)({},e,{classes:b.classes,headerAlign:D,depth:o,isDragging:!1}),$=I??t,G=(0,v.A)(),H=null===t?`empty-group-cell-${G}`:t,V=(e=>{const{classes:t,headerAlign:r,isDragging:n,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:l,pinnedPosition:s}=e,c={root:["columnHeader","left"===r&&"columnHeader--alignLeft","center"===r&&"columnHeader--alignCenter","right"===r&&"columnHeader--alignRight",n&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",null===l?"columnHeader--emptyGroup":"columnHeader--filledGroup",s===C.yL.LEFT&&"columnHeader--pinnedLeft",s===C.yL.RIGHT&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,g.A)(c,S.B,t)})(B);i.useLayoutEffect(()=>{if(d){const e=T.current.querySelector('[tabindex="0"]')||T.current;e?.focus()}},[_,d]);const W=i.useCallback(e=>t=>{(0,k.TA)(t)||_.current.publishEvent(e,z,t)},[_,z]),U=i.useMemo(()=>({onKeyDown:W("columnGroupHeaderKeyDown"),onFocus:W("columnGroupHeaderFocus"),onBlur:W("columnGroupHeaderBlur")}),[W]),q="function"==typeof M.headerClassName?M.headerClassName(z):M.headerClassName,X=i.useMemo(()=>(0,P.l)((0,n.A)({},e.style),j,m,y),[m,y,e.style,j]);return(0,E.jsx)(x.a,(0,n.A)({ref:T,classes:V,columnMenuOpen:!1,colIndex:c,height:s,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:p,isDraggable:!1,headerComponent:F,headerClassName:q,description:N,elementId:H,width:r,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:$,"aria-colspan":l.length,"data-fields":`|-${l.join("-|-")}-|`,style:X},U))}var T=r(55136),_=r(4012),R=r(27869),M=r(5877),I=r(94042);const N=(0,c.Ay)("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow"})({display:"flex"});var D=r(86053);const F=["className"],L=(0,D.A)("div",{name:"MuiDataGrid",slot:"ColumnHeaders"})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),z=(0,l.R)(function(e,t){const{className:r}=e,i=(0,o.A)(e,F),a=(0,f.A)(),l=(e=>{const{classes:t}=e;return(0,g.A)({root:["columnHeaders"]},S.B,t)})(a);return(0,E.jsx)(L,(0,n.A)({className:(0,s.A)(l.root,r),ownerState:a},i,{role:"presentation",ref:t}))}),B=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],$=(0,l.R)(function(e,t){const{visibleColumns:r,sortColumnLookup:a,filterColumnLookup:l,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:v,columnHeaderFocus:g,columnGroupHeaderFocus:w,headerGroupingMaxDepth:O,columnMenuState:x,columnVisibility:k,columnGroupsHeaderStructure:P,hasOtherElementInTabSequence:D}=e,F=(0,o.A)(e,B),{getInnerProps:L,getColumnHeadersRow:$,getColumnGroupHeadersRows:G}=(e=>{const{visibleColumns:t,sortColumnLookup:r,filterColumnLookup:o,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:l,columnHeaderFocus:c,columnGroupHeaderFocus:v,headerGroupingMaxDepth:g,columnMenuState:w,columnVisibility:O,columnGroupsHeaderStructure:x,hasOtherElementInTabSequence:k}=e,[P,D]=i.useState(""),[F,L]=i.useState(""),z=(0,d.E)(),B=(0,f.A)(),$=(0,u.Nc)(z,A.TQ),G=(0,u.Nc)(z,T.Sw),H=(0,u.Nc)(z,y.EG),V=(0,u.Nc)(z,T.Q1),W=(0,u.Nc)(z,T.gv),U=(0,b.Yr)(G,H,V.left.length),q=(0,u.Nc)(z,m.fc),X=(0,u.Nc)(z,m.sj),K=(0,u.Nc)(z,m._b),Y=(0,u.Nc)(z,m.hH),J=(0,u.Nc)(z,m.Y9),Z=i.useCallback(e=>L(e.field),[]),Q=i.useCallback(()=>L(""),[]),ee=i.useCallback(e=>D(e.field),[]),te=i.useCallback(()=>D(""),[]),re=i.useMemo(()=>V.left.length?{firstColumnIndex:0,lastColumnIndex:V.left.length}:null,[V.left.length]),ne=i.useMemo(()=>V.right.length?{firstColumnIndex:t.length-V.right.length,lastColumnIndex:t.length}:null,[V.right.length,t.length]);(0,p._W)(z,"columnResizeStart",Z),(0,p._W)(z,"columnResizeStop",Q),(0,p._W)(z,"columnHeaderDragStart",ee),(0,p._W)(z,"columnHeaderDragEndNative",te);const oe=e=>{const{renderContext:r=H}=e||{},n=r.firstColumnIndex,o=r.lastColumnIndex;return{renderedColumns:t.slice(n,o),firstColumnToRender:n,lastColumnToRender:o}},ie=(e,t,r,n=!1)=>{const o=e?.position===C.yL.RIGHT,a=void 0===e?.position,l=V.right.length>0&&o||0===V.right.length&&a,c=U-r;return(0,E.jsxs)(i.Fragment,{children:[a&&(0,E.jsx)("div",{role:"presentation",style:{width:c}}),t,a&&(0,E.jsx)("div",{role:"presentation",className:(0,s.A)(S.x.filler,n&&S.x["filler--borderBottom"])}),l&&(0,E.jsx)(_.t,{header:!0,pinnedRight:o,borderBottom:n,borderTop:!1})]})},ae=(e,t={})=>{const{renderedColumns:i,firstColumnToRender:l}=oe(e),s=[];for(let u=0;u<i.length;u+=1){const f=i[u],d=l+u,p=0===d,m=null!==a&&a.field===f.field||p&&!k?0:-1,y=null!==c&&c.field===f.field,b=w.open&&w.field===f.field,v=e?.position,g=(0,R.Y)(v,f.computedWidth,d,G,q,J),S=v===C.yL.RIGHT?i[u-1]:i[u+1],A=!!S&&null!==c&&c.field===S.field,O=d+1===G.length-V.right.length,x=u,j=i.length,T=(0,I.o)(v,x),_=(0,I.L)(v,x,j,B.showColumnVerticalBorder,X);s.push((0,E.jsx)(h.d,(0,n.A)({},r[f.field],{columnMenuOpen:b,filterItemsCounter:o[f.field]&&o[f.field].length,headerHeight:K,isDragging:f.field===P,colDef:f,colIndex:d,isResizing:F===f.field,isLast:d===G.length-1,hasFocus:y,tabIndex:m,pinnedPosition:v,pinnedOffset:g,isLastUnpinned:O,isSiblingFocused:A,showLeftBorder:T,showRightBorder:_},t),f.field))}return ie(e,s,0)},le=({depth:e,params:r})=>{const o=oe(r);if(0===o.renderedColumns.length)return null;const{firstColumnToRender:i,lastColumnToRender:a}=o,s=x[e],c=t[i].field,u=$[c]?.[e]??null,f=s.findIndex(({groupId:e,columnFields:t})=>e===u&&t.includes(c)),d=t[a-1].field,p=$[d]?.[e]??null,h=s.findIndex(({groupId:e,columnFields:t})=>e===p&&t.includes(d)),m=s.slice(f,h+1).map(e=>(0,n.A)({},e,{columnFields:e.columnFields.filter(e=>!1!==O[e])})).filter(e=>e.columnFields.length>0),y=m[0].columnFields.indexOf(c),b=m[0].columnFields.slice(0,y).reduce((e,t)=>e+(W[t].computedWidth??0),0);let w=i;const S=m.map(({groupId:t,columnFields:n},o)=>{const i=null!==v&&v.depth===e&&n.includes(v.field),a=null!==l&&l.depth===e&&n.includes(l.field)?0:-1,s={groupId:t,width:n.reduce((e,t)=>e+W[t].computedWidth,0),fields:n,colIndex:w,hasFocus:i,tabIndex:a},c=r.position,u=(0,R.Y)(c,s.width,w,G,q,J);w+=n.length;let f=o;return c===C.yL.LEFT&&(f=w-1),(0,E.jsx)(j,{groupId:t,width:s.width,fields:s.fields,colIndex:s.colIndex,depth:e,isLastColumn:o===m.length-1,maxDepth:g,height:Y,hasFocus:i,tabIndex:a,pinnedPosition:c,pinnedOffset:u,showLeftBorder:(0,I.o)(c,f),showRightBorder:(0,I.L)(c,f,m.length,B.showColumnVerticalBorder,X)},o)});return ie(r,S,b)};return{renderContext:H,leftRenderContext:re,rightRenderContext:ne,pinnedColumns:V,visibleColumns:t,columnPositions:G,getFillers:ie,getColumnHeadersRow:()=>(0,E.jsxs)(N,{role:"row","aria-rowindex":g+1,ownerState:B,className:S.x["row--borderBottom"],style:{height:K},children:[re&&ae({position:C.yL.LEFT,renderContext:re},{disableReorder:!0}),ae({renderContext:H}),ne&&ae({position:C.yL.RIGHT,renderContext:ne},{disableReorder:!0,separatorSide:M.j.Left})]}),getColumnsToRender:oe,getColumnGroupHeadersRows:()=>{if(0===g)return null;const e=[];for(let t=0;t<g;t+=1)e.push((0,E.jsxs)(N,{role:"row","aria-rowindex":t+1,ownerState:B,style:{height:Y},children:[re&&le({depth:t,params:{position:C.yL.LEFT,renderContext:re,maxLastColumn:re.lastColumnIndex}}),le({depth:t,params:{renderContext:H}}),ne&&le({depth:t,params:{position:C.yL.RIGHT,renderContext:ne,maxLastColumn:ne.lastColumnIndex}})]},t));return e},getPinnedCellOffset:R.Y,isDragging:!!P,getInnerProps:()=>({role:"rowgroup"})}})({visibleColumns:r,sortColumnLookup:a,filterColumnLookup:l,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:v,columnHeaderFocus:g,columnGroupHeaderFocus:w,headerGroupingMaxDepth:O,columnMenuState:x,columnVisibility:k,columnGroupsHeaderStructure:P,hasOtherElementInTabSequence:D});return(0,E.jsxs)(z,(0,n.A)({},F,L(),{ref:t,children:[G(),$()]}))}),G=(0,a.n)($)},96201:(e,t)=>{"use strict";t.getGrammar=function(){return{elements:{".":{type:"dot"},"[":{type:"openBracket"},"]":{type:"closeBracket"},"|":{type:"pipe"},"{":{type:"openCurl"},"}":{type:"closeCurl"},":":{type:"colon"},",":{type:"comma"},"(":{type:"openParen"},")":{type:"closeParen"},"?":{type:"question"},"+":{type:"binaryOp",precedence:30,eval:function(e,t){return e+t}},"-":{type:"binaryOp",precedence:30,eval:function(e,t){return e-t}},"*":{type:"binaryOp",precedence:40,eval:function(e,t){return e*t}},"/":{type:"binaryOp",precedence:40,eval:function(e,t){return e/t}},"//":{type:"binaryOp",precedence:40,eval:function(e,t){return Math.floor(e/t)}},"%":{type:"binaryOp",precedence:50,eval:function(e,t){return e%t}},"^":{type:"binaryOp",precedence:50,eval:function(e,t){return Math.pow(e,t)}},"==":{type:"binaryOp",precedence:20,eval:function(e,t){return e==t}},"!=":{type:"binaryOp",precedence:20,eval:function(e,t){return e!=t}},">":{type:"binaryOp",precedence:20,eval:function(e,t){return e>t}},">=":{type:"binaryOp",precedence:20,eval:function(e,t){return e>=t}},"<":{type:"binaryOp",precedence:20,eval:function(e,t){return e<t}},"<=":{type:"binaryOp",precedence:20,eval:function(e,t){return e<=t}},"&&":{type:"binaryOp",precedence:10,evalOnDemand:function(e,t){return e.eval().then(function(e){return e?t.eval():e})}},"||":{type:"binaryOp",precedence:10,evalOnDemand:function(e,t){return e.eval().then(function(e){return e||t.eval()})}},in:{type:"binaryOp",precedence:20,eval:function(e,t){return"string"==typeof t?-1!==t.indexOf(e):!!Array.isArray(t)&&t.some(function(t){return t===e})}},"!":{type:"unaryOp",precedence:1/0,eval:function(e){return!e}}},functions:{},transforms:{}}}},96217:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r(14041),o=r(54357),i=r(31593),a=r(4686),l=r(96674),s=r(40979),c=r(75721),u=r(31085);const f=(0,l.Ay)("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),d={variant:"head"},p="thead",h=n.forwardRef(function(e,t){const r=(0,s.b)({props:e,name:"MuiTableHead"}),{className:n,component:l=p,...h}=r,m={...r,component:l},y=(e=>{const{classes:t}=e;return(0,i.A)({root:["root"]},c.X,t)})(m);return(0,u.jsx)(a.A.Provider,{value:d,children:(0,u.jsx)(f,{as:l,className:(0,o.A)(y.root,n),ref:t,role:l===p?null:"rowgroup",ownerState:m,...h})})})},96232:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C});var n=r(14041),o=r(9810),i=r(81296),a=r(63507),l=r(88581),s=r(95305),c=r(68805),u=r(94263),f=r(53125),d=r(72899),p=r(97469),h=r(98819),m=r(14041),y=["children"];function b(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return v(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(v(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,v(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,v(f,"constructor",c),v(c,"constructor",s),s.displayName="GeneratorFunction",v(c,o,"GeneratorFunction"),v(f),v(f,o,"Generator"),v(f,n,function(){return this}),v(f,"toString",function(){return"[object Generator]"}),(b=function(){return{w:i,m:d}})()}function v(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}v=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){v(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},v(e,t,r,n)}function g(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function w(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){g(i,n,o,a,l,"next",e)}function l(e){g(i,n,o,a,l,"throw",e)}a(void 0)})}}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function O(){return m.createElement("div",null,m.createElement(a.A,{size:20,style:{marginRight:20}}),m.createElement(l.A,{display:"inline"},"Creating SVG"))}function x(e){var t=e.children,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,y);return m.createElement("div",null,m.createElement(s.A,r,t))}function k(e,t){return(0,i.useLocalStorage)("svg-".concat(e),t)}function C(e){var t=e.model,r=e.handleClose,a=(0,i.getSession)(t),s="undefined"!=typeof OffscreenCanvas,y=S((0,n.useState)(s),2),v=y[0],g=y[1],A=S((0,n.useState)(!1),2),C=A[0],P=A[1],E=S((0,n.useState)(),2),j=E[0],T=E[1],_=S(k("file","jbrowse.svg"),2),R=_[0],M=_[1],I=S(k("theme",a.themeName||"default"),2),N=I[0],D=I[1];return m.createElement(o.Dialog,{open:!0,onClose:r,title:"Export SVG"},m.createElement(c.A,null,j?m.createElement(o.ErrorMessage,{error:j}):C?m.createElement(O,null):null,m.createElement(x,{helperText:"filename",value:R,onChange:function(e){M(e.target.value)}}),a.allThemes?m.createElement(x,{select:!0,label:"Theme",value:N,onChange:function(e){D(e.target.value)}},Object.entries(a.allThemes()).map(function(e){var t=S(e,2),r=t[0],n=t[1];return m.createElement(u.A,{key:r,value:r},n.name||"(Unknown name)")})):null,s?m.createElement(f.A,{control:m.createElement(d.A,{checked:v,onChange:function(){g(function(e){return!e})}}),label:"Rasterize canvas based tracks? File may be much larger if this is turned off"}):m.createElement(l.A,null,"Note: rasterizing layers not yet supported in this browser, so SVG size may be large")),m.createElement(p.A,null,m.createElement(h.A,{variant:"contained",color:"secondary",onClick:function(){r()}},"Cancel"),m.createElement(h.A,{variant:"contained",color:"primary",type:"submit",onClick:w(b().m(function e(){var n;return b().w(function(e){for(;;)switch(e.n){case 0:return P(!0),T(void 0),e.p=1,e.n=2,t.exportSvg({rasterizeLayers:v,filename:R,themeName:N});case 2:r(),e.n=4;break;case 3:e.p=3,n=e.v,console.error(n),T(n);case 4:return e.p=4,P(!1),e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))},"Submit")))}},96674:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>l});var n=r(62221),o=r(69839),i=r(2234),a=r(48156);const l=(0,n.Ay)({themeId:i.A,defaultTheme:o.A,rootShouldForwardProp:a.A})},96708:(e,t,r)=>{"use strict";r.d(t,{H:()=>s});var n=r(89575),o=(r(14041),r(63817)),i=r(5334),a=r(51023),l=r(31085);function s({columnMenuId:e,columnMenuButtonId:t,ContentComponent:r,contentComponentProps:s,field:c,open:u,target:f,onExited:d}){const p=(0,i.h)(),h=p.current.getColumn(c),m=(0,o.A)(e=>{e&&(e.stopPropagation(),f?.contains(e.target))||p.current.hideColumnMenu()});return f&&h?(0,l.jsx)(a.U,{position:"bottom-"+("right"===h.align?"start":"end"),open:u,target:f,onClose:m,onExited:d,children:(0,l.jsx)(r,(0,n.A)({colDef:h,hideMenu:m,open:u,id:e,labelledby:t},s))}):null}},96728:(e,t,r)=>{var n=r(75414),o=Object.prototype.hasOwnProperty,i="undefined"!=typeof Map;function a(){this._array=[],this._set=i?new Map:Object.create(null)}a.fromArray=function(e,t){for(var r=new a,n=0,o=e.length;n<o;n++)r.add(e[n],t);return r},a.prototype.size=function(){return i?this._set.size:Object.getOwnPropertyNames(this._set).length},a.prototype.add=function(e,t){var r=i?e:n.toSetString(e),a=i?this.has(e):o.call(this._set,r),l=this._array.length;a&&!t||this._array.push(e),a||(i?this._set.set(e,l):this._set[r]=l)},a.prototype.has=function(e){if(i)return this._set.has(e);var t=n.toSetString(e);return o.call(this._set,t)},a.prototype.indexOf=function(e){if(i){var t=this._set.get(e);if(t>=0)return t}else{var r=n.toSetString(e);if(o.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},a.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},a.prototype.toArray=function(){return this._array.slice()},t.C=a},96829:(e,t,r)=>{"use strict";r.d(t,{D:()=>A});var n=r(89575),o=r(14041),i=r(31593),a=r(96674),l=r(18913),s=r(91437),c=r(55136),u=r(57936),f=r(5334),d=r(9919),p=r(43433);const h=(e,t)=>{const r=new Set(Object.keys(e).filter(t=>!1===e[t])),n=new Set(Object.keys(t).filter(e=>!1===t[e]));if(r.size!==n.size)return!1;let o=!0;return r.forEach(e=>{n.has(e)||(o=!1)}),o},m=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1;var y=r(48731),b=r(25010),v=r(88465),g=r(31085);const w=e=>{const{classes:t}=e;return(0,i.A)({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},p.B,t)},S=new Intl.Collator;function A(e){const t=(0,f.h)(),r=o.useRef(null),i=(0,u.Nc)(t,c.FX),a=(0,u.Nc)(t,c.FY),l=(0,d.A)(),[s,p]=o.useState(""),y=w(l),b=(0,u.Nc)(t,c.OV),A=(0,u.Nc)(t,v.MX),j=(0,u.Nc)(t,v.xi),T=o.useMemo(()=>A?Array.from(j.values()):b,[A,j,b]),{sort:_,searchPredicate:R=m,autoFocusSearchField:M=!0,disableShowHideToggle:I=!1,disableResetButton:N=!1,toggleAllMode:D="all",getTogglableColumns:F,searchInputProps:L}=e,z=o.useMemo(()=>h(a,i),[a,i]),B=o.useMemo(()=>{switch(_){case"asc":return[...T].sort((e,t)=>S.compare(e.headerName||e.field,t.headerName||t.field));case"desc":return[...T].sort((e,t)=>-S.compare(e.headerName||e.field,t.headerName||t.field));default:return T}},[T,_]),$=e=>{const{name:r}=e.target;t.current.setColumnVisibility(r,!1===a[r])},G=o.useMemo(()=>{const e=F?F(B):null,t=e?B.filter(({field:t})=>e.includes(t)):B;return s?t.filter(e=>R(e,s.toLowerCase())):t},[B,s,R,F]),H=o.useCallback(e=>{const r=(0,c.FY)(t),o=(0,n.A)({},r),i=F?F(T):null;return("filteredOnly"===D?G:T).forEach(t=>{t.hideable&&(null==i||i.includes(t.field))&&(e?delete o[t.field]:o[t.field]=!1)}),t.current.setColumnVisibilityModel(o)},[t,T,F,D,G]),V=o.useCallback(e=>{p(e.target.value)},[]),W=o.useMemo(()=>G.filter(e=>e.hideable),[G]),U=o.useMemo(()=>W.every(e=>null==a[e.field]||!1!==a[e.field]),[a,W]),q=o.useMemo(()=>W.every(e=>!1===a[e.field]),[a,W]),X=o.useRef(null);o.useEffect(()=>{M?r.current?.focus():X.current&&"function"==typeof X.current.focus&&X.current.focus()},[M]);let K=!1;const Y=e=>!1===K&&!1!==e.hideable&&(K=!0,!0),J=o.useCallback(()=>{p(""),r.current?.focus()},[]);return(0,g.jsxs)(o.Fragment,{children:[(0,g.jsx)(k,{className:y.header,ownerState:l,children:(0,g.jsx)(C,(0,n.A)({as:l.slots.baseTextField,ownerState:l,placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:r,className:y.searchInput,value:s,onChange:V,size:"small",type:"search",slotProps:{input:{startAdornment:(0,g.jsx)(l.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:(0,g.jsx)(l.slots.baseIconButton,(0,n.A)({size:"small","aria-label":t.current.getLocaleText("columnsManagementDeleteIconLabel"),style:s?{visibility:"visible"}:{visibility:"hidden"},tabIndex:-1,onClick:J,edge:"end"},l.slotProps?.baseIconButton,{children:(0,g.jsx)(l.slots.quickFilterClearIcon,{fontSize:"small"})}))},htmlInput:{"aria-label":t.current.getLocaleText("columnsManagementSearchTitle")}},autoComplete:"off",fullWidth:!0},l.slotProps?.baseTextField,L))}),(0,g.jsx)(x,{ownerState:l,children:(0,g.jsxs)(O,{className:y.root,ownerState:l,children:[G.map(e=>(0,g.jsx)(l.slots.baseCheckbox,(0,n.A)({className:y.row,disabled:!1===e.hideable||A,checked:!1!==a[e.field],onChange:$,name:e.field,inputRef:Y(e)?X:void 0,label:e.headerName||e.field,density:"compact",fullWidth:!0},l.slotProps?.baseCheckbox),e.field)),0===G.length&&(0,g.jsx)(E,{ownerState:l,children:t.current.getLocaleText("columnsManagementNoColumns")})]})}),I&&N?null:(0,g.jsxs)(P,{ownerState:l,className:y.footer,children:[I?(0,g.jsx)("span",{}):(0,g.jsx)(l.slots.baseCheckbox,(0,n.A)({disabled:0===W.length||A,checked:U,indeterminate:!U&&!q,onChange:()=>H(!U),name:t.current.getLocaleText("columnsManagementShowHideAllText"),label:t.current.getLocaleText("columnsManagementShowHideAllText"),density:"compact"},l.slotProps?.baseCheckbox)),N?null:(0,g.jsx)(l.slots.baseButton,(0,n.A)({onClick:()=>t.current.setColumnVisibilityModel(i),disabled:z||A},l.slotProps?.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]})]})}const O=(0,a.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagement"})({display:"flex",flexDirection:"column",padding:s.f.spacing(.5,1.5)}),x=(0,a.Ay)(b.R,{name:"MuiDataGrid",slot:"ColumnsManagementScrollArea"})({maxHeight:300}),k=(0,a.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader"})({padding:s.f.spacing(1.5,2),borderBottom:`1px solid ${s.f.colors.border.base}`}),C=(0,a.Ay)(y.p,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput"})({[`& .${l.A.input}::-webkit-search-decoration,\n & .${l.A.input}::-webkit-search-cancel-button,\n & .${l.A.input}::-webkit-search-results-button,\n & .${l.A.input}::-webkit-search-results-decoration`]:{display:"none"}}),P=(0,a.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter"})({padding:s.f.spacing(1,1,1,1.5),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${s.f.colors.border.base}`}),E=(0,a.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagementEmptyText"})({padding:s.f.spacing(1,0),alignSelf:"center",font:s.f.typography.font.body})},96876:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(6853),o=r(81453),i=r(28730),a=r(14041),l=(0,i.n9)()({ellipses:{textOverflow:"ellipsis",overflow:"hidden"}});function s(e){var t=e.message,r=e.severity,i=e.action,s=l().classes;return a.createElement(n.A,{severity:r,action:i,classes:{message:s.ellipses},onMouseDown:function(e){e.stopPropagation()}},a.createElement(o.A,{title:t},a.createElement("div",null,t)))}},96946:(e,t,r)=>{"use strict";r.d(t,{U:()=>f,h:()=>u});var n=r(89575),o=r(17502),i=r(14041),a=r(58203),l=r(9919),s=r(31085);const c=["item","applyValue","apiRef","focusElementRef","isFilterActive","headerFilterMenu","clearButton","tabIndex","slotProps"];function u(e){const{item:t,applyValue:r,apiRef:u,focusElementRef:d,headerFilterMenu:p,clearButton:h,tabIndex:m,slotProps:y}=e,b=(0,o.A)(e,c),[v,g]=i.useState(f(t.value)),w=(0,l.A)(),S=(0,a.A)(),A=(0,a.A)(),O=w.slotProps?.baseSelect||{},x=O.native??!1,k=w.slotProps?.baseSelectOption||{},C=i.useCallback(e=>{const o=f(e.target.value);g(o),r((0,n.A)({},t,{value:o}))},[r,t]);i.useEffect(()=>{g(f(t.value))},[t.value]);const P=y?.root.label??u.current.getLocaleText("filterPanelInputLabel"),E=y?.root.slotProps;return(0,s.jsxs)(i.Fragment,{children:[(0,s.jsxs)(w.slots.baseSelect,(0,n.A)({fullWidth:!0,labelId:S,id:A,label:P,value:void 0===v?"":String(v),onChange:C,native:x,slotProps:{htmlInput:(0,n.A)({ref:d,tabIndex:m},E?.htmlInput)}},O,b,y?.root,{children:[(0,s.jsx)(w.slots.baseSelectOption,(0,n.A)({},k,{native:x,value:"",children:u.current.getLocaleText("filterValueAny")})),(0,s.jsx)(w.slots.baseSelectOption,(0,n.A)({},k,{native:x,value:"true",children:u.current.getLocaleText("filterValueTrue")})),(0,s.jsx)(w.slots.baseSelectOption,(0,n.A)({},k,{native:x,value:"false",children:u.current.getLocaleText("filterValueFalse")}))]})),p,h]})}function f(e){return"true"===String(e).toLowerCase()||"false"!==String(e).toLowerCase()&&void 0}},96949:(e,t,r)=>{"use strict";r.d(t,{A:()=>He});var n=r(14041),o=r.t(n,2);function i(){return"undefined"!=typeof window}function a(e){return c(e)?(e.nodeName||"").toLowerCase():"#document"}function l(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function s(e){var t;return null==(t=(c(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function c(e){return!!i()&&(e instanceof Node||e instanceof l(e).Node)}function u(e){return!!i()&&(e instanceof Element||e instanceof l(e).Element)}function f(e){return!!i()&&(e instanceof HTMLElement||e instanceof l(e).HTMLElement)}function d(e){return!(!i()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof l(e).ShadowRoot)}const p=new Set(["inline","contents"]);function h(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=C(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!p.has(o)}const m=new Set(["table","td","th"]);function y(e){return m.has(a(e))}const b=[":popover-open",":modal"];function v(e){return b.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const g=["transform","translate","scale","rotate","perspective"],w=["transform","translate","scale","rotate","perspective","filter"],S=["paint","layout","strict","content"];function A(e){const t=O(),r=u(e)?C(e):e;return g.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||w.some(e=>(r.willChange||"").includes(e))||S.some(e=>(r.contain||"").includes(e))}function O(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const x=new Set(["html","body","#document"]);function k(e){return x.has(a(e))}function C(e){return l(e).getComputedStyle(e)}function P(e){return u(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function E(e){if("html"===a(e))return e;const t=e.assignedSlot||e.parentNode||d(e)&&e.host||s(e);return d(t)?t.host:t}function j(e){const t=E(e);return k(t)?e.ownerDocument?e.ownerDocument.body:e.body:f(t)&&h(t)?t:j(t)}function T(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=j(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=l(o);if(i){const e=_(a);return t.concat(a,a.visualViewport||[],h(o)?o:[],e&&r?T(e):[])}return t.concat(o,T(o,[],r))}function _(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var R="undefined"!=typeof document?n.useLayoutEffect:function(){};const M={...o}.useInsertionEffect||(e=>e());function I(e){const t=n.useRef(()=>{});return M(()=>{t.current=e}),n.useCallback(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)},[])}r(31085);var N=r(43144);const D=Math.min,F=Math.max,L=Math.round,z=(Math.floor,e=>({x:e,y:e}));function B(e){return e.split("-")[0]}function $(e){return e.split("-")[1]}const G=new Set(["top","bottom"]);function H(e){return G.has(B(e))?"y":"x"}function V(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function W(e,t,r){let{reference:n,floating:o}=e;const i=H(t),a=function(e){return"x"===H(e)?"y":"x"}(t),l="y"===a?"height":"width",s=B(t),c="y"===i,u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch($(t)){case"start":p[a]-=d*(r&&c?-1:1);break;case"end":p[a]+=d*(r&&c?-1:1)}return p}const U=new Set(["left","top"]);function q(e){const t=C(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=f(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=L(r)!==i||L(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function X(e){return u(e)?e:e.contextElement}function K(e){const t=X(e);if(!f(t))return z(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=q(t);let a=(i?L(r.width):r.width)/n,l=(i?L(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const Y=z(0);function J(e){const t=l(e);return O()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Y}function Z(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=X(e);let a=z(1);t&&(n?u(n)&&(a=K(n)):a=K(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==l(e))&&t}(i,r,n)?J(i):z(0);let c=(o.left+s.x)/a.x,f=(o.top+s.y)/a.y,d=o.width/a.x,p=o.height/a.y;if(i){const e=l(i),t=n&&u(n)?l(n):n;let r=e,o=_(r);for(;o&&n&&t!==r;){const e=K(o),t=o.getBoundingClientRect(),n=C(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,f*=e.y,d*=e.x,p*=e.y,c+=i,f+=a,r=l(o),o=_(r)}}return V({width:d,height:p,x:c,y:f})}function Q(e,t){const r=P(e).scrollLeft;return t?t.left+r:Z(s(e)).left+r}function ee(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Q(e,n)),y:n.top+t.scrollTop}}const te=new Set(["absolute","fixed"]);function re(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=l(e),n=s(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,c=0,u=0;if(o){i=o.width,a=o.height;const e=O();(!e||e&&"fixed"===t)&&(c=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:c,y:u}}(e,r);else if("document"===t)n=function(e){const t=s(e),r=P(e),n=e.ownerDocument.body,o=F(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=F(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Q(e);const l=-r.scrollTop;return"rtl"===C(n).direction&&(a+=F(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(s(e));else if(u(t))n=function(e,t){const r=Z(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=f(e)?K(e):z(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=J(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return V(n)}function ne(e,t){const r=E(e);return!(r===t||!u(r)||k(r))&&("fixed"===C(r).position||ne(r,t))}function oe(e,t,r){const n=f(t),o=s(t),i="fixed"===r,l=Z(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const u=z(0);function d(){u.x=Q(o)}if(n||!n&&!i)if(("body"!==a(t)||h(o))&&(c=P(t)),n){const e=Z(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&d();i&&!n&&o&&d();const p=!o||n||i?z(0):ee(o,c);return{x:l.left+c.scrollLeft-u.x-p.x,y:l.top+c.scrollTop-u.y-p.y,width:l.width,height:l.height}}function ie(e){return"static"===C(e).position}function ae(e,t){if(!f(e)||"fixed"===C(e).position)return null;if(t)return t(e);let r=e.offsetParent;return s(e)===r&&(r=r.ownerDocument.body),r}function le(e,t){const r=l(e);if(v(e))return r;if(!f(e)){let t=E(e);for(;t&&!k(t);){if(u(t)&&!ie(t))return t;t=E(t)}return r}let n=ae(e,t);for(;n&&y(n)&&ie(n);)n=ae(n,t);return n&&k(n)&&ie(n)&&!A(n)?r:n||function(e){let t=E(e);for(;f(t)&&!k(t);){if(A(t))return t;if(v(t))return null;t=E(t)}return null}(e)||r}const se={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,l=s(n),c=!!t&&v(t.floating);if(n===l||c&&i)return r;let u={scrollLeft:0,scrollTop:0},d=z(1);const p=z(0),m=f(n);if((m||!m&&!i)&&(("body"!==a(n)||h(l))&&(u=P(n)),f(n))){const e=Z(n);d=K(n),p.x=e.x+n.clientLeft,p.y=e.y+n.clientTop}const y=!l||m||i?z(0):ee(l,u,!0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+p.x+y.x,y:r.y*d.y-u.scrollTop*d.y+p.y+y.y}},getDocumentElement:s,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[..."clippingAncestors"===r?v(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=T(e,[],!1).filter(e=>u(e)&&"body"!==a(e)),o=null;const i="fixed"===C(e).position;let l=i?E(e):e;for(;u(l)&&!k(l);){const t=C(l),r=A(l);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&te.has(o.position)||h(l)&&!r&&ne(e,l))?n=n.filter(e=>e!==l):o=t,l=E(l)}return t.set(e,n),n}(t,this._c):[].concat(r),n],l=i[0],s=i.reduce((e,r)=>{const n=re(t,r,o);return e.top=F(n.top,e.top),e.right=D(n.right,e.right),e.bottom=D(n.bottom,e.bottom),e.left=F(n.left,e.left),e},re(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:le,getElementRects:async function(e){const t=this.getOffsetParent||le,r=this.getDimensions,n=await r(e.floating);return{reference:oe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=q(e);return{width:t,height:r}},getScale:K,isElement:u,isRTL:function(e){return"rtl"===C(e).direction}},ce=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=B(r),l=$(r),s="y"===H(r),c=U.has(a)?-1:1,u=i&&s?-1:1,f="function"==typeof(d=t)?d(e):d;var d;let{mainAxis:p,crossAxis:h,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof m&&(h="end"===l?-1*m:m),s?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},ue=(e,t,r)=>{const n=new Map,o={platform:se,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=W(c,n,s),d=n,p={},h=0;for(let r=0;r<l.length;r++){const{name:i,fn:m}=l[r],{x:y,y:b,data:v,reset:g}=await m({x:u,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=y?y:u,f=null!=b?b:f,p={...p,[i]:{...p[i],...v}},g&&h<=50&&(h++,"object"==typeof g&&(g.placement&&(d=g.placement),g.rects&&(c=!0===g.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):g.rects),({x:u,y:f}=W(c,d,s))),r=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var fe="undefined"!=typeof document?n.useLayoutEffect:function(){};function de(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!de(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(!("_owner"===r&&e.$$typeof||de(e[r],t[r])))return!1}return!0}return e!=e&&t!=t}function pe(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function he(e,t){const r=pe(e);return Math.round(t*r)/r}function me(e){const t=n.useRef(e);return fe(()=>{t.current=e}),t}const ye=(e,t)=>({...ce(e),options:[e,t]}),be="data-floating-ui-focusable",ve="active",ge="selected",we={...o};let Se=!1,Ae=0;const Oe=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ae++,xe=we.useId||function(){const[e,t]=n.useState(()=>Se?Oe():void 0);return R(()=>{null==e&&t(Oe())},[]),n.useEffect(()=>{Se=!0},[]),e};const ke=n.createContext(null),Ce=n.createContext(null),Pe=()=>{var e;return(null==(e=n.useContext(ke))?void 0:e.id)||null},Ee=()=>n.useContext(Ce);function je(e){return null!=e&&null!=e.clientX}function Te(e){void 0===e&&(e={});const{nodeId:t}=e,r=function(e){const{open:t=!1,onOpenChange:r,elements:o}=e,i=xe(),a=n.useRef({}),[l]=n.useState(()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach(e=>e(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){var n;null==(n=e.get(t))||n.delete(r)}}}()),s=null!=Pe(),[c,u]=n.useState(o.reference),f=I((e,t,n)=>{a.current.openEvent=e?t:void 0,l.emit("openchange",{open:e,event:t,reason:n,nested:s}),null==r||r(e,t,n)}),d=n.useMemo(()=>({setPositionReference:u}),[]),p=n.useMemo(()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference}),[c,o.reference,o.floating]);return n.useMemo(()=>({dataRef:a,open:t,onOpenChange:f,elements:p,events:l,floatingId:i,refs:d}),[t,f,p,l,i,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||r,i=o.elements,[a,l]=n.useState(null),[s,c]=n.useState(null),f=(null==i?void 0:i.domReference)||a,d=n.useRef(null),p=Ee();R(()=>{f&&(d.current=f)},[f]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,d]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=n.useState(o);de(p,o)||h(o);const[m,y]=n.useState(null),[b,v]=n.useState(null),g=n.useCallback(e=>{e!==O.current&&(O.current=e,y(e))},[]),w=n.useCallback(e=>{e!==x.current&&(x.current=e,v(e))},[]),S=a||m,A=l||b,O=n.useRef(null),x=n.useRef(null),k=n.useRef(f),C=null!=c,P=me(c),E=me(i),j=me(u),T=n.useCallback(()=>{if(!O.current||!x.current)return;const e={placement:t,strategy:r,middleware:p};E.current&&(e.platform=E.current),ue(O.current,x.current,e).then(e=>{const t={...e,isPositioned:!1!==j.current};_.current&&!de(k.current,t)&&(k.current=t,N.flushSync(()=>{d(t)}))})},[p,t,r,E,j]);fe(()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);const _=n.useRef(!1);fe(()=>(_.current=!0,()=>{_.current=!1}),[]),fe(()=>{if(S&&(O.current=S),A&&(x.current=A),S&&A){if(P.current)return P.current(S,A,T);T()}},[S,A,T,P,C]);const R=n.useMemo(()=>({reference:O,floating:x,setReference:g,setFloating:w}),[g,w]),M=n.useMemo(()=>({reference:S,floating:A}),[S,A]),I=n.useMemo(()=>{const e={position:r,left:0,top:0};if(!M.floating)return e;const t=he(M.floating,f.x),n=he(M.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...pe(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,s,M.floating,f.x,f.y]);return n.useMemo(()=>({...f,update:T,refs:R,elements:M,floatingStyles:I}),[f,T,R,M,I])}({...e,elements:{...i,...s&&{reference:s}}}),m=n.useCallback(e=>{const t=u(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),h.refs.setReference(t)},[h.refs]),y=n.useCallback(e=>{(u(e)||null===e)&&(d.current=e,l(e)),(u(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!u(e))&&h.refs.setReference(e)},[h.refs]),b=n.useMemo(()=>({...h.refs,setReference:y,setPositionReference:m,domReference:d}),[h.refs,y,m]),v=n.useMemo(()=>({...h.elements,domReference:f}),[h.elements,f]),g=n.useMemo(()=>({...h,...o,refs:b,elements:v,nodeId:t}),[h,b,v,t,o]);return R(()=>{o.dataRef.current.floatingContext=g;const e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=g)}),n.useMemo(()=>({...h,context:g,refs:b,elements:v}),[h,b,v,g])}function _e(e,t,r){const n=new Map,o="item"===r;let i=e;if(o&&e){const{[ve]:t,[ge]:r,...n}=e;i=n}return{..."floating"===r&&{tabIndex:-1,[be]:""},...i,...t.map(t=>{const n=t?t[r]:null;return"function"==typeof n?e?n(e):null:n}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[r,i]=t;var a;o&&[ve,ge].includes(r)||(0===r.indexOf("on")?(n.has(r)||n.set(r,[]),"function"==typeof i&&(null==(a=n.get(r))||a.push(i),e[r]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=n.get(r))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[r]=i)}),e):e,{})}}var Re=r(83589),Me=r(90389),Ie=r(51659),Ne=r(28730),De=r(14041);function Fe(e){return Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fe(e)}function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Le.apply(null,arguments)}function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(r),!0).forEach(function(t){$e(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ze(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function $e(e,t,r){return(t=function(e){var t=function(e){if("object"!=Fe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Fe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ge=(0,Ne.n9)()(function(e){return{tooltip:{position:"absolute",pointerEvents:"none",backgroundColor:(0,Re.X4)(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.fontSize,lineHeight:"".concat(Math.round(14e4)/1e5,"em"),maxWidth:300,wordWrap:"break-word"}}});function He(e){var t,r,o=e.clientPoint,i=e.children,a=e.placement,s=void 0===a?"right":a,c=null===(t=(0,Me.A)().components)||void 0===t?void 0:t.MuiPopper,u=Ge().classes,f=Te({placement:s,strategy:"fixed",middleware:[ye(5)]}),p=f.refs,h=f.floatingStyles,m=function(e,t){void 0===t&&(t={});const{open:r,dataRef:o,elements:{floating:i,domReference:a},refs:s}=e,{enabled:c=!0,axis:u="both",x:f=null,y:p=null}=t,h=n.useRef(!1),m=n.useRef(null),[y,b]=n.useState(),[v,g]=n.useState([]),w=I((e,t)=>{h.current||o.current.openEvent&&!je(o.current.openEvent)||s.setPositionReference(function(e,t){let r=null,n=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(null==e?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},l="x"===t.axis||"both"===t.axis,s="y"===t.axis||"both"===t.axis,c=["mouseenter","mousemove"].includes((null==(i=t.dataRef.current.openEvent)?void 0:i.type)||"")&&"touch"!==t.pointerType;let u=a.width,f=a.height,d=a.x,p=a.y;return null==r&&t.x&&l&&(r=a.x-t.x),null==n&&t.y&&s&&(n=a.y-t.y),d-=r||0,p-=n||0,u=0,f=0,!o||c?(u="y"===t.axis?a.width:0,f="x"===t.axis?a.height:0,d=l&&null!=t.x?t.x:d,p=s&&null!=t.y?t.y:p):o&&!c&&(f="x"===t.axis?a.height:f,u="y"===t.axis?a.width:u),o=!0,{width:u,height:f,x:d,y:p,top:p,right:d+u,bottom:p+f,left:d}}}}(a,{x:e,y:t,axis:u,dataRef:o,pointerType:y}))}),S=I(e=>{null==f&&null==p&&(r?m.current||g([]):w(e.clientX,e.clientY))}),A=function(e){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}(y)?i:r,O=n.useCallback(()=>{if(!A||!c||null!=f||null!=p)return;const e=l(i);function t(r){const n=function(e){return"composedPath"in e?e.composedPath()[0]:e.target}(r);!function(e,t){if(!e||!t)return!1;const r=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&d(r)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}(i,n)?w(r.clientX,r.clientY):(e.removeEventListener("mousemove",t),m.current=null)}if(!o.current.openEvent||je(o.current.openEvent)){e.addEventListener("mousemove",t);const r=()=>{e.removeEventListener("mousemove",t),m.current=null};return m.current=r,r}s.setPositionReference(a)},[A,c,f,p,i,o,s,a,w]);n.useEffect(()=>O(),[O,v]),n.useEffect(()=>{c&&!i&&(h.current=!1)},[c,i]),n.useEffect(()=>{!c&&r&&(h.current=!0)},[c,r]),R(()=>{!c||null==f&&null==p||(h.current=!1,w(f,p))},[c,f,p,w]);const x=n.useMemo(()=>{function e(e){let{pointerType:t}=e;b(t)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:S,onMouseEnter:S}},[S]);return n.useMemo(()=>c?{reference:x}:{},[c,x])}(f.context,o),y=function(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),r=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),i=n.useCallback(t=>_e(t,e,"reference"),t),a=n.useCallback(t=>_e(t,e,"floating"),r),l=n.useCallback(t=>_e(t,e,"item"),o);return n.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:l}),[i,a,l])}([m]),b=y.getFloatingProps;return De.createElement(Ie.A,{container:null==c||null===(r=c.defaultProps)||void 0===r?void 0:r.container},De.createElement("div",Le({className:u.tooltip,ref:p.setFloating,style:Be(Be({},h),{},{zIndex:1e5,visibility:"translate(0px, 0px)"===h.transform?"hidden":void 0,pointerEvents:"none"})},b()),i))}},97025:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(60654),o=r(81296),i=r(98412),a=r(81912),l=r(2033);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){p(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function p(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return m(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(m(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,m(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,m(f,"constructor",c),m(c,"constructor",s),s.displayName="GeneratorFunction",m(c,o,"GeneratorFunction"),m(f),m(f,o,"Generator"),m(f,n,function(){return this}),m(f,"toString",function(){return"[object Generator]"}),(h=function(){return{w:i,m:d}})()}function m(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}m=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){m(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},m(e,t,r,n)}function y(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function b(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,l,"next",e)}function l(e){y(i,n,o,a,l,"throw",e)}a(void 0)})}}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function g(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(w=function(){return!!e})()}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}var O=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=S(r=t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,w()?Reflect.construct(r,n||[],S(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(t,e),r=t,n=[{key:"configure",value:(f=b(h().m(function e(){var t,r;return h().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=this.getSubAdapter)||void 0===t?void 0:t.call(this,this.getConf("sequenceAdapter"));case 1:if(r=e.v){e.n=2;break}throw new Error("Error getting subadapter");case 2:return e.a(2,r.dataAdapter)}},e,this)})),function(){return f.apply(this,arguments)})},{key:"getRefNames",value:(u=b(h().m(function e(){var t;return h().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.configure();case 1:return t=e.v,e.a(2,t.getRefNames())}},e,this)})),function(){return u.apply(this,arguments)})},{key:"getFeatures",value:function(e,t){var r=this;return(0,i.ObservableCreate)(function(){var n=b(h().m(function n(i){var s,u,f,p,m,y,b,v,g,w,S,A,O,x,k,C,P,E,j,T,_,R,M,I;return h().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,r.configure();case 1:if(u=n.v,f=e.end+1e4,p=Math.max(0,e.start-1e4),!(f<0||p>f)){n.n=2;break}return i.complete(),n.a(2);case 2:return m=u.getFeatures(d(d({},e),{},{start:p,end:f}),t),n.n=3,(0,a._)(m.pipe((0,l.$)()));case 3:if(y=n.v,b=(null===(s=y[0])||void 0===s?void 0:s.get("seq"))||"",v=r.getConf("search"),g=r.getConf("searchForward"),w=r.getConf("searchReverse"),S=r.getConf("caseInsensitive"),A=new RegExp(v,"g".concat(S?"i":"")),v){if(g){O=b.matchAll(A),x=c(O);try{for(x.s();!(k=x.n()).done;)C=k.value,P=p+C.index,E=p+C.index+C[0].length,(0,o.doesIntersect2)(P,E,e.start,e.end)&&i.next(new o.SimpleFeature({uniqueId:"".concat(r.id,"-").concat(P,"-").concat(C[0],"-pos"),refName:e.refName,start:P,end:E,name:C[0],strand:1}))}catch(e){x.e(e)}finally{x.f()}}if(w){j=(0,o.revcom)(b).matchAll(A),T=c(j);try{for(T.s();!(_=T.n()).done;)R=_.value,M=f-R.index,I=f-R.index-R[0].length,(0,o.doesIntersect2)(I,M,e.start,e.end)&&i.next(new o.SimpleFeature({uniqueId:"".concat(r.id,"-").concat(I,"-").concat(R[0],"-neg"),refName:e.refName,start:I,end:M,name:R[0],strand:-1}))}catch(e){T.e(e)}finally{T.f()}}}i.complete();case 4:return n.a(2)}},n)}));return function(e){return n.apply(this,arguments)}}())}}],n&&v(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,u,f}(n.BaseFeatureDataAdapter)},97165:(e,t,r)=>{"use strict";r.d(t,{_:()=>i});var n=r(89575),o=r(14041);function i(e,t,r,i={}){return"function"==typeof t?t(r,i):t?(t.props.className&&(r.className=(a=t.props.className,l=r.className,a&&l?`${a} ${l}`:a||l)),(t.props.style||r.style)&&(r.style=(0,n.A)({},r.style,t.props.style)),o.cloneElement(t,r)):o.createElement(e,r);var a,l}},97355:(e,t,r)=>{"use strict";r.d(t,{F:()=>i});var n=r(21587);function o(e){return(0,n.Q)(e)||void 0===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)}function i(e={}){const t={...e};return function e(t){const r=Object.entries(t);for(let i=0;i<r.length;i++){const[a,l]=r[i];!o(l)||a.startsWith("unstable_")?delete t[a]:(0,n.Q)(l)&&(t[a]={...l},e(t[a]))}}(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(t,null,2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`}},97377:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>l,BO:()=>a,Yn:()=>i});var n=r(40133),o=r(14009);function i(e,t,r=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&r){const r=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=r)return r}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function a(e,t,r,n=r){let o;return o="function"==typeof e?e(r):Array.isArray(e)?e[r]||n:i(e,r)||n,t&&(o=t(o,n,e)),o}const l=function(e){const{prop:t,cssProperty:r=e.prop,themeKey:l,transform:s}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=i(e.theme,l)||{};return(0,o.NI)(e,c,e=>{let o=a(u,s,e);return e===o&&"string"==typeof e&&(o=a(u,s,`${t}${"default"===e?"":(0,n.A)(e)}`,e)),!1===r?o:{[r]:o}})};return c.propTypes={},c.filterProps=[t],c}},97412:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(60654),o=r(68020);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var a=n&&n.prototype instanceof c?n:c,u=Object.create(a.prototype);return l(u,"_invoke",function(r,n,o){var i,a,l,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,a=0,l=e,d.n=r,s}};function p(r,n){for(a=r,l=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(l=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(a=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,a=0))}if(o||r>1)return s;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),a=u,l=h;(t=a<2?e:l)||!f;){i||(a?a<3?(a>1&&(d.n=-1),p(a,l)):d.n=l:d.v=l);try{if(c=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(f=d.n<0)?l:r.call(n,d))!==s)break}catch(t){i=e,a=1,l=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),u}var s={};function c(){}function u(){}function f(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(l(t={},n,function(){return this}),t),p=f.prototype=c.prototype=Object.create(d);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return u.prototype=f,l(p,"constructor",f),l(f,"constructor",u),u.displayName="GeneratorFunction",l(f,o,"GeneratorFunction"),l(p),l(p,o,"Generator"),l(p,n,function(){return this}),l(p,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:h}})()}function l(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}l=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){l(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},l(e,t,r,n)}function s(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var h=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=d(r=t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(r,n||[],d(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,n=[{key:"getRefNameAliases",value:(l=a().m(function e(){var t,r,n,i,l,s,c,u,f;return a().w(function(e){for(;;)switch(e.n){case 0:if(""!==(t=this.getConf("location")).uri&&"/path/to/my/sequence_report.tsv"!==t.uri){e.n=1;break}return e.a(2,[]);case 1:return r=this.getConf("useNameOverride"),e.n=2,(0,o.openLocation)(t,this.pluginManager).readFile("utf8");case 2:if(n=e.v,i=n.split(/\n|\r\n|\r/).filter(function(e){return!!e.trim()}).map(function(e){return e.split("\t")}),l=i[0]||[],s=l.indexOf("GenBank seq accession"),c=l.indexOf("RefSeq seq accession"),u=l.indexOf("UCSC style name"),f=l.indexOf("Sequence name"),-1!==s&&-1!==c&&-1!==u){e.n=3;break}throw new Error('Header line must include "GenBank seq accession", "RefSeq seq accession", "UCSC style name", and "Sequence name"');case 3:return e.a(2,i.slice(1).filter(function(e){return!!e[u]||!!e[f]}).map(function(e){return{refName:e[u]||e[f],aliases:[e[s],e[c],e[u],e[f]].filter(function(e){return!!e}),override:r}}).filter(function(e){return!!e.refName}))}},e,this)}),u=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=l.apply(e,t);function i(e){s(o,r,n,i,a,"next",e)}function a(e){s(o,r,n,i,a,"throw",e)}i(void 0)})},function(){return u.apply(this,arguments)})}],n&&c(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,l,u}(n.BaseAdapter)},97469:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(14041),o=r(54357),i=r(31593),a=r(96674),l=r(40979),s=r(99061),c=r(31085);const u=(0,a.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),f=n.forwardRef(function(e,t){const r=(0,l.b)({props:e,name:"MuiDialogActions"}),{className:n,disableSpacing:a=!1,...f}=r,d={...r,disableSpacing:a},p=(e=>{const{classes:t,disableSpacing:r}=e,n={root:["root",!r&&"spacing"]};return(0,i.A)(n,s.C,t)})(d);return(0,c.jsx)(u,{className:(0,o.A)(p.root,n),ownerState:d,ref:t,...f})})},97555:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,r:()=>i});var n=r(42395),o=r(3807);function i(e){return(0,o.Ay)("MuiAutocomplete",e)}const a=(0,n.A)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"])},97573:(e,t,r)=>{"use strict";r.d(t,{A:()=>w});var n=r(31593),o=r(54357),i=r(14041),a=r(988),l=r(34946),s=r(20374),c=r(96674),u=r(42014),f=r(40979),d=r(72701),p=r(39455),h=r(31085);const m=(0,c.Ay)("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation]]}})({display:"flex",alignItems:"center",[`&.${d.A.alternativeLabel}`]:{flexDirection:"column"},[`&.${d.A.disabled}`]:{cursor:"default"},variants:[{props:{orientation:"vertical"},style:{textAlign:"left",padding:"8px 0"}}]}),y=(0,c.Ay)("span",{name:"MuiStepLabel",slot:"Label"})((0,u.A)(({theme:e})=>({...e.typography.body2,display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${d.A.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${d.A.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${d.A.alternativeLabel}`]:{marginTop:16},[`&.${d.A.error}`]:{color:(e.vars||e).palette.error.main}}))),b=(0,c.Ay)("span",{name:"MuiStepLabel",slot:"IconContainer"})({flexShrink:0,display:"flex",paddingRight:8,[`&.${d.A.alternativeLabel}`]:{paddingRight:0}}),v=(0,c.Ay)("span",{name:"MuiStepLabel",slot:"LabelContainer"})((0,u.A)(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${d.A.alternativeLabel}`]:{textAlign:"center"}}))),g=i.forwardRef(function(e,t){const r=(0,f.b)({props:e,name:"MuiStepLabel"}),{children:c,className:u,componentsProps:g={},error:w=!1,icon:S,optional:A,slots:O={},slotProps:x={},StepIconComponent:k,StepIconProps:C,...P}=r,{alternativeLabel:E,orientation:j}=i.useContext(s.A),{active:T,disabled:_,completed:R,icon:M}=i.useContext(a.A),I=S||M;let N=k;I&&!N&&(N=l.A);const D={...r,active:T,alternativeLabel:E,completed:R,disabled:_,error:w,orientation:j},F=(e=>{const{classes:t,orientation:r,active:o,completed:i,error:a,disabled:l,alternativeLabel:s}=e,c={root:["root",r,a&&"error",l&&"disabled",s&&"alternativeLabel"],label:["label",o&&"active",i&&"completed",a&&"error",l&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",o&&"active",i&&"completed",a&&"error",l&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]};return(0,n.A)(c,d.p,t)})(D),L={slots:O,slotProps:{stepIcon:C,...g,...x}},[z,B]=(0,p.A)("root",{elementType:m,externalForwardedProps:{...L,...P},ownerState:D,ref:t,className:(0,o.A)(F.root,u)}),[$,G]=(0,p.A)("label",{elementType:y,externalForwardedProps:L,ownerState:D}),[H,V]=(0,p.A)("stepIcon",{elementType:N,externalForwardedProps:L,ownerState:D});return(0,h.jsxs)(z,{...B,children:[I||H?(0,h.jsx)(b,{className:F.iconContainer,ownerState:D,children:(0,h.jsx)(H,{completed:R,active:T,error:w,icon:I,...V})}):null,(0,h.jsxs)(v,{className:F.labelContainer,ownerState:D,children:[c?(0,h.jsx)($,{...G,className:(0,o.A)(F.label,G?.className),children:c}):null,A]})]})});g.muiName="StepLabel";const w=g},97630:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,getSvgIconUtilityClass:()=>o.E,svgIconClasses:()=>o.A});var n=r(61845),o=r(66093)},97651:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(7603);function o(e){return(0,n.A)(e).defaultView||window}},97743:(e,t,r)=>{"use strict";r.d(t,{Q:()=>o,a:()=>n});var n=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(n||{}),o=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(o||{})},97832:(e,t,r)=>{"use strict";r.d(t,{L:()=>_});var n=r(89575),o=r(17502),i=r(14041),a=r(54357),l=r(1769),s=r(31593),c=r(7603),u=r(40133),f=r(41491),d=r(37570),p=r(10591);let h;var m=r(43433),y=r(30693),b=r(57936),v=r(9919),g=r(29393),w=r(12985),S=r(34051),A=r(84760),O=r(58385),x=r(45795),k=r(54012),C=r(80507),P=r(31085);const E=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],j=["changeReason","unstable_updateValueOnRender"];S.yL.LEFT,w.K.LEFT,S.yL.RIGHT,w.K.RIGHT,S.yL.NONE,S.yL.VIRTUAL;const T=(0,p.R)(function(e,t){const{column:r,row:f,rowId:p,rowNode:w,align:T,colIndex:_,width:R,className:M,style:I,colSpan:N,disableDragEvents:D,isNotVisible:F,pinnedOffset:L,pinnedPosition:z,showRightBorder:B,showLeftBorder:$,onClick:G,onDoubleClick:H,onMouseDown:V,onMouseUp:W,onMouseOver:U,onKeyDown:q,onKeyUp:X,onDragEnter:K,onDragOver:Y}=e,J=(0,o.A)(e,E),Z=(0,O.E)(),Q=(0,v.A)(),ee=(0,d.I)(),te=r.field,re=(0,b.Nc)(Z,x.R9,{rowId:p,field:te}),ne=(0,C.Q)().hooks.useCellAggregationResult(p,te),oe=re?y.bs.Edit:y.bs.View,ie=Z.current.getCellParamsForRow(p,te,f,{colDef:r,cellMode:oe,rowNode:w,tabIndex:(0,b.Nc)(Z,()=>{const e=(0,g.H5)(Z);return e&&e.field===te&&e.id===p?0:-1}),hasFocus:(0,b.Nc)(Z,()=>{const e=(0,g.MO)(Z);return e?.id===p&&e.field===te})});ie.api=Z.current,ne&&(ie.value=ne.value,ie.formattedValue=r.valueFormatter?r.valueFormatter(ie.value,f,r,Z):ie.value);const ae=(0,b.Nc)(Z,()=>Z.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:p,field:te})),le=(0,b.Nc)(Z,A.xX),se=(0,b.Nc)(Z,A.ET),{hasFocus:ce,isEditable:ue=!1,value:fe}=ie,de="actions"===r.type&&r.getActions?.(Z.current.getRowParams(p)).some(e=>!e.props.disabled),pe="view"!==oe&&ue||de?-1:ie.tabIndex,{classes:he,getCellClassName:me}=Q,ye=[(0,b.Nc)(Z,()=>Z.current.unstable_applyPipeProcessors("cellClassName",[],{id:p,field:te}).filter(Boolean).join(" "))];r.cellClassName&&ye.push("function"==typeof r.cellClassName?r.cellClassName(ie):r.cellClassName),"flex"===r.display&&ye.push(m.x["cell--flex"]),me&&ye.push(me(ie));const be=ie.formattedValue??fe,ve=i.useRef(null),ge=(0,l.A)(t,ve),we=i.useRef(null),Se=Q.cellSelection??!1,Ae=(e=>{const{align:t,showLeftBorder:r,showRightBorder:n,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:l,classes:c}=e,f={root:["cell",`cell--text${(0,u.A)(t)}`,a&&"selected",i&&"cell--editable",r&&"cell--withLeftBorder",n&&"cell--withRightBorder",o===S.yL.LEFT&&"cell--pinnedLeft",o===S.yL.RIGHT&&"cell--pinnedRight",l&&!i&&"cell--selectionMode"]};return(0,s.A)(f,m.B,c)})({align:T,showLeftBorder:$,showRightBorder:B,isEditable:ue,classes:Q.classes,pinnedPosition:z,isSelected:ae,isSelectionMode:Se}),Oe=i.useCallback(e=>t=>{const r=Z.current.getCellParams(p,te||"");Z.current.publishEvent(e,r,t),W&&W(t)},[Z,te,W,p]),xe=i.useCallback(e=>t=>{const r=Z.current.getCellParams(p,te||"");Z.current.publishEvent(e,r,t),V&&V(t)},[Z,te,V,p]),ke=i.useCallback((e,t)=>r=>{if(!Z.current.getRow(p))return;const n=Z.current.getCellParams(p,te||"");Z.current.publishEvent(e,n,r),t&&t(r)},[Z,te,p]),Ce=le[p]?.[te]??!1,Pe=se[p]?.[te]??1,Ee=i.useMemo(()=>{if(F)return{padding:0,opacity:0,width:0,height:0,border:0};const e=(0,k.l)((0,n.A)({"--width":`${R}px`},I),ee,z,L),t=z===S.yL.LEFT,r=z===S.yL.RIGHT;return Pe>1&&(e.height=`calc(var(--height) * ${Pe})`,e.zIndex=10,(t||r)&&(e.zIndex=40)),e},[R,F,I,L,z,ee,Pe]);if(i.useEffect(()=>{if(!ce||oe===y.bs.Edit)return;const e=(0,c.A)(Z.current.rootElementRef.current);if(ve.current&&!ve.current.contains(e.activeElement)){const e=ve.current.querySelector('[tabindex="0"]'),t=we.current||e||ve.current;if(void 0===h&&document.createElement("div").focus({get preventScroll(){return h=!0,!1}}),h)t.focus({preventScroll:!0});else{const e=Z.current.getScrollPosition();t.focus(),Z.current.scroll(e)}}},[ce,oe,Z]),Ce)return(0,P.jsx)("div",{"data-colindex":_,role:"presentation",style:(0,n.A)({width:"var(--width)"},Ee)});let je,Te,_e=J.onFocus;if(null===re&&r.renderCell&&(je=r.renderCell(ie)),null!==re&&r.renderEditCell){const e=Z.current.getRowWithUpdatedValues(p,r.field),t=(0,o.A)(re,j),i=r.valueFormatter?r.valueFormatter(re.value,e,r,Z):ie.formattedValue,a=(0,n.A)({},ie,{row:e,formattedValue:i},t);je=r.renderEditCell(a),ye.push(m.x["cell--editing"]),ye.push(he?.["cell--editing"])}if(void 0===je){const e=be?.toString();je=e,Te=e}i.isValidElement(je)&&de&&(je=i.cloneElement(je,{focusElementRef:we}));const Re=D?null:{onDragEnter:ke("cellDragEnter",K),onDragOver:ke("cellDragOver",Y)};return(0,P.jsx)("div",(0,n.A)({className:(0,a.A)(Ae.root,ye,M),role:"gridcell","data-field":te,"data-colindex":_,"aria-colindex":_+1,"aria-colspan":N,"aria-rowspan":Pe,style:Ee,title:Te,tabIndex:pe,onClick:ke("cellClick",G),onDoubleClick:ke("cellDoubleClick",H),onMouseOver:ke("cellMouseOver",U),onMouseDown:xe("cellMouseDown"),onMouseUp:Oe("cellMouseUp"),onKeyDown:ke("cellKeyDown",q),onKeyUp:ke("cellKeyUp",X)},Re,J,{onFocus:_e,ref:ge,children:je}))}),_=(0,f.n)(T)},97909:(e,t,r)=>{"use strict";r.d(t,{ED:()=>a,GD:()=>l,TQ:()=>i,aC:()=>s,tf:()=>o});var n=r(16190);const o=(0,n.gz)(e=>e.columnGrouping),i=(0,n.S)(o,e=>e?.unwrappedGroupingModel??{}),a=(0,n.S)(o,e=>e?.lookup??{}),l=(0,n.S)(o,e=>e?.headerStructure??[]),s=(0,n.Mz)(o,e=>e?.maxDepth??0)},97967:(e,t,r)=>{"use strict";e.exports=r(66310)},98176:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(66201),o=r(81296),i=r(49936),a=r(9765),l=r(81453),s=r(43557),c=r(22980),u=r(96876),f=r(14041);const d=(0,c.observer)(function(e){var t=e.model;return f.createElement(u.A,{message:"".concat(t.error),severity:"error",action:f.createElement(f.Fragment,null,f.createElement(l.A,{title:"Reload track"},f.createElement(s.A,{"data-testid":"reload_button",onClick:function(){t.reload()}},f.createElement(i.A,null))),f.createElement(l.A,{title:"Show stack trace"},f.createElement(s.A,{onClick:function(){(0,o.getSession)(t).queueDialog(function(e){return[n.default,{onClose:e,error:t.error}]})}},f.createElement(a.A,null))))})})},98245:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(81296),o=r(14041);function i(e){var t=e.feature,r=t.strand,i={"-1":"-",0:"",1:"+"},a=i[r]?"(".concat(i[r],")"):"",l=(0,n.assembleLocString)(t);return o.createElement(o.Fragment,null,"".concat(l," ").concat(a))}var a=r(90261),l=r(14041);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(null,arguments)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function h(e,t,r){return(t=function(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=e.feature,r=p(p({},t),t.__jbrowsefmt),o=r.start,s=r.end,u=p(p({},r),{},{length:(0,n.toLocale)(s-o)});return l.createElement(l.Fragment,null,l.createElement(a.A,{name:"Position",value:l.createElement(i,f({},e,{feature:r}))}),Object.entries({description:"Description",name:"Name",length:"Length",type:"Type"}).map(function(e){var t=c(e,2),r=t[0];return[t[1],u[r]]}).filter(function(e){return null!=c(e,2)[1]}).map(function(e){var t=c(e,2),r=t[0],n=t[1];return l.createElement(a.A,{key:r,name:r,value:n})}))}},98331:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>D});var n=r(14041),o=r(9810),i=r(81296),a=r(87211),l=r(23523),s=r(31085);const c=(0,l.A)((0,s.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp");var u=r(68805),f=r(95305),d=r(28773),p=r(53125),h=r(72899),m=r(88581),y=r(97469),b=r(98819),v=r(40200),g=r.n(v),w=r(45060),S=r(22980),A=r(28730),O=r(46658);function x(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return k(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(k(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,k(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,k(f,"constructor",c),k(c,"constructor",s),s.displayName="GeneratorFunction",k(c,o,"GeneratorFunction"),k(f),k(f,o,"Generator"),k(f,n,function(){return this}),k(f,"toString",function(){return"[object Generator]"}),(x=function(){return{w:i,m:d}})()}function k(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}k=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){k(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},k(e,t,r,n)}function C(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function P(e,t){return E.apply(this,arguments)}function E(){var e;return e=x().m(function e(t,r){var n,o,a,l,s,c,u,f,d;return x().w(function(e){for(;;)switch(e.n){case 0:if(n=(0,i.getSession)(t),o=t.leftOffset,a=t.rightOffset,o&&a){e.n=1;break}throw new Error("no offsets on model to use for range");case 1:if(!(new Set(r.map(function(e){return e.assemblyName})).size>1)){e.n=2;break}throw new Error("not able to fetch sequences from multiple assemblies currently");case 2:if(l=n.rpcManager,s=n.assemblyManager,c=o.assemblyName||a.assemblyName||"",u=s.get(c)){e.n=3;break}throw new Error("assembly ".concat(c," not found"));case 3:return f=(0,O.getConf)(u,["sequence","adapter"]),d="getSequence",e.a(2,l.call(d,"CoreGetFeatures",{adapterConfig:f,regions:r,sessionId:d}))}},e)}),E=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){C(i,n,o,a,l,"next",e)}function l(e){C(i,n,o,a,l,"throw",e)}a(void 0)})},E.apply(this,arguments)}var j=r(14041);function T(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return _(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(_(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,_(f,"constructor",c),_(c,"constructor",s),s.displayName="GeneratorFunction",_(c,o,"GeneratorFunction"),_(f),_(f,o,"Generator"),_(f,n,function(){return this}),_(f,"toString",function(){return"[object Generator]"}),(T=function(){return{w:i,m:d}})()}function _(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}_=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){_(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},_(e,t,r,n)}function R(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function M(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return I(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var N=(0,A.n9)()({dialogContent:{width:"80em"},textAreaFont:{fontFamily:"Courier New"},ml:{marginLeft:10}});const D=(0,S.observer)(function(e){var t=e.model,r=e.handleClose,l=N().classes,s=M((0,n.useState)(),2),v=s[0],S=s[1],A=M((0,n.useState)(),2),O=A[0],x=A[1],k=M((0,n.useState)(!1),2),C=k[0],E=k[1],_=M((0,n.useState)(!1),2),I=_[0],D=_[1],F=M((0,n.useState)(!1),2),L=F[0],z=F[1],B=t.leftOffset,$=t.rightOffset,G=void 0===O;(0,n.useEffect)(function(){var e,r=new AbortController;return(e=T().m(function e(){var r,n,o,i;return T().w(function(e){for(;;)switch(e.n){case 0:if(e.p=0,0!==(r=t.getSelectedRegions(B,$)).length){e.n=1;break}throw new Error("Selected region is out of bounds");case 1:return n=x,e.n=2,P(t,r);case 2:o=e.v,n(o),e.n=4;break;case 3:e.p=3,i=e.v,console.error(i),S(i);case 4:return e.a(2)}},e,null,[[0,3]])}),function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){R(i,n,o,a,l,"next",e)}function l(e){R(i,n,o,a,l,"throw",e)}a(void 0)})})(),function(){r.abort()}},[t,B,$]);var H=O?O.map(function(e){var t,r=e.get("seq"),n=e.get("refName"),o=e.get("start")+1,a=e.get("end"),l="".concat(n,":").concat(o,"-").concat(a);if((null===(t=r)||void 0===t?void 0:t.length)!==a-o+1)throw new Error("".concat(l," returned ").concat(r.length.toLocaleString()," bases, but should have returned ").concat((a-o).toLocaleString()));return C&&(r=(0,i.reverse)(r)),L&&(r=(0,i.complement)(r)),{header:l+(C?"-rev":"")+(L?"-comp":""),seq:r}}).map(function(e){return">".concat(e.header,"\n").concat(e.seq.replaceAll(/(.{1,80})/g,"$1\n").trimEnd())}).join("\n"):"",V=!!H&&H.length>1e6;return j.createElement(o.Dialog,{maxWidth:"xl",open:!0,onClose:function(){r(),t.setOffsets()},title:"Reference sequence"},j.createElement(u.A,null,v?j.createElement(o.ErrorMessage,{error:v}):G?j.createElement(o.LoadingEllipses,{message:"Retrieving sequences"}):null,j.createElement(f.A,{"data-testid":"rubberband-sequence",variant:"outlined",multiline:!0,minRows:5,maxRows:10,disabled:V,className:l.dialogContent,fullWidth:!0,value:V?"Reference sequence too large to display, use the download FASTA button":H,slotProps:{input:{readOnly:!0,classes:{input:l.textAreaFont}}}}),j.createElement(d.A,null,j.createElement(p.A,{control:j.createElement(h.A,{value:C,onChange:function(e){E(e.target.checked)}}),label:"Reverse sequence"}),j.createElement(p.A,{control:j.createElement(h.A,{value:L,onChange:function(e){z(e.target.checked)}}),label:"Complement sequence"})),j.createElement(m.A,{style:{margin:10}},'Note: Check both boxes for the "reverse complement"')),j.createElement(y.A,null,j.createElement(b.A,{onClick:function(){g()(H),D(!0),setTimeout(function(){D(!1)},500)},disabled:G||!!v||V,color:"primary",startIcon:j.createElement(a.A,null)},I?"Copied":"Copy to clipboard"),j.createElement(b.A,{onClick:function(){(0,w.saveAs)(new Blob([H||""],{type:"text/x-fasta;charset=utf-8"}),"jbrowse_ref_seq.fa")},disabled:G||!!v,color:"primary",startIcon:j.createElement(c,null)},"Download FASTA"),j.createElement(b.A,{onClick:r,variant:"contained"},"Close")))})},98355:e=>{function t(e){var r,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(r=0;r<i;r++)e[r]&&(n=t(e[r]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function r(){for(var e,r,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(r=t(e))&&(o&&(o+=" "),o+=r);return o}e.exports=r,e.exports.clsx=r},98412:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ObservableCreate:()=>i});var n=r(38509),o=r(10568);function i(e,t){return(0,o.SW)(t),new n.c(function(t){try{var r=e(t);null!=r&&r.catch&&r.catch(function(e){t.error(e)})}catch(e){t.error(e)}})}},98438:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},98453:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e){return"string"==typeof e}},98523:(e,t,r)=>{"use strict";r.d(t,{C:()=>i,U:()=>a});var n=r(85608),o=r(14460);function i(e){return(0,n.AQ)(this,arguments,function(){var t,r,o;return(0,n.YH)(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,(0,n.N3)(t.read())];case 3:return r=i.sent(),o=r.value,r.done?[4,(0,n.N3)(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,(0,n.N3)(o)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function a(e){return(0,o.T)(null==e?void 0:e.getReader)}},98537:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C});var n=r(81912),o=r(2033),i=r(35431),a=r(60654),l=r(57859),s=r(81296),c=r(865),u=r(10568);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function d(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return p(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(p(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,p(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,p(f,"constructor",c),p(c,"constructor",s),s.displayName="GeneratorFunction",p(c,o,"GeneratorFunction"),p(f),p(f,o,"Generator"),p(f,n,function(){return this}),p(f,"toString",function(){return"[object Generator]"}),(d=function(){return{w:i,m:h}})()}function p(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}p=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){p(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},p(e,t,r,n)}function h(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function m(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,l,"next",e)}function l(e){h(i,n,o,a,l,"throw",e)}a(void 0)})}}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(t){v(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function v(e,t,r){return(t=w(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,w(n.key),n)}}function w(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}function A(e,t,r,n){var o=O(x(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function O(){return O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=x(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},O.apply(null,arguments)}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}var C=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=x(r=t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(r,n||[],x(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(t,e),r=t,i=[{key:"serializeArgsInClient",value:function(e){return A(t,"serializeArgsInClient",this,3)([b(b({},e),{},{displayModel:void 0,regions:structuredClone(e.regions)})])}},{key:"deserializeResultsInClient",value:function(e,r){var n=new Map(e.features.map(function(e){return c.A.fromJSON(e)}).map(function(e){return[e.id(),e]})),o=A(t,"deserializeResultsInClient",this,3)([b(b({},e),{},{features:n}),r]);return b(b({},o),{},{blockKey:r.blockKey,features:n})}},{key:"serializeResultsInWorker",value:function(e,r){var n=A(t,"serializeResultsInWorker",this,3)([e,r]),o=e.features;return b(b({},n),{},{features:(0,s.iterMap)(o.values(),function(e){return e.toJSON()},o.size)})}},{key:"getExpandedRegion",value:function(e,t){return e}},{key:"getFeatures",value:(h=m(d().m(function e(t){var r,i,s,c,f,p,h,m,y,v,g,w=this;return d().w(function(e){for(;;)switch(e.n){case 0:return r=this.pluginManager,i=t.stopToken,s=t.regions,c=t.sessionId,f=t.adapterConfig,e.n=1,(0,l.cK)(r,c,f);case 1:if(p=e.v,h=p.dataAdapter,(0,a.isFeatureAdapter)(h)){e.n=2;break}throw new Error("Adapter does not support retrieving features");case 2:return(0,u.SW)(i),m=s.map(function(e){return b(b({},e),{},{start:Math.floor(e.start),end:Math.ceil(e.end)})}),y=m[0],v=1===m.length?h.getFeatures(this.getExpandedRegion(y,t),t):h.getFeaturesInMultipleRegions(m,t),e.n=3,(0,n._)(v.pipe((0,o.$)()));case 3:return g=e.v,(0,u.SW)(i),e.a(2,new Map(g.filter(function(e){return w.featurePassesFilters(t,e)}).map(function(e){return[e.id(),e]})))}},e,this)})),function(e){return h.apply(this,arguments)})},{key:"featurePassesFilters",value:function(e,t){return!e.filters||e.filters.passes(t,e)}},{key:"render",value:(p=m(d().m(function e(r){var n,o,i;return d().w(function(e){for(;;)switch(e.n){case 0:if(i=r.features){e.n=2;break}return e.n=1,this.getFeatures(r);case 1:i=e.v;case 2:return n=i,e.n=3,A(t,"render",this,3)([b(b({},r),{},{features:n})]);case 3:return o=e.v,e.a(2,b(b({},o),{},{features:n}))}},e,this)})),function(e){return p.apply(this,arguments)})}],i&&g(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i,p,h}(i.default)},98539:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,getSwitchUtilityClass:()=>o.n,switchClasses:()=>o.A});var n=r(11419),o=r(15503)},98696:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PopoverPaper:()=>n.IJ,PopoverRoot:()=>n.yt,default:()=>n.Ay,getOffsetLeft:()=>n.fB,getOffsetTop:()=>n.Dy,getPopoverUtilityClass:()=>o.K,popoverClasses:()=>o.A});var n=r(25101),o=r(17349)},98715:(e,t,r)=>{"use strict";r.d(t,{ai:()=>y,ep:()=>b,aU:()=>g,HO:()=>v});var n=r(89575),o=r(17502),i=r(14041),a=r(10591),l=r(9919),s=r(58385);const c=["displayOrder"];var u=r(91786),f=r(92847),d=r(49678),p=r(49972),h=r(31085);const m=["defaultSlots","defaultSlotProps","slots","slotProps"],y={columnMenuSortItem:p.H,columnMenuFilterItem:d.r,columnMenuColumnsItem:f.O},b={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},v=(0,a.R)(function(e,t){const{defaultSlots:r,defaultSlotProps:a,slots:f,slotProps:d}=e,p=(0,o.A)(e,m),y=(e=>{const t=(0,s.E)(),r=(0,l.A)(),{defaultSlots:a,defaultSlotProps:u,slots:f={},slotProps:d={},hideMenu:p,colDef:h,addDividers:m=!0}=e,y=i.useMemo(()=>(0,n.A)({},a,f),[a,f]),b=i.useMemo(()=>{if(!d||0===Object.keys(d).length)return u;const e=(0,n.A)({},d);return Object.entries(u).forEach(([t,r])=>{e[t]=(0,n.A)({},r,d[t]||{})}),e},[u,d]),v=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),g=i.useMemo(()=>{const e=Object.keys(a);return Object.keys(f).filter(t=>!e.includes(t))},[f,a]);return i.useMemo(()=>{const e=Array.from(new Set([...v,...g])).filter(e=>null!=y[e]).sort((e,t)=>{const r=b[e],n=b[t];return(Number.isFinite(r?.displayOrder)?r.displayOrder:100)-(Number.isFinite(n?.displayOrder)?n.displayOrder:100)});return e.reduce((t,i,a)=>{let l={colDef:h,onClick:p};const s=b[i];if(s){const e=(0,o.A)(s,c);l=(0,n.A)({},l,e)}return m&&a!==e.length-1?[...t,[y[i],l],[r.slots.baseDivider,{}]]:[...t,[y[i],l]]},[])},[m,h,v,p,y,b,g,r.slots.baseDivider])})((0,n.A)({},p,{defaultSlots:r,defaultSlotProps:a,slots:f,slotProps:d}));return(0,h.jsx)(u.T,(0,n.A)({},p,{ref:t,children:y.map(([e,t],r)=>(0,h.jsx)(e,(0,n.A)({},t),r))}))}),g=(0,a.R)(function(e,t){return(0,h.jsx)(v,(0,n.A)({},e,{ref:t,defaultSlots:y,defaultSlotProps:b}))})},98758:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O,getSpeedDialActionUtilityClass:()=>m,speedDialActionClasses:()=>y});var n=r(14041),o=r(54357),i=r(31593),a=r(83589),l=r(96674),s=r(42014),c=r(40979),u=r(82165),f=r(81453),d=r(38216),p=r(42395),h=r(3807);function m(e){return(0,h.Ay)("MuiSpeedDialAction",e)}const y=(0,p.A)("MuiSpeedDialAction",["fab","fabClosed","staticTooltip","staticTooltipClosed","staticTooltipLabel","tooltipPlacementLeft","tooltipPlacementRight"]);var b=r(39455),v=r(964),g=r(31085);const w=(0,l.Ay)(u.A,{name:"MuiSpeedDialAction",slot:"Fab",skipVariantsResolver:!1,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.fab,!r.open&&t.fabClosed]}})((0,s.A)(({theme:e})=>({margin:8,color:(e.vars||e).palette.text.secondary,backgroundColor:(e.vars||e).palette.background.paper,"&:hover":{backgroundColor:e.vars?e.vars.palette.SpeedDialAction.fabHoverBg:(0,a.tL)(e.palette.background.paper,.15)},transition:`${e.transitions.create("transform",{duration:e.transitions.duration.shorter})}, opacity 0.8s`,opacity:1,variants:[{props:({ownerState:e})=>!e.open,style:{opacity:0,transform:"scale(0)"}}]}))),S=(0,l.Ay)("span",{name:"MuiSpeedDialAction",slot:"StaticTooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.staticTooltip,!r.open&&t.staticTooltipClosed,t[`tooltipPlacement${(0,d.A)(r.tooltipPlacement)}`]]}})((0,s.A)(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",[`& .${y.staticTooltipLabel}`]:{transition:e.transitions.create(["transform","opacity"],{duration:e.transitions.duration.shorter}),opacity:1},variants:[{props:({ownerState:e})=>!e.open,style:{[`& .${y.staticTooltipLabel}`]:{opacity:0,transform:"scale(0.5)"}}},{props:{tooltipPlacement:"left"},style:{[`& .${y.staticTooltipLabel}`]:{transformOrigin:"100% 50%",right:"100%",marginRight:8}}},{props:{tooltipPlacement:"right"},style:{[`& .${y.staticTooltipLabel}`]:{transformOrigin:"0% 50%",left:"100%",marginLeft:8}}}]}))),A=(0,l.Ay)("span",{name:"MuiSpeedDialAction",slot:"StaticTooltipLabel"})((0,s.A)(({theme:e})=>({position:"absolute",...e.typography.body1,backgroundColor:(e.vars||e).palette.background.paper,borderRadius:(e.vars||e).shape.borderRadius,boxShadow:(e.vars||e).shadows[1],color:(e.vars||e).palette.text.secondary,padding:"4px 16px",wordBreak:"keep-all"}))),O=n.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiSpeedDialAction"}),{className:a,delay:l=0,FabProps:s={},icon:u,id:p,open:h,TooltipClasses:y,tooltipOpen:O=!1,tooltipPlacement:x="left",tooltipTitle:k,slots:C={},slotProps:P={},...E}=r,j={...r,tooltipPlacement:x},T=(e=>{const{open:t,tooltipPlacement:r,classes:n}=e,o={fab:["fab",!t&&"fabClosed"],staticTooltip:["staticTooltip",`tooltipPlacement${(0,d.A)(r)}`,!t&&"staticTooltipClosed"],staticTooltipLabel:["staticTooltipLabel"]};return(0,i.A)(o,m,n)})(j),_={slots:C,slotProps:{fab:s,...P,tooltip:(0,v.A)("function"==typeof P.tooltip?P.tooltip(j):P.tooltip,{title:k,open:O,placement:x,classes:y})}},[R,M]=n.useState(_.slotProps.tooltip?.open),I={transitionDelay:`${l}ms`},[N,D]=(0,b.A)("fab",{elementType:w,externalForwardedProps:_,ownerState:j,shouldForwardComponentProp:!0,className:(0,o.A)(T.fab,a),additionalProps:{style:I,tabIndex:-1,role:"menuitem",size:"small"}}),[F,L]=(0,b.A)("tooltip",{elementType:f.A,externalForwardedProps:_,shouldForwardComponentProp:!0,ref:t,additionalProps:{id:p},ownerState:j,getSlotProps:e=>({...e,onClose:t=>{e.onClose?.(t),M(!1)},onOpen:t=>{e.onOpen?.(t),M(!0)}})}),[z,B]=(0,b.A)("staticTooltip",{elementType:S,externalForwardedProps:_,ownerState:j,ref:t,className:T.staticTooltip,additionalProps:{id:p}}),[$,G]=(0,b.A)("staticTooltipLabel",{elementType:A,externalForwardedProps:_,ownerState:j,className:T.staticTooltipLabel,additionalProps:{style:I,id:`${p}-label`}}),H=(0,g.jsx)(N,{...D,children:u});return L.open?(0,g.jsxs)(z,{...B,...E,children:[(0,g.jsx)($,{...G,children:L.title}),n.cloneElement(H,{"aria-labelledby":`${p}-label`})]}):(!h&&R&&M(!1),(0,g.jsx)(F,{...L,title:L.title,open:h&&R,placement:L.placement,classes:L.classes,...E,children:H}))})},98819:(e,t,r)=>{"use strict";r.d(t,{A:()=>P});var n=r(14041),o=r(54357),i=r(58265),a=r(31593),l=r(83589),s=r(65866),c=r(48156),u=r(96674),f=r(42014),d=r(40979),p=r(59054),h=r(63507),m=r(38216),y=r(22162),b=r(76855),v=r(70718),g=r(37566),w=r(31085);const S=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],A=(0,u.Ay)(p.A,{shouldForwardProp:e=>(0,c.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${(0,m.A)(r.color)}`],t[`size${(0,m.A)(r.size)}`],t[`${r.variant}Size${(0,m.A)(r.size)}`],"inherit"===r.color&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,r.loading&&t.loading]}})((0,f.A)(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],r="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${b.A.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${b.A.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${b.A.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${b.A.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter((0,y.A)()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,l.X4)(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette[t].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${b.A.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${b.A.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${b.A.loading}`]:{color:"transparent"}}}]}})),O=(0,u.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,r.loading&&t.startIconLoadingStart,t[`iconSize${(0,m.A)(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...S]})),x=(0,u.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,r.loading&&t.endIconLoadingEnd,t[`iconSize${(0,m.A)(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...S]})),k=(0,u.Ay)("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),C=(0,u.Ay)("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),P=n.forwardRef(function(e,t){const r=n.useContext(v.A),l=n.useContext(g.A),c=(0,i.A)(r,e),u=(0,d.b)({props:c,name:"MuiButton"}),{children:f,color:p="primary",component:y="button",className:S,disabled:P=!1,disableElevation:E=!1,disableFocusRipple:j=!1,endIcon:T,focusVisibleClassName:_,fullWidth:R=!1,id:M,loading:I=null,loadingIndicator:N,loadingPosition:D="center",size:F="medium",startIcon:L,type:z,variant:B="text",...$}=u,G=(0,s.A)(M),H=N??(0,w.jsx)(h.A,{"aria-labelledby":G,color:"inherit",size:16}),V={...u,color:p,component:y,disabled:P,disableElevation:E,disableFocusRipple:j,fullWidth:R,loading:I,loadingIndicator:H,loadingPosition:D,size:F,type:z,variant:B},W=(e=>{const{color:t,disableElevation:r,fullWidth:n,size:o,variant:i,loading:l,loadingPosition:s,classes:c}=e,u={root:["root",l&&"loading",i,`${i}${(0,m.A)(t)}`,`size${(0,m.A)(o)}`,`${i}Size${(0,m.A)(o)}`,`color${(0,m.A)(t)}`,r&&"disableElevation",n&&"fullWidth",l&&`loadingPosition${(0,m.A)(s)}`],startIcon:["icon","startIcon",`iconSize${(0,m.A)(o)}`],endIcon:["icon","endIcon",`iconSize${(0,m.A)(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},f=(0,a.A)(u,b.B,c);return{...c,...f}})(V),U=(L||I&&"start"===D)&&(0,w.jsx)(O,{className:W.startIcon,ownerState:V,children:L||(0,w.jsx)(C,{className:W.loadingIconPlaceholder,ownerState:V})}),q=(T||I&&"end"===D)&&(0,w.jsx)(x,{className:W.endIcon,ownerState:V,children:T||(0,w.jsx)(C,{className:W.loadingIconPlaceholder,ownerState:V})}),X=l||"",K="boolean"==typeof I?(0,w.jsx)("span",{className:W.loadingWrapper,style:{display:"contents"},children:I&&(0,w.jsx)(k,{className:W.loadingIndicator,ownerState:V,children:H})}):null;return(0,w.jsxs)(A,{ownerState:V,className:(0,o.A)(r.className,W.root,S,X),component:y,disabled:P||I,focusRipple:!j,focusVisibleClassName:(0,o.A)(W.focusVisible,_),ref:t,type:z,id:I?G:M,...$,classes:W,children:[U,"end"!==D&&K,f,"end"===D&&K,q]})})},98847:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var n=r(11154),o=r(98245),i=r(14041);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(null,arguments)}function l(e){var t=e.title,r=void 0===t?"Primary data":t;return i.createElement(n.default,a({},e,{title:r}),i.createElement(o.A,e))}},98886:(e,t,r)=>{"use strict";r.d(t,{h:()=>s});var n=r(89575),o=(r(14041),r(10591)),i=r(5334),a=r(34425),l=r(31085);const s=(0,o.R)(function(e,t){const r=(0,i.h)().current.getLocaleText("noRowsLabel");return(0,l.jsx)(a.$,(0,n.A)({},e,{ref:t,children:r}))})},99061:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,C:()=>i});var n=r(42395),o=r(3807);function i(e){return(0,o.Ay)("MuiDialogActions",e)}const a=(0,n.A)("MuiDialogActions",["root","spacing"])},99281:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C});var n=r(14041),o=r(9810),i=r(81296),a=r(63507),l=r(88581),s=r(95305),c=r(68805),u=r(94263),f=r(53125),d=r(72899),p=r(97469),h=r(98819),m=r(14041),y=["children"];function b(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return v(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(v(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,v(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,v(f,"constructor",c),v(c,"constructor",s),s.displayName="GeneratorFunction",v(c,o,"GeneratorFunction"),v(f),v(f,o,"Generator"),v(f,n,function(){return this}),v(f,"toString",function(){return"[object Generator]"}),(b=function(){return{w:i,m:d}})()}function v(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}v=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){v(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},v(e,t,r,n)}function g(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function w(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){g(i,n,o,a,l,"next",e)}function l(e){g(i,n,o,a,l,"throw",e)}a(void 0)})}}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function O(){return m.createElement("div",null,m.createElement(a.A,{size:20,style:{marginRight:20}}),m.createElement(l.A,{display:"inline"},"Creating SVG"))}function x(e,t){return(0,i.useLocalStorage)("svg-".concat(e),t)}function k(e){var t=e.children,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,y);return m.createElement("div",null,m.createElement(s.A,r,t))}function C(e){var t=e.model,r=e.handleClose,a=(0,i.getSession)(t),s="undefined"!=typeof OffscreenCanvas,y=S((0,n.useState)(s),2),v=y[0],g=y[1],A=S((0,n.useState)(!1),2),C=A[0],P=A[1],E=S((0,n.useState)(),2),j=E[0],T=E[1],_=S(x("file","jbrowse.svg"),2),R=_[0],M=_[1],I=S(x("tracklabels","offset"),2),N=I[0],D=I[1],F=S(x("theme",a.themeName||"default"),2),L=F[0],z=F[1];return m.createElement(o.Dialog,{open:!0,onClose:r,title:"Export SVG"},m.createElement(c.A,null,j?m.createElement(o.ErrorMessage,{error:j}):C?m.createElement(O,null):null,m.createElement(k,{helperText:"filename",value:R,onChange:function(e){M(e.target.value)}}),m.createElement(k,{select:!0,label:"Track label positioning",variant:"outlined",style:{width:150},value:N,onChange:function(e){D(e.target.value)}},m.createElement(u.A,{value:"offset"},"Offset"),m.createElement(u.A,{value:"overlay"},"Overlay"),m.createElement(u.A,{value:"left"},"Left"),m.createElement(u.A,{value:"none"},"None")),a.allThemes?m.createElement(k,{select:!0,label:"Theme",variant:"outlined",value:L,onChange:function(e){z(e.target.value)}},Object.entries(a.allThemes()).map(function(e){var t=S(e,2),r=t[0],n=t[1];return m.createElement(u.A,{key:r,value:r},n.name||"(Unknown name)")})):null,s?m.createElement(f.A,{control:m.createElement(d.A,{checked:v,onChange:function(){g(function(e){return!e})}}),label:"Rasterize canvas based tracks? File may be much larger if this is turned off"}):m.createElement(l.A,null,"Note: rasterizing layers not yet supported in this browser, so SVG size may be large")),m.createElement(p.A,null,m.createElement(h.A,{variant:"contained",color:"secondary",onClick:function(){r()}},"Cancel"),m.createElement(h.A,{variant:"contained",color:"primary",type:"submit",onClick:w(b().m(function e(){var n;return b().w(function(e){for(;;)switch(e.n){case 0:return P(!0),T(void 0),e.p=1,e.n=2,t.exportSvg({rasterizeLayers:v,filename:R,trackLabels:N,themeName:L});case 2:r(),e.n=4;break;case 3:e.p=3,n=e.v,console.error(n),T(n);case 4:return e.p=4,P(!1),e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))},"Submit")))}},99286:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,getListSubheaderUtilityClass:()=>o.g,listSubheaderClasses:()=>o.A});var n=r(26629),o=r(77501)},99494:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(8837),o=r(79177),i=r(94263),a=r(22980),l=r(28730),s=r(14041);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){p(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function p(e,t,r){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var h=(0,l.n9)()({formControl:{margin:0,marginLeft:4}});const m=(0,a.observer)(function(e){var t=e.model,r=h().classes,a=t.intronBp,l=t.upDownBp,c=t.mode,f=t.hasCDS,p=t.hasExonOrCDS;return s.createElement(n.A,{className:r.formControl},s.createElement(o.A,{size:"small",value:c,onChange:function(e){t.setMode(e.target.value)}},Object.entries(d(d(d(d(d(d(d(d(d({},f?{cds:"CDS"}:{}),f?{protein:"Protein"}:{}),p?{cdna:"cDNA"}:{}),p?{gene:"Genomic w/ full introns"}:{}),p?{gene_updownstream:"Genomic w/ full introns +/- ".concat(l,"bp up+down stream")}:{}),p?{gene_collapsed_intron:"Genomic w/ ".concat(a,"bp intron")}:{}),p?{gene_updownstream_collapsed_intron:"Genomic w/ ".concat(a,"bp intron +/- ").concat(l,"bp up+down stream ")}:{}),p?{}:{genomic:"Genomic"}),p?{}:{genomic_sequence_updownstream:"Genomic +/- ".concat(l,"bp up+down stream")})).map(function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],a=n[1];return s.createElement(i.A,{key:o,value:o},a)})))})},99696:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>R});var n=r(47482),o=r(88581),i=r(89981),a=r(34901),l=r(14041),s=r(22664),c=r(8837),u=r(98819),f=r(43557),d=r(22980),p=r(28730),h=r(9810),m=r(81296),y=r(14041);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var v=(0,l.lazy)(function(){return Promise.resolve().then(r.bind(r,81899))}),g=(0,l.lazy)(function(){return Promise.resolve().then(r.bind(r,22495))}),w=(0,p.n9)()(function(e){return{formControl:{margin:0},container:{marginTop:e.spacing(4),marginBottom:e.spacing(4)}}});const S=(0,d.observer)(function(e){var t,r,n=e.model,o=e.feature,i=w().classes,a=(t=(0,l.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=a[0],p=a[1];return y.createElement("div",{className:i.container},y.createElement(c.A,{className:i.formControl},y.createElement(u.A,{variant:"contained",onClick:function(){p(!d)}},d?"Hide feature sequence":"Show feature sequence")),y.createElement(f.A,{onClick:function(){(0,m.getSession)(n).queueDialog(function(e){return[g,{handleClose:e}]})}},y.createElement(s.A,null)),d?y.createElement(l.Suspense,{fallback:y.createElement(h.LoadingEllipses,null)},y.createElement(v,{key:o.uniqueId,model:n,feature:o})):null)});var A=r(3845),O=r(11154),x=r(98245),k=r(14041);function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P.apply(null,arguments)}function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach(function(t){T(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function T(e,t,r){return(t=function(e){var t=function(e){if("object"!=C(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==C(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var _=["name","start","end","strand","refName","description","type"];function R(e){var t=e.omit,r=void 0===t?[]:t,l=e.model,s=e.feature,c=e.depth,u=void 0===c?0:c,f=l.maxDepth,d=s.mate,p=s.name,y=void 0===p?"":p,b=s.id,v=void 0===b?"":b,g=s.type,w=void 0===g?"":g,C=s.subfeatures,E=s.uniqueId,T=(0,m.getEnv)(l).pluginManager,M=(0,m.getSession)(l),I=T.evaluateExtensionPoint("Core-extraFeaturePanel",null,{session:M,feature:s,model:l}),N=d;return k.createElement(O.default,{title:(0,a.KS)(y,v,w)},k.createElement(o.A,null,"Core details"),k.createElement(x.A,e),N?k.createElement(k.Fragment,null,k.createElement(i.A,null),k.createElement(o.A,null,"Mate details"),k.createElement(x.A,P({},e,{feature:j(j({},N),{},{start:N.start,end:N.end,refName:N.refName,uniqueId:"".concat(E,"-mate")})}))):null,k.createElement(i.A,null),k.createElement(o.A,null,"Attributes"),k.createElement(A.default,P({attributes:s},e,{omit:r,omitSingleLevel:_})),k.createElement(n.t,{FallbackComponent:function(e){return k.createElement(h.ErrorMessage,{error:e.error})}},k.createElement(S,e)),I?k.createElement(k.Fragment,null,k.createElement(i.A,null),k.createElement(O.default,{title:I.name},k.createElement(I.Component,e))):null,u<f&&null!=C&&C.length?k.createElement(O.default,{title:"Subfeatures",defaultExpanded:u<1},C.map(function(e,t){return k.createElement(R,{key:JSON.stringify(e),feature:j(j({},e),{},{uniqueId:"".concat(E,"_").concat(t)}),model:l,depth:u+1})})):null)}},99708:(e,t,r)=>{"use strict";var n=r(71824);function o(e){for(var t=e.length;--t>=0;)e[t]=0}var i=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],s=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);o(c);var u=new Array(60);o(u);var f=new Array(512);o(f);var d=new Array(256);o(d);var p=new Array(29);o(p);var h,m,y,b=new Array(30);function v(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}function g(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function w(e){return e<256?f[e]:f[256+(e>>>7)]}function S(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function A(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,S(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function O(e,t,r){A(e,r[2*t],r[2*t+1])}function x(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function k(e,t,r){var n,o,i=new Array(16),a=0;for(n=1;n<=15;n++)i[n]=a=a+r[n-1]<<1;for(o=0;o<=t;o++){var l=e[2*o+1];0!==l&&(e[2*o]=x(i[l]++,l))}}function C(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function P(e){e.bi_valid>8?S(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function E(e,t,r,n){var o=2*t,i=2*r;return e[o]<e[i]||e[o]===e[i]&&n[t]<=n[r]}function j(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&E(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!E(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function T(e,t,r){var n,o,l,s,c=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],o=e.pending_buf[e.l_buf+c],c++,0===n?O(e,o,t):(O(e,(l=d[o])+256+1,t),0!==(s=i[l])&&A(e,o-=p[l],s),O(e,l=w(--n),r),0!==(s=a[l])&&A(e,n-=b[l],s))}while(c<e.last_lit);O(e,256,t)}function _(e,t){var r,n,o,i=t.dyn_tree,a=t.stat_desc.static_tree,l=t.stat_desc.has_stree,s=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<s;r++)0!==i[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):i[2*r+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[o]=0,e.opt_len--,l&&(e.static_len-=a[2*o+1]);for(t.max_code=c,r=e.heap_len>>1;r>=1;r--)j(e,i,r);o=s;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],j(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*o]=i[2*r]+i[2*n],e.depth[o]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=o,e.heap[1]=o++,j(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,o,i,a,l,s=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,f=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,h=t.stat_desc.max_length,m=0;for(i=0;i<=15;i++)e.bl_count[i]=0;for(s[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(i=s[2*s[2*(n=e.heap[r])+1]+1]+1)>h&&(i=h,m++),s[2*n+1]=i,n>c||(e.bl_count[i]++,a=0,n>=p&&(a=d[n-p]),l=s[2*n],e.opt_len+=l*(i+a),f&&(e.static_len+=l*(u[2*n+1]+a)));if(0!==m){do{for(i=h-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[h]--,m-=2}while(m>0);for(i=h;0!==i;i--)for(n=e.bl_count[i];0!==n;)(o=e.heap[--r])>c||(s[2*o+1]!==i&&(e.opt_len+=(i-s[2*o+1])*s[2*o],s[2*o+1]=i),n--)}}(e,t),k(i,c,e.bl_count)}function R(e,t,r){var n,o,i=-1,a=t[1],l=0,s=7,c=4;for(0===a&&(s=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=t[2*(n+1)+1],++l<s&&o===a||(l<c?e.bl_tree[2*o]+=l:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):l<=10?e.bl_tree[34]++:e.bl_tree[36]++,l=0,i=o,0===a?(s=138,c=3):o===a?(s=6,c=3):(s=7,c=4))}function M(e,t,r){var n,o,i=-1,a=t[1],l=0,s=7,c=4;for(0===a&&(s=138,c=3),n=0;n<=r;n++)if(o=a,a=t[2*(n+1)+1],!(++l<s&&o===a)){if(l<c)do{O(e,o,e.bl_tree)}while(0!==--l);else 0!==o?(o!==i&&(O(e,o,e.bl_tree),l--),O(e,16,e.bl_tree),A(e,l-3,2)):l<=10?(O(e,17,e.bl_tree),A(e,l-3,3)):(O(e,18,e.bl_tree),A(e,l-11,7));l=0,i=o,0===a?(s=138,c=3):o===a?(s=6,c=3):(s=7,c=4)}}o(b);var I=!1;function N(e,t,r,o){A(e,0+(o?1:0),3),function(e,t,r){P(e),S(e,r),S(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}t._tr_init=function(e){I||(function(){var e,t,r,n,o,s=new Array(16);for(r=0,n=0;n<28;n++)for(p[n]=r,e=0;e<1<<i[n];e++)d[r++]=n;for(d[r-1]=n,o=0,n=0;n<16;n++)for(b[n]=o,e=0;e<1<<a[n];e++)f[o++]=n;for(o>>=7;n<30;n++)for(b[n]=o<<7,e=0;e<1<<a[n]-7;e++)f[256+o++]=n;for(t=0;t<=15;t++)s[t]=0;for(e=0;e<=143;)c[2*e+1]=8,e++,s[8]++;for(;e<=255;)c[2*e+1]=9,e++,s[9]++;for(;e<=279;)c[2*e+1]=7,e++,s[7]++;for(;e<=287;)c[2*e+1]=8,e++,s[8]++;for(k(c,287,s),e=0;e<30;e++)u[2*e+1]=5,u[2*e]=x(e,5);h=new v(c,i,257,286,15),m=new v(u,a,0,30,15),y=new v(new Array(0),l,0,19,7)}(),I=!0),e.l_desc=new g(e.dyn_ltree,h),e.d_desc=new g(e.dyn_dtree,m),e.bl_desc=new g(e.bl_tree,y),e.bi_buf=0,e.bi_valid=0,C(e)},t._tr_stored_block=N,t._tr_flush_block=function(e,t,r,n){var o,i,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),_(e,e.l_desc),_(e,e.d_desc),a=function(e){var t;for(R(e,e.dyn_ltree,e.l_desc.max_code),R(e,e.dyn_dtree,e.d_desc.max_code),_(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*s[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(i=e.static_len+3+7>>>3)<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==t?N(e,t,r,n):4===e.strategy||i===o?(A(e,2+(n?1:0),3),T(e,c,u)):(A(e,4+(n?1:0),3),function(e,t,r,n){var o;for(A(e,t-257,5),A(e,r-1,5),A(e,n-4,4),o=0;o<n;o++)A(e,e.bl_tree[2*s[o]+1],3);M(e,e.dyn_ltree,t-1),M(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),T(e,e.dyn_ltree,e.dyn_dtree)),C(e),n&&P(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(d[r]+256+1)]++,e.dyn_dtree[2*w(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){A(e,2,3),O(e,256,c),function(e){16===e.bi_valid?(S(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},99728:(e,t,r)=>{"use strict";var n=r(82001),o=r.n(n),i=r(40935);r.n(i)()(o()).push([e.id,"/* Placeholder file to ensure CSS imports are working */\n\n.MuiDataGrid {\n display: block;\n}\n","",{version:3,sources:["webpack://./../../node_modules/@mui/x-data-grid/esm/index.css"],names:[],mappings:"AAAA,uDAAuD;;AAEvD;EACE,cAAc;AAChB",sourcesContent:["/* Placeholder file to ensure CSS imports are working */\n\n.MuiDataGrid {\n display: block;\n}\n"],sourceRoot:""}])},99938:e=>{function t(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function r(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,n,o){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");"function"==typeof n&&(o=n,n={}),n=n||{},o=o||function(){},a.type=n.type||"text/javascript",a.charset=n.charset||"utf8",a.async=!("async"in n)||!!n.async,a.src=e,n.attrs&&function(e,t){for(var r in t)e.setAttribute(r,t[r])}(a,n.attrs),n.text&&(a.text=""+n.text),("onload"in a?t:r)(a,o),a.onload||t(a,o),i.appendChild(a)}},99972:(e,t,r)=>{"use strict";r.d(t,{A:()=>P});var n=r(72971),o=r(21587);function i(e=""){function t(...r){if(!r.length)return"";const n=r[0];return"string"!=typeof n||n.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${n}`:`, var(--${e?`${e}-`:""}${n}${t(...r.slice(1))})`}return(r,...n)=>`var(--${e?`${e}-`:""}${r}${t(...n)})`}var a=r(80009),l=r(12926);function s(e){const t={};return Object.entries(e).forEach(e=>{const[r,n]=e;"object"==typeof n&&(t[r]=`${n.fontStyle?`${n.fontStyle} `:""}${n.fontVariant?`${n.fontVariant} `:""}${n.fontWeight?`${n.fontWeight} `:""}${n.fontStretch?`${n.fontStretch} `:""}${n.fontSize||""}${n.lineHeight?`/${n.lineHeight} `:""}${n.fontFamily||""}`)}),t}const c=(e,t,r,n=[])=>{let o=e;t.forEach((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=r:o&&"object"==typeof o&&(o[e]=r):o&&"object"==typeof o&&(o[e]||(o[e]=n.includes(e)?[]:{}),o=o[e])})};function u(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},i={},a={};var l,s;return l=(e,t,l)=>{if(!("string"!=typeof t&&"number"!=typeof t||n&&n(e,t))){const n=`--${r?`${r}-`:""}${e.join("-")}`,s=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(o,{[n]:s}),c(i,e,`var(${n})`,l),c(a,e,`var(${n}, ${s})`,l)}},s=e=>"vars"===e[0],function e(t,r=[],n=[]){Object.entries(t).forEach(([t,o])=>{(!s||s&&!s([...r,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...r,t],Array.isArray(o)?[...n,t]:n):l([...r,t],o,n))})}(e),{css:o,vars:i,varsWithDefaults:a}}const f=function(e,t={}){const{getSelector:r=v,disableCssColorScheme:n,colorSchemeSelector:i}=t,{colorSchemes:a={},components:l,defaultColorScheme:s="light",...c}=e,{vars:f,css:d,varsWithDefaults:p}=u(c,t);let h=p;const m={},{[s]:y,...b}=a;if(Object.entries(b||{}).forEach(([e,r])=>{const{vars:n,css:i,varsWithDefaults:a}=u(r,t);h=(0,o.A)(h,a),m[e]={css:i,vars:n}}),y){const{css:e,vars:r,varsWithDefaults:n}=u(y,t);h=(0,o.A)(h,n),m[s]={css:e,vars:r}}function v(t,r){let n=i;if("class"===i&&(n=".%s"),"data"===i&&(n="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(n=`[${i}="%s"]`),t){if("media"===n){if(e.defaultColorScheme===t)return":root";const n=a[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${n})`]:{":root":r}}}if(n)return e.defaultColorScheme===t?`:root, ${n.replace("%s",String(t))}`:n.replace("%s",String(t))}return":root"}return{vars:h,generateThemeVars:()=>{let e={...f};return Object.entries(m).forEach(([,{vars:t}])=>{e=(0,o.A)(e,t)}),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function i(e,r){Object.keys(r).length&&t.push("string"==typeof e?{[e]:{...r}}:e)}i(r(void 0,{...d}),d);const{[o]:l,...s}=m;if(l){const{css:e}=l,t=a[o]?.palette?.mode,s=!n&&t?{colorScheme:t,...e}:{...e};i(r(o,{...s}),s)}return Object.entries(s).forEach(([e,{css:t}])=>{const o=a[e]?.palette?.mode,l=!n&&o?{colorScheme:o,...t}:{...t};i(r(e,{...l}),l)}),t}}};var d=r(481),p=r(65073),h=r(83589),m=r(1463),y=r(9273),b=r(52312),v=r(25238);const g=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return(0,v.A)(e.cssVarPrefix).forEach(e=>{o[e]=r[e],delete r[e]}),"media"===i?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:o}}:i?{[i.replace("%s",t)]:o,[`${n}, ${i.replace("%s",t)}`]:r}:{[n]:{...r,...o}}}if(i&&"media"!==i)return`${n}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(i)return i.replace("%s",String(t))}return n};var w=r(97355);function S(e,t,r){!e[t]&&r&&(e[t]=r)}function A(e){return"string"==typeof e&&e.startsWith("hsl")?(0,h.YL)(e):e}function O(e,t){`${t}Channel`in e||(e[`${t}Channel`]=(0,h.Me)(A(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\nTo suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}const x=e=>{try{return e()}catch(e){}},k=(e="mui")=>i(e);function C(e,t,r,n){if(!t)return;t=!0===t?{}:t;const o="dark"===n?"dark":"light";if(!r)return void(e[n]=(0,y.Ay)({...t,palette:{mode:o,...t?.palette}}));const{palette:i,...a}=(0,m.A)({...r,palette:{mode:o,...t?.palette}});return e[n]={...t,palette:i,opacity:{...(0,y.UL)(o),...t?.opacity},overlays:t?.overlays||(0,y.Qw)(o)},a}function P(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:i,disableCssColorScheme:c=!1,cssVarPrefix:u="mui",shouldSkipGeneratingVar:m=b.A,colorSchemeSelector:y=(r.light&&r.dark?"media":void 0),rootSelector:v=":root",...P}=e,E=Object.keys(r)[0],j=i||(r.light&&"light"!==E?"light":E),T=k(u),{[j]:_,light:R,dark:M,...I}=r,N={...I};let D=_;if(("dark"===j&&!("dark"in r)||"light"===j&&!("light"in r))&&(D=!0),!D)throw new Error((0,n.A)(21,j));const F=C(N,D,P,j);R&&!N.light&&C(N,R,void 0,"light"),M&&!N.dark&&C(N,M,void 0,"dark");let L={defaultColorScheme:j,...F,cssVarPrefix:u,colorSchemeSelector:y,rootSelector:v,getCssVar:T,colorSchemes:N,font:{...s(F.typography),...F.font},spacing:(z=P.spacing,"number"==typeof z?`${z}px`:"string"==typeof z||"function"==typeof z||Array.isArray(z)?z:"8px")};var z;Object.keys(L.colorSchemes).forEach(e=>{const t=L.colorSchemes[e].palette,r=e=>{const r=e.split("-"),n=r[1],o=r[2];return T(e,t[n][o])};var n;if("light"===t.mode&&(S(t.common,"background","#fff"),S(t.common,"onBackground","#000")),"dark"===t.mode&&(S(t.common,"background","#000"),S(t.common,"onBackground","#fff")),n=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach(e=>{n[e]||(n[e]={})}),"light"===t.mode){S(t.Alert,"errorColor",(0,h.Nd)(t.error.light,.6)),S(t.Alert,"infoColor",(0,h.Nd)(t.info.light,.6)),S(t.Alert,"successColor",(0,h.Nd)(t.success.light,.6)),S(t.Alert,"warningColor",(0,h.Nd)(t.warning.light,.6)),S(t.Alert,"errorFilledBg",r("palette-error-main")),S(t.Alert,"infoFilledBg",r("palette-info-main")),S(t.Alert,"successFilledBg",r("palette-success-main")),S(t.Alert,"warningFilledBg",r("palette-warning-main")),S(t.Alert,"errorFilledColor",x(()=>t.getContrastText(t.error.main))),S(t.Alert,"infoFilledColor",x(()=>t.getContrastText(t.info.main))),S(t.Alert,"successFilledColor",x(()=>t.getContrastText(t.success.main))),S(t.Alert,"warningFilledColor",x(()=>t.getContrastText(t.warning.main))),S(t.Alert,"errorStandardBg",(0,h.j4)(t.error.light,.9)),S(t.Alert,"infoStandardBg",(0,h.j4)(t.info.light,.9)),S(t.Alert,"successStandardBg",(0,h.j4)(t.success.light,.9)),S(t.Alert,"warningStandardBg",(0,h.j4)(t.warning.light,.9)),S(t.Alert,"errorIconColor",r("palette-error-main")),S(t.Alert,"infoIconColor",r("palette-info-main")),S(t.Alert,"successIconColor",r("palette-success-main")),S(t.Alert,"warningIconColor",r("palette-warning-main")),S(t.AppBar,"defaultBg",r("palette-grey-100")),S(t.Avatar,"defaultBg",r("palette-grey-400")),S(t.Button,"inheritContainedBg",r("palette-grey-300")),S(t.Button,"inheritContainedHoverBg",r("palette-grey-A100")),S(t.Chip,"defaultBorder",r("palette-grey-400")),S(t.Chip,"defaultAvatarColor",r("palette-grey-700")),S(t.Chip,"defaultIconColor",r("palette-grey-700")),S(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),S(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),S(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),S(t.LinearProgress,"primaryBg",(0,h.j4)(t.primary.main,.62)),S(t.LinearProgress,"secondaryBg",(0,h.j4)(t.secondary.main,.62)),S(t.LinearProgress,"errorBg",(0,h.j4)(t.error.main,.62)),S(t.LinearProgress,"infoBg",(0,h.j4)(t.info.main,.62)),S(t.LinearProgress,"successBg",(0,h.j4)(t.success.main,.62)),S(t.LinearProgress,"warningBg",(0,h.j4)(t.warning.main,.62)),S(t.Skeleton,"bg",`rgba(${r("palette-text-primaryChannel")} / 0.11)`),S(t.Slider,"primaryTrack",(0,h.j4)(t.primary.main,.62)),S(t.Slider,"secondaryTrack",(0,h.j4)(t.secondary.main,.62)),S(t.Slider,"errorTrack",(0,h.j4)(t.error.main,.62)),S(t.Slider,"infoTrack",(0,h.j4)(t.info.main,.62)),S(t.Slider,"successTrack",(0,h.j4)(t.success.main,.62)),S(t.Slider,"warningTrack",(0,h.j4)(t.warning.main,.62));const e=(0,h.Y9)(t.background.default,.8);S(t.SnackbarContent,"bg",e),S(t.SnackbarContent,"color",x(()=>t.getContrastText(e))),S(t.SpeedDialAction,"fabHoverBg",(0,h.Y9)(t.background.paper,.15)),S(t.StepConnector,"border",r("palette-grey-400")),S(t.StepContent,"border",r("palette-grey-400")),S(t.Switch,"defaultColor",r("palette-common-white")),S(t.Switch,"defaultDisabledColor",r("palette-grey-100")),S(t.Switch,"primaryDisabledColor",(0,h.j4)(t.primary.main,.62)),S(t.Switch,"secondaryDisabledColor",(0,h.j4)(t.secondary.main,.62)),S(t.Switch,"errorDisabledColor",(0,h.j4)(t.error.main,.62)),S(t.Switch,"infoDisabledColor",(0,h.j4)(t.info.main,.62)),S(t.Switch,"successDisabledColor",(0,h.j4)(t.success.main,.62)),S(t.Switch,"warningDisabledColor",(0,h.j4)(t.warning.main,.62)),S(t.TableCell,"border",(0,h.j4)((0,h.Cg)(t.divider,1),.88)),S(t.Tooltip,"bg",(0,h.Cg)(t.grey[700],.92))}if("dark"===t.mode){S(t.Alert,"errorColor",(0,h.j4)(t.error.light,.6)),S(t.Alert,"infoColor",(0,h.j4)(t.info.light,.6)),S(t.Alert,"successColor",(0,h.j4)(t.success.light,.6)),S(t.Alert,"warningColor",(0,h.j4)(t.warning.light,.6)),S(t.Alert,"errorFilledBg",r("palette-error-dark")),S(t.Alert,"infoFilledBg",r("palette-info-dark")),S(t.Alert,"successFilledBg",r("palette-success-dark")),S(t.Alert,"warningFilledBg",r("palette-warning-dark")),S(t.Alert,"errorFilledColor",x(()=>t.getContrastText(t.error.dark))),S(t.Alert,"infoFilledColor",x(()=>t.getContrastText(t.info.dark))),S(t.Alert,"successFilledColor",x(()=>t.getContrastText(t.success.dark))),S(t.Alert,"warningFilledColor",x(()=>t.getContrastText(t.warning.dark))),S(t.Alert,"errorStandardBg",(0,h.Nd)(t.error.light,.9)),S(t.Alert,"infoStandardBg",(0,h.Nd)(t.info.light,.9)),S(t.Alert,"successStandardBg",(0,h.Nd)(t.success.light,.9)),S(t.Alert,"warningStandardBg",(0,h.Nd)(t.warning.light,.9)),S(t.Alert,"errorIconColor",r("palette-error-main")),S(t.Alert,"infoIconColor",r("palette-info-main")),S(t.Alert,"successIconColor",r("palette-success-main")),S(t.Alert,"warningIconColor",r("palette-warning-main")),S(t.AppBar,"defaultBg",r("palette-grey-900")),S(t.AppBar,"darkBg",r("palette-background-paper")),S(t.AppBar,"darkColor",r("palette-text-primary")),S(t.Avatar,"defaultBg",r("palette-grey-600")),S(t.Button,"inheritContainedBg",r("palette-grey-800")),S(t.Button,"inheritContainedHoverBg",r("palette-grey-700")),S(t.Chip,"defaultBorder",r("palette-grey-700")),S(t.Chip,"defaultAvatarColor",r("palette-grey-300")),S(t.Chip,"defaultIconColor",r("palette-grey-300")),S(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),S(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),S(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),S(t.LinearProgress,"primaryBg",(0,h.Nd)(t.primary.main,.5)),S(t.LinearProgress,"secondaryBg",(0,h.Nd)(t.secondary.main,.5)),S(t.LinearProgress,"errorBg",(0,h.Nd)(t.error.main,.5)),S(t.LinearProgress,"infoBg",(0,h.Nd)(t.info.main,.5)),S(t.LinearProgress,"successBg",(0,h.Nd)(t.success.main,.5)),S(t.LinearProgress,"warningBg",(0,h.Nd)(t.warning.main,.5)),S(t.Skeleton,"bg",`rgba(${r("palette-text-primaryChannel")} / 0.13)`),S(t.Slider,"primaryTrack",(0,h.Nd)(t.primary.main,.5)),S(t.Slider,"secondaryTrack",(0,h.Nd)(t.secondary.main,.5)),S(t.Slider,"errorTrack",(0,h.Nd)(t.error.main,.5)),S(t.Slider,"infoTrack",(0,h.Nd)(t.info.main,.5)),S(t.Slider,"successTrack",(0,h.Nd)(t.success.main,.5)),S(t.Slider,"warningTrack",(0,h.Nd)(t.warning.main,.5));const e=(0,h.Y9)(t.background.default,.98);S(t.SnackbarContent,"bg",e),S(t.SnackbarContent,"color",x(()=>t.getContrastText(e))),S(t.SpeedDialAction,"fabHoverBg",(0,h.Y9)(t.background.paper,.15)),S(t.StepConnector,"border",r("palette-grey-600")),S(t.StepContent,"border",r("palette-grey-600")),S(t.Switch,"defaultColor",r("palette-grey-300")),S(t.Switch,"defaultDisabledColor",r("palette-grey-600")),S(t.Switch,"primaryDisabledColor",(0,h.Nd)(t.primary.main,.55)),S(t.Switch,"secondaryDisabledColor",(0,h.Nd)(t.secondary.main,.55)),S(t.Switch,"errorDisabledColor",(0,h.Nd)(t.error.main,.55)),S(t.Switch,"infoDisabledColor",(0,h.Nd)(t.info.main,.55)),S(t.Switch,"successDisabledColor",(0,h.Nd)(t.success.main,.55)),S(t.Switch,"warningDisabledColor",(0,h.Nd)(t.warning.main,.55)),S(t.TableCell,"border",(0,h.Nd)((0,h.Cg)(t.divider,1),.68)),S(t.Tooltip,"bg",(0,h.Cg)(t.grey[700],.92))}O(t.background,"default"),O(t.background,"paper"),O(t.common,"background"),O(t.common,"onBackground"),O(t,"divider"),Object.keys(t).forEach(e=>{const r=t[e];"tonalOffset"!==e&&r&&"object"==typeof r&&(r.main&&S(t[e],"mainChannel",(0,h.Me)(A(r.main))),r.light&&S(t[e],"lightChannel",(0,h.Me)(A(r.light))),r.dark&&S(t[e],"darkChannel",(0,h.Me)(A(r.dark))),r.contrastText&&S(t[e],"contrastTextChannel",(0,h.Me)(A(r.contrastText))),"text"===e&&(O(t[e],"primary"),O(t[e],"secondary")),"action"===e&&(r.active&&O(t[e],"active"),r.selected&&O(t[e],"selected")))})}),L=t.reduce((e,t)=>(0,o.A)(e,t),L);const B={prefix:u,disableCssColorScheme:c,shouldSkipGeneratingVar:m,getSelector:g(L)},{vars:$,generateThemeVars:G,generateStyleSheets:H}=f(L,B);return L.vars=$,Object.entries(L.colorSchemes[L.defaultColorScheme]).forEach(([e,t])=>{L[e]=t}),L.generateThemeVars=G,L.generateStyleSheets=H,L.generateSpacing=function(){return(0,a.A)(P.spacing,(0,l.LX)(this))},L.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(y),L.spacing=L.generateSpacing(),L.shouldSkipGeneratingVar=m,L.unstable_sxConfig={...d.A,...P?.unstable_sxConfig},L.unstable_sx=function(e){return(0,p.A)({sx:e,theme:this})},L.toRuntimeSource=w.F,L}},99987:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(14041),o=r(54357),i=r(31593),a=r(96674),l=r(40979),s=r(39455),c=r(58315),u=r(85383),f=r(31085);const d=(0,a.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),p=n.forwardRef(function(e,t){const r=(0,l.b)({props:e,name:"MuiBackdrop"}),{children:n,className:a,component:p="div",invisible:h=!1,open:m,components:y={},componentsProps:b={},slotProps:v={},slots:g={},TransitionComponent:w,transitionDuration:S,...A}=r,O={...r,component:p,invisible:h},x=(e=>{const{classes:t,invisible:r}=e,n={root:["root",r&&"invisible"]};return(0,i.A)(n,u.R,t)})(O),k={component:p,slots:{transition:w,root:y.Root,...g},slotProps:{...b,...v}},[C,P]=(0,s.A)("root",{elementType:d,externalForwardedProps:k,className:(0,o.A)(x.root,a),ownerState:O}),[E,j]=(0,s.A)("transition",{elementType:c.A,externalForwardedProps:k,ownerState:O});return(0,f.jsx)(E,{in:m,timeout:S,...A,...j,children:(0,f.jsx)(C,{"aria-hidden":!0,...P,classes:x,ref:t,children:n})})})}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={id:e,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var l=2&n&&r;("object"==typeof l||"function"==typeof l)&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach(e=>a[e]=()=>r[e]);return a.default=()=>r,o.d(i,a),i},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var i={};return(()=>{"use strict";o.r(i),o.d(i,{JBrowseCircularGenomeView:()=>ie,React:()=>l,createModel:()=>LA,createRoot:()=>Jn.createRoot,createViewState:()=>BA,hydrateRoot:()=>Jn.hydrateRoot,loadPlugins:()=>cO,version:()=>Jn.version});var e={};o.r(e),o.d(e,{CoreFreeResources:()=>fr,CoreGetFeatureDensityStats:()=>Pr,CoreGetFeatureDetails:()=>Qe,CoreGetFeatures:()=>Lt,CoreGetFileInfo:()=>gt,CoreGetMetadata:()=>ct,CoreGetRefNames:()=>Be,CoreRender:()=>Zt});var t={};o.r(t),o.d(t,{CssVarsProvider:()=>vn.Zr,Experimental_CssVarsProvider:()=>vn.Gk,StyledEngineProvider:()=>hn,THEME_ID:()=>Vr.A,ThemeProvider:()=>re.A,adaptV4Theme:()=>qr,alpha:()=>z.X4,createColorScheme:()=>rn.Ay,createStyles:()=>Zr,createTheme:()=>Gr.A,createTransitions:()=>tn.Ay,css:()=>Xr.AH,darken:()=>z.e$,decomposeColor:()=>z.rP,duration:()=>tn.p0,easing:()=>tn.cz,emphasize:()=>z.tL,experimental_extendTheme:()=>Sn,experimental_sx:()=>Pn,extendTheme:()=>gn.A,getContrastRatio:()=>z.eM,getInitColorSchemeScript:()=>vn.Gs,getLuminance:()=>z.J1,getOverlayAlpha:()=>An.A,hexToRgb:()=>z.E2,hslToRgb:()=>z.YL,keyframes:()=>Xr.i7,lighten:()=>z.a,makeStyles:()=>mn,private_createMixins:()=>kn.A,private_createTypography:()=>xn.A,private_excludeVariablesFromRoot:()=>Cn.A,recomposeColor:()=>z.X0,responsiveFontSizes:()=>en,rgbToHex:()=>z.Ob,shouldSkipGeneratingVar:()=>On.A,styled:()=>p.Ay,unstable_createBreakpoints:()=>Ur.A,unstable_createMuiStrictModeTheme:()=>Yr,unstable_getUnit:()=>Qr.l_,unstable_toUnitless:()=>Qr.db,useColorScheme:()=>vn.Ut,useTheme:()=>F.A,useThemeProps:()=>an,withStyles:()=>yn,withTheme:()=>bn});var r={};o.r(r),o.d(r,{capitalize:()=>y.A,createChainedFunction:()=>jn.A,createSvgIcon:()=>Tn.A,debounce:()=>_n.A,deprecatedPropType:()=>Rn,isMuiElement:()=>Mn.A,mergeSlotProps:()=>Vn.A,ownerDocument:()=>In.A,ownerWindow:()=>Nn.A,requirePropFactory:()=>Dn,setRef:()=>Fn,unstable_ClassNameGenerator:()=>Wn,unstable_memoTheme:()=>h.A,unstable_useEnhancedEffect:()=>Ln.A,unstable_useId:()=>zn.A,unsupportedProp:()=>Bn,useControlled:()=>$n.A,useEventCallback:()=>Gn.A,useForkRef:()=>Hn.A});var n={};o.r(n),o.d(n,{GranularRectLayout:()=>Ao.A,MultiLayout:()=>Oo.A,PrecomputedLayout:()=>xo.A,PrecomputedMultiLayout:()=>Do,SceneGraph:()=>$o});var a=o(14041),l=o.t(a,2),s=o(46658),c=o(9810),u=o(81296),f=o(54357),d=o(31593),p=o(96674),h=o(42014),m=o(40979),y=o(38216),b=o(22162),v=o(65585),g=o(42395),w=o(3807);function S(e){return(0,w.Ay)("MuiAppBar",e)}(0,g.A)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);var A=o(31085),O=o.t(A,2);const x=(e,t)=>e?`${e?.replace(")","")}, ${t})`:t,k=(0,p.Ay)(v.A,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${(0,y.A)(r.position)}`],t[`color${(0,y.A)(r.color)}`]]}})((0,h.A)(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter((0,b.A)(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:e=>!0===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>!1===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?x(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?x(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),C=a.forwardRef(function(e,t){const r=(0,m.b)({props:e,name:"MuiAppBar"}),{className:n,color:o="primary",enableColorOnDark:i=!1,position:a="fixed",...l}=r,s={...r,color:o,position:a,enableColorOnDark:i},c=(e=>{const{color:t,position:r,classes:n}=e,o={root:["root",`color${(0,y.A)(t)}`,`position${(0,y.A)(r)}`]};return(0,d.A)(o,S,n)})(s);return(0,A.jsx)(k,{square:!0,component:"header",ownerState:s,elevation:4,className:(0,f.A)(c.root,n,"fixed"===a&&"mui-fixed"),ref:t,...l})}),P=C;var E=o(32757),j=o(88581),T=o(22980),_=o(77099),R=o(28730),M=o(14041),I=(0,R.n9)()({paper:{overflow:"auto"}}),N=(0,T.observer)(function(e){var t=e.session,r=I().classes,n=t.visibleWidget,o=(0,_.getEnv)(t).pluginManager;if(!n)return null;var i=o.getWidgetType(n.type),l=i.ReactComponent,s=i.HeadingComponent,u=i.heading,f=o.evaluateExtensionPoint("Core-replaceWidget",l,{session:t,model:n});return M.createElement(c.Dialog,{open:!0,onClose:function(){t.hideAllWidgets()},maxWidth:"xl",header:M.createElement(P,{position:"static"},M.createElement(E.A,null,s?M.createElement(s,{model:n}):M.createElement(j.A,{variant:"h6"},u)))},M.createElement(a.Suspense,{fallback:M.createElement("div",null,"Loading...")},M.createElement(v.A,{className:r.paper},M.createElement(f,{model:n,session:t,overrideDimensions:{height:5*window.innerHeight/8,width:800}}))))});const D=N;var F=o(90389),L=o(1557),z=o(83589),B=o(43557),$=o(44775),G=o(83636),H=o(14041);function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},V.apply(null,arguments)}var W=(0,T.observer)(function(e){var t=e.model,r=e.IconButtonProps,n=e.IconProps,o=(0,$.T6)({variant:"popover"});return H.createElement(H.Fragment,null,H.createElement(B.A,V({},r,(0,$.cO)(o),{"data-testid":"view_menu_icon"}),H.createElement(G.A,n)),H.createElement(c.CascadingMenu,V({},(0,$.dB)(o),{onMenuItemClick:function(e,t){t()},menuItems:t.menuItems(),popupState:o})))});const U=W;var q=o(14041);function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var K=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,2452))}),Y=(0,R.n9)()(function(e){return{icon:{color:e.palette.secondary.contrastText},displayName:{marginTop:2,color:e.palette.secondary.contrastText},grow:{flexGrow:1},container:{display:"flex"},iconRoot:{"&:hover":{backgroundColor:(0,z.X4)(e.palette.secondary.contrastText,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}}}});const J=(0,T.observer)(function(e){var t,r,n=e.view,o=Y().classes,i=n.displayName,l=(t=(0,a.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return X(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=l[0],f=l[1],d=(0,u.getSession)(n);return q.createElement("div",{className:o.container},q.createElement(U,{model:n,IconButtonProps:{classes:{root:o.iconRoot},edge:"start"},IconProps:{className:o.icon}}),q.createElement("div",{className:o.grow}),i?q.createElement(j.A,{variant:"body2",className:o.displayName},i):null,q.createElement("div",{className:o.grow}),q.createElement(B.A,{onClick:function(){f(!0)}},q.createElement("div",{style:{width:22,height:22}},q.createElement(c.Logomark,{variant:"white"}))),s?q.createElement(a.Suspense,{fallback:null},q.createElement(K,{open:!0,onClose:function(){f(!1)},version:d.version})):null)});var Z=o(14041),Q=(0,R.n9)()(function(e){return{avoidParentStyle:{all:"initial"},viewContainer:{overflow:"hidden",background:e.palette.secondary.main,margin:e.spacing(.5),padding:"0 ".concat(e.spacing(1)," ").concat(e.spacing(1))}}}),ee=(0,T.observer)(function(e){var t=e.view,r=e.children,n=Q().classes,o=(0,u.getSession)(t),i=(0,F.A)(),l=(0,u.useWidthSetter)(t,i.spacing(1));return Z.createElement(v.A,{elevation:12,ref:l,className:n.viewContainer},o.DialogComponent?Z.createElement(a.Suspense,{fallback:null},Z.createElement(o.DialogComponent,o.DialogProps)):null,Z.createElement(J,{view:t}),Z.createElement(v.A,null,r))});const te=(0,T.observer)(function(e){var t=e.view,r=e.children,n=Q().classes;return Z.createElement("div",{className:n.avoidParentStyle},Z.createElement(L.A,null,Z.createElement(ee,{view:t},r)))});var re=o(70836),ne=o(14041),oe=(0,T.observer)(function(e){var t=e.viewState,r=t.session,n=r.view,o=(0,u.getEnv)(r).pluginManager.getViewType(n.type);if(!o)throw new Error("unknown view type ".concat(n.type));var i=o.ReactComponent,l=(0,c.createJBrowseTheme)((0,s.readConfObject)(t.config.configuration,"theme"));return ne.createElement(re.A,{theme:l},ne.createElement(te,{key:"view-".concat(n.id),view:n},ne.createElement(a.Suspense,{fallback:ne.createElement("div",null,"Loading...")},ne.createElement(i,{model:n,session:r}))),ne.createElement(D,{session:r}))});const ie=oe;var ae=(0,s.ConfigurationSchema)("BaseFeatureWidget",{}),le=o(83794);function se(e,t){(0,u.localStorageSetItem)(e,JSON.stringify(t))}var ce="sequenceFeatureDetails";var ue=o(32168),fe=o(21735),de=["featureData","finalizedFeatureData"],pe=["unformattedFeatureData","featureData"];function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function me(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function ye(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(r),!0).forEach(function(t){ve(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ve(e,t,r){return(t=function(e){var t=function(e){if("object"!=he(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=he(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==he(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ge(e){return _.types.model("BaseFeatureWidget",{id:fe.ElementId,type:_.types.literal("BaseFeatureWidget"),featureData:_.types.frozen(),formattedFields:_.types.frozen(),unformattedFeatureData:_.types.frozen(),view:_.types.safeReference(e.pluggableMstType("view","stateModel")),track:_.types.safeReference(e.pluggableMstType("track","stateModel")),trackId:_.types.maybe(_.types.string),trackType:_.types.maybe(_.types.string),maxDepth:_.types.maybe(_.types.number),sequenceFeatureDetails:_.types.optional(_.types.model("SequenceFeatureDetails").volatile(function(){return{showCoordinatesSetting:(0,u.localStorageGetItem)("".concat(ce,"-showCoordinatesSetting"))||"none",intronBp:(0,u.localStorageGetNumber)("".concat(ce,"-intronBp"),10),upDownBp:(0,u.localStorageGetNumber)("".concat(ce,"-upDownBp"),100),upperCaseCDS:(0,u.localStorageGetBoolean)("".concat(ce,"-upperCaseCDS"),!0),charactersPerRow:100,feature:void 0,mode:""}}).actions(function(e){return{setFeature:function(t){e.feature=t},setUpDownBp:function(t){e.upDownBp=t},setIntronBp:function(t){e.intronBp=t},setUpperCaseCDS:function(t){e.upperCaseCDS=t},setShowCoordinates:function(t){e.showCoordinatesSetting=t},setMode:function(t){e.mode=t}}}).views(function(e){return{get showCoordinates(){return"none"!==e.showCoordinatesSetting},get showGenomicCoordsOption(){return"gene"===e.mode||"gene_updownstream"===e.mode||"genomic"===e.mode||"genomic_sequence_updownstream"===e.mode},get hasCDS(){var t;return null===(t=e.feature)||void 0===t||null===(t=t.subfeatures)||void 0===t?void 0:t.some(function(e){return"CDS"===e.type})},get hasExon(){var t;return null===(t=e.feature)||void 0===t||null===(t=t.subfeatures)||void 0===t?void 0:t.some(function(e){return"exon"===e.type})},get hasExonOrCDS(){return this.hasExon||this.hasCDS}}}).actions(function(e){return{afterAttach:function(){(0,_.addDisposer)(e,(0,le.autorun)(function(){var t,r;se("".concat(ce,"-upDownBp"),e.upDownBp),se("".concat(ce,"-intronBp"),e.intronBp),t="".concat(ce,"-upperCaseCDS"),r=e.upperCaseCDS,(0,u.localStorageSetItem)(t,JSON.stringify(r)),(0,u.localStorageSetItem)("".concat(ce,"-showCoordinatesSetting"),e.showCoordinatesSetting)})),(0,_.addDisposer)(e,(0,le.autorun)(function(){e.setMode(e.hasCDS?"cds":e.hasExon?"cdna":"genomic")}))}}}),{}),descriptions:_.types.frozen()}).volatile(function(){return{error:void 0}}).actions(function(e){return{setFeatureData:function(t){e.unformattedFeatureData=t},clearFeatureData:function(){e.featureData=void 0},setFormattedData:function(t){e.featureData=t},setExtra:function(t,r,n){e.trackId=r,e.trackType=t,e.maxDepth=n},setError:function(t){e.error=t}}}).actions(function(e){return{afterCreate:function(){(0,_.addDisposer)(e,(0,le.autorun)(function(){try{var t=e.unformattedFeatureData,r=e.track,n=(0,u.getSession)(e);if(r&&e.setExtra(r.type,r.configuration.trackId,(0,s.getConf)(r,["formatDetails","maxDepth"])),t){var o=structuredClone(t),i=function(e,t){return be(be({},(0,s.getConf)(n,["formatDetails",e],{feature:t})),(0,s.getConf)(r,["formatDetails",e],{feature:t}))};r&&(o.__jbrowsefmt=i("feature",o),(0,ue.fq)(o,(0,s.getConf)(r,["formatDetails","depth"]),function(e){e.__jbrowsefmt=i("subfeatures",e)})),e.setFormattedData(o)}}catch(t){console.error(t),e.setError(t)}}))}}}).preProcessSnapshot(function(e){return be({unformattedFeatureData:e.featureData,featureData:e.finalizedFeatureData},me(e,de))}).postProcessSnapshot(function(e){var t=e,r=(t.unformattedFeatureData,t.featureData),n=me(t,pe),o=JSON.stringify(r,function(e,t){return void 0===t?null:t});return be({finalizedFeatureData:!o||o.length>2e6?void 0:JSON.parse(o)},n)})}var we=o(22261);function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Oe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach(function(t){xe(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function xe(e,t,r){return(t=function(e){var t=function(e){if("object"!=Se(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Se(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Se(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ke=(0,s.ConfigurationSchema)("CytobandAdapter",{cytobandLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/cytoband.txt.gz"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?Oe(Oe({},e),{},{cytobandLocation:{uri:e.uri,baseUri:e.baseUri}}):e}});var Ce=o(58185),Pe=o(38647),Ee=o(60654),je=o(57859),Te=o(85132);function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function Re(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Me(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Me(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Me(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Me(f,"constructor",c),Me(c,"constructor",s),s.displayName="GeneratorFunction",Me(c,o,"GeneratorFunction"),Me(f),Me(f,o,"Generator"),Me(f,n,function(){return this}),Me(f,"toString",function(){return"[object Generator]"}),(Re=function(){return{w:i,m:d}})()}function Me(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Me=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Me(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Me(e,t,r,n)}function Ie(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ne(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ze(n.key),n)}}function De(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(De=function(){return!!e})()}function Fe(e){return Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fe(e)}function Le(e,t){return Le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Le(e,t)}function ze(e){var t=function(e){if("object"!=_e(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=_e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_e(t)?t:t+""}var Be=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=ze(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=Fe(n),e=function(e,t){if(t&&("object"==_e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,De()?Reflect.construct(n,o||[],Fe(r).constructor):n.apply(r,o))),"name","CoreGetRefNames"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Le(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=Re().m(function e(t,r){var n,o,i,a,l,s;return Re().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.sessionId,a=o.adapterConfig,e.n=2,(0,je.cK)(n,i,a);case 2:if(l=e.v,s=l.dataAdapter,!(0,Ee.isFeatureAdapter)(s)){e.n=3;break}return e.a(2,s.getRefNames(o));case 3:return e.a(2,[])}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){Ie(i,r,n,a,l,"next",e)}function l(e){Ie(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&Ne(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A);function $e(e){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(e)}function Ge(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return He(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(He(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,He(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,He(f,"constructor",c),He(c,"constructor",s),s.displayName="GeneratorFunction",He(c,o,"GeneratorFunction"),He(f),He(f,o,"Generator"),He(f,n,function(){return this}),He(f,"toString",function(){return"[object Generator]"}),(Ge=function(){return{w:i,m:d}})()}function He(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}He=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){He(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},He(e,t,r,n)}function Ve(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function We(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Ve(i,n,o,a,l,"next",e)}function l(e){Ve(i,n,o,a,l,"throw",e)}a(void 0)})}}function Ue(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ze(n.key),n)}}function qe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qe=function(){return!!e})()}function Xe(e,t,r,n){var o=Ke(Ye(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Ke(){return Ke="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ye(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Ke.apply(null,arguments)}function Ye(e){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ye(e)}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}function Ze(e){var t=function(e){if("object"!=$e(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=$e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$e(t)?t:t+""}var Qe=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Ze(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=Ye(n),e=function(e,t){if(t&&("object"==$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,qe()?Reflect.construct(n,o||[],Ye(r).constructor):n.apply(r,o))),"name","CoreGetFeatureDetails"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Je(e,t)}(t,e),r=t,n=[{key:"serializeArguments",value:(i=We(Ge().m(function e(r,n){var o,i,a,l,s,c;return Ge().w(function(e){for(;;)switch(e.n){case 0:return o=this.pluginManager.rootModel,i=o.session.assemblyManager,e.n=1,(0,u.renameRegionsIfNeeded)(i,r);case 1:return a=e.v,e.n=2,Xe(t,"serializeArguments",this,3)([a,n]);case 2:if(l=e.v,"MainThreadRpcDriver"!==n){e.n=3;break}return e.a(2,l);case 3:return s=r.rendererType,c=this.pluginManager.getRendererType(s),e.a(2,c.serializeArgsInClient(l))}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"execute",value:(o=We(Ge().m(function e(t,r){var n,o,i,a,l,s;return Ge().w(function(e){for(;;)switch(e.n){case 0:if(o=t,"MainThreadRpcDriver"===r){e.n=2;break}return e.n=1,this.deserializeArguments(t,r);case 1:o=e.v;case 2:return a=(i=o).rendererType,l=i.featureId,s=this.pluginManager.getRendererType(a),e.a(2,{feature:null===(n=s.getLayoutSession(t))||void 0===n||null===(n=n.cachedLayout.layout.getDataByID(l))||void 0===n?void 0:n.toJSON()})}},e,this)})),function(e,t){return o.apply(this,arguments)})}],n&&Ue(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A);function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}function tt(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return rt(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(rt(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,rt(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,rt(f,"constructor",c),rt(c,"constructor",s),s.displayName="GeneratorFunction",rt(c,o,"GeneratorFunction"),rt(f),rt(f,o,"Generator"),rt(f,n,function(){return this}),rt(f,"toString",function(){return"[object Generator]"}),(tt=function(){return{w:i,m:d}})()}function rt(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}rt=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){rt(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},rt(e,t,r,n)}function nt(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ot(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,st(n.key),n)}}function it(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(it=function(){return!!e})()}function at(e){return at=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},at(e)}function lt(e,t){return lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lt(e,t)}function st(e){var t=function(e){if("object"!=et(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=et(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==et(t)?t:t+""}var ct=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=st(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=at(n),e=function(e,t){if(t&&("object"==et(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,it()?Reflect.construct(n,o||[],at(r).constructor):n.apply(r,o))),"name","CoreGetMetadata"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lt(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=tt().m(function e(t,r){var n,o,i,a,l,s;return tt().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.sessionId,a=o.adapterConfig,e.n=2,(0,je.cK)(n,i,a);case 2:return l=e.v,s=l.dataAdapter,e.a(2,(0,Ee.isFeatureAdapter)(s)?s.getMetadata(o):null)}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){nt(i,r,n,a,l,"next",e)}function l(e){nt(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&ot(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A);function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}function ft(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return dt(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(dt(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,dt(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,dt(f,"constructor",c),dt(c,"constructor",s),s.displayName="GeneratorFunction",dt(c,o,"GeneratorFunction"),dt(f),dt(f,o,"Generator"),dt(f,n,function(){return this}),dt(f,"toString",function(){return"[object Generator]"}),(ft=function(){return{w:i,m:d}})()}function dt(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}dt=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){dt(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},dt(e,t,r,n)}function pt(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ht(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vt(n.key),n)}}function mt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mt=function(){return!!e})()}function yt(e){return yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yt(e)}function bt(e,t){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bt(e,t)}function vt(e){var t=function(e){if("object"!=ut(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ut(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ut(t)?t:t+""}var gt=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=vt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=yt(n),e=function(e,t){if(t&&("object"==ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,mt()?Reflect.construct(n,o||[],yt(r).constructor):n.apply(r,o))),"name","CoreGetInfo"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bt(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=ft().m(function e(t,r){var n,o,i,a,l,s;return ft().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.sessionId,a=o.adapterConfig,e.n=2,(0,je.cK)(n,i,a);case 2:return l=e.v,s=l.dataAdapter,e.a(2,(0,Ee.isFeatureAdapter)(s)?s.getHeader(o):null)}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){pt(i,r,n,a,l,"next",e)}function l(e){pt(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&ht(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A),wt=o(81912),St=o(2033),At=o(865);function Ot(e){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ot(e)}function xt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(r),!0).forEach(function(t){Dt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ct(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Pt(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Pt(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Pt(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Pt(f,"constructor",c),Pt(c,"constructor",s),s.displayName="GeneratorFunction",Pt(c,o,"GeneratorFunction"),Pt(f),Pt(f,o,"Generator"),Pt(f,n,function(){return this}),Pt(f,"toString",function(){return"[object Generator]"}),(Ct=function(){return{w:i,m:d}})()}function Pt(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Pt=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Pt(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Pt(e,t,r,n)}function Et(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function jt(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Et(i,n,o,a,l,"next",e)}function l(e){Et(i,n,o,a,l,"throw",e)}a(void 0)})}}function Tt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ft(n.key),n)}}function _t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_t=function(){return!!e})()}function Rt(e,t,r,n){var o=Mt(It(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Mt(){return Mt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=It(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Mt.apply(null,arguments)}function It(e){return It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},It(e)}function Nt(e,t){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nt(e,t)}function Dt(e,t,r){return(t=Ft(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ft(e){var t=function(e){if("object"!=Ot(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ot(t)?t:t+""}var Lt=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return Dt((r=this,n=t,o=[].concat(a),n=It(n),e=function(e,t){if(t&&("object"==Ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,_t()?Reflect.construct(n,o||[],It(r).constructor):n.apply(r,o))),"name","CoreGetFeatures"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nt(e,t)}(t,e),r=t,n=[{key:"deserializeReturn",value:(a=jt(Ct().m(function e(r,n,o){var i;return Ct().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Rt(t,"deserializeReturn",this,3)([r,n,o]);case 1:return i=e.v,e.a(2,i.map(function(e){return new At.A(e)}))}},e,this)})),function(e,t,r){return a.apply(this,arguments)})},{key:"serializeArguments",value:(i=jt(Ct().m(function e(r,n){var o,i,a;return Ct().w(function(e){for(;;)switch(e.n){case 0:return o=this.pluginManager.rootModel,i=o.session.assemblyManager,e.n=1,(0,u.renameRegionsIfNeeded)(i,r);case 1:return a=e.v,e.a(2,Rt(t,"serializeArguments",this,3)([a,n]))}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"execute",value:(o=jt(Ct().m(function e(t,r){var n,o,i,a,l,s,c,u,f;return Ct().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.deserializeArguments(t,r);case 1:return n=e.v,o=n.stopToken,i=n.statusCallback,a=n.sessionId,l=n.adapterConfig,s=n.regions,c=n.opts,e.n=2,(0,je.cK)(this.pluginManager,a,l);case 2:return u=e.v.dataAdapter,e.n=3,(0,wt._)(u.getFeaturesInMultipleRegions(s,kt(kt({},c),{},{statusCallback:i,stopToken:o})).pipe((0,St.$)()));case 3:return f=e.v,e.a(2,f.map(function(e){return e.toJSON()}))}},e,this)})),function(e,t){return o.apply(this,arguments)})}],n&&Tt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i,a}(Te.A);function zt(e,t){if(!t.ReactComponent)throw new Error("renderer ".concat(e," has no ReactComponent, it may not be completely implemented yet"));return t}function Bt(e){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bt(e)}function $t(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Gt(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Gt(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Gt(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Gt(f,"constructor",c),Gt(c,"constructor",s),s.displayName="GeneratorFunction",Gt(c,o,"GeneratorFunction"),Gt(f),Gt(f,o,"Generator"),Gt(f,n,function(){return this}),Gt(f,"toString",function(){return"[object Generator]"}),($t=function(){return{w:i,m:d}})()}function Gt(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Gt=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Gt(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Gt(e,t,r,n)}function Ht(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Vt(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Ht(i,n,o,a,l,"next",e)}function l(e){Ht(i,n,o,a,l,"throw",e)}a(void 0)})}}function Wt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jt(n.key),n)}}function Ut(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ut=function(){return!!e})()}function qt(e,t,r,n){var o=Xt(Kt(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Xt(){return Xt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Kt(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Xt.apply(null,arguments)}function Kt(e){return Kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kt(e)}function Yt(e,t){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yt(e,t)}function Jt(e){var t=function(e){if("object"!=Bt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Bt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bt(t)?t:t+""}var Zt=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Jt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=Kt(n),e=function(e,t){if(t&&("object"==Bt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Ut()?Reflect.construct(n,o||[],Kt(r).constructor):n.apply(r,o))),"name","CoreRender"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yt(e,t)}(t,e),r=t,n=[{key:"serializeArguments",value:(a=Vt($t().m(function e(r,n){var o,i,a,l;return $t().w(function(e){for(;;)switch(e.n){case 0:return o=this.pluginManager.rootModel,i=o.session.assemblyManager,e.n=1,(0,u.renameRegionsIfNeeded)(i,r);case 1:return a=e.v,e.n=2,qt(t,"serializeArguments",this,3)([a,n]);case 2:if(l=e.v,"MainThreadRpcDriver"!==n){e.n=3;break}return e.a(2,l);case 3:return e.a(2,zt(r.rendererType,this.pluginManager.getRendererType(r.rendererType)).serializeArgsInClient(l))}},e,this)})),function(e,t){return a.apply(this,arguments)})},{key:"execute",value:(i=Vt($t().m(function e(t,r){var n,o,i,a,l,s;return $t().w(function(e){for(;;)switch(e.n){case 0:if(n=t,"MainThreadRpcDriver"===r){e.n=2;break}return e.n=1,this.deserializeArguments(t,r);case 1:n=e.v;case 2:if(i=(o=n).sessionId,a=o.rendererType,i){e.n=3;break}throw new Error("must pass a unique session id");case 3:if(l=zt(a,this.pluginManager.getRendererType(a)),"MainThreadRpcDriver"!==r){e.n=5;break}return e.n=4,l.render(n);case 4:s=e.v,e.n=7;break;case 5:return e.n=6,l.renderInWorker(n);case 6:s=e.v;case 7:return e.a(2,s)}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"deserializeReturn",value:(o=Vt($t().m(function e(r,n,o){var i;return $t().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,qt(t,"deserializeReturn",this,3)([r,n,o]);case 1:if(i=e.v,"MainThreadRpcDriver"!==o){e.n=2;break}return e.a(2,i);case 2:return e.a(2,zt(n.rendererType,this.pluginManager.getRendererType(n.rendererType)).deserializeResultsInClient(i,n))}},e,this)})),function(e,t,r){return o.apply(this,arguments)})}],n&&Wt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i,a}(Te.A);function Qt(e){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(e)}function er(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return tr(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(tr(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,tr(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,tr(f,"constructor",c),tr(c,"constructor",s),s.displayName="GeneratorFunction",tr(c,o,"GeneratorFunction"),tr(f),tr(f,o,"Generator"),tr(f,n,function(){return this}),tr(f,"toString",function(){return"[object Generator]"}),(er=function(){return{w:i,m:d}})()}function tr(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}tr=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){tr(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},tr(e,t,r,n)}function rr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return nr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function or(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ir(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){or(i,n,o,a,l,"next",e)}function l(e){or(i,n,o,a,l,"throw",e)}a(void 0)})}}function ar(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ur(n.key),n)}}function lr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lr=function(){return!!e})()}function sr(e){return sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sr(e)}function cr(e,t){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cr(e,t)}function ur(e){var t=function(e){if("object"!=Qt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qt(t)?t:t+""}var fr=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=ur(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=sr(n),e=function(e,t){if(t&&("object"==Qt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,lr()?Reflect.construct(n,o||[],sr(r).constructor):n.apply(r,o))),"name","CoreFreeResources"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cr(e,t)}(t,e),r=t,n=[{key:"execute",value:(i=ir(er().m(function e(t){var r,n;return er().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,(0,je.pZ)(t);case 1:r=rr(this.pluginManager.getRendererTypes());try{for(r.s();!(n=r.n()).done;)n.value.freeResources(t)}catch(e){r.e(e)}finally{r.f()}case 2:return e.a(2)}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"serializeArguments",value:(o=ir(er().m(function e(t,r){return er().w(function(e){for(;;)if(0===e.n)return e.a(2,t)},e)})),function(e,t){return o.apply(this,arguments)})}],n&&ar(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A);function dr(e){return dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dr(e)}function pr(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return hr(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(hr(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,hr(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,hr(f,"constructor",c),hr(c,"constructor",s),s.displayName="GeneratorFunction",hr(c,o,"GeneratorFunction"),hr(f),hr(f,o,"Generator"),hr(f,n,function(){return this}),hr(f,"toString",function(){return"[object Generator]"}),(pr=function(){return{w:i,m:d}})()}function hr(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}hr=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){hr(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},hr(e,t,r,n)}function mr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function yr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mr(Object(r),!0).forEach(function(t){kr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function br(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function vr(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){br(i,n,o,a,l,"next",e)}function l(e){br(i,n,o,a,l,"throw",e)}a(void 0)})}}function gr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Cr(n.key),n)}}function wr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wr=function(){return!!e})()}function Sr(e,t,r,n){var o=Ar(Or(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Ar(){return Ar="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Or(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Ar.apply(null,arguments)}function Or(e){return Or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Or(e)}function xr(e,t){return xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xr(e,t)}function kr(e,t,r){return(t=Cr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cr(e){var t=function(e){if("object"!=dr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=dr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dr(t)?t:t+""}var Pr=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return kr((r=this,n=t,o=[].concat(a),n=Or(n),e=function(e,t){if(t&&("object"==dr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,wr()?Reflect.construct(n,o||[],Or(r).constructor):n.apply(r,o))),"name","CoreGetFeatureDensityStats"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xr(e,t)}(t,e),r=t,n=[{key:"serializeArguments",value:(i=vr(pr().m(function e(r,n){var o,i,a,l;return pr().w(function(e){for(;;)switch(e.n){case 0:return i=this.pluginManager.rootModel,a=i.session.assemblyManager,e.n=1,(0,u.renameRegionsIfNeeded)(a,yr(yr({},r),{},{filters:null===(o=r.filters)||void 0===o?void 0:o.toJSON().filters}));case 1:return l=e.v,e.a(2,Sr(t,"serializeArguments",this,3)([l,n]))}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"execute",value:(o=vr(pr().m(function e(t,r){var n,o,i,a,l,s,c;return pr().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.adapterConfig,a=o.sessionId,l=o.regions,e.n=2,(0,je.cK)(n,a,i);case 2:if(s=e.v,c=s.dataAdapter,(0,Ee.isFeatureAdapter)(c)){e.n=3;break}throw new Error("Adapter does not support retrieving features");case 3:return e.a(2,c.getMultiRegionFeatureDensityStats(l,o))}},e,this)})),function(e,t){return o.apply(this,arguments)})}],n&&gr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A);function Er(e){return Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Er(e)}function jr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Mr(n.key),n)}}function Tr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tr=function(){return!!e})()}function _r(e){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_r(e)}function Rr(e,t){return Rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rr(e,t)}function Mr(e){var t=function(e){if("object"!=Er(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Er(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Er(t)?t:t+""}var Ir=function(t){function r(){var e,t,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Mr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((t=this,n=r,o=[].concat(a),n=_r(n),e=function(e,t){if(t&&("object"==Er(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(t,Tr()?Reflect.construct(n,o||[],_r(t).constructor):n.apply(t,o))),"name","CorePlugin"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rr(e,t)}(r,t),n=r,i=[{key:"install",value:function(t){for(var r=function(){var e=i[n];t.addRpcMethod(function(){return new e(t)})},n=0,i=Object.values(e);n<i.length;n++)r();!function(e){e.addAdapterType(function(){return new Ce.AdapterType({name:"CytobandAdapter",configSchema:ke,adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,54273)).then(function(e){return e.default})}})})}(t),t.addWidgetType(function(){return new Pe.A({name:"BaseFeatureWidget",heading:"Feature details",configSchema:ae,stateModel:ge(t),ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,25863))})})})}}],i&&jr(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(we.A);function Nr(e){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nr(e)}function Dr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Fr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function Fr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Lr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Br(n.key),n)}}function zr(e,t,r){return(t=Br(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Br(e){var t=function(e){if("object"!=Nr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Nr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nr(t)?t:t+""}var $r=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),zr(this,"phaseCallbacks",new Map),zr(this,"phaseOrder",[]);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.phaseOrder=r},(t=[{key:"add",value:function(e,t){if(!this.phaseOrder.includes(e))throw new Error("unknown phase ".concat(e));var r=this.phaseCallbacks.get(e);r||(r=[],this.phaseCallbacks.set(e,r)),r.push(t)}},{key:"run",value:function(){var e,t=Dr(this.phaseOrder);try{for(t.s();!(e=t.n()).done;){var r,n=e.value,o=Dr(this.phaseCallbacks.get(n)||[]);try{for(o.s();!(r=o.n()).done;)(0,r.value)()}catch(e){o.e(e)}finally{o.f()}}}catch(e){t.e(e)}finally{t.f()}}}])&&Lr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),Gr=o(59612),Hr=o(72971),Vr=o(2234),Wr=o(80009),Ur=o(19661);function qr(e){const{defaultProps:t={},mixins:r={},overrides:n={},palette:o={},props:i={},styleOverrides:a={},...l}=e,s={...l,components:{}};Object.keys(t).forEach(e=>{const r=s.components[e]||{};r.defaultProps=t[e],s.components[e]=r}),Object.keys(i).forEach(e=>{const t=s.components[e]||{};t.defaultProps=i[e],s.components[e]=t}),Object.keys(a).forEach(e=>{const t=s.components[e]||{};t.styleOverrides=a[e],s.components[e]=t}),Object.keys(n).forEach(e=>{const t=s.components[e]||{};t.styleOverrides=n[e],s.components[e]=t}),s.spacing=(0,Wr.A)(e.spacing);const c=(0,Ur.A)(e.breakpoints||{}),u=s.spacing;s.mixins={gutters:(e={})=>({paddingLeft:u(2),paddingRight:u(2),...e,[c.up("sm")]:{paddingLeft:u(3),paddingRight:u(3),...e[c.up("sm")]}}),...r};const{type:f,mode:d,...p}=o,h=d||f||"light";return s.palette={text:{hint:"dark"===h?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:h,type:h,...p},s}var Xr=o(15428),Kr=o(21587);function Yr(e,...t){return(0,Gr.A)((0,Kr.A)({unstable_strictMode:!0},e),...t)}let Jr=!1;function Zr(e){return Jr||(console.warn(["MUI: createStyles from @mui/material/styles is deprecated.","Please use @mui/styles/createStyles"].join("\n")),Jr=!0),e}var Qr=o(80525);function en(e,t={}){const{breakpoints:r=["sm","md","lg"],disableAlign:n=!1,factor:o=2,variants:i=["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]}=t,a={...e};a.typography={...a.typography};const l=a.typography,s=(0,Qr.I3)(l.htmlFontSize),c=r.map(e=>a.breakpoints.values[e]);return i.forEach(e=>{const t=l[e];if(!t)return;const r=parseFloat(s(t.fontSize,"rem"));if(r<=1)return;const i=r,a=1+(i-1)/o;let{lineHeight:u}=t;if(!(0,Qr.a9)(u)&&!n)throw new Error((0,Hr.A)(6));(0,Qr.a9)(u)||(u=parseFloat(s(u,"rem"))/parseFloat(r));let f=null;n||(f=e=>(0,Qr.VR)({size:e,grid:(0,Qr.qW)({pixels:4,lineHeight:u,htmlFontSize:l.htmlFontSize})})),l[e]={...t,...(0,Qr.yL)({cssProperty:"fontSize",min:a,max:i,unit:"rem",breakpoints:c,transform:f})}}),a}var tn=o(70453),rn=o(9273),nn=o(74873),on=o(69839);function an({props:e,name:t}){return(0,nn.A)({props:e,name:t,defaultTheme:on.A,themeId:Vr.A})}var ln=o(8539),sn=o(67024),cn=o(48658);const un=new Map,fn={insert:void 0},dn=(e,t)=>{const r=(0,sn.A)(e);return r.sheet=new t({key:r.key,nonce:r.sheet.nonce,container:r.sheet.container,speedy:r.sheet.isSpeedy,prepend:r.sheet.prepend,insertionPoint:r.sheet.insertionPoint}),r};let pn;if("object"==typeof document&&(pn=document.querySelector('[name="emotion-insertion-point"]'),!pn)){pn=document.createElement("meta"),pn.setAttribute("name","emotion-insertion-point"),pn.setAttribute("content","");const e=document.querySelector("head");e&&e.prepend(pn)}function hn(e){const{injectFirst:t,enableCssLayer:r,children:n}=e,o=a.useMemo(()=>{const e=`${t}-${r}`;if("object"==typeof document&&un.has(e))return un.get(e);const n=function(e,t){if(e||t){class r extends cn.v{insert(e,t){return fn.insert?fn.insert(e,t):(this.key&&this.key.endsWith("global")&&(this.before=pn),super.insert(e,t))}}const n=dn({key:"css",insertionPoint:e?pn:void 0},r);if(t){const e=n.insert;n.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return n}}(t,r);return un.set(e,n),n},[t,r]);return o?(0,A.jsx)(ln.C,{value:o,children:n}):n}function mn(){throw new Error((0,Hr.A)(14))}function yn(){throw new Error((0,Hr.A)(15))}function bn(){throw new Error((0,Hr.A)(16))}var vn=o(1702),gn=o(99972);let wn=!1;function Sn(...e){return wn||(console.warn(["MUI: The `experimental_extendTheme` has been stabilized.","","You should use `import { extendTheme } from '@mui/material/styles'`"].join("\n")),wn=!0),(0,gn.A)(...e)}var An=o(81441),On=o(52312),xn=o(23340),kn=o(92371),Cn=o(25238);function Pn(){throw new Error((0,Hr.A)(19))}var En=o(77709),jn=o(5948),Tn=o(23523),_n=o(65069);const Rn=function(e,t){return()=>null};var Mn=o(71589),In=o(70414),Nn=o(58063);const Dn=function(e,t){return()=>()=>null},Fn=o(63835).A;var Ln=o(38256),zn=o(65866);const Bn=function(e,t,r,n,o){return null};var $n=o(25337),Gn=o(75220),Hn=o(38870),Vn=o(964);const Wn={configure:e=>{En.A.configure(e)}};var Un=o(5334),qn=o(19120),Xn=o(9919),Kn=o(43144),Yn=o.t(Kn,2),Jn=o(25873),Zn=o.t(Jn,2),Qn=o(14041);function eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function to(){return to=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},to.apply(null,arguments)}function ro(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.fromEntries(Object.entries(e).map(function(e){var r,n,o=(n=2,function(e){if(Array.isArray(e))return e}(r=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(r,n)||function(e,t){if(e){if("string"==typeof e)return eo(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eo(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],l=o[1];return function(e,t){var r=(0,a.forwardRef)(function(e,r){return Qn.createElement(a.Suspense,{fallback:null},Qn.createElement(t,to({},e,{ref:r})))});return r.displayName=e,[e,r]}("".concat(t).concat(i),l)}))}var no=ro({Attributes:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,3845))}),FeatureDetails:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,99696))}),BaseCard:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,11154))}),BaseAttributes:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,30943))}),BaseCoreDetails:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,98847))})},"@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/"),oo={DataGrid:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.DataGrid}})}),GridActionsCellItem:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridActionsCellItem}})}),GridAddIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridAddIcon}})}),GridArrowDownwardIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridArrowDownwardIcon}})}),GridArrowUpwardIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridArrowUpwardIcon}})}),GridCellCheckboxForwardRef:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridCellCheckboxForwardRef}})}),GridCellCheckboxRenderer:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridCellCheckboxRenderer}})}),GridCheckCircleIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridCheckCircleIcon}})}),GridCheckIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridCheckIcon}})}),GridCloseIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridCloseIcon}})}),GridColumnHeaderSeparator:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridColumnHeaderSeparator}})}),GridColumnHeaderSortIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridColumnHeaderSortIcon}})}),GridColumnIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridColumnIcon}})}),GridColumnMenu:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridColumnMenu}})}),GridColumnMenuContainer:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridColumnMenuContainer}})}),GridDragIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridDragIcon}})}),GridExpandMoreIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridExpandMoreIcon}})}),GridFilterAltIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridFilterAltIcon}})}),GridFilterForm:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridFilterForm}})}),GridFilterListIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridFilterListIcon}})}),GridFilterPanel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridFilterPanel}})}),GridFooter:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridFooter}})}),GridFooterContainer:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridFooterContainer}})}),GridHeader:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridHeader}})}),GridHeaderCheckbox:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridHeaderCheckbox}})}),GridKeyboardArrowRight:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridKeyboardArrowRight}})}),GridLoadIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridLoadIcon}})}),GridLoadingOverlay:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridLoadingOverlay}})}),GridMenuIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridMenuIcon}})}),GridMoreVertIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridMoreVertIcon}})}),GridNoRowsOverlay:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridNoRowsOverlay}})}),GridOverlay:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridOverlay}})}),GridPagination:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridPagination}})}),GridPanel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridPanel}})}),GridPanelWrapper:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridPanelWrapper}})}),GridRemoveIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridRemoveIcon}})}),GridRoot:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridRoot}})}),GridRowCount:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridRowCount}})}),GridSearchIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridSearchIcon}})}),GridSelectedRowCount:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridSelectedRowCount}})}),GridSeparatorIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridSeparatorIcon}})}),GridTableRowsIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridTableRowsIcon}})}),GridToolbarExportContainer:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridToolbarExportContainer}})}),GridTripleDotsVerticalIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridTripleDotsVerticalIcon}})}),GridViewHeadlineIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridViewHeadlineIcon}})}),GridViewStreamIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridViewStreamIcon}})})},io={Accordion:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,91435))}),AccordionActions:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,2791))}),AccordionDetails:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,41211))}),AccordionSummary:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,55577))}),Alert:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,32135))}),AlertTitle:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,89642))}),Autocomplete:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,81439))}),Avatar:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,47826))}),AvatarGroup:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,9047))}),Backdrop:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,78141))}),Badge:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,25978))}),Box:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,46160))}),Breadcrumbs:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,85157))}),Button:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,6467))}),ButtonGroup:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,57089))}),Card:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,90017))}),CardActions:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,72352))}),CardActionArea:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,84565))}),CardContent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,60730))}),CardHeader:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,75860))}),CardMedia:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,53539))}),CircularProgress:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,60477))}),Collapse:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,41372))}),ClickAwayListener:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,7819))}),Chip:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,91517))}),Checkbox:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,6266))}),Container:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,74550))}),Dialog:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,90895))}),DialogActions:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,72378))}),DialogTitle:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,52295))}),DialogContent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,38908))}),DialogContentText:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,40415))}),Divider:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,63820))}),Drawer:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,53331))}),Fab:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,69356))}),Fade:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,66937))}),FilledInput:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,75893))}),FormLabel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,80461))}),FormControl:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,64194))}),FormControlLabel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,74327))}),FormHelperText:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,84570))}),FormGroup:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,35500))}),Grid:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,21448))}),Grid2:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,21448))}),Grow:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,25260))}),Icon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,76846))}),IconButton:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,57906))}),Input:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,45269))}),InputBase:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,4504))}),InputLabel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,63613))}),InputAdornment:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,53409))}),Link:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,32039))}),LinearProgress:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,4453))}),List:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,25763))}),ListItem:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,44696))}),ListItemAvatar:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,63007))}),ListItemSecondaryAction:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,44616))}),ListItemIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,8905))}),ListSubheader:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,99286))}),ListItemText:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,10307))}),Menu:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,62752))}),MenuItem:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,68195))}),MenuList:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,8072))}),Modal:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,51376))}),NativeSelect:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,46262))}),OutlinedInput:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,75983))}),Pagination:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,60612))}),PaginationItem:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,6196))}),Paper:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,60943))}),Popover:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,98696))}),Popper:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,18017))}),Portal:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,69829))}),Radio:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,64982))}),RadioGroup:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,19805))}),Rating:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,94460))}),ScopedCssBaseline:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,62769))}),Select:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,80811))}),Skeleton:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,66568))}),Slider:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,76058))}),Snackbar:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,8807))}),SnackbarContent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,91513))}),SpeedDial:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,92891))}),SpeedDialAction:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,98758))}),SpeedDialIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,65990))}),Stack:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,23110))}),Step:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,67253))}),StepButton:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,68861))}),StepConnector:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39904))}),StepLabel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,93085))}),StepIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,44536))}),Stepper:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,42980))}),SvgIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,97630))}),Switch:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,98539))}),Tab:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,95790))}),Table:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,79857))}),TableBody:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,12353))}),TableCell:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,14433))}),TableContainer:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,92892))}),TableFooter:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,84449))}),TableHead:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,76571))}),TablePagination:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,7581))}),TableRow:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,20051))}),TableSortLabel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,23017))}),Tabs:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,93))}),TextField:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,73980))}),TextareaAutosize:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,68039))}),ToggleButton:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,84663))}),ToggleButtonGroup:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39614))}),Toolbar:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,82618))}),Tooltip:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,63610))}),Typography:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39798))})};const ao=["mobx","mobx-state-tree","react","react/jsx-runtime","react-dom","react-dom/client","mobx-react","@mui/x-data-grid","@mui/material/utils","@material-ui/core/utils","tss-react/mui","@material-ui/core","@mui/material","@mui/material/styles","@material-ui/core/styles","@material-ui/core/Accordion","@material-ui/core/AccordionActions","@material-ui/core/AccordionDetails","@material-ui/core/AccordionSummary","@material-ui/core/Alert","@material-ui/core/AlertTitle","@material-ui/core/Autocomplete","@material-ui/core/Avatar","@material-ui/core/AvatarGroup","@material-ui/core/Backdrop","@material-ui/core/Badge","@material-ui/core/Box","@material-ui/core/Breadcrumbs","@material-ui/core/Button","@material-ui/core/ButtonGroup","@material-ui/core/Card","@material-ui/core/CardActions","@material-ui/core/CardActionArea","@material-ui/core/CardContent","@material-ui/core/CardHeader","@material-ui/core/CardMedia","@material-ui/core/CircularProgress","@material-ui/core/Collapse","@material-ui/core/ClickAwayListener","@material-ui/core/Chip","@material-ui/core/Checkbox","@material-ui/core/Container","@material-ui/core/Dialog","@material-ui/core/DialogActions","@material-ui/core/DialogTitle","@material-ui/core/DialogContent","@material-ui/core/DialogContentText","@material-ui/core/Divider","@material-ui/core/Drawer","@material-ui/core/Fab","@material-ui/core/Fade","@material-ui/core/FilledInput","@material-ui/core/FormLabel","@material-ui/core/FormControl","@material-ui/core/FormControlLabel","@material-ui/core/FormHelperText","@material-ui/core/FormGroup","@material-ui/core/Grid","@material-ui/core/Grid2","@material-ui/core/Grow","@material-ui/core/Icon","@material-ui/core/IconButton","@material-ui/core/Input","@material-ui/core/InputBase","@material-ui/core/InputLabel","@material-ui/core/InputAdornment","@material-ui/core/Link","@material-ui/core/LinearProgress","@material-ui/core/List","@material-ui/core/ListItem","@material-ui/core/ListItemAvatar","@material-ui/core/ListItemSecondaryAction","@material-ui/core/ListItemIcon","@material-ui/core/ListSubheader","@material-ui/core/ListItemText","@material-ui/core/Menu","@material-ui/core/MenuItem","@material-ui/core/MenuList","@material-ui/core/Modal","@material-ui/core/NativeSelect","@material-ui/core/OutlinedInput","@material-ui/core/Pagination","@material-ui/core/PaginationItem","@material-ui/core/Paper","@material-ui/core/Popover","@material-ui/core/Popper","@material-ui/core/Portal","@material-ui/core/Radio","@material-ui/core/RadioGroup","@material-ui/core/Rating","@material-ui/core/ScopedCssBaseline","@material-ui/core/Select","@material-ui/core/Skeleton","@material-ui/core/Slider","@material-ui/core/Snackbar","@material-ui/core/SnackbarContent","@material-ui/core/SpeedDial","@material-ui/core/SpeedDialAction","@material-ui/core/SpeedDialIcon","@material-ui/core/Stack","@material-ui/core/Step","@material-ui/core/StepButton","@material-ui/core/StepConnector","@material-ui/core/StepLabel","@material-ui/core/StepIcon","@material-ui/core/Stepper","@material-ui/core/SvgIcon","@material-ui/core/Switch","@material-ui/core/Tab","@material-ui/core/Table","@material-ui/core/TableBody","@material-ui/core/TableCell","@material-ui/core/TableContainer","@material-ui/core/TableFooter","@material-ui/core/TableHead","@material-ui/core/TablePagination","@material-ui/core/TableRow","@material-ui/core/TableSortLabel","@material-ui/core/Tabs","@material-ui/core/TextField","@material-ui/core/TextareaAutosize","@material-ui/core/ToggleButton","@material-ui/core/ToggleButtonGroup","@material-ui/core/Toolbar","@material-ui/core/Tooltip","@material-ui/core/Typography","@mui/material/Accordion","@mui/material/AccordionActions","@mui/material/AccordionDetails","@mui/material/AccordionSummary","@mui/material/Alert","@mui/material/AlertTitle","@mui/material/Autocomplete","@mui/material/Avatar","@mui/material/AvatarGroup","@mui/material/Backdrop","@mui/material/Badge","@mui/material/Box","@mui/material/Breadcrumbs","@mui/material/Button","@mui/material/ButtonGroup","@mui/material/Card","@mui/material/CardActions","@mui/material/CardActionArea","@mui/material/CardContent","@mui/material/CardHeader","@mui/material/CardMedia","@mui/material/CircularProgress","@mui/material/Collapse","@mui/material/ClickAwayListener","@mui/material/Chip","@mui/material/Checkbox","@mui/material/Container","@mui/material/Dialog","@mui/material/DialogActions","@mui/material/DialogTitle","@mui/material/DialogContent","@mui/material/DialogContentText","@mui/material/Divider","@mui/material/Drawer","@mui/material/Fab","@mui/material/Fade","@mui/material/FilledInput","@mui/material/FormLabel","@mui/material/FormControl","@mui/material/FormControlLabel","@mui/material/FormHelperText","@mui/material/FormGroup","@mui/material/Grid","@mui/material/Grid2","@mui/material/Grow","@mui/material/Icon","@mui/material/IconButton","@mui/material/Input","@mui/material/InputBase","@mui/material/InputLabel","@mui/material/InputAdornment","@mui/material/Link","@mui/material/LinearProgress","@mui/material/List","@mui/material/ListItem","@mui/material/ListItemAvatar","@mui/material/ListItemSecondaryAction","@mui/material/ListItemIcon","@mui/material/ListSubheader","@mui/material/ListItemText","@mui/material/Menu","@mui/material/MenuItem","@mui/material/MenuList","@mui/material/Modal","@mui/material/NativeSelect","@mui/material/OutlinedInput","@mui/material/Pagination","@mui/material/PaginationItem","@mui/material/Paper","@mui/material/Popover","@mui/material/Popper","@mui/material/Portal","@mui/material/Radio","@mui/material/RadioGroup","@mui/material/Rating","@mui/material/ScopedCssBaseline","@mui/material/Select","@mui/material/Skeleton","@mui/material/Slider","@mui/material/Snackbar","@mui/material/SnackbarContent","@mui/material/SpeedDial","@mui/material/SpeedDialAction","@mui/material/SpeedDialIcon","@mui/material/Stack","@mui/material/Step","@mui/material/StepButton","@mui/material/StepConnector","@mui/material/StepLabel","@mui/material/StepIcon","@mui/material/Stepper","@mui/material/SvgIcon","@mui/material/Switch","@mui/material/Tab","@mui/material/Table","@mui/material/TableBody","@mui/material/TableCell","@mui/material/TableContainer","@mui/material/TableFooter","@mui/material/TableHead","@mui/material/TablePagination","@mui/material/TableRow","@mui/material/TableSortLabel","@mui/material/Tabs","@mui/material/TextField","@mui/material/TextareaAutosize","@mui/material/ToggleButton","@mui/material/ToggleButtonGroup","@mui/material/Toolbar","@mui/material/Tooltip","@mui/material/Typography","@material-ui/lab/ToggleButton","@material-ui/lab/ToggleButtonGroup","@material-ui/lab/Autocomplete","@material-ui/lab/Alert","@material-ui/lab","@jbrowse/core/Plugin","@jbrowse/core/pluggableElementTypes","@jbrowse/core/pluggableElementTypes/ViewType","@jbrowse/core/pluggableElementTypes/AdapterType","@jbrowse/core/pluggableElementTypes/DisplayType","@jbrowse/core/pluggableElementTypes/TrackType","@jbrowse/core/pluggableElementTypes/WidgetType","@jbrowse/core/pluggableElementTypes/models","@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType","@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType","@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType","@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType","@jbrowse/core/pluggableElementTypes/renderers/RendererType","@jbrowse/core/configuration","@jbrowse/core/util/types/mst","@jbrowse/core/ui","@jbrowse/core/ui/theme","@jbrowse/core/util","@jbrowse/core/util/color","@jbrowse/core/util/layouts","@jbrowse/core/util/tracks","@jbrowse/core/util/Base1DViewModel","@jbrowse/core/util/io","@jbrowse/core/util/mst-reflection","@jbrowse/core/util/rxjs","@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail","@jbrowse/core/data_adapters/BaseAdapter"];var lo=o(47200),so=o(60929),co=o(50736),uo=o(9434),fo=o(14777),po=o(61909),ho=o(39336),mo=o(98537),yo=o(51871),bo=o(35431),vo=o(20702),go=o(45323),wo=o(78412),So=o(68020),Ao=o(20693),Oo=o(35778),xo=o(39421);function ko(e){return ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ko(e)}function Co(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Po(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Po(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Po(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Eo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Eo=function(){return!!e})()}function jo(e){return jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jo(e)}function To(e,t){return To=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},To(e,t)}function _o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Mo(n.key),n)}}function Ro(e,t,r){return t&&_o(e.prototype,t),r&&_o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mo(e){var t=function(e){if("object"!=ko(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ko(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ko(t)?t:t+""}function Io(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var No=Ro(function e(){throw Io(this,e),new Error("invalid layout name")}),Do=function(e){function t(e){var r,n,o,i;Io(this,t),n=this,i=[No],o=jo(o=t),r=function(e,t){if(t&&("object"==ko(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(n,Eo()?Reflect.construct(o,i||[],jo(n).constructor):o.apply(n,i));for(var a=0,l=Object.entries(e);a<l.length;a++){var s=Co(l[a],2),c=s[0],u=s[1];r.subLayouts.set(c,new xo.A(u))}return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&To(e,t)}(t,e),Ro(t)}(Oo.A);function Fo(e){return Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fo(e)}function Lo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function zo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Bo(n.key),n)}}function Bo(e){var t=function(e){if("object"!=Fo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Fo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fo(t)?t:t+""}var $o=function(){function e(t,r,n,o,i,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.left=r,this.top=n,this.width=o,this.height=i,this.data=a,this.children=new Map,this.absoluteCache={dirty:!0}}return t=e,r=[{key:"addChild",value:function(t,r,n,o,i,a){var l=t instanceof e?t:new e(t,r,n,o,i,a);if(!(l instanceof e))throw new TypeError("argument to addChild must be an array or a SceneGraph");if(this.children.has(l.name))throw new Error('child named "'.concat(l.name,'" already exists'));l.parent=this;var s=l.absolute,c=s.left,u=s.right,f=s.top,d=s.bottom;return void 0!==c&&void 0!==u&&void 0!==f&&void 0!==d&&(this.expand(c,u,f,d),this.children.set(l.name,l)),l}},{key:"getSubRecord",value:function(e){return this.children.get(e)}},{key:"expand",value:function(e,t,r,n){var o=this.absolute,i=o.left,a=o.right,l=o.top,s=o.bottom;if(void 0!==i&&e<i){var c=i-e;this.width+=c,this.left-=c}if(void 0!==a&&t>a&&(this.width+=t-a),void 0!==l&&r<l){var u=l-r;this.height+=u,this.top-=u}void 0!==s&&n>s&&(this.height+=n-s),this.parent&&this.parent.expand(e,t,r,n),this.absoluteCache.dirty=!0}},{key:"bottom",get:function(){return this.top+this.height}},{key:"right",get:function(){return this.left+this.width}},{key:"walkParents",value:function(e){this.parent&&(e(this.parent),this.parent.walkParents(e))}},{key:"walkChildren",value:function(e){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Lo(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Lo(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(this.children.values());try{for(r.s();!(t=r.n()).done;){var n=t.value;e(n),n.walkChildren(e)}}catch(e){r.e(e)}finally{r.f()}}},{key:"absolute",get:function(){if(this.absoluteCache.dirty){var e=0,t=0;this.walkParents(function(r){e+=r.left,t+=r.top}),this.absoluteCache={dirty:!1,left:this.left+e,right:this.right+e,top:this.top+t,bottom:this.bottom+t,width:this.width,height:this.height}}return this.absoluteCache}},{key:"move",value:function(e,t){this.left+=e,this.top+=t,this.absoluteCache.dirty=!0,this.walkChildren(function(e){e.absoluteCache.dirty=!0});var r=this.absolute,n=r.left,o=r.right,i=r.top,a=r.bottom;void 0!==n&&void 0!==o&&void 0!==i&&void 0!==a&&this.expand(n,o,i,a)}}],r&&zo(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}(),Go=o(92975),Ho=o(98412),Vo=o(70641);function Wo(e){return Wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wo(e)}function Uo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function qo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Uo(Object(r),!0).forEach(function(t){Xo(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uo(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Xo(e,t,r){return(t=function(e){var t=function(e){if("object"!=Wo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Wo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ko=qo(qo(qo({mobx:le,"mobx-state-tree":_,react:l,"react/jsx-runtime":O,"react-dom":Yn,"react-dom/client":Zn,"mobx-react":T,"@mui/x-data-grid":qo({useGridApiContext:Un.h,useGridApiRef:qn.b,useGridRootProps:Xn.A},ro(oo)),"@mui/material/utils":r,"@material-ui/core/utils":r,"tss-react/mui":{makeStyles:R.n9},"@material-ui/core":qo(qo({},ro(io)),{},{useTheme:F.A,alpha:z.X4,makeStyles:function(e){var t=(0,R.n9)()(e);return function(){return t().classes}}}),"@mui/material":qo(qo({},ro(io)),{},{alpha:z.X4,useTheme:F.A,createTheme:Gr.A})},ro(io,"@mui/material/")),ro(io,"@material-ui/core/")),{},{"@mui/material/styles":qo(qo({},t),{},{makeStyles:function(e){var t=(0,R.n9)()(e);return function(){return t().classes}}}),"@material-ui/core/styles":qo(qo({},t),{},{makeStyles:function(e){var t=(0,R.n9)()(e);return function(){return t().classes}}}),"@material-ui/lab/ToggleButton":io.ToggleButton,"@material-ui/lab/ToggleButtonGroup":io.ToggleButtonGroup,"@material-ui/lab/Autocomplete":io.Autocomplete,"@material-ui/lab/Alert":io.Alert,"@material-ui/lab":{Alert:io.Alert,Autocomplete:io.Autocomplete,ToggleButton:io.ToggleButton,ToggleButtonGroup:io.ToggleButtonGroup},"@jbrowse/core/Plugin":we.A,"@jbrowse/core/pluggableElementTypes/renderers/RendererType":yo,"@jbrowse/core/configuration":s,"@jbrowse/core/util/types/mst":fe,"@jbrowse/core/ui":c,"@jbrowse/core/ui/theme":vo,"@jbrowse/core/util":u,"@jbrowse/core/util/color":wo,"@jbrowse/core/util/layouts":n,"@jbrowse/core/util/tracks":Vo,"@jbrowse/core/util/Base1DViewModel":go.A,"@jbrowse/core/util/io":So,"@jbrowse/core/util/mst-reflection":Go,"@jbrowse/core/util/rxjs":Ho,"@jbrowse/core/pluggableElementTypes":Ce,"@jbrowse/core/pluggableElementTypes/ViewType":uo.A,"@jbrowse/core/pluggableElementTypes/AdapterType":lo.A,"@jbrowse/core/pluggableElementTypes/DisplayType":so.A,"@jbrowse/core/pluggableElementTypes/TrackType":co.A,"@jbrowse/core/pluggableElementTypes/WidgetType":Pe.A,"@jbrowse/core/pluggableElementTypes/models":fo,"@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType":bo,"@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType":ho.A,"@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType":po,"@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType":mo,"@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail":no,"@jbrowse/core/data_adapters/BaseAdapter":Ee}),Yo=Object.keys(Ko),Jo=Yo.filter(function(e){return!ao.includes(e)});if(Jo.length>0)throw new Error("The following modules are in the modules libs, but not the re-exports list: ".concat(Jo.join(", ")));var Zo=ao.filter(function(e){return!Yo.includes(e)});if(Zo.length)throw new Error("The following modules are in the re-exports list, but not the modules libs: ".concat(Zo.join(", ")));const Qo=Ko;var ei=o(33052),ti=o(45999),ri=o(53359),ni=o(80285),oi=o(95944);function ii(e){return ii="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ii(e)}function ai(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return li(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(li(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,li(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,li(f,"constructor",c),li(c,"constructor",s),s.displayName="GeneratorFunction",li(c,o,"GeneratorFunction"),li(f),li(f,o,"Generator"),li(f,n,function(){return this}),li(f,"toString",function(){return"[object Generator]"}),(ai=function(){return{w:i,m:d}})()}function li(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}li=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){li(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},li(e,t,r,n)}function si(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ci(e){return function(e){if(Array.isArray(e))return hi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pi(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ui(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function fi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ui(Object(r),!0).forEach(function(t){vi(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ui(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function di(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=pi(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function pi(e,t){if(e){if("string"==typeof e)return hi(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hi(e,t):void 0}}function hi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function mi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gi(n.key),n)}}function bi(e,t,r){return t&&yi(e.prototype,t),r&&yi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vi(e,t,r){return(t=gi(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gi(e){var t=function(e){if("object"!=ii(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ii(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ii(t)?t:t+""}var wi=function(){return bi(function e(t,r){mi(this,e),vi(this,"registeredTypes",{}),this.typeName=t,this.baseClass=r},[{key:"add",value:function(e,t){this.registeredTypes[e]=t}},{key:"has",value:function(e){return e in this.registeredTypes}},{key:"get",value:function(e){if(!this.has(e))throw new Error("".concat(this.typeName," '").concat(e,"' not found, perhaps its plugin is not loaded or its plugin has not added it."));return this.registeredTypes[e]}},{key:"all",value:function(){return Object.values(this.registeredTypes)}}])}(),Si=function(){return bi(function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];mi(this,e),vi(this,"plugins",[]),vi(this,"jexl",(0,oi.A)()),vi(this,"pluginMetadata",{}),vi(this,"runtimePluginDefinitions",[]),vi(this,"elementCreationSchedule",new $r("renderer","adapter","text search adapter","display","track","connection","view","widget","rpc method","internet account","add track workflow")),vi(this,"rendererTypes",new wi("RendererType",yo.default)),vi(this,"adapterTypes",new wi("AdapterType",lo.A)),vi(this,"textSearchAdapterTypes",new wi("TextSearchAdapterType",ni.A)),vi(this,"trackTypes",new wi("TrackType",co.A)),vi(this,"displayTypes",new wi("DisplayType",so.A)),vi(this,"connectionTypes",new wi("ConnectionType",ti.A)),vi(this,"viewTypes",new wi("ViewType",uo.A)),vi(this,"widgetTypes",new wi("WidgetType",Pe.A)),vi(this,"rpcMethods",new wi("RpcMethodType",Te.A)),vi(this,"addTrackWidgets",new wi("AddTrackWorkflow",ei.A)),vi(this,"internetAccountTypes",new wi("InternetAccountType",ri.A)),vi(this,"configured",!1),vi(this,"extensionPoints",new Map),vi(this,"jbrequireCache",new Map),vi(this,"lib",Qo),vi(this,"load",function(e){return t.jbrequireCache.has(e)||t.jbrequireCache.set(e,e(t)),t.jbrequireCache.get(e)}),vi(this,"jbrequire",function(e){if("string"==typeof e){var r=t.lib[e];if(!r)throw new TypeError("No jbrequire re-export defined for package '".concat(e,"'. If this package must be shared between plugins, add it to ReExports.js. If it does not need to be shared, just import it normally."));return r}if("function"==typeof e)return t.load(e);if(e.default)return console.warn("initiated jbrequire on a {default:Function}"),t.jbrequire(e.default);throw new TypeError("lib passed to jbrequire must be either a string or a function")}),this.addPlugin({plugin:new Ir,metadata:{isCore:!0}});var n,o=di(r);try{for(o.s();!(n=o.n()).done;){var i=n.value;this.addPlugin(i)}}catch(e){o.e(e)}finally{o.f()}},[{key:"pluginConfigurationNamespacedSchemas",value:function(){var e,t={},r=di(this.plugins);try{for(r.s();!(e=r.n()).done;){var n=e.value;n.configurationSchema&&(t[n.name]=n.configurationSchema)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"pluginConfigurationUnnamespacedSchemas",value:function(){var e,t={},r=di(this.plugins);try{for(r.s();!(e=r.n()).done;){var n=e.value;n.configurationSchemaUnnamespaced&&(t=fi(fi({},t),n.configurationSchemaUnnamespaced))}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"pluginConfigurationRootSchemas",value:function(){var e,t={},r=di(this.plugins);try{for(r.s();!(e=r.n()).done;){var n=e.value;n.rootConfigurationSchema&&(t=fi(fi({},t),n.rootConfigurationSchema(this)))}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"addPlugin",value:function(e){if(this.configured)throw new Error("JBrowse already configured, cannot add plugins");var t,r,n=(t="install"in e&&"configure"in e?[e,{}]:[e.plugin,e.metadata],r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||pi(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1],a=void 0===i?{}:i;if(this.plugins.includes(o))throw new Error("plugin already installed");return this.pluginMetadata[o.name]=a,"definition"in e&&this.runtimePluginDefinitions.push(e.definition),o.install(this),this.plugins.push(o),this}},{key:"getPlugin",value:function(e){return this.plugins.find(function(t){return t.name===e})}},{key:"hasPlugin",value:function(e){return void 0!==this.getPlugin(e)}},{key:"createPluggableElements",value:function(){return this.elementCreationSchedule&&(this.elementCreationSchedule.run(),this.elementCreationSchedule=void 0),this}},{key:"setRootModel",value:function(e){return this.rootModel=e,this}},{key:"configure",value:function(){if(this.configured)throw new Error("already configured");var e,t=di(this.plugins);try{for(t.s();!(e=t.n()).done;)e.value.configure(this)}catch(e){t.e(e)}finally{t.f()}return this.configured=!0,this}},{key:"getElementTypeRecord",value:function(e){switch(e){case"adapter":return this.adapterTypes;case"text search adapter":return this.textSearchAdapterTypes;case"connection":return this.connectionTypes;case"widget":return this.widgetTypes;case"renderer":return this.rendererTypes;case"display":return this.displayTypes;case"track":return this.trackTypes;case"view":return this.viewTypes;case"rpc method":return this.rpcMethods;case"internet account":return this.internetAccountTypes;case"add track workflow":return this.addTrackWidgets;default:throw new Error("invalid element type '".concat(e,"'"))}}},{key:"addElementType",value:function(e,t){var r,n=this;if("function"!=typeof t)throw new Error("must provide a callback function that returns the new type object");var o=this.getElementTypeRecord(e);return null===(r=this.elementCreationSchedule)||void 0===r||r.add(e,function(){var r=t(n);if(!r.name)throw new Error("cannot add a ".concat(e," with no name"));o.has(r.name)?console.warn("".concat(e," ").concat(r.name," already registered, cannot register it again")):o.add(r.name,n.evaluateExtensionPoint("Core-extendPluggableElement",r))}),this}},{key:"getElementType",value:function(e,t){return this.getElementTypeRecord(e).get(t)}},{key:"getElementTypesInGroup",value:function(e){return this.getElementTypeRecord(e).all()}},{key:"getViewElements",value:function(){return this.getElementTypesInGroup("view")}},{key:"getTrackElements",value:function(){return this.getElementTypesInGroup("track")}},{key:"getConnectionElements",value:function(){return this.getElementTypesInGroup("connection")}},{key:"getAddTrackWorkflowElements",value:function(){return this.getElementTypesInGroup("add track workflow")}},{key:"getRpcElements",value:function(){return this.getElementTypesInGroup("rpc method")}},{key:"getDisplayElements",value:function(){return this.getElementTypesInGroup("display")}},{key:"getAdapterElements",value:function(){return this.getElementTypesInGroup("adapter")}},{key:"pluggableMstType",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.types.maybe(_.types.null),n=this.getElementTypeRecord(e).all().map(function(e){return e[t]}).filter(function(e){return(0,_.isType)(e)&&(0,_.isModelType)(e)});return 0===n.length&&"undefined"==typeof jest?(console.warn("No pluggable types found matching ('".concat(e,"','").concat(t,"')")),r):_.types.union.apply(_.types,ci(n))}},{key:"pluggableConfigSchemaType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"configSchema",r=this.getElementTypeRecord(e).all().map(function(e){return e[t]}).filter(function(e){return(0,s.isBareConfigurationSchemaType)(e)});return 0===r.length&&r.push((0,s.ConfigurationSchema)("Null",{})),_.types.union.apply(_.types,ci(r))}},{key:"getRendererType",value:function(e){return this.rendererTypes.get(e)}},{key:"getRendererTypes",value:function(){return this.rendererTypes.all()}},{key:"getAdapterType",value:function(e){return this.adapterTypes.get(e)}},{key:"getTextSearchAdapterType",value:function(e){return this.textSearchAdapterTypes.get(e)}},{key:"getTrackType",value:function(e){return this.trackTypes.get(e)}},{key:"getDisplayType",value:function(e){return this.displayTypes.get(e)}},{key:"getViewType",value:function(e){return this.viewTypes.get(e)}},{key:"getAddTrackWorkflow",value:function(e){return this.addTrackWidgets.get(e)}},{key:"getWidgetType",value:function(e){return this.widgetTypes.get(e)}},{key:"getConnectionType",value:function(e){return this.connectionTypes.get(e)}},{key:"getRpcMethodType",value:function(e){return this.rpcMethods.get(e)}},{key:"getInternetAccountType",value:function(e){return this.internetAccountTypes.get(e)}},{key:"addRendererType",value:function(e){return this.addElementType("renderer",e)}},{key:"addAdapterType",value:function(e){return this.addElementType("adapter",e)}},{key:"addTextSearchAdapterType",value:function(e){return this.addElementType("text search adapter",e)}},{key:"addTrackType",value:function(e){var t=this;return this.addElementType("track",function(){var r,n=e(t),o=di(t.getElementTypesInGroup("display"));try{for(o.s();!(r=o.n()).done;){var i=r.value;i.trackType!==n.name||n.displayTypes.includes(i)||n.addDisplayType(i)}}catch(e){o.e(e)}finally{o.f()}return n})}},{key:"addDisplayType",value:function(e){return this.addElementType("display",e)}},{key:"addViewType",value:function(e){var t=this;return this.addElementType("view",function(){var r,n=e(t),o=di(t.getElementTypesInGroup("display"));try{for(o.s();!(r=o.n()).done;){var i=r.value;i.viewType!==n.name&&i.viewType!==n.extendedName||n.displayTypes.includes(i)||n.addDisplayType(i)}}catch(e){o.e(e)}finally{o.f()}return n})}},{key:"addWidgetType",value:function(e){return this.addElementType("widget",e)}},{key:"addConnectionType",value:function(e){return this.addElementType("connection",e)}},{key:"addRpcMethod",value:function(e){return this.addElementType("rpc method",e)}},{key:"addInternetAccountType",value:function(e){return this.addElementType("internet account",e)}},{key:"addAddTrackWorkflowType",value:function(e){return this.addElementType("add track workflow",e)}},{key:"addToExtensionPoint",value:function(e,t){var r=this.extensionPoints.get(e);r||(r=[],this.extensionPoints.set(e,r)),r.push(t)}},{key:"evaluateExtensionPoint",value:function(e,t,r){var n=this.extensionPoints.get(e),o=t;if(n){var i,a=di(n);try{for(a.s();!(i=a.n()).done;){var l=i.value;try{o=l(o,r)}catch(e){console.error(e)}}}catch(e){a.e(e)}finally{a.f()}}return o}},{key:"evaluateAsyncExtensionPoint",value:(e=ai().m(function e(t,r,n){var o,i,a,l,s,c,u;return ai().w(function(e){for(;;)switch(e.n){case 0:if(o=this.extensionPoints.get(t),i=r,!o){e.n=10;break}a=di(o),e.p=1,a.s();case 2:if((l=a.n()).done){e.n=7;break}return s=l.value,e.p=3,e.n=4,s(i,n);case 4:i=e.v,e.n=6;break;case 5:e.p=5,c=e.v,console.error(c);case 6:e.n=2;break;case 7:e.n=9;break;case 8:e.p=8,u=e.v,a.e(u);case 9:return e.p=9,a.f(),e.f(9);case 10:return e.a(2,i)}},e,this,[[3,5],[1,8,9,10]])}),t=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){si(i,n,o,a,l,"next",e)}function l(e){si(i,n,o,a,l,"throw",e)}a(void 0)})},function(e,r,n){return t.apply(this,arguments)})}]);var e,t}(),Ai=o(47149),Oi=o(35806),xi=o(25348),ki=o(78755);function Ci(e){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ci(e)}var Pi=["stopToken","statusCallback"];function Ei(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function ji(e){return function(e){if(Array.isArray(e))return Ri(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ti(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||_i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _i(e,t){if(e){if("string"==typeof e)return Ri(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ri(e,t):void 0}}function Ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Mi(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Ii(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ii(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ii(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Ii(f,"constructor",c),Ii(c,"constructor",s),s.displayName="GeneratorFunction",Ii(c,o,"GeneratorFunction"),Ii(f),Ii(f,o,"Generator"),Ii(f,n,function(){return this}),Ii(f,"toString",function(){return"[object Generator]"}),(Mi=function(){return{w:i,m:d}})()}function Ii(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ii=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ii(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ii(e,t,r,n)}function Ni(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Di(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ni(Object(r),!0).forEach(function(t){Fi(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ni(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Fi(e,t,r){return(t=function(e){var t=function(e){if("object"!=Ci(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ci(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ci(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Li(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function zi(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Li(i,n,o,a,l,"next",e)}function l(e){Li(i,n,o,a,l,"throw",e)}a(void 0)})}}var Bi=new RegExp("[0-9A-Za-z!#$%&+./:;?@^_|~-][0-9A-Za-z!#$%&*+./:;=?@^_|~-]*"),$i=["rgb(153, 102, 0)","rgb(102, 102, 0)","rgb(153, 153, 30)","rgb(204, 0, 0)","rgb(255, 0, 0)","rgb(255, 0, 204)","rgb(165, 132, 132)","rgb(204, 122, 0)","rgb(178, 142, 0)","rgb(153, 153, 0)","rgb(122, 153, 0)","rgb(0, 165, 0)","rgb(53, 128, 0)","rgb(0, 0, 204)","rgb(96, 145, 242)","rgb(107, 142, 178)","rgb(0, 165, 165)","rgb(122, 153, 153)","rgb(153, 0, 204)","rgb(204, 51, 255)","rgb(173, 130, 216)","rgb(102, 102, 102)","rgb(145, 145, 145)","rgb(142, 142, 142)","rgb(142, 142, 107)","rgb(96, 163, 48)"];function Gi(e,t,r,n){return Hi.apply(this,arguments)}function Hi(){return(Hi=zi(Mi().m(function e(t,r,n,o){var i,a,l;return Mi().w(function(e){for(;;)switch(e.n){case 0:return i=n.sessionId,e.n=1,(0,u.when)(function(){return!(!t.regions||!t.refNameAliases)},{name:"when assembly ready"});case 1:return e.n=2,t.rpcManager.call(i||"assemblyRpc","CoreGetRefNames",Di({adapterConfig:r,stopToken:o},n),{timeout:1e6});case 2:if(a=e.v,t.refNameAliases){e.n=3;break}throw new Error("error loading assembly ".concat(t.name,"'s refNameAliases"));case 3:return l=Object.fromEntries(a.map(function(e){return Vi(e),[t.getCanonicalRefName(e),e]})),e.a(2,{forwardMap:l,reverseMap:Object.fromEntries(Object.entries(l).map(function(e){var t=Ti(e,2),r=t[0];return[t[1],r]}))})}},e)}))).apply(this,arguments)}function Vi(e){if(!Bi.test(e))throw new Error('Encountered invalid refName: "'.concat(e,'"'))}function Wi(e){return Ui.apply(this,arguments)}function Ui(){return(Ui=zi(Mi().m(function e(t){var r,n,o,i,a,l;return Mi().w(function(e){for(;;)switch(e.n){case 0:return r=t.config,n=t.pluginManager,o=t.stopToken,i=n.getAdapterType(r.type),e.n=1,i.getAdapterClass();case 1:return a=e.v,l=new a(r,void 0,n),e.a(2,l.getRefNameAliases({stopToken:o}))}},e)}))).apply(this,arguments)}function qi(e){return Xi.apply(this,arguments)}function Xi(){return(Xi=zi(Mi().m(function e(t){var r,n,o,i,a;return Mi().w(function(e){for(;;)switch(e.n){case 0:return r=t.config,n=t.pluginManager,o=n.getAdapterType(r.type),e.n=1,o.getAdapterClass();case 1:return i=e.v,a=new i(r,void 0,n),e.a(2,a.getData())}},e)}))).apply(this,arguments)}function Ki(e){return Yi.apply(this,arguments)}function Yi(){return(Yi=zi(Mi().m(function e(t){var r,n,o,i,a,l;return Mi().w(function(e){for(;;)switch(e.n){case 0:return r=t.config,n=t.pluginManager,o=t.stopToken,i=n.getAdapterType(r.type),e.n=1,i.getAdapterClass();case 1:return a=e.v,l=new a(r,void 0,n),e.a(2,l.getRegions({stopToken:o}))}},e)}))).apply(this,arguments)}function Ji(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Zi(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Zi(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Zi(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Zi(f,"constructor",c),Zi(c,"constructor",s),s.displayName="GeneratorFunction",Zi(c,o,"GeneratorFunction"),Zi(f),Zi(f,o,"Generator"),Zi(f,n,function(){return this}),Zi(f,"toString",function(){return"[object Generator]"}),(Ji=function(){return{w:i,m:d}})()}function Zi(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Zi=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Zi(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Zi(e,t,r,n)}function Qi(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ea(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Qi(i,n,o,a,l,"next",e)}function l(e){Qi(i,n,o,a,l,"throw",e)}a(void 0)})}}function ta(e){return function(e){if(Array.isArray(e))return oa(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||na(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ra(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=na(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function na(e,t){if(e){if("string"==typeof e)return oa(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oa(e,t):void 0}}function oa(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const ia=function(e,t){return _.types.model({assemblies:_.types.array((r=e,n=t,o=new Oi.A({cache:new ki.A({maxSize:1e3}),fill:function(e,t,r){return zi(Mi().m(function t(){var n,o,i;return Mi().w(function(t){for(;;)if(0===t.n)return n=e.adapterConf,o=e.self,i=e.options,t.a(2,Gi(o,n,Di(Di({},i),{},{statusCallback:r})))},t)}))()}}),_.types.model({configuration:_.types.safeReference(r)}).volatile(function(){return{error:void 0,loadingP:void 0,volatileRegions:void 0,refNameAliases:void 0,cytobands:void 0}}).views(function(e){return{getConf:function(t){return e.configuration?(0,s.getConf)(e,t):void 0},get lowerCaseRefNameAliases(){return e.refNameAliases?Object.fromEntries(Object.entries(e.refNameAliases).map(function(e){var t=Ti(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]})):void 0}}}).views(function(e){return{get initialized(){return e.load(),!!e.refNameAliases},get name(){return e.getConf("name")||""},get regions(){return e.load(),e.volatileRegions},get aliases(){return e.getConf("aliases")||[]},get displayName(){return e.getConf("displayName")||e.getConf("name")||""},hasName:function(e){return this.allAliases.includes(e)},get allAliases(){return[this.name].concat(ji(this.aliases))},get allRefNames(){return e.refNameAliases?Object.keys(e.refNameAliases):void 0},get lowerCaseRefNames(){return e.lowerCaseRefNameAliases?Object.keys(e.lowerCaseRefNameAliases):void 0},get allRefNamesWithLowerCase(){return this.allRefNames&&this.lowerCaseRefNames?ji(new Set([].concat(ji(this.allRefNames),ji(this.lowerCaseRefNames)))):void 0},get rpcManager(){return(0,_.getParent)(e,2).rpcManager},get refNameColors(){var t=e.getConf("refNameColors")||[];return 0===t.length?$i:t}}}).views(function(e){return{get refNames(){var t;return null===(t=e.regions)||void 0===t?void 0:t.map(function(e){return e.refName})}}}).views(function(e){return{getCanonicalRefName:function(t){if(!e.refNameAliases||!e.lowerCaseRefNameAliases)throw new Error("aliases not loaded, we expect them to be loaded before getCanonicalRefName can be called");return e.refNameAliases[t]||e.lowerCaseRefNameAliases[t]},getRefNameColor:function(t){if(e.refNames){var r=e.refNames.indexOf(t);return-1===r?void 0:e.refNameColors[r%e.refNameColors.length]}},isValidRefName:function(t){if(!e.refNameAliases)throw new Error("isValidRefName cannot be called yet, the assembly has not finished loading");return!!this.getCanonicalRefName(t)}}}).actions(function(e){return{setLoaded:function(e){var t=e.regions,r=e.refNameAliases,n=e.cytobands;this.setRegions(t),this.setRefNameAliases(r),this.setCytobands(n)},setError:function(t){e.error=t},setRegions:function(t){e.volatileRegions=t},setRefNameAliases:function(t){e.refNameAliases=t},setCytobands:function(t){e.cytobands=t},setLoadingP:function(t){e.loadingP=t},load:function(){var t=this;return e.loadingP||(e.loadingP=this.loadPre().catch(function(e){t.setLoadingP(void 0),t.setError(e)})),e.loadingP},loadPre:function(){var t=this;return zi(Mi().m(function r(){var o,i,a,l,s,c,u,f,d,p,h,m,y,b,v,g,w,S,A,O,x,k,C,P,E,j,T,_,R,M;return Mi().w(function(r){for(;;)switch(r.n){case 0:return a=e.configuration,l=null==a||null===(o=a.refNameAliases)||void 0===o?void 0:o.adapter,s=null==a||null===(i=a.cytobands)||void 0===i?void 0:i.adapter,c=null==a?void 0:a.sequence.adapter,u=e.name,r.n=1,Ki({config:c,pluginManager:n});case 1:f=r.v,d=Ei(f);try{for(d.s();!(p=d.n()).done;)Vi(p.value.refName)}catch(e){d.e(e)}finally{d.f()}return h={},r.n=2,Wi({config:l,pluginManager:n});case 2:m=r.v,y=Ei(m);try{for(y.s();!(b=y.n()).done;){v=b.value,g=v.refName,w=v.aliases,S=v.override,A=Ei(w);try{for(A.s();!(O=A.n()).done;)Vi(x=O.value),h[x]=g}catch(e){A.e(e)}finally{A.f()}S&&(h[g]=g)}}catch(e){y.e(e)}finally{y.f()}k=Ei(f);try{for(k.s();!(C=k.n()).done;)E=C.value,h[P=E.refName]||(h[P]=E.refName)}catch(e){k.e(e)}finally{k.f()}return j=t,T=h,_=f.map(function(e){return Di(Di({},e),{},{refName:h[e.refName]||e.refName,assemblyName:u})}),r.n=3,qi({config:s,pluginManager:n});case 3:R=r.v,M={refNameAliases:T,regions:_,cytobands:R},j.setLoaded.call(j,M);case 4:return r.a(2)}},r)}))()}}}).views(function(e){return{getAdapterMapEntry:function(t,r){r.stopToken;var n=r.statusCallback,i=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(r,Pi);if(!r.sessionId)throw new Error("sessionId is required");return o.get((0,xi.L)(t),{adapterConf:t,self:e,options:i},void 0,n)},getRefNameMapForAdapter:function(e,t){var r=this;return zi(Mi().m(function n(){var o;return Mi().w(function(n){for(;;)switch(n.n){case 0:if(t.sessionId){n.n=1;break}throw new Error("sessionId is required");case 1:return n.n=2,r.getAdapterMapEntry(e,t);case 2:return o=n.v,n.a(2,o.forwardMap)}},n)}))()},getReverseRefNameMapForAdapter:function(e,t){var r=this;return zi(Mi().m(function n(){var o;return Mi().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,r.getAdapterMapEntry(e,t);case 1:return o=n.v,n.a(2,o.reverseMap)}},n)}))()},afterCreate:function(){(0,_.addDisposer)(e,(0,le.autorun)(function(){e.allRefNamesWithLowerCase}))}}})))}).views(function(e){return{get assemblyNameMap(){var t,r={},n=ra(e.assemblies);try{for(n.s();!(t=n.n()).done;){var o,i=t.value,a=ra(i.allAliases);try{for(a.s();!(o=a.n()).done;)r[o.value]=i}catch(e){a.e(e)}finally{a.f()}}}catch(e){n.e(e)}finally{n.f()}return r}}}).views(function(e){return{get:function(t){return e.assemblyNameMap[t]},get assemblyNamesList(){return this.assemblyList.map(function(e){return e.name})},get assemblyList(){var t=(0,_.getParent)(e),r=t.jbrowse.assemblies,n=t.session,o=void 0===n?{}:n,i=o.sessionAssemblies,a=void 0===i?[]:i,l=o.temporaryAssemblies,s=void 0===l?[]:l;return[].concat(ta(r),ta(a),ta(s))},get rpcManager(){return(0,_.getParent)(e).rpcManager}}}).views(function(e){return{waitForAssembly:function(t){return ea(Ji().m(function r(){var n;return Ji().w(function(r){for(;;)switch(r.n){case 0:if(t){r.n=1;break}throw new Error("no assembly name supplied to waitForAssembly");case 1:if(n=e.get(t)){r.n=5;break}return r.p=2,r.n=3,(0,u.when)(function(){return Boolean(e.get(t))},{timeout:1e3});case 3:n=e.get(t),r.n=5;break;case 4:r.p=4,r.v;case 5:if(n){r.n=6;break}return r.a(2,void 0);case 6:return r.n=7,n.load();case 7:return r.n=8,(0,u.when)(function(){return!(!n.regions||!n.refNameAliases)||!!n.error});case 8:if(!n.error){r.n=9;break}throw n.error;case 9:return r.a(2,n)}},r,null,[[2,4]])}))()},getRefNameMapForAdapter:function(e,t,r){var n=this;return ea(Ji().m(function o(){var i;return Ji().w(function(o){for(;;)switch(o.n){case 0:if(!t){o.n=2;break}return o.n=1,n.waitForAssembly(t);case 1:return i=o.v,o.a(2,null==i?void 0:i.getRefNameMapForAdapter(e,r));case 2:return o.a(2,{})}},o)}))()},getReverseRefNameMapForAdapter:function(e,t,r){var n=this;return ea(Ji().m(function o(){var i;return Ji().w(function(o){for(;;)switch(o.n){case 0:if(!t){o.n=2;break}return o.n=1,n.waitForAssembly(t);case 1:return i=o.v,o.a(2,null==i?void 0:i.getReverseRefNameMapForAdapter(e,r));case 2:return o.a(2,{})}},o)}))()},isValidRefName:function(t,r){var n=e.get(r);if(n)return n.isValidRefName(t);throw new Error("Failed to look up refName:".concat(t," on assemblyName:").concat(r," (assembly does not exist)"))}}}).actions(function(e){return{afterAttach:function(){var t=this;(0,_.addDisposer)(e,(0,le.reaction)(function(){return e.assemblyList},function(r){var n,o=ra(e.assemblies);try{for(o.s();!(n=o.n()).done;){var i=n.value;i.configuration||t.removeAssembly(i)}}catch(e){o.e(e)}finally{o.f()}var a,l=ra(r);try{var c=function(){var r=a.value,n=(0,s.readConfObject)(r,"name");e.assemblies.some(function(e){return e.name===n})||t.addAssembly(r)};for(l.s();!(a=l.n()).done;)c()}catch(e){l.e(e)}finally{l.f()}},{fireImmediately:!0,name:"assemblyManagerAfterAttach"}))},removeAssembly:function(t){e.assemblies.remove(t)},addAssembly:function(t){e.assemblies.push({configuration:t})}}});var r,n,o},aa=function(e){return(0,s.ConfigurationSchema)("BaseAssembly",{aliases:{type:"stringArray",defaultValue:[],description:"Other possible names for the assembly"},sequence:e.getTrackType("ReferenceSequenceTrack").configSchema,refNameColors:{type:"stringArray",defaultValue:[],description:"Define custom colors for each reference sequence. Will cycle through this list if there are not enough colors for every sequence."},refNameAliases:(0,s.ConfigurationSchema)("RefNameAliases",{adapter:e.pluggableConfigSchemaType("adapter")},{preProcessSnapshot:function(e){return e.adapter?e:{adapter:{type:"RefNameAliasAdapter"}}}}),cytobands:(0,s.ConfigurationSchema)("Cytoband",{adapter:e.pluggableConfigSchemaType("adapter")},{preProcessSnapshot:function(e){return e.adapter?e:{adapter:{type:"CytobandAdapter"}}}}),displayName:{type:"string",defaultValue:"",description:'A human readable display name for the assembly e.g. "Homo sapiens (hg38)" while the assembly name may just be "hg38"'}},{explicitIdentifier:"name"})};function la(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function sa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?la(Object(r),!0).forEach(function(t){ua(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):la(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ca(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ua(e,t,r){return(t=ga(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fa(e){return fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fa(e)}function da(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return pa(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(pa(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,pa(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,pa(f,"constructor",c),pa(c,"constructor",s),s.displayName="GeneratorFunction",pa(c,o,"GeneratorFunction"),pa(f),pa(f,o,"Generator"),pa(f,n,function(){return this}),pa(f,"toString",function(){return"[object Generator]"}),(da=function(){return{w:i,m:d}})()}function pa(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}pa=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){pa(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},pa(e,t,r,n)}function ha(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ma(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ha(i,n,o,a,l,"next",e)}function l(e){ha(i,n,o,a,l,"throw",e)}a(void 0)})}}function ya(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ba(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ga(n.key),n)}}function va(e,t,r){return t&&ba(e.prototype,t),r&&ba(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ga(e){var t=function(e){if("object"!=fa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=fa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fa(t)?t:t+""}function wa(e){return!("function"==typeof e||e instanceof Error)}var Sa=function(){return va(function e(t){ya(this,e),this.driver=t},[{key:"getWorker",value:(e=ma(da().m(function e(){var t=this;return da().w(function(e){for(;;)if(0===e.n)return this.workerP||(this.workerP=this.driver.makeWorker().catch(function(e){throw t.workerP=void 0,e})),e.a(2,this.workerP)},e,this)})),function(){return e.apply(this,arguments)})}]);var e}(),Aa=function(){return va(function e(t){ya(this,e),ua(this,"lastWorkerAssignment",-1),ua(this,"workerAssignments",new Map),ua(this,"maxPingTime",3e4),ua(this,"workerCheckFrequency",5e3),this.config=t.config},[{key:"filterArgs",value:function(e,t){var r=this;if(Array.isArray(e))return e.filter(function(e){return wa(e)}).map(function(e){return r.filterArgs(e,t)});if("object"===fa(e)&&null!==e){if((0,_.isStateTreeNode)(e)&&!(0,_.isAlive)(e))throw new Error("dead state tree node passed to RPC call");return e instanceof File?e:Object.fromEntries(Object.entries(e).filter(function(e){return wa(e[1])}).map(function(e){var n,o,i=(o=2,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,o)||function(e,t){if(e){if("string"==typeof e)return ca(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ca(e,t):void 0}}(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],l=i[1];return[a,r.filterArgs(l,t)]}))}return e}},{key:"remoteAbort",value:(r=ma(da().m(function e(t,r,n){var o;return da().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getWorker(t);case 1:return o=e.v,e.n=2,o.call(r,{stopTokenId:n},{timeout:1e6,rpcDriverClassName:this.name});case 2:return e.a(2)}},e,this)})),function(e,t,n){return r.apply(this,arguments)})},{key:"createWorkerPool",value:function(){for(var e,t,r=(t=(e="undefined"!=typeof window)&&"hardwareConcurrency"in window.navigator,e&&t?window.navigator.hardwareConcurrency:1),n=(0,s.readConfObject)(this.config,"workerCount")||(0,u.clamp)(1,Math.max(1,r-1),5),o=[],i=0;i<n;i++)o.push(new Sa(this));return o}},{key:"getWorkerPool",value:function(){if(!this.workerPool){var e=this.createWorkerPool();return this.workerPool=e,e}return this.workerPool}},{key:"getWorker",value:(t=ma(da().m(function e(t){var r,n,o;return da().w(function(e){for(;;)if(0===e.n)return r=this.getWorkerPool(),void 0===(n=this.workerAssignments.get(t))&&(o=(this.lastWorkerAssignment+1)%r.length,this.workerAssignments.set(t,o),this.lastWorkerAssignment=o,n=o),e.a(2,r[n].getWorker())},e,this)})),function(e){return t.apply(this,arguments)})},{key:"call",value:(e=ma(da().m(function e(t,r,n,o){var i,a,l,s,c,u,f,d=arguments;return da().w(function(e){for(;;)switch(e.n){case 0:if(i=d.length>4&&void 0!==d[4]?d[4]:{},r){e.n=1;break}throw new TypeError("sessionId is required");case 1:return e.n=2,this.getWorker(r);case 2:if(a=e.v,l=t.evaluateExtensionPoint("Core-extendWorker",a),s=t.getRpcMethodType(n)){e.n=3;break}throw new Error("unknown RPC method ".concat(n));case 3:return e.n=4,s.serializeArguments(o,this.name);case 4:return c=e.v,u=this.filterArgs(c,r),e.n=5,l.call(n,u,sa({timeout:3e5,statusCallback:o.statusCallback,rpcDriverClassName:this.name},i));case 5:return f=e.v,e.a(2,s.deserializeReturn(f,o,this.name))}},e,this)})),function(t,r,n,o){return e.apply(this,arguments)})}]);var e,t,r}();function Oa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oa=function(){return!!e})()}function xa(e){return xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xa(e)}function ka(e,t){return ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ka(e,t)}function Ca(e){return Ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ca(e)}function Pa(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Ea(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ea(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ea(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Ea(f,"constructor",c),Ea(c,"constructor",s),s.displayName="GeneratorFunction",Ea(c,o,"GeneratorFunction"),Ea(f),Ea(f,o,"Generator"),Ea(f,n,function(){return this}),Ea(f,"toString",function(){return"[object Generator]"}),(Pa=function(){return{w:i,m:d}})()}function Ea(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ea=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ea(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ea(e,t,r,n)}function ja(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ta(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ja(i,n,o,a,l,"next",e)}function l(e){ja(i,n,o,a,l,"throw",e)}a(void 0)})}}function _a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ra(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ia(n.key),n)}}function Ma(e,t,r){return t&&Ra(e.prototype,t),r&&Ra(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ia(e){var t=function(e){if("object"!=Ca(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ca(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ca(t)?t:t+""}var Na=function(){return Ma(function e(){_a(this,e)},[{key:"destroy",value:function(){}},{key:"call",value:(e=Ta(Pa().m(function e(t,r){return Pa().w(function(e){for(;;)if(0===e.n)return e.a(2,void 0)},e)})),function(t,r){return e.apply(this,arguments)})}]);var e}(),Da=function(e){function t(e){var r,n,o,i;return _a(this,t),function(e,t,r){(t=Ia(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((n=this,i=[e],o=xa(o=t),r=function(e,t){if(t&&("object"==Ca(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(n,Oa()?Reflect.construct(o,i||[],xa(n).constructor):o.apply(n,i))),"name","MainThreadRpcDriver"),r.makeWorker=Ta(Pa().m(function e(){return Pa().w(function(e){for(;;)if(0===e.n)return e.a(2,new Na)},e)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ka(e,t)}(t,e),Ma(t,[{key:"call",value:(r=Ta(Pa().m(function e(t,r,n,o){var i,a,l;return Pa().w(function(e){for(;;)switch(e.n){case 0:if(r){e.n=1;break}throw new TypeError("sessionId is required");case 1:if(i=t.getRpcMethodType(n)){e.n=2;break}throw new Error("unknown RPC method ".concat(n));case 2:return e.n=3,i.serializeArguments(o,this.name);case 3:return a=e.v,e.n=4,i.execute(a,this.name);case 4:return l=e.v,e.a(2,i.deserializeReturn(l,o,this.name))}},e,this)})),function(e,t,n,o){return r.apply(this,arguments)})}]);var r}(Aa);class Fa{constructor(){this.events=Object.create(null)}on(e,t){var r=this.events[e];return r||(r=[],this.events[e]=r),r.push(t),this}off(e,t){var r=this.events[e];if(r){var n=r.indexOf(t);-1!==n&&r.splice(n,1)}return this}emit(e,t){var r=this.events[e];if(r)for(var n=0;n<r.length;n++)r[n](t);return this}}function La(e,t=[]){if(function(e){try{return e instanceof ArrayBuffer||e instanceof ImageBitmap||e instanceof OffscreenCanvas||e instanceof MessagePort}catch(e){return!1}}(e))t.push(e);else if(n=e,Object(n)===n&&!("containsNoTransferables"in e))for(var r in e)La(e[r],t);var n;return t}var za=o(69655);const Ba=class extends Fa{constructor({workers:e}){super(),this.idx=0,this.calls={},this.timeouts={},this.errors={},this.workers=[...e],this.handler=this.handler.bind(this),this.catch=this.catch.bind(this),this.init()}init(){this.workers.forEach(this.listen,this)}listen(e){e.addEventListener("message",this.handler),e.addEventListener("error",this.catch)}handler(e){var{uid:t,error:r,method:n,eventName:o,data:i,libRpc:a}=e.data;a&&(r?this.reject(t,r):n?this.resolve(t,i):o&&this.emit(o,i))}catch({message:e,lineno:t,filename:r,libRpc:n}){n&&this.emit("error",{message:e,lineno:t,filename:r})}reject(e,t){this.errors[e]&&(this.errors[e]((0,za.deserializeError)(t)),this.clear(e))}resolve(e,t){this.calls[e]&&(this.calls[e](t),this.clear(e))}clear(e){clearTimeout(this.timeouts[e]),delete this.timeouts[e],delete this.calls[e],delete this.errors[e]}call(e,t,{timeout:r=2e3}={}){var n=Math.floor(1e10*(1+Math.random())).toString(16),o=La(t);return new Promise((i,a)=>{this.timeouts[n]=setTimeout(()=>this.reject(n,new Error(`Timeout exceeded for RPC method "${e}"`)),r),this.calls[n]=i,this.errors[n]=a,this.workers[this.idx].postMessage({method:e,uid:n,data:t,libRpc:!0},o),this.idx=++this.idx%this.workers.length})}};var $a=o(22144);function Ga(e){return Ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ga(e)}function Ha(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Va(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Va(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Va(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Va(f,"constructor",c),Va(c,"constructor",s),s.displayName="GeneratorFunction",Va(c,o,"GeneratorFunction"),Va(f),Va(f,o,"Generator"),Va(f,n,function(){return this}),Va(f,"toString",function(){return"[object Generator]"}),(Ha=function(){return{w:i,m:d}})()}function Va(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Va=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Va(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Va(e,t,r,n)}function Wa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ua(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wa(Object(r),!0).forEach(function(t){qa(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wa(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function qa(e,t,r){return(t=Qa(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xa(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ka(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Xa(i,n,o,a,l,"next",e)}function l(e){Xa(i,n,o,a,l,"throw",e)}a(void 0)})}}function Ya(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ja(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qa(n.key),n)}}function Za(e,t,r){return t&&Ja(e.prototype,t),r&&Ja(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qa(e){var t=function(e){if("object"!=Ga(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ga(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ga(t)?t:t+""}function el(e,t,r){return t=ol(t),function(e,t){if(t&&("object"==Ga(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tl()?Reflect.construct(t,r||[],ol(e).constructor):t.apply(e,r))}function tl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tl=function(){return!!e})()}function rl(e,t,r,n){var o=nl(ol(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function nl(){return nl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ol(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},nl.apply(null,arguments)}function ol(e){return ol=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ol(e)}function il(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&al(e,t)}function al(e,t){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},al(e,t)}var ll=function(e){function t(){return Ya(this,t),el(this,t,arguments)}return il(t,e),Za(t,[{key:"destroy",value:function(){this.workers[0].terminate()}},{key:"call",value:(r=Ka(Ha().m(function e(r,n,o){var i,a,l,s,c;return Ha().w(function(e){for(;;)switch(e.n){case 0:return i=o.statusCallback,a=o.rpcDriverClassName,l="message-".concat((0,$a.Ak)()),s=function(e){null==i||i(e)},this.on(l,s),e.n=1,rl(t,"call",this,3)([r,Ua(Ua({},n),{},{channel:l,rpcDriverClassName:a}),o]);case 1:return c=e.v,this.off(l,s),e.a(2,c)}},e,this)})),function(e,t,n){return r.apply(this,arguments)})}]);var r}(Ba),sl=function(e){function t(e,r){var n;return Ya(this,t),qa(n=el(this,t,[e]),"name","WebWorkerRpcDriver"),n.workerBootConfiguration=r,n.makeWorkerInstance=e.makeWorkerInstance,n}return il(t,e),Za(t,[{key:"makeWorker",value:(r=Ka(Ha().m(function e(){var t,r,n=this;return Ha().w(function(e){for(;;)if(0===e.n)return t=this.makeWorkerInstance(),r=new ll({workers:[t]}),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&console.log("console logging the webworker handle avoids the track going into an infinite loading state, this is a hacky workaround for safari",t),e.a(2,new Promise(function(e,t){var o=function(i){switch(i.data.message){case"ready":e(r),r.workers[0].removeEventListener("message",o);break;case"readyForConfig":r.workers[0].postMessage({message:"config",config:n.workerBootConfiguration});break;case"error":t((0,za.deserializeError)(i.data.error))}};r.workers[0].addEventListener("message",o)}))},e,this)})),function(){return r.apply(this,arguments)})}]);var r}(Aa);const cl=(0,s.ConfigurationSchema)("BaseRpcDriver",{workerCount:{type:"number",description:"The number of workers to use. If 0 (the default) JBrowse will decide how many workers to use.",defaultValue:0}},{explicitlyTyped:!0}),ul=(0,s.ConfigurationSchema)("MainThreadRpcDriver",{},{baseConfiguration:cl,explicitlyTyped:!0}),fl=(0,s.ConfigurationSchema)("WebWorkerRpcDriver",{},{baseConfiguration:cl,explicitlyTyped:!0}),dl=(0,s.ConfigurationSchema)("RpcOptions",{defaultDriver:{type:"string",description:"the RPC driver to use for tracks and tasks that are not configured to use a specific RPC backend",defaultValue:"MainThreadRpcDriver"},drivers:_.types.optional(_.types.map(_.types.union(ul,fl)),{MainThreadRpcDriver:{type:"MainThreadRpcDriver"},WebWorkerRpcDriver:{type:"WebWorkerRpcDriver"}})},{actions:function(e){return{addDriverConfig:function(t,r){e.drivers.set(t,r)}}}});function pl(e){return pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pl(e)}function hl(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return ml(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(ml(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ml(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,ml(f,"constructor",c),ml(c,"constructor",s),s.displayName="GeneratorFunction",ml(c,o,"GeneratorFunction"),ml(f),ml(f,o,"Generator"),ml(f,n,function(){return this}),ml(f,"toString",function(){return"[object Generator]"}),(hl=function(){return{w:i,m:d}})()}function ml(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ml=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){ml(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},ml(e,t,r,n)}function yl(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function bl(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){yl(i,n,o,a,l,"next",e)}function l(e){yl(i,n,o,a,l,"throw",e)}a(void 0)})}}function vl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function gl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vl(Object(r),!0).forEach(function(t){Sl(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vl(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function wl(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Al(n.key),n)}}function Sl(e,t,r){return(t=Al(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Al(e){var t=function(e){if("object"!=pl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=pl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pl(t)?t:t+""}var Ol=function(){return e=function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pluginManager=t,this.mainConfiguration=r,this.backendConfigurations=n,this.driverObjects=new Map},t=[{key:"getDriver",value:function(e){var t=this.driverObjects.get(e);if(t)return t;var r=this.mainConfiguration.drivers.get("WebWorkerRpcDriver");if("MainThreadRpcDriver"===e){var n=this.backendConfigurations.MainThreadRpcDriver;if(!n)throw new Error('requested RPC driver "'.concat(e,'" is missing config'));var o=new Da(gl(gl({},n),{},{config:r}));return this.driverObjects.set(e,o),o}if("WebWorkerRpcDriver"===e){var i=this.backendConfigurations.WebWorkerRpcDriver;if(!i)throw new Error('requested RPC driver "'.concat(e,'" is missing config'));var a=new sl(gl(gl({},i),{},{config:r}),{plugins:this.pluginManager.runtimePluginDefinitions,windowHref:window.location.href});return this.driverObjects.set(e,a),a}throw new Error('requested RPC driver "'.concat(e,'" is not installed'))}},{key:"getDriverForCall",value:(n=bl(hl().m(function e(t,r,n){var o;return hl().w(function(e){for(;;)if(0===e.n)return o=n.rpcDriverName||(0,s.readConfObject)(this.mainConfiguration,"defaultDriver"),e.a(2,this.getDriver(o))},e,this)})),function(e,t,r){return n.apply(this,arguments)})},{key:"call",value:(r=bl(hl().m(function e(t,r,n){var o,i,a=arguments;return hl().w(function(e){for(;;)switch(e.n){case 0:if(o=a.length>3&&void 0!==a[3]?a[3]:{},t){e.n=1;break}throw new Error("sessionId is required");case 1:return e.n=2,this.getDriverForCall(t,r,n);case 2:return i=e.v,e.a(2,i.call(this.pluginManager,t,r,n,o))}},e,this)})),function(e,t,n){return r.apply(this,arguments)})}],t&&wl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,n}();Sl(Ol,"configSchema",dl);const xl=(0,s.ConfigurationSchema)("OAuthInternetAccount",{tokenType:{description:"a custom name for a token to include in the header",type:"string",defaultValue:"Bearer"},authEndpoint:{description:"the authorization code endpoint of the internet account",type:"string",defaultValue:""},tokenEndpoint:{description:"the token endpoint of the internet account",type:"string",defaultValue:""},needsPKCE:{description:"boolean to indicate if the endpoint needs a PKCE code",type:"boolean",defaultValue:!1},clientId:{description:"id for the OAuth application",type:"string",defaultValue:""},scopes:{description:"optional scopes for the authorization call",type:"string",defaultValue:""},state:{description:"optional state for the authorization call",type:"string",defaultValue:""},responseType:{description:"the type of response from the authorization endpoint. can be 'token' or 'code'",type:"string",defaultValue:"code"}},{baseConfiguration:fo.BaseInternetAccountConfig,explicitlyTyped:!0}),kl=(0,s.ConfigurationSchema)("DropboxOAuthInternetAccount",{authEndpoint:{description:"the authorization code endpoint of the internet account",type:"string",defaultValue:"https://www.dropbox.com/oauth2/authorize"},tokenEndpoint:{description:"the token endpoint of the internet account",type:"string",defaultValue:"https://api.dropbox.com/oauth2/token"},needsPKCE:{description:"boolean to indicate if the endpoint needs a PKCE code",type:"boolean",defaultValue:!0},domains:{description:"array of valid domains the url can contain to use this account",type:"stringArray",defaultValue:["addtodropbox.com","db.tt","dropbox.com","dropboxapi.com","dropboxbusiness.com","dropbox.tech","getdropbox.com"]}},{baseConfiguration:xl,explicitlyTyped:!0});function Cl(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Pl(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Pl(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Pl(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Pl(f,"constructor",c),Pl(c,"constructor",s),s.displayName="GeneratorFunction",Pl(c,o,"GeneratorFunction"),Pl(f),Pl(f,o,"Generator"),Pl(f,n,function(){return this}),Pl(f,"toString",function(){return"[object Generator]"}),(Cl=function(){return{w:i,m:d}})()}function Pl(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Pl=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Pl(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Pl(e,t,r,n)}function El(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function jl(e){return e.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function Tl(e){return _l.apply(this,arguments)}function _l(){var e;return e=Cl().m(function e(t){var r,n;return Cl().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Promise.resolve().then(o.t.bind(o,72110,23)).then(function(e){return e.default});case 1:return r=e.v,e.n=2,Promise.resolve().then(o.t.bind(o,72201,23));case 2:return n=e.v,e.a(2,jl(n.stringify(r(t))))}},e)}),_l=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){El(i,n,o,a,l,"next",e)}function l(e){El(i,n,o,a,l,"throw",e)}a(void 0)})},_l.apply(this,arguments)}function Rl(e,t){try{var r,n=JSON.parse(e);return"invalid_grant"===n.error&&t(),null!==(r=null==n?void 0:n.error_description)&&void 0!==r?r:e}catch(e){}return e}function Ml(e,t){return e.refresh_token&&t(e.refresh_token),e.access_token}function Il(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Nl(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Nl(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Nl(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Nl(f,"constructor",c),Nl(c,"constructor",s),s.displayName="GeneratorFunction",Nl(c,o,"GeneratorFunction"),Nl(f),Nl(f,o,"Generator"),Nl(f,n,function(){return this}),Nl(f,"toString",function(){return"[object Generator]"}),(Il=function(){return{w:i,m:d}})()}function Nl(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Nl=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Nl(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Nl(e,t,r,n)}function Dl(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Fl(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Dl(i,n,o,a,l,"next",e)}function l(e){Dl(i,n,o,a,l,"throw",e)}a(void 0)})}}function Ll(e){return zl.apply(this,arguments)}function zl(){return zl=Fl(Il().m(function e(t){var r,n,o,i,a,l,s;return Il().w(function(e){for(;;)switch(e.n){case 0:if(r=t.response,n=t.reason,o=t.statusText,i="HTTP ".concat(r.status),a=n,null==o){e.n=1;break}l=o,e.n=3;break;case 1:return e.n=2,Bl(r);case 2:l=e.v;case 3:return s=l,e.a(2,[i,a,s].filter(function(e){return!!e}).join(" - "))}},e)})),zl.apply(this,arguments)}function Bl(e){return $l.apply(this,arguments)}function $l(){return($l=Fl(Il().m(function e(t){return Il().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,t.text();case 1:return e.a(2,e.v);case 2:return e.p=2,e.v,e.a(2,t.statusText)}},e,null,[[0,2]])}))).apply(this,arguments)}function Gl(e){return Gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gl(e)}function Hl(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Vl(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Vl(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Vl(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Vl(f,"constructor",c),Vl(c,"constructor",s),s.displayName="GeneratorFunction",Vl(c,o,"GeneratorFunction"),Vl(f),Vl(f,o,"Generator"),Vl(f,n,function(){return this}),Vl(f,"toString",function(){return"[object Generator]"}),(Hl=function(){return{w:i,m:d}})()}function Vl(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Vl=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Vl(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Vl(e,t,r,n)}function Wl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ul(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wl(Object(r),!0).forEach(function(t){ql(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wl(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ql(e,t,r){return(t=function(e){var t=function(e){if("object"!=Gl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Gl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gl(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xl(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Kl(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Xl(i,n,o,a,l,"next",e)}function l(e){Xl(i,n,o,a,l,"throw",e)}a(void 0)})}}const Yl=function(e){return fo.InternetAccount.named("OAuthInternetAccount").props({type:_.types.literal("OAuthInternetAccount"),configuration:(0,s.ConfigurationReference)(e)}).views(function(){var e=void 0;return{get codeVerifierPKCE(){if(!e){var t=new Uint8Array(32);globalThis.crypto.getRandomValues(t),e=jl(function(e){for(var t=[],r=0,n=e.length;r<n;r++)t.push(String.fromCharCode(e[r]));return btoa(t.join(""))}(t))}return e}}}).views(function(e){return{get authEndpoint(){return(0,s.getConf)(e,"authEndpoint")},get tokenEndpoint(){return(0,s.getConf)(e,"tokenEndpoint")},get needsPKCE(){return(0,s.getConf)(e,"needsPKCE")},get clientId(){return(0,s.getConf)(e,"clientId")},get scopes(){return(0,s.getConf)(e,"scopes")},state:function(){return(0,s.getConf)(e,"state")},get responseType(){return(0,s.getConf)(e,"responseType")},get refreshTokenKey(){return"".concat(e.internetAccountId,"-refreshToken")}}}).actions(function(e){return{storeRefreshToken:function(t){localStorage.setItem(e.refreshTokenKey,t)},removeRefreshToken:function(){localStorage.removeItem(e.refreshTokenKey)},retrieveRefreshToken:function(){return localStorage.getItem(e.refreshTokenKey)},exchangeAuthorizationForAccessToken:function(t,r){var n=this;return Kl(Hl().m(function o(){var i,a,l,s,c;return Hl().w(function(o){for(;;)switch(o.n){case 0:return i=new URLSearchParams(Object.entries(Ul({code:t,grant_type:"authorization_code",client_id:e.clientId,redirect_uri:r},e.needsPKCE?{code_verifier:e.codeVerifierPKCE}:{}))),o.n=1,fetch(e.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:i.toString()});case 1:if((a=o.v).ok){o.n=3;break}return s=Error,o.n=2,Ll({response:a,reason:"Failed to obtain token"});case 2:throw c=o.v,new s(c);case 3:return o.n=4,a.json();case 4:return l=o.v,o.a(2,Ml(l,function(e){n.storeRefreshToken(e)}))}},o)}))()},exchangeRefreshForAccessToken:function(t){var r=this;return Kl(Hl().m(function n(){var o,i,a,l,s;return Hl().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,fetch(e.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(Object.entries({grant_type:"refresh_token",refresh_token:t,client_id:e.clientId})).toString()});case 1:if((o=n.v).ok){n.n=4;break}return e.removeToken(),n.n=2,o.text();case 2:return i=n.v,l=Error,n.n=3,Ll({response:o,statusText:Rl(i,function(){r.removeRefreshToken()})});case 3:throw s=n.v,new l(s);case 4:return n.n=5,o.json();case 5:return a=n.v,n.a(2,Ml(a,function(e){r.storeRefreshToken(e)}))}},n)}))()}}}).actions(function(e){var t,r=void 0;return{addMessageChannel:function(e,r){var n=this;t=function(t){n.finishOAuthWindow(t,e,r)},window.addEventListener("message",t)},deleteMessageChannel:function(){window.removeEventListener("message",t)},finishOAuthWindow:function(t,r,n){var o=this;return Kl(Hl().m(function i(){var a,l,s,c,u,f,d,p,h;return Hl().w(function(i){for(;;)switch(i.n){case 0:if(t.data.name==="JBrowseAuthWindow-".concat(e.internetAccountId)){i.n=1;break}return o.deleteMessageChannel(),i.a(2);case 1:if(a=t.data.redirectUri,l=a.replace("#","?"),s=new URL(l),c=s.search,!(u=new URLSearchParams(c)).has("access_token")){i.n=3;break}if(f=u.get("access_token")){i.n=2;break}return n(new Error("Error with token endpoint")),i.a(2);case 2:return e.storeToken(f),r(f),i.a(2);case 3:if(!u.has("code")){i.n=7;break}if(d=u.get("code")){i.n=4;break}return n(new Error("Error with authorization endpoint")),i.a(2);case 4:return i.p=4,i.n=5,e.exchangeAuthorizationForAccessToken(d,s.origin+s.pathname);case 5:return p=i.v,e.storeToken(p),r(p),i.a(2);case 6:return i.p=6,(h=i.v)instanceof Error?n(h):n(new Error(String(h))),i.a(2);case 7:if(!a.includes("access_denied")){i.n=8;break}return n(new Error("OAuth flow was cancelled")),i.a(2);case 8:if(!a.includes("error")){i.n=9;break}return n(new Error("OAuth flow error: ".concat(c))),i.a(2);case 9:o.deleteMessageChannel();case 10:return i.a(2)}},i,null,[[4,6]])}))()},useEndpointForAuthorization:function(t,r){var n=this;return Kl(Hl().m(function o(){var i,a,l,s,c,f,d,p,h;return Hl().w(function(o){for(;;)switch(o.n){case 0:if(i=u.isElectron?"http://localhost/auth":window.location.origin+window.location.pathname,a={client_id:e.clientId,redirect_uri:i,response_type:e.responseType,token_access_type:"offline"},e.state()&&(a.state=e.state()),e.scopes&&(a.scope=e.scopes),!e.needsPKCE){o.n=2;break}return o.n=1,Tl(e.codeVerifierPKCE);case 1:a.code_challenge=o.v,a.code_challenge_method="S256";case 2:if(l=new URLSearchParams(Object.entries(a)),(s=new URL(e.authEndpoint)).search=l.toString(),c="JBrowseAuthWindow-".concat(e.internetAccountId),!u.isElectron){o.n=4;break}return f=window.require("electron"),d=f.ipcRenderer,o.n=3,d.invoke("openAuthWindow",{internetAccountId:e.internetAccountId,data:a,url:s.toString()});case 3:p=o.v,h=new MessageEvent("message",{data:{name:c,redirectUri:p}}),n.finishOAuthWindow(h,t,r),o.n=5;break;case 4:window.open(s,c,"width=500,height=600,left=0,top=0");case 5:return o.a(2)}},o)}))()},getTokenFromUser:function(t,r){var n=this;return Kl(Hl().m(function o(){var i,a,l,s;return Hl().w(function(o){for(;;)switch(o.n){case 0:if(i=e.retrieveRefreshToken(),a=!0,!i){o.n=4;break}return o.p=1,o.n=2,e.exchangeRefreshForAccessToken(i);case 2:l=o.v,t(l),a=!1,o.n=4;break;case 3:o.p=3,s=o.v,console.error(s),e.removeRefreshToken();case 4:a&&(n.addMessageChannel(t,r),n.useEndpointForAuthorization(t,r));case 5:return o.a(2)}},o,null,[[1,3]])}))()},validateToken:function(t,n){return Kl(Hl().m(function o(){var i,a,l,s,c,u,f;return Hl().w(function(o){for(;;)switch(o.n){case 0:return i=e.addAuthHeaderToInit({method:"HEAD"},t),o.n=1,fetch(n.uri,i);case 1:if((a=o.v).ok){o.n=7;break}if(e.removeToken(),!(l=e.retrieveRefreshToken())){o.n=5;break}return o.p=2,r||(r=e.exchangeRefreshForAccessToken(l)),o.n=3,r;case 3:return s=o.v,r=void 0,o.a(2,s);case 4:o.p=4,c=o.v,console.error("Token could not be refreshed",c);case 5:return u=Error,o.n=6,Ll({response:a,reason:"Error validating token"});case 6:throw f=o.v,new u(f);case 7:return o.a(2,t)}},o,null,[[2,4]])}))()}}}).actions(function(e){var t=e.getFetcher;return{getFetcher:function(r){var n=t(r);return function(){var t=Kl(Hl().m(function t(o,i){var a,l,s;return Hl().w(function(t){for(;;)switch(t.n){case 0:if(!r){t.n=2;break}return a=e,t.n=1,e.getToken(r);case 1:return l=t.v,s=r,t.n=2,a.validateToken.call(a,l,s);case 2:return t.a(2,n(o,i))}},t)}));return function(e,r){return t.apply(this,arguments)}}()}}})};var Jl=o(61845),Zl=o(14041);function Ql(e){return Zl.createElement(Jl.A,e,Zl.createElement("path",{d:"M3 6.2L8 9.39L13 6.2L8 3L3 6.2M13 6.2L18 9.39L23 6.2L18 3L13 6.2M3 12.55L8 15.74L13 12.55L8 9.35L3 12.55M18 9.35L13 12.55L18 15.74L23 12.55L18 9.35M8.03 16.8L13.04 20L18.04 16.8L13.04 13.61L8.03 16.8Z"}))}function es(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return ts(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(ts(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ts(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,ts(f,"constructor",c),ts(c,"constructor",s),s.displayName="GeneratorFunction",ts(c,o,"GeneratorFunction"),ts(f),ts(f,o,"Generator"),ts(f,n,function(){return this}),ts(f,"toString",function(){return"[object Generator]"}),(es=function(){return{w:i,m:d}})()}function ts(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ts=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){ts(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},ts(e,t,r,n)}function rs(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}var ns={shared_link_not_found:"The shared link wasn't found.",shared_link_access_denied:"The caller is not allowed to access this shared link.",unsupported_link_type:"This type of link is not supported; use files/export instead.",shared_link_is_directory:"Directories cannot be retrieved by this endpoint."};function os(e,t){return is.apply(this,arguments)}function is(){var e;return e=es().m(function e(t,r){var n,o,i,a,l;return es().w(function(e){for(;;)switch(e.n){case 0:return n="",e.p=1,a=JSON,e.n=2,t.text();case 2:l=e.v,o=a.parse.call(a,l),i=o.error[".tag"],n=ns[i]||i,e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,Ll({response:t,reason:r,statusText:n}))}},e,null,[[1,3]])}),is=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){rs(i,n,o,a,l,"next",e)}function l(e){rs(i,n,o,a,l,"throw",e)}a(void 0)})},is.apply(this,arguments)}var as=o(14041);function ls(e){return ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls(e)}function ss(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return cs(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(cs(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,cs(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,cs(f,"constructor",c),cs(c,"constructor",s),s.displayName="GeneratorFunction",cs(c,o,"GeneratorFunction"),cs(f),cs(f,o,"Generator"),cs(f,n,function(){return this}),cs(f,"toString",function(){return"[object Generator]"}),(ss=function(){return{w:i,m:d}})()}function cs(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}cs=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){cs(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},cs(e,t,r,n)}function us(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function fs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?us(Object(r),!0).forEach(function(t){ds(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):us(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ds(e,t,r){return(t=function(e){var t=function(e){if("object"!=ls(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ls(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ls(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ps(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function hs(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ps(i,n,o,a,l,"next",e)}function l(e){ps(i,n,o,a,l,"throw",e)}a(void 0)})}}const ms=function(e){return Yl(xl).named("DropboxOAuthInternetAccount").props({type:_.types.literal("DropboxOAuthInternetAccount"),configuration:(0,s.ConfigurationReference)(e)}).views(function(){return{get toggleContents(){return as.createElement(Ql,null)},get selectorLabel(){return"Enter Dropbox share link"}}}).actions(function(e){return{getFetcher:function(t){return function(){var r=hs(ss().m(function r(n,o){var i,a,l,s,c;return ss().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,e.getToken(t);case 1:return i=r.v,(a=e.addAuthHeaderToInit(fs(fs({},o),{},{method:"POST"}),i)).headers.append("Dropbox-API-Arg",JSON.stringify({url:n})),r.n=2,fetch("https://content.dropboxapi.com/2/sharing/get_shared_link_file",a);case 2:if((l=r.v).ok){r.n=4;break}return s=Error,r.n=3,os(l);case 3:throw c=r.v,new s(c);case 4:return r.a(2,l)}},r)}));return function(e,t){return r.apply(this,arguments)}}()},validateToken:function(t,r){var n=this;return hs(ss().m(function o(){var i,a,l,s,c;return ss().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,fetch("https://api.dropboxapi.com/2/sharing/get_shared_link_metadata",{method:"POST",headers:{Authorization:"Bearer ".concat(t),"Content-Type":"application/json"},body:JSON.stringify({url:r.uri})});case 1:if((i=o.v).ok){o.n=5;break}if(!(a=e.retrieveRefreshToken())){o.n=3;break}return e.removeRefreshToken(),o.n=2,e.exchangeRefreshForAccessToken(a);case 2:return l=o.v,o.a(2,n.validateToken(l,r));case 3:return s=Error,o.n=4,os(i,"Token could not be validated");case 4:throw c=o.v,new s(c);case 5:return o.a(2,t)}},o)}))()}}})},ys=(0,s.ConfigurationSchema)("ExternalTokenInternetAccount",{validateWithHEAD:{description:"validate the token with a HEAD request before using it",type:"boolean",defaultValue:!0}},{baseConfiguration:fo.BaseInternetAccountConfig,explicitlyTyped:!0});var bs=o(68805),vs=o(95305),gs=o(97469),ws=o(98819),Ss=o(14041);function As(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Os=function(e){var t,r,n=e.internetAccountId,o=e.handleClose,i=(t=(0,a.useState)(""),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return As(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?As(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=i[0],s=i[1];return Ss.createElement(c.Dialog,{open:!0,maxWidth:"xl","data-testid":"externalToken-form",onClose:function(){o()},title:"Enter token for ".concat(n)},Ss.createElement(bs.A,{style:{display:"flex",flexDirection:"column"}},Ss.createElement(vs.A,{required:!0,label:"Enter Token",variant:"outlined",onChange:function(e){s(e.target.value)},margin:"dense",slotProps:{htmlInput:{"data-testid":"entry-externalToken"}}})),Ss.createElement(gs.A,null,Ss.createElement(ws.A,{variant:"contained",color:"primary",type:"submit",disabled:!l,onClick:function(){l&&o(l)}},"Add"),Ss.createElement(ws.A,{variant:"contained",color:"secondary",onClick:function(){o()}},"Cancel")))};function xs(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return ks(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(ks(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ks(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,ks(f,"constructor",c),ks(c,"constructor",s),s.displayName="GeneratorFunction",ks(c,o,"GeneratorFunction"),ks(f),ks(f,o,"Generator"),ks(f,n,function(){return this}),ks(f,"toString",function(){return"[object Generator]"}),(xs=function(){return{w:i,m:d}})()}function ks(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ks=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){ks(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},ks(e,t,r,n)}function Cs(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}const Ps=function(e){return fo.InternetAccount.named("ExternalTokenInternetAccount").props({type:_.types.literal("ExternalTokenInternetAccount"),configuration:(0,s.ConfigurationReference)(e)}).views(function(e){return{get validateWithHEAD(){return(0,s.getConf)(e,"validateWithHEAD")}}}).actions(function(e){return{getTokenFromUser:function(t,r){(0,_.getRoot)(e).session.queueDialog(function(n){return[Os,{internetAccountId:e.internetAccountId,handleClose:function(e){e?t(e):r(new Error("user cancelled entry")),n()}}]})},validateToken:function(t,r){return(n=xs().m(function n(){var o,i,a;return xs().w(function(n){for(;;)switch(n.n){case 0:if(e.validateWithHEAD){n.n=1;break}return n.a(2,t);case 1:return o=e.addAuthHeaderToInit({method:"HEAD"},t),n.n=2,fetch(r.uri,o);case 2:if((i=n.v).ok){n.n=7;break}return n.p=3,n.n=4,i.text();case 4:a=n.v,n.n=6;break;case 5:n.p=5,n.v,a="";case 6:throw new Error("Token could not be validated — ".concat(i.status," ").concat(a?" (".concat(a,")"):""));case 7:return n.a(2,t)}},n,null,[[3,5]])}),function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){Cs(i,r,o,a,l,"next",e)}function l(e){Cs(i,r,o,a,l,"throw",e)}a(void 0)})})();var n}}})},Es=(0,s.ConfigurationSchema)("GoogleDriveOAuthInternetAccount",{authEndpoint:{description:"the authorization code endpoint of the internet account",type:"string",defaultValue:"https://accounts.google.com/o/oauth2/v2/auth"},scopes:{description:"optional scopes for the authorization call",type:"string",defaultValue:"https://www.googleapis.com/auth/drive.readonly"},domains:{description:"array of valid domains the url can contain to use this account",type:"stringArray",defaultValue:['drive.google.com"']},responseType:{description:"the type of response from the authorization endpoint",type:"string",defaultValue:"token"}},{baseConfiguration:xl,explicitlyTyped:!0});function js(e){return js="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},js(e)}function Ts(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return _s(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(_s(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_s(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,_s(f,"constructor",c),_s(c,"constructor",s),s.displayName="GeneratorFunction",_s(c,o,"GeneratorFunction"),_s(f),_s(f,o,"Generator"),_s(f,n,function(){return this}),_s(f,"toString",function(){return"[object Generator]"}),(Ts=function(){return{w:i,m:d}})()}function _s(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}_s=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){_s(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},_s(e,t,r,n)}function Rs(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ms(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Rs(i,n,o,a,l,"next",e)}function l(e){Rs(i,n,o,a,l,"throw",e)}a(void 0)})}}function Is(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ns(n.key),n)}}function Ns(e){var t=function(e){if("object"!=js(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=js(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==js(t)?t:t+""}function Ds(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ds=function(){return!!e})()}function Fs(e,t,r,n){var o=Ls(zs(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Ls(){return Ls="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=zs(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Ls.apply(null,arguments)}function zs(e){return zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zs(e)}function Bs(e,t){return Bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bs(e,t)}var $s=function(e){function t(e,r){var n,o,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=this,i=t,a=[e,r],i=zs(i),n=function(e,t){if(t&&("object"==js(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(o,Ds()?Reflect.construct(i,a||[],zs(o).constructor):i.apply(o,a))).statsPromise=n.fetch(e,{metadataOnly:!0}).then(function(e){return e.json()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bs(e,t)}(t,e),r=t,n=[{key:"fetch",value:(i=Ms(Ts().m(function e(r,n){return Ts().w(function(e){for(;;)if(0===e.n)return e.a(2,Fs(t,"fetch",this,3)([r,n]))},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"stat",value:(o=Ms(Ts().m(function e(){return Ts().w(function(e){for(;;)if(0===e.n)return e.a(2,this.statsPromise)},e,this)})),function(){return o.apply(this,arguments)})}],n&&Is(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(So.RemoteFileWithRangeCache),Gs=o(14041);function Hs(e){return Gs.createElement(Jl.A,e,Gs.createElement("path",{d:"M7.71,3.5L1.15,15L4.58,21L11.13,9.5M9.73,15L6.3,21H19.42L22.85,15M22.28,14L15.42,2H8.58L8.57,2L15.43,14H22.28Z"}))}function Vs(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Ws(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ws(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ws(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Ws(f,"constructor",c),Ws(c,"constructor",s),s.displayName="GeneratorFunction",Ws(c,o,"GeneratorFunction"),Ws(f),Ws(f,o,"Generator"),Ws(f,n,function(){return this}),Ws(f,"toString",function(){return"[object Generator]"}),(Vs=function(){return{w:i,m:d}})()}function Ws(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ws=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ws(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ws(e,t,r,n)}function Us(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function qs(e,t){return Xs.apply(this,arguments)}function Xs(){var e;return e=Vs().m(function e(t,r){var n,o,i,a;return Vs().w(function(e){for(;;)switch(e.n){case 0:return n="",e.p=1,i=JSON,e.n=2,t.text();case 2:a=e.v,o=i.parse.call(i,a),n=o.error.message,e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,Ll({response:t,reason:r,statusText:n}))}},e,null,[[1,3]])}),Xs=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Us(i,n,o,a,l,"next",e)}function l(e){Us(i,n,o,a,l,"throw",e)}a(void 0)})},Xs.apply(this,arguments)}var Ks=o(14041);function Ys(e){return Ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ys(e)}function Js(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Zs(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Zs(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Zs(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Zs(f,"constructor",c),Zs(c,"constructor",s),s.displayName="GeneratorFunction",Zs(c,o,"GeneratorFunction"),Zs(f),Zs(f,o,"Generator"),Zs(f,n,function(){return this}),Zs(f,"toString",function(){return"[object Generator]"}),(Js=function(){return{w:i,m:d}})()}function Zs(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Zs=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Zs(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Zs(e,t,r,n)}function Qs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ec(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qs(Object(r),!0).forEach(function(t){tc(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qs(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function tc(e,t,r){return(t=function(e){var t=function(e){if("object"!=Ys(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ys(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ys(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rc(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function nc(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){rc(i,n,o,a,l,"next",e)}function l(e){rc(i,n,o,a,l,"throw",e)}a(void 0)})}}function oc(e){var t=/[-\w]{25,}/.exec(e);return"https://www.googleapis.com/drive/v3/files/".concat(t)}function ic(e){return Yl(xl).named("GoogleDriveOAuthInternetAccount").props({type:_.types.literal("GoogleDriveOAuthInternetAccount"),configuration:(0,s.ConfigurationReference)(e)}).views(function(){return{get toggleContents(){return Ks.createElement(Hs,null)},get selectorLabel(){return"Enter Google Drive share link"}}}).actions(function(e){return{getFetcher:function(t){return function(){var r=nc(Js().m(function r(n,o){var i,a,l,s,c,u;return Js().w(function(r){for(;;)switch(r.n){case 0:return i=new URL(oc(String(n))),a=new URLSearchParams,null!=o&&o.metadataOnly?a.append("fields","size"):a.append("alt","media"),i.search=a.toString(),r.n=1,e.getToken(t);case 1:return l=r.v,r.n=2,fetch(i,e.addAuthHeaderToInit(ec(ec({},o),{},{method:"GET",credentials:"same-origin"}),l));case 2:if((s=r.v).ok){r.n=4;break}return c=Error,r.n=3,qs(s);case 3:throw u=r.v,new c(u);case 4:return r.a(2,s)}},r)}));return function(e,t){return r.apply(this,arguments)}}()},openLocation:function(e){return new $s(e.uri,{fetch:this.getFetcher(e)})},validateToken:function(e,t){return nc(Js().m(function r(){var n,o,i;return Js().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,fetch(oc(t.uri),{headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/x-www-form-urlencoded"}});case 1:if((n=r.v).ok){r.n=3;break}return o=Error,r.n=2,qs(n,"Token could not be validated");case 2:throw i=r.v,new o(i);case 3:return r.a(2,e)}},r)}))()}}})}const ac=(0,s.ConfigurationSchema)("HTTPBasicInternetAccount",{tokenType:{description:"a custom name for a token to include in the header",type:"string",defaultValue:"Basic"},validateWithHEAD:{description:"validate the token with a HEAD request before using it",type:"boolean",defaultValue:!0}},{baseConfiguration:fo.BaseInternetAccountConfig,explicitlyTyped:!0});var lc=o(14041);function sc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return cc(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cc(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function uc(e){var t=e.internetAccountId,r=e.handleClose,n=sc((0,a.useState)(""),2),o=n[0],i=n[1],l=sc((0,a.useState)(""),2),s=l[0],u=l[1];return lc.createElement(c.Dialog,{open:!0,maxWidth:"xl","data-testid":"login-httpbasic",title:"Log in for ".concat(t),onClose:function(){r()}},lc.createElement("form",{onSubmit:function(e){o&&s?r(btoa("".concat(o,":").concat(s))):r(),e.preventDefault()}},lc.createElement(bs.A,{style:{display:"flex",flexDirection:"column"}},lc.createElement(vs.A,{required:!0,label:"Username",variant:"outlined",onChange:function(e){i(e.target.value)},margin:"dense",slotProps:{htmlInput:{"data-testid":"login-httpbasic-username"}}}),lc.createElement(vs.A,{required:!0,label:"Password",type:"password",autoComplete:"current-password",variant:"outlined",onChange:function(e){u(e.target.value)},margin:"dense",slotProps:{htmlInput:{"data-testid":"login-httpbasic-password"}}})),lc.createElement(gs.A,null,lc.createElement(ws.A,{variant:"contained",color:"primary",type:"submit"},"Submit"),lc.createElement(ws.A,{variant:"contained",color:"secondary",type:"submit",onClick:function(){r()}},"Cancel"))))}function fc(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return dc(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(dc(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,dc(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,dc(f,"constructor",c),dc(c,"constructor",s),s.displayName="GeneratorFunction",dc(c,o,"GeneratorFunction"),dc(f),dc(f,o,"Generator"),dc(f,n,function(){return this}),dc(f,"toString",function(){return"[object Generator]"}),(fc=function(){return{w:i,m:d}})()}function dc(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}dc=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){dc(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},dc(e,t,r,n)}function pc(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}const hc=function(e){return fo.InternetAccount.named("HTTPBasicInternetAccount").props({type:_.types.literal("HTTPBasicInternetAccount"),configuration:(0,s.ConfigurationReference)(e)}).views(function(e){return{get validateWithHEAD(){return(0,s.getConf)(e,"validateWithHEAD")}}}).actions(function(e){return{getTokenFromUser:function(t,r){(0,_.getRoot)(e).session.queueDialog(function(n){return[uc,{internetAccountId:e.internetAccountId,handleClose:function(e){e?t(e):r(new Error("User cancelled entry")),n()}}]})},validateToken:function(t,r){return(n=fc().m(function n(){var o,i,a,l;return fc().w(function(n){for(;;)switch(n.n){case 0:if(e.validateWithHEAD){n.n=1;break}return n.a(2,t);case 1:return o=e.addAuthHeaderToInit({method:"HEAD"},t),n.n=2,fetch(r.uri,o);case 2:if((i=n.v).ok){n.n=4;break}return a=Error,n.n=3,Ll({response:i,reason:"Error validating token"});case 3:throw l=n.v,new a(l);case 4:return n.a(2,t)}},n)}),function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){pc(i,r,o,a,l,"next",e)}function l(e){pc(i,r,o,a,l,"throw",e)}a(void 0)})})();var n}}})};function mc(e){return mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mc(e)}function yc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sc(n.key),n)}}function bc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(bc=function(){return!!e})()}function vc(e){return vc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vc(e)}function gc(e,t){return gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gc(e,t)}function wc(e,t,r){return(t=Sc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sc(e){var t=function(e){if("object"!=mc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mc(t)?t:t+""}var Ac=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return wc((r=this,n=t,o=[].concat(a),n=vc(n),e=function(e,t){if(t&&("object"==mc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,bc()?Reflect.construct(n,o||[],vc(r).constructor):n.apply(r,o))),"name","AuthenticationPlugin"),wc(e,"exports",{OAuthConfigSchema:xl,OAuthInternetAccountModelFactory:Yl,ExternalTokenConfigSchema:ys,ExternalTokenInternetAccountModelFactory:Ps,HTTPBasicConfigSchema:ac,HTTPBasicInternetAccountModelFactory:hc,DropboxOAuthConfigSchema:kl,DropboxOAuthInternetAccountModelFactory:ms,GoogleDriveOAuthConfigSchema:Es,GoogleDriveOAuthInternetAccountModelFactory:ic}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gc(e,t)}(t,e),r=t,(n=[{key:"install",value:function(e){e.addInternetAccountType(function(){return new ri.A({name:"OAuthInternetAccount",configSchema:xl,stateModel:Yl(xl)})}),e.addInternetAccountType(function(){return new ri.A({name:"ExternalTokenInternetAccount",configSchema:ys,stateModel:Ps(ys)})}),e.addInternetAccountType(function(){return new ri.A({name:"HTTPBasicInternetAccount",configSchema:ac,stateModel:hc(ac)})}),e.addInternetAccountType(function(){return new ri.A({name:"DropboxOAuthInternetAccount",configSchema:kl,stateModel:ms(kl)})}),e.addInternetAccountType(function(){return new ri.A({name:"GoogleDriveOAuthInternetAccount",configSchema:Es,stateModel:ic(Es)})})}}])&&yc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we.A);const Oc=(0,Tn.A)((0,A.jsx)("path",{d:"M13 2.05v3.03c3.39.49 6 3.39 6 6.92 0 .9-.18 1.75-.48 2.54l2.6 1.53c.56-1.24.88-2.62.88-4.07 0-5.18-3.95-9.45-9-9.95M12 19c-3.87 0-7-3.13-7-7 0-3.53 2.61-6.43 6-6.92V2.05c-5.06.5-9 4.76-9 9.95 0 5.52 4.47 10 9.99 10 3.31 0 6.24-1.61 8.06-4.09l-2.6-1.53C16.17 17.98 14.21 19 12 19"}),"DataUsage");var xc=o(78179);const kc=(0,Tn.A)((0,A.jsx)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z"}),"FolderOpen");var Cc=o(68776),Pc=o(45060);function Ec(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return jc(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jc(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Tc(e,t,r,n,o){var i=Math.abs(e-r);if(!(i>n)){i===n&&o.push([t,e]);var a=Math.sqrt(n*n-i*i);o.push([t-a,e],[t+a,e])}}function _c(e,t,r,n,o){var i=Math.abs(e-t);if(!(i>n)){i===n&&o.push([e,r]);var a=Math.sqrt(n*n-i*i);o.push([e,r-a],[e,r+a])}}function Rc(e,t){var r=Math.sqrt(e*e+t*t);if(0===r)return[0,0];var n=function(e,t){var r=(Math.atan(t/e)+2*Math.PI)%(2*Math.PI);return e<0&&(t<=0?r+=Math.PI:r-=Math.PI),r}(e,t);return[r,n]}var Mc=2*Math.PI;function Ic(e){return Ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ic(e)}function Nc(e,t){if(e){if("string"==typeof e)return Dc(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dc(e,t):void 0}}function Dc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Fc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Lc(n.key),n)}}function Lc(e){var t=function(e){if("object"!=Ic(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ic(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ic(t)?t:t+""}var zc=function(){return e=function e(t,r,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.region=r,this.offsetRadians=n,this.radianWidth=o;var i=t.bpPerRadian;this.key="regions"in r?JSON.stringify(r.regions):(0,u.assembleLocString)(r),this.bpPerRadian=i,this.flipped=!1,this.startRadians=n,this.endRadians=r.widthBp/this.bpPerRadian+n,Object.freeze(this)},(t=[{key:"bpToXY",value:function(e,t){var r=(this.region.elided?this.region.widthBp/2:this.flipped?this.region.end-e:e-this.region.start)/this.bpPerRadian+this.offsetRadians;return(0,u.polarToCartesian)(t,r)}},{key:"toJSON",value:function(){return Object.fromEntries(Object.entries(this))}}])&&Fc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Bc(e,t){var r,n,o,i,a,l,s=(a=e.visibleSection.theta,l=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(a,l)||Nc(a,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=s[0],u=s[1];return r=t.offsetRadians+e.offsetRadians,o=c,i=u-c,!((n=t.radianWidth)<=0||i<=0)&&(n+1e-4>=Mc||i+1e-4>=Mc||(r=(r%Mc+Mc)%Mc+Mc)<(o=(o%Mc+Mc)%Mc+Mc)+i&&r+n>o||r<(o-=Mc)+i&&r+n>o||r<(o+=Mc+Mc)+i&&r+n>o)}function $c(e){return $c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$c(e)}function Gc(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Hc(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Hc(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Hc(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Hc(f,"constructor",c),Hc(c,"constructor",s),s.displayName="GeneratorFunction",Hc(c,o,"GeneratorFunction"),Hc(f),Hc(f,o,"Generator"),Hc(f,n,function(){return this}),Hc(f,"toString",function(){return"[object Generator]"}),(Gc=function(){return{w:i,m:d}})()}function Hc(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Hc=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Hc(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Hc(e,t,r,n)}function Vc(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Wc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Uc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wc(Object(r),!0).forEach(function(t){qc(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wc(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function qc(e,t,r){return(t=function(e){var t=function(e){if("object"!=$c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=$c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Kc(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function Kc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Yc=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,96232))});const Jc=function(e){return _.types.compose("CircularView",fo.BaseViewModel,_.types.model({type:_.types.literal("CircularView"),offsetRadians:-Math.PI/2,bpPerPx:200,tracks:_.types.array(e.pluggableMstType("track","stateModel")),hideVerticalResizeHandle:!1,hideTrackSelectorButton:!1,lockedFitToWindow:!0,disableImportForm:!1,height:_.types.optional(_.types.number,400),displayedRegions:_.types.optional(_.types.frozen(),[]),scrollX:0,scrollY:0,minimumRadiusPx:25,spacingPx:10,paddingPx:80,lockedPaddingPx:100,minVisibleWidth:6,minimumBlockWidth:20,trackSelectorType:"hierarchical"})).volatile(function(){return{volatileWidth:void 0,error:void 0}}).views(function(e){return{get width(){if(void 0===e.volatileWidth)throw new Error("wait for view to be initialized first before accessing width");return e.volatileWidth},get visibleSection(){var t=e.scrollX,r=e.scrollY;return function(e,t,r){var n=Ec(e,4),o=n[0],i=n[1],a=n[2],l=n[3],s=Ec(t,2),c=s[0],u=s[1];if(i-=c,a-=u,l-=u,(o-=c)<0&&i>0&&a<0&&l>0){for(var f=[[o,a],[i,a],[o,l],[i,l]],d=Number.NEGATIVE_INFINITY,p=0,h=f;p<h.length;p++){var m=Ec(h[p],2),y=m[0],b=m[1],v=Math.sqrt(y*y+b*b);v>d&&(d=v)}return{rho:[0,Math.min(r,d)],theta:[0,2*Math.PI]}}var g=[[o,a],[i,a],[o,l],[i,l]];_c(o,0,0,r,g),_c(i,0,0,r,g),Tc(a,0,0,r,g),Tc(l,0,0,r,g),-o<r&&g.push([o,0]),i<r&&g.push([i,0]),-a<r&&g.push([0,a]),l<r&&g.push([0,l]);for(var w=o>=0?-1:1,S=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,O=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY,k=0,C=g;k<C.length;k++){var P=Ec(C[k],2),E=P[0],j=P[1];if(E>=o&&E<=i&&j>=a&&j<=l){var T=Ec(Rc(E*w,j*w),2),_=T[0],R=T[1];_<=r+.001&&(R<O&&_>1e-4&&(O=R),R>x&&_>1e-4&&(x=R),_<S&&(S=_),_>A&&(A=_))}}return-1===w&&(O+=Math.PI,x+=Math.PI),O>2*Math.PI&&x>2*Math.PI&&(O-=2*Math.PI,x-=2*Math.PI),{rho:[S,Math.min(r,A)],theta:[O,x]}}([t,t+e.width,r,r+e.height],this.centerXY,this.radiusPx)},get circumferencePx(){var t,r=0,n=Xc(this.elidedRegions);try{for(n.s();!(t=n.n()).done;)r+=t.value.widthBp}catch(e){n.e(e)}finally{n.f()}return r/e.bpPerPx+e.spacingPx*this.elidedRegions.length},get radiusPx(){return this.circumferencePx/(2*Math.PI)},get bpPerRadian(){return e.bpPerPx*this.radiusPx},get pxPerRadian(){return this.radiusPx},get centerXY(){return[this.radiusPx+e.paddingPx,this.radiusPx+e.paddingPx]},get totalBp(){var t,r=0,n=Xc(e.displayedRegions);try{for(n.s();!(t=n.n()).done;){var o=t.value;r+=o.end-o.start}}catch(e){n.e(e)}finally{n.f()}return r},get maximumRadiusPx(){return e.lockedFitToWindow?Math.min(e.width,e.height)/2-e.lockedPaddingPx:1e6},get maxBpPerPx(){var t=2*Math.PI*e.minimumRadiusPx;return this.totalBp/t},get minBpPerPx(){var e=2*Math.PI*this.maximumRadiusPx;return(0,u.clamp)(this.totalBp/e,1e-10,this.maxBpPerPx)},get atMaxBpPerPx(){return e.bpPerPx>=this.maxBpPerPx},get atMinBpPerPx(){return e.bpPerPx<=this.minBpPerPx},get tooSmallToLock(){return this.minBpPerPx<=1e-10},get figureDimensions(){return[2*this.radiusPx+2*e.paddingPx,2*this.radiusPx+2*e.paddingPx]},get figureWidth(){return this.figureDimensions[0]},get figureHeight(){return this.figureDimensions[1]},get elidedRegions(){var t,r=[],n=Xc(e.displayedRegions);try{for(n.s();!(t=n.n()).done;){var o=t.value,i=o.end-o.start;if(i/e.bpPerPx<e.minVisibleWidth){var a=r.at(-1);null!=a&&a.elided?(a.regions.push(Uc({},o)),a.widthBp+=i):r.push({elided:!0,widthBp:i,regions:[Uc({},o)]})}else r.push(Uc(Uc({},o),{},{widthBp:i,elided:!1}))}}catch(e){n.e(e)}finally{n.f()}for(var l=0;l<r.length;l+=1){var s=r[l];s.elided&&1===s.regions.length&&(r[l]=Uc(Uc(Uc({},s),s.regions[0]),{},{elided:!1}))}return r},get assemblyNames(){var t,r=[],n=Xc(e.displayedRegions);try{for(n.s();!(t=n.n()).done;){var o=t.value;r.includes(o.assemblyName)||r.push(o.assemblyName)}}catch(e){n.e(e)}finally{n.f()}return r},get initialized(){var t=(0,u.getSession)(e).assemblyManager;return void 0!==e.volatileWidth&&this.assemblyNames.every(function(e){var r;return null===(r=t.get(e))||void 0===r?void 0:r.initialized})}}}).views(function(e){return{get staticSlices(){return function(e){var t,r=[],n=0,o=e.bpPerRadian,i=e.spacingPx,a=e.pxPerRadian,l=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Nc(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(e.elidedRegions);try{for(l.s();!(t=l.n()).done;){var s=t.value,c=s.widthBp/o+i/a;r.push(new zc(e,s,n,c)),n+=c}}catch(e){l.e(e)}finally{l.f()}return r}(e)}}}).views(function(e){return{get visibleStaticSlices(){return e.staticSlices.filter(function(t){return Bc(e,t)})}}}).actions(function(t){return{setWidth:function(e){return t.volatileWidth=Math.max(e,100),t.volatileWidth},setHeight:function(e){return t.height=Math.max(e,40),t.height},resizeHeight:function(e){var r=t.height,n=this.setHeight(t.height+e);return this.setModelViewWhenAdjust(!t.tooSmallToLock),n-r},resizeWidth:function(e){var r=t.width,n=this.setWidth(t.width+e);return this.setModelViewWhenAdjust(!t.tooSmallToLock),n-r},rotateClockwiseButton:function(){this.rotateClockwise(Math.PI/6)},rotateCounterClockwiseButton:function(){this.rotateCounterClockwise(Math.PI/6)},rotateClockwise:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.17;t.offsetRadians+=e},rotateCounterClockwise:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.17;t.offsetRadians-=e},zoomInButton:function(){this.setBpPerPx(t.bpPerPx/1.4)},zoomOutButton:function(){this.setBpPerPx(1.4*t.bpPerPx)},setBpPerPx:function(e){t.bpPerPx=(0,u.clamp)(e,t.minBpPerPx,t.maxBpPerPx)},setModelViewWhenAdjust:function(e){t.lockedFitToWindow&&e&&this.setBpPerPx(t.minBpPerPx)},setDisplayedRegions:function(e){var r=0===t.displayedRegions.length;t.displayedRegions=(0,_.cast)(e),r?this.setBpPerPx(t.minBpPerPx):this.setBpPerPx(t.bpPerPx)},activateTrackSelector:function(){if("hierarchical"===t.trackSelectorType){var e=(0,u.getSession)(t);if((0,u.isSessionModelWithWidgets)(e)){var r=e.addWidget("HierarchicalTrackSelectorWidget","hierarchicalTrackSelector",{view:t});return e.showWidget(r),r}}throw new Error("invalid track selector type ".concat(t.trackSelectorType))},toggleTrack:function(e){return!this.hideTrack(e)&&(this.showTrack(e),!0)},setError:function(e){t.error=e},showTrack:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.pluggableConfigSchemaType("track"),i=(0,_.resolveIdentifier)(o,(0,_.getRoot)(t),r),a=e.getTrackType(i.type);if(!a)throw new Error("unknown track type ".concat(i.type));var l=e.getViewType(t.type),s=new Set(l.displayTypes.map(function(e){return e.name})),c=i.displays.find(function(e){return s.has(e.type)}),u=a.stateModel.create(Uc(Uc({},n),{},{type:i.type,configuration:i,displays:[{type:c.type,configuration:c}]}));t.tracks.push(u)},addTrackConf:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.type,i=(0,s.readConfObject)(r,"name"),a=e.getTrackType(o);if(!a)throw new Error("unknown track type ".concat(o));var l=e.getViewType(t.type),c=new Set(l.displayTypes.map(function(e){return e.name})),u=r.displays.find(function(e){return c.has(e.type)});t.tracks.push(a.stateModel.create(Uc(Uc({},n),{},{name:i,type:o,configuration:r,displays:[{type:u.type,configuration:u}]})))},hideTrack:function(r){var n=e.pluggableConfigSchemaType("track"),o=(0,_.resolveIdentifier)(n,(0,_.getRoot)(t),r),i=t.tracks.filter(function(e){return e.configuration===o});return(0,le.transaction)(function(){var e,r=Xc(i);try{for(r.s();!(e=r.n()).done;){var n=e.value;t.tracks.remove(n)}}catch(e){r.e(e)}finally{r.f()}}),i.length},toggleFitToWindowLock:function(){return t.lockedFitToWindow=!t.lockedFitToWindow,this.setModelViewWhenAdjust(t.atMinBpPerPx),t.lockedFitToWindow},exportSvg:function(){var e,r=arguments;return(e=Gc().m(function e(){var n,i,a,l,s;return Gc().w(function(e){for(;;)switch(e.n){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},e.n=1,Promise.resolve().then(o.bind(o,90025));case 1:return i=e.v,a=i.renderToSvg,e.n=2,a(t,n);case 2:l=e.v,s=new Blob([l],{type:"image/svg+xml"}),(0,Pc.saveAs)(s,n.filename||"image.svg");case 3:return e.a(2)}},e)}),function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Vc(i,n,o,a,l,"next",e)}function l(e){Vc(i,n,o,a,l,"throw",e)}a(void 0)})})()}}}).views(function(e){return{menuItems:function(){return[{label:"Return to import form",onClick:function(){e.setDisplayedRegions([])},icon:kc},{label:"Export SVG",icon:Cc.A,onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Yc,{model:e,handleClose:t}]})}},{label:"Open track selector",onClick:e.activateTrackSelector,icon:xc.xU}]}}})};function Zc(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Qc(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Qc(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Qc(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Qc(f,"constructor",c),Qc(c,"constructor",s),s.displayName="GeneratorFunction",Qc(c,o,"GeneratorFunction"),Qc(f),Qc(f,o,"Generator"),Qc(f,n,function(){return this}),Qc(f,"toString",function(){return"[object Generator]"}),(Zc=function(){return{w:i,m:d}})()}function Qc(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Qc=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Qc(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Qc(e,t,r,n)}function eu(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return tu(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tu(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function tu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ru(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}var nu=o(14041),ou=(0,T.observer)(function(e){var t=e.model,r=t.renderProps.radius,n=t.error;return nu.createElement("g",null,nu.createElement("defs",null,nu.createElement("pattern",{id:"diagonalHatch",width:"10",height:"10",patternTransform:"rotate(45 0 0)",patternUnits:"userSpaceOnUse"},nu.createElement("line",{x1:"0",y1:"0",x2:"0",y2:"10",style:{stroke:"rgba(255,0,0,0.5)",strokeWidth:10}}))),nu.createElement("circle",{cx:"0",cy:"0",r,fill:"#ffb4b4"}),nu.createElement("circle",{cx:"0",cy:"0",r,fill:"url(#diagonalHatch)"}),nu.createElement("text",{x:"0",y:"0",transform:"rotate(90 0 0)",dominantBaseline:"middle",textAnchor:"middle"},String(n)))});const iu=ou;var au=o(14041);function lu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var su=(0,R.n9)()(function(e){var t=e.palette,r=t.primary,n=t.secondary,o=t.tertiary,i=t.quaternary;return{path:{strokeDasharray:187,strokeDashoffset:50,animation:"$dash ".concat(1.4,"s ease-in-out infinite, $colors ").concat(5.6,"s ease-in-out infinite")},"@keyframes colors":{"0%":{stroke:r.light},"25%":{stroke:n.light},"50%":{stroke:o.light},"75%":{stroke:i.light},"100%":{stroke:r.light}},"@keyframes dash":{"0%":{strokeDashoffset:2},"50%":{strokeDashoffset:.5,transform:"rotate(135deg)"},"100%":{strokeDashoffset:2,transform:"rotate(720deg)"}}}});const cu=(0,T.observer)(function(e){var t,r,n=e.model.renderProps.radius,o=su().classes,i=(t=(0,a.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return lu(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lu(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=i[0],s=i[1];return(0,a.useEffect)(function(){var e=setTimeout(function(){s(!0)},400);return function(){clearTimeout(e)}}),l?au.createElement("g",null,au.createElement("defs",null,au.createElement("pattern",{id:"diagonalHatch",width:"10",height:"10",patternTransform:"rotate(45 0 0)",patternUnits:"userSpaceOnUse"},au.createElement("line",{x1:"0",y1:"0",x2:"0",y2:"10",style:{stroke:"rgba(255,255,255,0.5)",strokeWidth:10}}))),au.createElement("circle",{cx:"0",cy:"0",r:n,fill:"#f1f1f1"}),au.createElement("circle",{cx:"0",cy:"0",r:n,fill:"url(#diagonalHatch)"}),au.createElement("text",{x:"0",y:"0",transform:"rotate(90 0 0)",dominantBaseline:"middle",textAnchor:"middle"},"Loading…"),au.createElement("circle",{className:o.path,fill:"none",strokeWidth:"4",strokeLinecap:"round",cx:"0",cy:"0",r:"60"})):null});var uu=o(14041);const fu=(0,T.observer)(function(e){var t=e.display;return t.error?uu.createElement(iu,{model:t}):t.filled?t.reactElement:uu.createElement(cu,{model:t})});var du=(0,s.ConfigurationSchema)("BaseChordDisplay",{onChordClick:{type:"boolean",description:"callback that should be run when a chord in the track is clicked",defaultValue:!1,contextVariable:["feature","track","pluginManager"]}},{explicitIdentifier:"displayId"});function pu(e){return pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pu(e)}var hu=["html"];function mu(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return yu(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(yu(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,yu(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,yu(f,"constructor",c),yu(c,"constructor",s),s.displayName="GeneratorFunction",yu(c,o,"GeneratorFunction"),yu(f),yu(f,o,"Generator"),yu(f,n,function(){return this}),yu(f,"toString",function(){return"[object Generator]"}),(mu=function(){return{w:i,m:d}})()}function yu(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}yu=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){yu(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},yu(e,t,r,n)}function bu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function vu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bu(Object(r),!0).forEach(function(t){gu(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bu(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function gu(e,t,r){return(t=function(e){var t=function(e){if("object"!=pu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=pu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pu(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wu(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Su(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Au(e){var t=(0,u.getContainingView)(e),r=e.rendererType;return{rendererType:r,rpcManager:(0,u.getSession)(t).rpcManager,renderProps:e.renderProps(),renderArgs:{assemblyName:t.displayedRegions[0].assemblyName,adapterConfig:structuredClone(e.adapterConfig),rendererType:r.name,regions:structuredClone(t.displayedRegions),blockDefinitions:e.blockDefinitions,sessionId:(0,Vo.getRpcSessionId)(e),timeout:1e6}}}function Ou(e,t){return xu.apply(this,arguments)}function xu(){var e;return e=mu().m(function e(t,r){var n,o,i,a,l,s,c,u,f,d;return mu().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}throw new Error("cannot render with no props");case 1:if(o=t.rendererType,i=t.rpcManager,a=t.cannotBeRenderedReason,l=t.renderArgs,s=t.renderProps,c=t.exportSVG,!a){e.n=2;break}return e.a(2,{message:a});case 2:if(s.radius&&null!==(n=l.regions)&&void 0!==n&&n.length){e.n=3;break}return e.a(2,{message:"Skipping render"});case 3:return e.n=4,o.renderInClient(i,vu(vu(vu({},l),s),{},{exportSVG:c,stopToken:r}));case 4:return u=e.v,f=u.html,d=wu(u,hu),e.a(2,{html:f,data:d,reactElement:d.reactElement,renderingComponent:o.ReactComponent})}},e)}),xu=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Su(i,n,o,a,l,"next",e)}function l(e){Su(i,n,o,a,l,"throw",e)}a(void 0)})},xu.apply(this,arguments)}var ku=o(14041);function Cu(e){return Cu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cu(e)}function Pu(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Eu(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Eu(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Eu(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Eu(f,"constructor",c),Eu(c,"constructor",s),s.displayName="GeneratorFunction",Eu(c,o,"GeneratorFunction"),Eu(f),Eu(f,o,"Generator"),Eu(f,n,function(){return this}),Eu(f,"toString",function(){return"[object Generator]"}),(Pu=function(){return{w:i,m:d}})()}function Eu(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Eu=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Eu(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Eu(e,t,r,n)}function ju(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Tu(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ju(i,n,o,a,l,"next",e)}function l(e){ju(i,n,o,a,l,"throw",e)}a(void 0)})}}function _u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ru(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_u(Object(r),!0).forEach(function(t){Mu(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Mu(e,t,r){return(t=function(e){var t=function(e){if("object"!=Cu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Cu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cu(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Iu(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Nu(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nu(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function Nu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Du=_.types.compose("BaseChordDisplay",fo.BaseDisplay,_.types.model({bezierRadiusRatio:.1,assemblyName:_.types.maybe(_.types.string),configuration:(0,s.ConfigurationReference)(du)})).volatile(function(){return{filled:!1,reactElement:void 0,data:void 0,html:void 0,message:"",renderingComponent:void 0,refNameMap:void 0}}).actions(function(e){var t=(0,u.getEnv)(e).pluginManager,r=e;return{onChordClick:function(n){(0,s.getConf)(e,"onChordClick",{feature:n,track:r,pluginManager:t})}}}).views(function(e){return{get blockDefinitions(){var t=(0,u.getContainingView)(e).staticSlices;if(!e.refNameMap)return t;var r,n=structuredClone(t),o=Iu(n);try{for(o.s();!(r=o.n()).done;){var i,a=r.value,l=Iu(a.region.elided?a.region.regions:[a.region]);try{for(l.s();!(i=l.n()).done;){var s=i.value,c=e.refNameMap[s.refName];c&&s.refName!==c&&(s.refName=c)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){o.e(e)}finally{o.f()}return n},renderProps:function(){var t=(0,u.getContainingView)(e);return Ru(Ru({},(0,Vo.getParentRenderProps)(e)),{},{rpcDriverName:e.rpcDriverName,bezierRadius:t.radiusPx*e.bezierRadiusRatio,radius:t.radiusPx,blockDefinitions:this.blockDefinitions,onChordClick:e.onChordClick})},get rendererType(){return(0,u.getEnv)(e).pluginManager.getRendererType(e.rendererTypeName)},get selectedFeatureId(){if((0,_.isAlive)(e)){var t=(0,u.getSession)(e).selection;return(0,u.isFeature)(t)?t.id():void 0}}}}).actions(function(e){return{renderStarted:function(){e.filled=!1,e.message="",e.reactElement=void 0,e.data=void 0,e.html=void 0,e.error=void 0,e.renderingComponent=void 0},renderSuccess:function(t){var r=t.message,n=t.data,o=t.reactElement,i=t.html,a=t.renderingComponent;r?(e.filled=!1,e.message=r,e.reactElement=void 0,e.data=void 0,e.html=void 0,e.error=void 0,e.renderingComponent=void 0):(e.filled=!0,e.message="",e.reactElement=o,e.data=n,e.html=i,e.error=void 0,e.renderingComponent=a)},renderError:function(t){console.error(t),e.filled=!1,e.message="",e.reactElement=void 0,e.html=void 0,e.data=void 0,e.error=t,e.renderingComponent=void 0},setRefNameMap:function(t){e.refNameMap=t}}}).actions(function(e){return{afterAttach:function(){(0,u.makeAbortableReaction)(e,Au,Ou,{name:"".concat(e.type," ").concat(e.id," rendering"),fireImmediately:!0},e.renderStarted,e.renderSuccess,e.renderError),(0,u.makeAbortableReaction)(e,function(){return{assemblyNames:(0,Vo.getTrackAssemblyNames)(e.parentTrack),adapter:(0,s.getConf)((0,_.getParent)(e,2),"adapter"),assemblyManager:(0,u.getSession)(e).assemblyManager}},function(){var t=Tu(Pu().m(function t(r,n){return Pu().w(function(t){for(;;)if(0===t.n)return t.a(2,r?r.assemblyManager.getRefNameMapForAdapter(r.adapter,r.assemblyNames[0],{stopToken:n,sessionId:(0,Vo.getRpcSessionId)(e)}):void 0)},t)}));return function(e,r){return t.apply(this,arguments)}}(),{name:"".concat(e.type," ").concat(e.id," getting refNames"),fireImmediately:!0},function(){},function(t){t&&e.setRefNameMap(t)},function(t){console.error(t),e.setError(t)})}}}).views(function(e){return{renderSvg:function(t){return Tu(Pu().m(function r(){var n,o;return Pu().w(function(r){for(;;)switch(r.n){case 0:return n=Au(e),r.n=1,Ou(Ru(Ru({},n),{},{exportSVG:t,theme:t.theme||n.renderProps.theme}));case 1:return o=r.v,r.a(2,ku.createElement(u.ReactRendering,{rendering:o}))}},r)}))()}}});function Fu(e){return Fu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fu(e)}function Lu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Gu(n.key),n)}}function zu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zu=function(){return!!e})()}function Bu(e){return Bu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bu(e)}function $u(e,t){return $u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$u(e,t)}function Gu(e){var t=function(e){if("object"!=Fu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Fu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fu(t)?t:t+""}var Hu=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Gu(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=Bu(n),e=function(e,t){if(t&&("object"==Fu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,zu()?Reflect.construct(n,o||[],Bu(r).constructor):n.apply(r,o))),"name","CircularViewPlugin"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$u(e,t)}(t,e),r=t,n=[{key:"install",value:function(e){!function(e){e.addViewType(function(){return new uo.A({ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,65876))}),stateModel:Jc(e),name:"CircularView",displayName:"Circular view"})})}(e),function(e){e.addToExtensionPoint("LaunchView-CircularView",function(){var e,t=(e=Zc().m(function e(t){var r,n,o,i,a,l,s,c,u,f;return Zc().w(function(e){for(;;)switch(e.n){case 0:return r=t.session,n=t.assembly,o=t.tracks,i=void 0===o?[]:o,a=r.assemblyManager,l=r.addView("CircularView",{}),e.n=1,(0,le.when)(function(){return l.initialized});case 1:if(n){e.n=2;break}throw new Error("No assembly provided when launching circular genome view");case 2:return e.n=3,a.waitForAssembly(n);case 3:if(s=e.v){e.n=4;break}throw new Error('Assembly "'.concat(n,'" not found when launching circular genome view'));case 4:l.setDisplayedRegions(s.regions||[]),c=eu(i);try{for(c.s();!(u=c.n()).done;)f=u.value,l.showTrack(f)}catch(e){c.e(e)}finally{c.f()}case 5:return e.a(2)}},e)}),function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ru(i,n,o,a,l,"next",e)}function l(e){ru(i,n,o,a,l,"throw",e)}a(void 0)})});return function(e){return t.apply(this,arguments)}}())}(e)}},{key:"configure",value:function(e){(0,u.isAbstractMenuManager)(e.rootModel)&&e.rootModel.appendToSubMenu(["Add"],{label:"Circular view",icon:Oc,onClick:function(e){e.addView("CircularView",{})}})}}],n&&Lu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we.A),Vu=o(88965);const Wu=_.types.model("AddConnectionModel",{id:fe.ElementId,type:_.types.literal("AddConnectionWidget")});var Uu=(0,s.ConfigurationSchema)("AddConnectionWidget",{}),qu=o(52743),Xu=o.n(qu);function Ku(e){return Ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ku(e)}function Yu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ju(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yu(Object(r),!0).forEach(function(t){Zu(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yu(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Zu(e,t,r){return(t=function(e){var t=function(e){if("object"!=Ku(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ku(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{return new URL(e),!0}catch(t){return e.startsWith("/")}}function ef(e){return _.types.model("AddTrackModel",{id:fe.ElementId,type:_.types.literal("AddTrackWidget"),view:_.types.safeReference(e.pluggableMstType("view","stateModel"))}).volatile(function(){return{trackSource:"fromFile",trackData:void 0,indexTrackData:void 0,altAssemblyName:"",altTrackName:"",altTrackType:"",adapterHint:"",textIndexTrack:!0,textIndexingConf:void 0,mixinData:{}}}).actions(function(e){return{setMixinData:function(t){e.mixinData=t},setAdapterHint:function(t){e.adapterHint=t},setTrackSource:function(t){e.trackSource=t},setTextIndexingConf:function(t){e.textIndexingConf=t},setTextIndexTrack:function(t){e.textIndexTrack=t},setTrackData:function(t){e.trackData=t},setIndexTrackData:function(t){e.indexTrackData=t},setAssembly:function(t){e.altAssemblyName=t},setTrackName:function(t){e.altTrackName=t},setTrackType:function(t){e.altTrackType=t},clearData:function(){e.trackSource="",e.altTrackName="",e.altTrackType="",e.altAssemblyName="",e.adapterHint="",e.indexTrackData=void 0,e.trackData=void 0,e.textIndexingConf=void 0,e.textIndexTrack=!0}}}).views(function(e){return{get trackAdapter(){var t=e.trackData,r=e.indexTrackData,n=e.adapterHint;return t?(0,Vo.guessAdapter)(t,r,n,e):void 0},get trackName(){return e.altTrackName||(e.trackData?(0,Vo.getFileName)(e.trackData):"")},get isFtp(){var t,r,n=e.trackData,o=e.indexTrackData;return!!(null!=o&&null!==(t=o.uri)&&void 0!==t&&t.startsWith("ftp://")||null!=n&&null!==(r=n.uri)&&void 0!==r&&r.startsWith("ftp://"))},get isRelativeTrackUrl(){var t,r=null===(t=e.trackData)||void 0===t?void 0:t.uri;return!!r&&!Qu(r)},get isRelativeIndexUrl(){var t,r=null===(t=e.indexTrackData)||void 0===t?void 0:t.uri;return!!r&&!Qu(r)},get isRelativeUrl(){return this.isRelativeIndexUrl||this.isRelativeTrackUrl},get trackHttp(){var t;return null===(t=e.trackData)||void 0===t||null===(t=t.uri)||void 0===t?void 0:t.startsWith("http://")},get indexHttp(){var t;return null===(t=e.indexTrackData)||void 0===t||null===(t=t.uri)||void 0===t?void 0:t.startsWith("http://")},get wrongProtocol(){return"https:"===window.location.protocol&&(this.trackHttp||this.indexHttp)},get unsupported(){var e;return(null===(e=this.trackAdapter)||void 0===e?void 0:e.type)===Vo.UNSUPPORTED},get assembly(){var t;return e.altAssemblyName||(null===(t=e.view.assemblyNames)||void 0===t?void 0:t[0])},get trackAdapterType(){var e;return null===(e=this.trackAdapter)||void 0===e?void 0:e.type},get trackType(){return e.altTrackType||(this.trackAdapterType?(0,Vo.guessTrackType)(this.trackAdapterType,e):"")}}}).views(function(e){return{getTrackConfig:function(t){var r=(0,u.getSession)(e),n=r.assemblyManager.get(e.assembly);return n&&e.trackAdapter&&"UNKNOWN"!==e.trackAdapter.type?Xu()({trackId:["".concat(e.trackName.toLowerCase().replaceAll(" ","_"),"-").concat(t),r.adminMode?"":"-sessionTrack"].join(""),type:e.trackType,name:e.trackName,assemblyNames:[e.assembly],adapter:Ju(Ju({},e.trackAdapter),{},{sequenceAdapter:(0,s.getConf)(n,["sequence","adapter"])})},e.mixinData):void 0},get warningMessage(){return e.isFtp?"Warning: JBrowse cannot access files using the ftp protocol":e.isRelativeUrl?"Warning: one or more of your files do not provide the protocol e.g.\n https://, please provide an absolute URL unless you are sure a\n relative URL is intended.":e.wrongProtocol?"Warning: You entered a http:// resources but we cannot access HTTP\n resources from JBrowse when it is running on https. Please use an\n https URL for your track, or access the JBrowse app from the http\n protocol":""}}})}var tf=(0,s.ConfigurationSchema)("AddTrackWidget",{});const rf=(0,s.ConfigurationSchema)("HierarchicalTrackSelectorWidget",{});var nf=o(19779);function of(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function af(e,t,r){return e.filter(function(e){return t.map(function(t){return r(t,e)}).filter(function(e){return!!e}).length>5})}function lf(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return sf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sf(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function sf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function cf(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e[0]===t[0])return!0;var r=new Set(e);return t.some(function(e){return r.has(e)})}function uf(e,t,r){var n=(0,s.readConfObject)(t,"category")||[],o=e.toLowerCase();return(0,Vo.getTrackName)(t,r).toLowerCase().includes(o)||!!n.filter(function(e){return e.toLowerCase().includes(o)}).length}function ff(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!1,i=lf(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.children.length?ff(a.children,t,n+1)&&n>0&&t.push(a.id):o=!0}}catch(e){i.e(e)}finally{i.f()}return o}function df(e,t){var r,n=lf(e);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.children.length&&t.push(o.id)}}catch(e){n.e(e)}finally{n.f()}}function pf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||mf(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hf(e){return function(e){if(Array.isArray(e))return yf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||mf(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mf(e,t){if(e){if("string"==typeof e)return yf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yf(e,t):void 0}}function yf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var bf=["category","adapter","description"];function vf(){return _.types.model("FacetedModel",{filterText:_.types.optional(_.types.string,""),showSparse:_.types.optional(_.types.boolean,function(){return(0,u.localStorageGetBoolean)("facet-showSparse",!1)}),showFilters:_.types.optional(_.types.boolean,function(){return(0,u.localStorageGetBoolean)("facet-showFilters",!0)}),showOptions:_.types.optional(_.types.boolean,function(){return(0,u.localStorageGetBoolean)("facet-showTableOptions",!1)}),panelWidth:_.types.optional(_.types.number,function(){return(0,u.localStorageGetNumber)("facet-panelWidth",400)})}).volatile(function(){return{visible:{},useShoppingCart:!1,filters:le.observable.map()}}).actions(function(e){return{setFilter:function(t,r){e.filters.set(t,r)},setPanelWidth:function(t){return e.panelWidth=t,e.panelWidth},setUseShoppingCart:function(t){e.useShoppingCart=t},setFilterText:function(t){e.filterText=t},setShowSparse:function(t){e.showSparse=t},setShowOptions:function(t){e.showOptions=t},setShowFilters:function(t){e.showFilters=t}}}).views(function(e){return{get allTrackConfigurations(){return(0,_.getParent)(e).allTrackConfigurations}}}).views(function(e){return{get rows(){var t=(0,u.getSession)(e),r=e.allTrackConfigurations,n=e.filterText;return r.filter(function(e){return uf(n,e,t)}).map(function(e){var r,n;return{id:e.trackId,conf:e,name:(0,Vo.getTrackName)(e,t),category:null===(r=(0,s.readConfObject)(e,"category"))||void 0===r?void 0:r.join(", "),adapter:null===(n=(0,s.readConfObject)(e,"adapter"))||void 0===n?void 0:n.type,description:(0,s.readConfObject)(e,"description"),metadata:(0,s.readConfObject)(e,"metadata")}})}}}).views(function(e){return{get filteredNonMetadataKeys(){return e.showSparse?bf:af(bf,e.rows,function(e,t){return e[t]})},get metadataKeys(){return hf(new Set(e.rows.flatMap(function(e){return t=e.metadata,Object.entries(t).map(function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return of(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?of(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0];return"string"==typeof n[1]?o:""}).filter(function(e){return!!e});var t})))},get filteredMetadataKeys(){return e.showSparse?this.metadataKeys:af(this.metadataKeys,e.rows,function(e,t){return e.metadata[t]})},get fields(){return["name"].concat(hf(this.filteredNonMetadataKeys),hf(this.filteredMetadataKeys.map(function(e){return"metadata.".concat(e)})))},get filteredRows(){var t=hf(e.filters.entries()).filter(function(e){return e[1].length>0}).map(function(e){var t=pf(e,2),r=t[0],n=t[1];return[r,new Set(n)]});return e.rows.filter(function(e){return t.every(function(t){var r=pf(t,2),n=r[0];return r[1].has((0,nf.a)(n,e))})})}}}).actions(function(e){return{setVisible:function(t){e.visible=t},afterAttach:function(){var t=this;(0,_.addDisposer)(e,(0,le.autorun)(function(){t.setVisible(Object.fromEntries(e.fields.map(function(e){return[e,!0]})))}))}}})}function gf(e,t){if(e){if("string"==typeof e)return wf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wf(e,t):void 0}}function wf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Sf(e){var t=e.model,r=e.trackConfs,n=e.extra,o=e.noCategories,i=e.menuItems,a={children:[]},l=t.collapsed,c=t.filterText,f=t.activeSortTrackNames,d=t.activeSortCategories,p=t.view;if(!p)return[];var h,m,y,b,v,g=(0,u.getSession)(t),w=p.tracks,S=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=gf(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}((m=r.filter(function(e){return uf(c,e,g)}),y=f,b=d,v=m.map(function(e){var t,r,n;return[e,(0,s.readConfObject)(e,"name"),(null===(t=(0,s.readConfObject)(e,"category"))||void 0===t?void 0:t[0])||"",(null===(r=(0,s.readConfObject)(e,"category"))||void 0===r?void 0:r[1])||"",(null===(n=(0,s.readConfObject)(e,"category"))||void 0===n?void 0:n[2])||""]}),y&&v.sort(function(e,t){return e[1].localeCompare(t[1])}),b&&v.sort(function(e,t){return e[2]!==t[2]?e[2].localeCompare(t[2]):e[3]!==t[3]?e[3].localeCompare(t[3]):e[4]!==t[4]?e[4].localeCompare(t[4]):0}),v.map(function(e){return e[0]})));try{var A=function(){var e=h.value,t=function(e){return function(e){if(Array.isArray(e))return wf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gf(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,s.readConfObject)(e,"category")||[]);e.trackId.endsWith("sessionTrack")&&t.unshift(" Session tracks");var r=a;if(!o)for(var c=function(){var e=t[u],o=r.children.find(function(t){return t.name===e}),a=[n,t.slice(0,u+1).join(",")].filter(function(e){return!!e}).join("-");if(o)r=o;else{var s={children:[],name:e,id:a,isOpenByDefault:!l.get(a),menuItems:i,type:"category"};r.children.push(s),r=s}},u=0;u<t.length;u++)c();var f=r.children.findIndex(function(e){return e.children.length}),d=-1===f?r.children.length:f;r.children.splice(d,0,{id:[n,e.trackId].filter(function(e){return!!e}).join(","),trackId:e.trackId,name:(0,Vo.getTrackName)(e,g),conf:e,checked:w.some(function(t){return t.configuration===e}),children:[],type:"track"})};for(S.s();!(h=S.n()).done;)A()}catch(e){S.e(e)}finally{S.f()}return a.children}function Af(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=xf(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function Of(e){return function(e){if(Array.isArray(e))return kf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xf(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xf(e,t){if(e){if("string"==typeof e)return kf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kf(e,t):void 0}}function kf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Cf(){return"undefined"!=typeof window?[window.location.pathname,new URLSearchParams(window.location.search).get("config")].filter(function(e){return!!e}).join("-"):"empty"}function Pf(e){return["recentlyUsedTracks",Cf(),e.join(",")].filter(function(e){return!!e}).join("-")}function Ef(){return"favoriteTracks-".concat(Cf(),"}")}function jf(e,t){return["collapsedCategories",Cf(),e.join(","),t].join("-")}function Tf(e,t){var r=(0,u.localStorageGetItem)(e);return null!=r&&r?JSON.parse(r):t}function _f(e,t){null!=t&&(0,u.localStorageSetItem)(e,JSON.stringify(t))}function Rf(e){return _.types.model("HierarchicalTrackSelectorWidget",{id:fe.ElementId,type:_.types.literal("HierarchicalTrackSelectorWidget"),view:_.types.safeReference(e.pluggableMstType("view","stateModel")),faceted:_.types.optional(vf(),{})}).volatile(function(){return{favorites:Tf(Ef(),[]),recentlyUsed:[],selection:[],sortTrackNames:Tf("sortTrackNames",void 0),sortCategories:Tf("sortCategories",void 0),collapsed:le.observable.map(),filterText:"",recentlyUsedCounter:0,favoritesCounter:0}}).views(function(e){return{get shownTrackIds(){var t;return new Set(null===(t=e.view)||void 0===t||null===(t=t.tracks)||void 0===t?void 0:t.map(function(e){return e.configuration.trackId}))},get selectionSet(){return new Set(e.selection)},get favoritesSet(){return new Set(e.favorites)},get recentlyUsedSet(){return new Set(e.recentlyUsed)},get assemblyNames(){var t;return(null===(t=e.view)||void 0===t?void 0:t.assemblyNames)||[]}}}).actions(function(e){return{setSortTrackNames:function(t){e.sortTrackNames=t},setSortCategories:function(t){e.sortCategories=t},setSelection:function(t){e.selection=t},addToSelection:function(t){e.selection=(0,u.dedupe)([].concat(Of(e.selection),Of(t)),function(e){return e.trackId})},removeFromSelection:function(t){var r=new Set(t);e.selection=e.selection.filter(function(e){return!r.has(e)})},clearSelection:function(){e.selection=[]},addToFavorites:function(t){e.favoritesCounter+=1,e.favorites=[].concat(Of(e.favorites),[t])},removeFromFavorites:function(t){e.favorites=e.favorites.filter(function(e){return e!==t})},clearFavorites:function(){e.favorites=[]},setRecentlyUsedCounter:function(t){e.recentlyUsedCounter=t},setRecentlyUsed:function(t){e.recentlyUsed=t},setFavorites:function(t){e.favorites=t},setFavoritesCounter:function(t){e.favoritesCounter=t},addToRecentlyUsed:function(t){e.recentlyUsed.includes(t)||(e.recentlyUsedCounter=Math.min(e.recentlyUsedCounter+1,10),e.recentlyUsed=e.recentlyUsed.length>=10?[].concat(Of(e.recentlyUsed.slice(1)),[t]):[].concat(Of(e.recentlyUsed),[t]))},clearRecentlyUsed:function(){e.recentlyUsed=[]},setView:function(t){e.view=t},toggleCategory:function(t){e.collapsed.set(t,!e.collapsed.get(t))},setCategoryCollapsed:function(t,r){e.collapsed.set(t,r)},expandAllCategories:function(){e.collapsed.clear()},setCollapsedCategories:function(t){e.collapsed.replace(t)},clearFilterText:function(){e.filterText=""},setFilterText:function(t){e.filterText=t}}}).views(function(t){return{isSelected:function(e){return t.selectionSet.has(e)},isFavorite:function(e){return t.favoritesSet.has(e)},isRecentlyUsed:function(e){return t.recentlyUsedSet.has(e)},getRefSeqTrackConf:function(r){var n=(0,u.getSession)(t).assemblyManager.get(r),o=null==n?void 0:n.configuration.sequence,i=e.getViewType(t.view.type);if(o){var a,l=Af(o.displays);try{var s,c=function(){var e=a.value;if(i.displayTypes.some(function(t){return t.name===e.type}))return{v:o}};for(l.s();!(a=l.n()).done;)if(s=c())return s.v}catch(e){l.e(e)}finally{l.f()}}}}}).views(function(e){return{get activeSortTrackNames(){var t;return null!==(t=e.sortTrackNames)&&void 0!==t?t:(0,s.getConf)((0,u.getSession)(e),["hierarchical","sort","trackNames"])},get activeSortCategories(){var t;return null!==(t=e.sortCategories)&&void 0!==t?t:(0,s.getConf)((0,u.getSession)(e),["hierarchical","sort","categories"])},get configAndSessionTrackConfigurations(){return[].concat(Of(e.assemblyNames.map(function(t){return e.getRefSeqTrackConf(t)})),Of(function(e,t){var r=(0,u.getSession)(t).assemblyManager,n=(0,u.getEnv)(t).pluginManager,o=t.view;if(!o)return[];var i=t.assemblyNames.map(function(e){return r.get(e)}).filter(u.notEmpty);return e.filter(function(e){var t=(0,s.readConfObject)(e,"assemblyNames"),n=null==t?void 0:t.map(function(e){return r.get(e)}).filter(u.notEmpty);return o.trackSelectorAnyOverlap?cf(n,i):function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=new Set(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);return e.every(function(e){return t.has(e)})}(n,i)}).filter(function(e){return cf(n.getViewType(o.type).displayTypes.map(function(e){return e.name}),e.displays.map(function(e){return e.type}))})}((0,u.getSession)(e).tracks,e))).filter(u.notEmpty)},get allTrackConfigurations(){var t=(0,u.getSession)(e).connectionInstances,r=void 0===t?[]:t;return[].concat(Of(this.configAndSessionTrackConfigurations),Of(r.flatMap(function(e){return e.tracks})))},get allTrackConfigurationTrackIdSet(){return new Map(this.allTrackConfigurations.map(function(e){return[e.trackId,e]}))}}}).views(function(e){return{get favoriteTracks(){return e.favorites.filter(function(t){return e.allTrackConfigurationTrackIdSet.has(t)}).map(function(t){return e.allTrackConfigurationTrackIdSet.get(t)})},get recentlyUsedTracks(){return e.recentlyUsed.filter(function(t){return e.allTrackConfigurationTrackIdSet.has(t)}).map(function(t){return e.allTrackConfigurationTrackIdSet.get(t)})}}}).views(function(e){return{get allTracks(){var t=(0,u.getSession)(e).connectionInstances,r=void 0===t?[]:t;return[{group:"Tracks",tracks:e.configAndSessionTrackConfigurations,noCategories:!1,menuItems:[]}].concat(Of(r.flatMap(function(e){return{group:(0,s.getConf)(e,"name"),tracks:e.tracks,noCategories:!1,menuItems:[]}})))}}}).views(function(e){return{get hierarchy(){return{name:"Root",id:"Root",isOpenByDefault:!0,type:"category",children:e.allTracks.map(function(t){return{name:t.group,id:t.group,type:"category",isOpenByDefault:!e.collapsed.get(t.group),menuItems:t.menuItems,children:Sf({model:e,trackConfs:t.tracks,extra:t.group,noCategories:t.noCategories})}})}}}}).actions(function(e){return{collapseSubCategories:function(){var t=[];ff(e.hierarchy.children,t);for(var r=0,n=t;r<n.length;r++){var o=n[r];e.setCategoryCollapsed(o,!0)}},collapseTopLevelCategories:function(){var t,r=[],n=Af(e.hierarchy.children);try{for(n.s();!(t=n.n()).done;){var o=t.value;o.children.length&&df(o.children,r)}}catch(e){n.e(e)}finally{n.f()}for(var i=0,a=r;i<a.length;i++){var l=a[i];e.setCategoryCollapsed(l,!0)}}}}).views(function(e){return{get hasAnySubcategories(){return e.allTracks.some(function(e){return e.tracks.some(function(e){var t;return(null===(t=(0,s.readConfObject)(e,"category"))||void 0===t?void 0:t.length)>1})})}}}).actions(function(e){return{afterAttach:function(){(0,_.addDisposer)(e,(0,le.autorun)(function(){var t=e.assemblyNames,r=e.view;if(e.setRecentlyUsed(Tf(Pf(t),[])),r){var n=Tf(jf(t,r.type),void 0),o=["hierarchical","defaultCollapsed"],i=(0,u.getSession)(e);if(n)e.setCollapsedCategories(n);else{e.expandAllCategories(),(0,s.getConf)(i,[].concat(o,["topLevelCategories"]))&&e.collapseTopLevelCategories(),(0,s.getConf)(i,[].concat(o,["subCategories"]))&&e.collapseSubCategories();var a,l=Af((0,s.getConf)(i,[].concat(o,["categoryNames"])));try{for(l.s();!(a=l.n()).done;){var c=a.value;e.setCategoryCollapsed("Tracks-".concat(c),!0)}}catch(e){l.e(e)}finally{l.f()}}}})),(0,_.addDisposer)(e,(0,le.autorun)(function(){var t=e.sortTrackNames,r=e.sortCategories,n=e.favorites,o=e.recentlyUsed,i=e.assemblyNames,a=e.collapsed,l=e.view;_f(Pf(i),o),_f(Ef(),n),_f("sortTrackNames",t),_f("sortCategories",r),l&&_f(jf(i,l.type),a)}))}}})}function Mf(e){return _.types.model("PluginStoreModel",{id:fe.ElementId,type:_.types.literal("PluginStoreWidget"),filterText:"",view:_.types.safeReference(e.pluggableMstType("view","stateModel"))}).actions(function(e){return{clearFilterText:function(){e.filterText=""},setFilterText:function(t){e.filterText=t}}})}var If=(0,s.ConfigurationSchema)("PluginStoreWidget",{});function Nf(e){return Nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nf(e)}function Df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ff(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Df(Object(r),!0).forEach(function(t){Lf(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Df(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Lf(e,t,r){return(t=function(e){var t=function(e){if("object"!=Nf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Nf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zf=(0,s.ConfigurationSchema)("UCSCTrackHubConnection",{hubTxtLocation:{type:"fileLocation",defaultValue:{uri:"http://mysite.com/path/to/hub.txt",locationType:"UriLocation"},description:"location of the hub file (usually called hub.txt)"},assemblyNames:{type:"stringArray",defaultValue:[],description:"optional list of genomes to import from this track hub, if empty all genomes will be imported"}},{baseConfiguration:fo.baseConnectionConfig,preProcessSnapshot:function(e){return e.uri?Ff(Ff({},e),{},{hubTxtLocation:{uri:e.uri,baseUri:e.baseUri}}):e}});function Bf(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return $f(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):($f(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,$f(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,$f(f,"constructor",c),$f(c,"constructor",s),s.displayName="GeneratorFunction",$f(c,o,"GeneratorFunction"),$f(f),$f(f,o,"Generator"),$f(f,n,function(){return this}),$f(f,"toString",function(){return"[object Generator]"}),(Bf=function(){return{w:i,m:d}})()}function $f(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}$f=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){$f(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},$f(e,t,r,n)}function Gf(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Hf(e){return _.types.compose("UCSCTrackHubConnection",(0,fo.BaseConnectionModelFactory)(e),_.types.model({configuration:(0,s.ConfigurationReference)(zf),type:_.types.literal("UCSCTrackHubConnection")})).actions(function(e){return{connect:function(){return(t=Bf().m(function t(){return Bf().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then(o.bind(o,70960));case 1:(0,t.v.doConnect)(e);case 2:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(e){Gf(i,n,o,a,l,"next",e)}function l(e){Gf(i,n,o,a,l,"throw",e)}a(void 0)})})();var t}}})}function Vf(e){return Vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vf(e)}function Wf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Yf(n.key),n)}}function Uf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Uf=function(){return!!e})()}function qf(e){return qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qf(e)}function Xf(e,t){return Xf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xf(e,t)}function Kf(e,t,r){return(t=Yf(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yf(e){var t=function(e){if("object"!=Vf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Vf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vf(t)?t:t+""}var Jf=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,59760))}),Zf=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return Kf((r=this,n=t,o=[].concat(a),n=qf(n),e=function(e,t){if(t&&("object"==Vf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Uf()?Reflect.construct(n,o||[],qf(r).constructor):n.apply(r,o))),"name","DataManagementPlugin"),Kf(e,"exports",{AssemblyManager:Jf}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xf(e,t)}(t,e),r=t,(n=[{key:"install",value:function(e){!function(e){e.addConnectionType(function(){return new Ce.ConnectionType({name:"UCSCTrackHubConnection",configSchema:zf,stateModel:Hf(e),displayName:"UCSC Track Hub",description:"A track or assembly hub in the Track Hub format",url:"https://genome.ucsc.edu/goldenPath/help/hgTrackHubHelp.html#Intro"})})}(e),function(e){e.addWidgetType(function(){return new Ce.WidgetType({name:"AddTrackWidget",heading:"Add a track",configSchema:tf,stateModel:ef(e),ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,41157))})})})}(e),function(e){e.addWidgetType(function(){return new Ce.WidgetType({name:"HierarchicalTrackSelectorWidget",heading:"Available tracks",configSchema:rf,stateModel:Rf(e),ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,20673))})})})}(e),function(e){e.addWidgetType(function(){return new Ce.WidgetType({name:"AddConnectionWidget",heading:"Add a connection",configSchema:Uu,stateModel:Wu,ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,74448))})})})}(e),function(e){e.addWidgetType(function(){return new Ce.WidgetType({name:"PluginStoreWidget",heading:"Plugin store",configSchema:If,stateModel:Mf(e),ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,28973))})})})}(e)}},{key:"configure",value:function(e){}}])&&Wf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we.A);function Qf(e){return Qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qf(e)}function ed(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function td(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ed(Object(r),!0).forEach(function(t){rd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ed(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function rd(e,t,r){return(t=function(e){var t=function(e){if("object"!=Qf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Qf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const nd=(0,s.ConfigurationSchema)("BgzipFastaAdapter",{fastaLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/seq.fa.gz",locationType:"UriLocation"}},faiLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/seq.fa.gz.fai",locationType:"UriLocation"}},metadataLocation:{description:"Optional metadata file",type:"fileLocation",defaultValue:{uri:"/path/to/fa.metadata.yaml",locationType:"UriLocation"}},gziLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/seq.fa.gz.gzi",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?td(td({},e),{},{fastaLocation:{uri:e.uri,baseUri:e.baseUri},faiLocation:{uri:"".concat(e.uri,".fai"),baseUri:e.baseUri},gziLocation:{uri:"".concat(e.uri,".gzi"),baseUri:e.baseUri}}):e}});function od(e){return od="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},od(e)}function id(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ad(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?id(Object(r),!0).forEach(function(t){ld(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):id(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ld(e,t,r){return(t=function(e){var t=function(e){if("object"!=od(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=od(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==od(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const sd=(0,s.ConfigurationSchema)("ChromSizesAdapter",{chromSizesLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/species.chrom.sizes",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?ad(ad({},e),{},{chromSizesLocation:{uri:e.uri,baseUri:e.baseUri}}):e}});var cd=o(14041);function ud(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||fd(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fd(e,t){if(e){if("string"==typeof e)return dd(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dd(e,t):void 0}}function dd(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function pd(e){for(var t,r,n=e.codonTable,o=e.seq,i=e.frame,l=e.width,s=e.bpPerPx,c=e.colorByCDS,f=e.region,d=e.seqStart,p=e.height,h=e.y,m=e.reverse,y=void 0!==m&&m,b=(Math.abs(i)-1-d%3+3)%3,v=(0,F.A)(),g=o.length-b,w=g-g%3,S=o.slice(b,b+w),A=[],O=0;O<S.length;O+=3){var x=S.slice(O,O+3),k=y?(0,u.revcom)(x):x,C=n[k]||"";A.push({letter:C,codon:k.toUpperCase()})}var P=1/s*3,E=1/s>=12,j=b/s-(f.start-d)/s,T="dark"===v.palette.mode?"dark":"main",_=c?null===(t=v.palette.framesCDS.at(i))||void 0===t?void 0:t[T]:null===(r=v.palette.frames.at(i))||void 0===r?void 0:r[T];return cd.createElement(cd.Fragment,null,cd.createElement("rect",{x:0,y:h,width:l,height:p,fill:_}),A.map(function(e,t){var r=f.reversed?l-(t+1)*P-j:P*t+j,n=e.letter,o=e.codon,i=u.defaultStarts.includes(o)?v.palette.startCodon:u.defaultStops.includes(o)?v.palette.stopCodon:void 0;return E||i?cd.createElement(a.Fragment,{key:"".concat(t,"-").concat(n)},cd.createElement("rect",{x:r,y:h,width:E?P:P+.7,height:p,stroke:E?"#555":"none",fill:i||"none"}),E?cd.createElement("text",{x:r+P/2,fontSize:p-2,y:h+p/2,dominantBaseline:"middle",textAnchor:"middle"},n):null):null}))}function hd(e){var t=e.bpPerPx,r=e.region,n=e.feature,o=e.sequenceType,i=e.height,l=e.seq,s=e.y,c=1/t>=12,f=n.get("start"),d=n.get("end"),p=ud((0,u.bpSpanPx)(f,d,r,t),2),h=p[0],m=p[1],y=r.reversed,b=d-f,v=Math.max((m-h)/b,.8),g=(0,F.A)();return cd.createElement(cd.Fragment,null,l.split("").map(function(e,t){var r="dna"===o?g.palette.bases[e.toUpperCase()]:void 0,n="dark"===g.palette.mode,l=y?m-(t+1)*v:h+t*v;return cd.createElement(a.Fragment,{key:"".concat(e,"-").concat(t)},cd.createElement("rect",{x:l,y:s,width:v,height:i,fill:r?n?r.dark:r.main:"#aaa",stroke:c?"#555":"none"}),c?cd.createElement("text",{x:l+v/2,y:s+i/2,dominantBaseline:"middle",textAnchor:"middle",fontSize:i-2,fill:r?g.palette.getContrastText(r.main):"black"},e):null)}))}function md(e){var t,r=e.regions,n=e.width,o=e.colorByCDS,i=e.features,a=void 0===i?new Map:i,l=e.showReverse,s=void 0===l||l,c=e.showForward,f=void 0===c||c,d=e.showTranslation,p=void 0===d||d,h=e.sequenceType,m=void 0===h?"dna":h,y=e.bpPerPx,b=e.rowHeight,v=r[0],g=(0,u.generateCodonTable)(u.defaultCodonTable),w=(t=a.values(),function(e){if(Array.isArray(e))return dd(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||fd(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];if(!w)return null;var S=w.get("seq");if(!S)return null;var A=-b,O=y<=1,x=p&&f?[3,2,1]:[],k=p&&s?[-1,-2,-3]:[],C=ud(v.reversed?[k.toReversed(),x.toReversed()]:[x,k],2),P=C[0],E=C[1];return cd.createElement(cd.Fragment,null,P.map(function(e){return cd.createElement(pd,{key:"translation-".concat(e),width:n,colorByCDS:o,seq:S,y:A+=b,codonTable:g,frame:e,bpPerPx:y,region:v,seqStart:w.get("start"),height:b,reverse:v.reversed})}),f&&O?cd.createElement(hd,{height:b,sequenceType:m,y:A+=b,feature:w,region:v,seq:v.reversed?(0,u.complement)(S):S,bpPerPx:y}):null,s&&O?cd.createElement(hd,{height:b,sequenceType:m,y:A+=b,feature:w,region:v,seq:v.reversed?S:(0,u.complement)(S),bpPerPx:y}):null,E.map(function(e){return cd.createElement(pd,{key:"rev-translation-".concat(e),width:n,colorByCDS:o,seq:S,y:A+=b,codonTable:g,frame:e,bpPerPx:y,region:v,seqStart:w.get("start"),height:b,reverse:!v.reversed})}))}function yd(e){var t=e.exportSVG,r=e.width,n=e.totalHeight,o=e.children;return t?o:cd.createElement("svg",{"data-testid":"sequence_track",width:r,height:n,style:{display:"block",width:r,height:n,userSelect:"none"}},o)}const bd=(0,T.observer)(function(e){var t=e.exportSVG,r=e.features,n=e.regions,o=e.colorByCDS,i=e.bpPerPx,a=e.rowHeight,l=e.sequenceHeight,s=e.showForward,c=e.showReverse,u=e.showTranslation,f=n[0],d=Math.ceil((f.end-f.start)/i);return cd.createElement(yd,{exportSVG:t,totalHeight:l,width:d},cd.createElement(md,{width:d,showReverse:c,showForward:s,showTranslation:u,colorByCDS:o,bpPerPx:i,rowHeight:a,features:r,regions:n}))}),vd=(0,s.ConfigurationSchema)("DivSequenceRenderer",{height:{type:"number",description:"height in pixels of each line of sequence",defaultValue:16}},{explicitlyTyped:!0});function gd(e){return gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gd(e)}function wd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Sd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wd(Object(r),!0).forEach(function(t){Cd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wd(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ad(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Pd(n.key),n)}}function Od(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Od=function(){return!!e})()}function xd(e){return xd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xd(e)}function kd(e,t){return kd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kd(e,t)}function Cd(e,t,r){return(t=Pd(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pd(e){var t=function(e){if("object"!=gd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=gd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gd(t)?t:t+""}var Ed=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return Cd((r=this,n=t,o=[].concat(a),n=xd(n),e=function(e,t){if(t&&("object"==gd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Od()?Reflect.construct(n,o||[],xd(r).constructor):n.apply(r,o))),"supportsSVG",!0),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kd(e,t)}(t,e),r=t,(n=[{key:"getExpandedRegion",value:function(e){return Sd(Sd({},e),{},{start:Math.max(e.start-3,0),end:e.end+3})}}])&&Ad(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(mo.default);function jd(e){return jd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jd(e)}function Td(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Td(Object(r),!0).forEach(function(t){Rd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Td(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Rd(e,t,r){return(t=function(e){var t=function(e){if("object"!=jd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=jd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jd(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Md=(0,s.ConfigurationSchema)("IndexedFastaAdapter",{fastaLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/seq.fa",locationType:"UriLocation"}},faiLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/seq.fa.fai",locationType:"UriLocation"}},metadataLocation:{description:"Optional metadata file",type:"fileLocation",defaultValue:{uri:"/path/to/fa.metadata.yaml",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?_d(_d({},e),{},{fastaLocation:{uri:e.uri,baseUri:e.baseUri},faiLocation:{uri:"".concat(e.uri,".fai"),baseUri:e.baseUri}}):e}});var Id=o(59519),Nd=(0,s.ConfigurationSchema)("LinearReferenceSequenceDisplay",{renderer:vd},{explicitIdentifier:"displayId",explicitlyTyped:!0});function Dd(e){return Dd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dd(e)}function Fd(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ld(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function zd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ld(Object(r),!0).forEach(function(t){Bd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ld(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Bd(e,t,r){return(t=function(e){var t=function(e){if("object"!=Dd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Dd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dd(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $d(e){e.addDisplayType(function(){var e,t=(e=Nd,_.types.compose("LinearReferenceSequenceDisplay",Id.Lr,_.types.model({type:_.types.literal("LinearReferenceSequenceDisplay"),configuration:(0,s.ConfigurationReference)(e),showForward:!0,showReverse:!0,showTranslation:!0})).volatile(function(){return{rowHeight:15}}).views(function(e){return{get sequenceType(){return(0,s.getConf)((0,u.getContainingTrack)(e),"sequenceType")},get showForwardActual(){return e.showForward},get showReverseActual(){return"dna"===this.sequenceType&&e.showReverse},get showTranslationActual(){return"dna"===this.sequenceType&&e.showTranslation}}}).views(function(e){return{get sequenceHeight(){var t=e.rowHeight,r=e.showTranslationActual,n=e.showReverseActual,o=e.showForwardActual;return(n&&r?3*t:0)+(o&&r?3*t:0)+(n?t:0)+(o?t:0)}}}).views(function(e){var t=e.renderProps;return{renderProps:function(){var r=e.rpcDriverName,n=e.showForwardActual,o=e.showReverseActual,i=e.showTranslationActual,a=e.rowHeight,l=e.sequenceHeight,s=e.sequenceType;return zd(zd(zd({},t()),(0,Vo.getParentRenderProps)(e)),{},{config:e.configuration.renderer,rpcDriverName:r,showForward:n,showReverse:o,showTranslation:i,sequenceType:s,rowHeight:a,sequenceHeight:l})}}}).views(function(e){return{regionCannotBeRendered:function(){return(0,u.getContainingView)(e).bpPerPx>3?"Zoom in to see sequence":void 0},get rendererTypeName(){return e.configuration.renderer.type}}}).actions(function(e){return{toggleShowForward:function(){e.showForward=!e.showForward},toggleShowReverse:function(){e.showReverse=!e.showReverse},toggleShowTranslation:function(){e.showTranslation=!e.showTranslation},afterAttach:function(){(0,_.addDisposer)(e,(0,le.autorun)(function(){(0,u.getContainingView)(e).bpPerPx>3?e.setHeight(50):e.setHeight(e.sequenceHeight)}))}}}).views(function(e){return{trackMenuItems:function(){return function(e){if(Array.isArray(e))return Fd(e)}(t="dna"===e.sequenceType?[{label:"Show forward",type:"checkbox",checked:e.showForward,onClick:function(){e.toggleShowForward()}},{label:"Show reverse",type:"checkbox",checked:e.showReverse,onClick:function(){e.toggleShowReverse()}},{label:"Show translation",type:"checkbox",checked:e.showTranslation,onClick:function(){e.toggleShowTranslation()}}]:[])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Fd(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fd(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var t}}}));return new Ce.DisplayType({name:"LinearReferenceSequenceDisplay",configSchema:Nd,stateModel:t,displayName:"Reference sequence display",trackType:"ReferenceSequenceTrack",viewType:"LinearGenomeView",ReactComponent:Id.GQ})})}function Gd(e){return Gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gd(e)}function Hd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Vd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Hd(Object(r),!0).forEach(function(t){Wd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hd(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Wd(e,t,r){return(t=function(e){var t=function(e){if("object"!=Gd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Gd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gd(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ud(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return qd(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qd(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function qd(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const Xd=(0,s.ConfigurationSchema)("SequenceSearchAdapter",{search:{type:"string",defaultValue:"",description:"Search string or regex to search for"},sequenceAdapter:{type:"frozen",defaultValue:null},searchForward:{type:"boolean",defaultValue:!0},searchReverse:{type:"boolean",defaultValue:!0},caseInsensitive:{type:"boolean",defaultValue:!0}},{explicitlyTyped:!0});function Kd(e){return Kd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kd(e)}function Yd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Jd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(r),!0).forEach(function(t){Zd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Zd(e,t,r){return(t=function(e){var t=function(e){if("object"!=Kd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Kd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kd(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Qd=(0,s.ConfigurationSchema)("TwoBitAdapter",{twoBitLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.2bit",locationType:"UriLocation"}},chromSizesLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/default.chrom.sizes",locationType:"UriLocation"},description:"An optional chrom.sizes file can be supplied to speed up loading since parsing the twobit file can take time"}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?Jd(Jd({},e),{},{twoBitLocation:{uri:e.uri,baseUri:e.baseUri}},e.chromSizes?{chromSizesLocation:{uri:e.chromSizes,baseUri:e.baseUri}}:{}):e}});function ep(e){return ep="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ep(e)}function tp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function rp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tp(Object(r),!0).forEach(function(t){np(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tp(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function np(e,t,r){return(t=function(e){var t=function(e){if("object"!=ep(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ep(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ep(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const op=(0,s.ConfigurationSchema)("UnindexedFastaAdapter",{rewriteRefNames:{type:"string",defaultValue:"",contextVariable:["refName"]},fastaLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/seq.fa",locationType:"UriLocation"}},metadataLocation:{description:"Optional metadata file",type:"fileLocation",defaultValue:{uri:"/path/to/fa.metadata.yaml",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?rp(rp({},e),{},{fastaLocation:{uri:e.uri,baseUri:e.baseUri}}):e}});function ip(e){return ip="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ip(e)}function ap(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,up(n.key),n)}}function lp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lp=function(){return!!e})()}function sp(e){return sp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sp(e)}function cp(e,t){return cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cp(e,t)}function up(e){var t=function(e){if("object"!=ip(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ip(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ip(t)?t:t+""}var fp=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=up(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=sp(n),e=function(e,t){if(t&&("object"==ip(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,lp()?Reflect.construct(n,o||[],sp(r).constructor):n.apply(r,o))),"name","SequencePlugin"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cp(e,t)}(t,e),r=t,(n=[{key:"install",value:function(e){!function(e){e.addRendererType(function(){return new Ed({name:"DivSequenceRenderer",ReactComponent:bd,configSchema:vd,pluginManager:e})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"TwoBitAdapter",displayName:"TwoBit adapter",configSchema:Qd,adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,19370)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"BgzipFastaAdapter",displayName:"Bgzip-indexed FASTA adapter",configSchema:nd,adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,90269)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"ChromSizesAdapter",displayName:"Chrom sizes adapter",configSchema:sd,adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,50121)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"IndexedFastaAdapter",displayName:"Indexed FASTA adapter",configSchema:Md,adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,65365)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"UnindexedFastaAdapter",displayName:"Unindexed FASTA adapter",configSchema:op,adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,27233)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"SequenceSearchAdapter",displayName:"Sequence search adapter",adapterMetadata:{hiddenFromGUI:!0},configSchema:Xd,getAdapterClass:function(){return Promise.resolve().then(o.bind(o,97025)).then(function(e){return e.default})}})})}(e),function(e){e.addTrackType(function(){var t=function(e){return(0,s.ConfigurationSchema)("ReferenceSequenceTrack",{adapter:e.pluggableConfigSchemaType("adapter"),displays:_.types.array(e.pluggableConfigSchemaType("display")),name:{type:"string",description:'optional track name, otherwise uses the "Reference sequence (assemblyName)"',defaultValue:""},sequenceType:{type:"string",description:"either dna or pep",defaultValue:"dna"},description:{description:"a description of the track",type:"string",defaultValue:""},metadata:{type:"frozen",description:"anything to add about this track",defaultValue:{}},formatAbout:(0,s.ConfigurationSchema)("FormatAbout",{config:{type:"frozen",description:"formats configuration in about dialog",defaultValue:{},contextVariable:["config"]},hideUris:{type:"boolean",defaultValue:!1}})},{preProcessSnapshot:function(t){var r=JSON.parse(JSON.stringify(t)),n=new Set,o=r.displays,i=void 0===o?[]:o;if("placeholderId"!==r.trackId){var a,l=Ud(i);try{for(l.s();!(a=l.n()).done;){var s=a.value;s&&n.add(s.type)}}catch(e){l.e(e)}finally{l.f()}var c,u=e.getTrackType(r.type),f=Ud((null==u?void 0:u.displayTypes)||[]);try{for(f.s();!(c=f.n()).done;){var d=c.value;n.has(d.name)||i.push({displayId:"".concat(r.trackId,"-").concat(d.name),type:d.name})}}catch(e){f.e(e)}finally{f.f()}}return Vd(Vd({},r),{},{displays:i})},explicitIdentifier:"trackId",explicitlyTyped:!0,actions:function(e){return{addDisplayConf:function(t){var r=t.type;if(!r)throw new Error("unknown display type ".concat(r));var n=e.displays.find(function(e){return e&&e.displayId===t.displayId});if(n)return n;var o=e.displays.push(t);return e.displays[o-1]}}}})}(e);return new co.A({name:"ReferenceSequenceTrack",displayName:"Reference sequence track",configSchema:t,stateModel:(0,fo.createBaseTrackModel)(e,"ReferenceSequenceTrack",t)})})}(e),$d(e),function(e){e.addToExtensionPoint("Core-guessAdapterForLocation",function(e){return function(t,r,n){var o="TwoBitAdapter",i=(0,Vo.getFileName)(t),a={type:o,twoBitLocation:t};return/\.2bit$/i.test(i)&&!n||n===o?a:e(t,r,n)}}),e.addToExtensionPoint("Core-guessTrackTypeForLocation",function(e){return function(t){return"TwoBitAdapter"===t?"ReferenceSequenceTrack":e(t)}}),e.addToExtensionPoint("Core-guessAdapterForLocation",function(e){return function(t,r,n){var o="IndexedFastaAdapter",i=(0,Vo.getFileName)(t),a={type:o,fastaLocation:t,faiLocation:r||(0,Vo.makeIndex)(t,".fai")};return/\.(fa|fasta|fas|fna|mfa)$/i.test(i)&&!n||n===o?a:e(t,r,n)}}),e.addToExtensionPoint("Core-guessTrackTypeForLocation",function(e){return function(t){return"IndexedFastaAdapter"===t?"ReferenceSequenceTrack":e(t)}}),e.addToExtensionPoint("Core-guessAdapterForLocation",function(e){return function(t,r,n){var o="BgzipFastaAdapter",i=(0,Vo.getFileName)(t),a={type:o,faiLocation:(0,Vo.makeIndex)(t,".fai"),gziLocation:(0,Vo.makeIndex)(t,".gzi")};return/\.(fa|fasta|fas|fna|mfa)\.b?gz$/i.test(i)&&!n||n===o?a:e(t,r,n)}}),e.addToExtensionPoint("Core-guessTrackTypeForLocation",function(e){return function(t){return"BgzipFastaAdapter"===t?"ReferenceSequenceTrack":e(t)}})}(e)}}])&&ap(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we.A);function dp(e){return dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dp(e)}function pp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function hp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pp(Object(r),!0).forEach(function(t){mp(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pp(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function mp(e,t,r){return(t=function(e){var t=function(e){if("object"!=dp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=dp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dp(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yp(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return bp(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(bp(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,bp(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,bp(f,"constructor",c),bp(c,"constructor",s),s.displayName="GeneratorFunction",bp(c,o,"GeneratorFunction"),bp(f),bp(f,o,"Generator"),bp(f,n,function(){return this}),bp(f,"toString",function(){return"[object Generator]"}),(yp=function(){return{w:i,m:d}})()}function bp(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}bp=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){bp(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},bp(e,t,r,n)}function vp(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function gp(e){return _.types.compose("LinearVariantDisplay",(0,Id.bN)(e),_.types.model({type:_.types.literal("LinearVariantDisplay"),configuration:(0,s.ConfigurationReference)(e)})).actions(function(e){return{selectFeature:function(t){return(r=yp().m(function r(){var n,o,i,a,l,c,f;return yp().w(function(r){for(;;)switch(r.n){case 0:if(n=(0,u.getSession)(e),!(0,u.isSessionModelWithWidgets)(n)){r.n=2;break}return o=n.rpcManager,i=(0,Vo.getRpcSessionId)(e),a=(0,u.getContainingTrack)(e),l=(0,u.getContainingView)(e),c=(0,s.getConf)(a,"adapter"),r.n=1,o.call(i,"CoreGetMetadata",{adapterConfig:c});case 1:f=r.v,n.showWidget(n.addWidget("VariantFeatureWidget","variantFeature",{featureData:t.toJSON(),view:l,track:a,descriptions:f}));case 2:n.setSelection(t);case 3:return r.a(2)}},r)}),function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){vp(i,n,o,a,l,"next",e)}function l(e){vp(i,n,o,a,l,"throw",e)}a(void 0)})})();var r}}})}var wp=o(18183),Sp=o(10568);const Ap=(0,Tn.A)([(0,A.jsx)("path",{d:"m12 2-5.5 9h11z"},"0"),(0,A.jsx)("circle",{cx:"17.5",cy:"17.5",r:"4.5"},"1"),(0,A.jsx)("path",{d:"M3 13.5h8v8H3z"},"2")],"Category"),Op=(0,Tn.A)((0,A.jsx)("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),xp=(0,Tn.A)((0,A.jsx)("path",{d:"M13 6.99h3L12 3 8 6.99h3v10.02H8L12 21l4-3.99h-3z"}),"Height"),kp=(0,Tn.A)((0,A.jsx)("path",{d:"M18 4v5H6V4zm0-2H6c-1.1 0-2 .9-2 2v5c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 13v5H6v-5zm0-2H6c-1.1 0-2 .9-2 2v5c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2"}),"Splitscreen");var Cp=o(57323),Pp=o(38792),Ep=o.n(Pp);function jp(e){return jp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jp(e)}function Tp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tp(Object(r),!0).forEach(function(t){Rp(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tp(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Rp(e,t,r){return(t=function(e){var t=function(e){if("object"!=jp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=jp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jp(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ip(e){var t,r=e.sources,n=e.layout,o=void 0===n?r:n,i=e.renderingMode,a=e.sampleInfo,l=[],s=Object.fromEntries(r.map(function(e){return[e.name,e]})),c=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Mp(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mp(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(o);try{for(c.s();!(t=c.n()).done;){var u=t.value;if("phased"===i){var f=null==a?void 0:a[u.name];if(null!=f&&f.isPhased)for(var d=f.maxPloidy,p=0;p<d;p++){var h="".concat(u.name," HP").concat(p);l.push(_p(_p(_p({},s[u.name]),u),{},{label:h,HP:p,id:h}))}}else l.push(_p(_p(_p({},s[u.name]),u),{},{label:u.name,id:u.name}))}}catch(e){c.e(e)}finally{c.f()}return l}function Np(e){return Np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Np(e)}function Dp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Fp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Lp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fp(Object(r),!0).forEach(function(t){zp(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fp(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function zp(e,t,r){return(t=function(e){var t=function(e){if("object"!=Np(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Np(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Np(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Bp=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,71535))}),$p=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,33378))}),Gp=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,23736))}),Hp=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,26017))}),Vp=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,70823))});function Wp(e){return _.types.compose("LinearVariantMatrixDisplay",(0,Id.Gx)(e),_.types.model({type:_.types.literal("LinearVariantMatrixDisplay"),layout:_.types.optional(_.types.frozen(),[]),configuration:(0,s.ConfigurationReference)(e),minorAlleleFrequencyFilter:_.types.optional(_.types.number,0),showSidebarLabelsSetting:!0,renderingMode:_.types.optional(_.types.string,"alleleCount"),rowHeightSetting:_.types.optional(_.types.number,8),autoHeight:!0,lengthCutoffFilter:Number.MAX_SAFE_INTEGER,jexlFilters:_.types.maybe(_.types.array(_.types.string)),referenceDrawingMode:"skip"})).volatile(function(){return{sourcesLoadingStopToken:void 0,simplifiedFeaturesStopToken:void 0,featureUnderMouseVolatile:void 0,sourcesVolatile:void 0,featuresVolatile:void 0,hasPhased:!1,sampleInfo:void 0,hoveredGenotype:void 0}}).actions(function(e){return{setJexlFilters:function(t){e.jexlFilters=(0,_.cast)(t)},setRowHeight:function(t){e.rowHeightSetting=t},setHoveredGenotype:function(t){e.hoveredGenotype=t},setFeatures:function(t){e.featuresVolatile=t},setLayout:function(t){e.layout=t},clearLayout:function(){e.layout=[]},setSourcesLoading:function(t){e.sourcesLoadingStopToken&&(0,Sp.CF)(e.sourcesLoadingStopToken),e.sourcesLoadingStopToken=t},setSimplifiedFeaturesLoading:function(t){e.simplifiedFeaturesStopToken&&(0,Sp.CF)(e.simplifiedFeaturesStopToken),e.simplifiedFeaturesStopToken=t},setSources:function(t){Ep()(t,e.sourcesVolatile)||(e.sourcesVolatile=t)},setMafFilter:function(t){e.minorAlleleFrequencyFilter=t},setShowSidebarLabels:function(t){e.showSidebarLabelsSetting=t},setPhasedMode:function(t){e.renderingMode=t},setAutoHeight:function(t){e.autoHeight=t},setHasPhased:function(t){e.hasPhased=t},setSampleInfo:function(t){Ep()(t,e.sampleInfo)||(e.sampleInfo=t)},setReferenceDrawingMode:function(t){e.referenceDrawingMode=t}}}).views(function(e){return{get activeFilters(){var t;return null!==(t=e.jexlFilters)&&void 0!==t?t:(0,s.getConf)(e,"jexlFilters").map(function(e){return"jexl:".concat(e)})},get preSources(){return e.layout.length?e.layout:e.sourcesVolatile},get sourcesWithoutLayout(){return e.sourcesVolatile?Ip({sources:e.sourcesVolatile,renderingMode:e.renderingMode,sampleInfo:e.sampleInfo}):void 0},get sources(){var t=e.layout.length?e.layout:e.sourcesVolatile;return t?Ip({sources:t,renderingMode:e.renderingMode,sampleInfo:e.sampleInfo}):void 0}}}).views(function(e){var t=e.trackMenuItems,r=e.renderProps;return{get sourceMap(){return e.sources?Object.fromEntries(e.sources.map(function(e){return[e.name,e]})):void 0},get rowHeight(){var t=e.sources,r=e.autoHeight,n=e.rowHeightSetting,o=e.height;return r?o/((null==t?void 0:t.length)||1):n},adapterProps:function(){return Lp(Lp({},r()),{},{rpcDriverName:e.rpcDriverName,displayModel:e,config:e.rendererConfig})},trackMenuItems:function(){return[].concat(function(e){if(Array.isArray(e))return Dp(e)}(r=t())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Dp(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dp(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[{label:"Show sidebar labels",icon:Cp.A,type:"checkbox",checked:e.showSidebarLabelsSetting,onClick:function(){e.setShowSidebarLabels(!e.showSidebarLabelsSetting)}},{label:"Row height",icon:xp,subMenu:[{label:"Manually set row height",disabled:e.autoHeight,onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Vp,{model:e,handleClose:t}]})}},{label:"Auto-adjust to display height",type:"checkbox",checked:e.autoHeight,onClick:function(){e.setAutoHeight(!e.autoHeight)}}]},{label:"Rendering mode",icon:kp,subMenu:[{label:"Allele count",type:"radio",checked:"alleleCount"===e.renderingMode,onClick:function(){e.setPhasedMode("alleleCount")}},{label:"Phased".concat(e.hasPhased?"":" (disabled, no phased variants found)"),disabled:!e.hasPhased,checked:"phased"===e.renderingMode,type:"radio",onClick:function(){e.setPhasedMode("phased")}}]},{label:"Reference mode",type:"subMenu",subMenu:[{label:"Fill background grey, skip reference allele mouseovers (helps with large overlapping SVs)",type:"radio",checked:"skip"===e.referenceDrawingMode,onClick:function(){e.setReferenceDrawingMode("skip")}},{label:"Don't fill background grey, only draw actual reference alleles as grey",type:"radio",checked:"draw"===e.referenceDrawingMode,onClick:function(){e.setReferenceDrawingMode("draw")}}]},{label:"Filter by",icon:Op,subMenu:[{label:"Minor allele frequency",onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[$p,{model:e,handleClose:t}]})}},{label:"Edit filters",onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Gp,{model:e,handleClose:t}]})}}]},{label:"Cluster by genotype",icon:Ap,onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Hp,{model:e,handleClose:t}]})}},{label:"Edit group colors/arrangement...",onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Bp,{model:e,handleClose:t}]})}}]);var r}}}).views(function(e){return{get canDisplayLabels(){return e.rowHeight>=8&&e.showSidebarLabelsSetting},get totalHeight(){var t;return e.rowHeight*((null===(t=e.sources)||void 0===t?void 0:t.length)||1)},get featuresReady(){return!!e.featuresVolatile}}}).views(function(e){return{renderProps:function(){var t=e.adapterProps();return Lp(Lp({},t),{},{notReady:t.notReady||!e.sources||!e.featuresReady,height:e.height,totalHeight:e.totalHeight,renderingMode:e.renderingMode,minorAlleleFrequencyFilter:e.minorAlleleFrequencyFilter,lengthCutoffFilter:e.lengthCutoffFilter,rowHeight:e.rowHeight,sources:e.sources,scrollTop:e.scrollTop,referenceDrawingMode:e.referenceDrawingMode,filters:new wp.A({filters:e.activeFilters})})}}})}function Up(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return qp(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(qp(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,qp(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,qp(f,"constructor",c),qp(c,"constructor",s),s.displayName="GeneratorFunction",qp(c,o,"GeneratorFunction"),qp(f),qp(f,o,"Generator"),qp(f,n,function(){return this}),qp(f,"toString",function(){return"[object Generator]"}),(Up=function(){return{w:i,m:d}})()}function qp(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}qp=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){qp(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},qp(e,t,r,n)}function Xp(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Kp(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Xp(i,n,o,a,l,"next",e)}function l(e){Xp(i,n,o,a,l,"throw",e)}a(void 0)})}}const Yp=function(e){return _.types.compose("MultiLinearVariantDisplay",Wp(e),_.types.model({type:_.types.literal("MultiLinearVariantDisplay"),rowHeightSetting:_.types.optional(_.types.number,11),minorAlleleFrequencyFilter:_.types.optional(_.types.number,0)})).views(function(){return{get rendererTypeName(){return"MultiVariantRenderer"}}}).actions(function(e){var t=e.renderSvg;return{afterAttach:function(){Kp(Up().m(function t(){var r,n,i,a,l;return Up().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,Promise.resolve().then(o.bind(o,74437));case 1:return r=t.v,n=r.getMultiVariantSourcesAutorun,t.n=2,Promise.resolve().then(o.bind(o,65238));case 2:i=t.v,a=i.getMultiVariantFeaturesAutorun,n(e),a(e),t.n=4;break;case 3:t.p=3,l=t.v,(0,_.isAlive)(e)&&(console.error(l),(0,u.getSession)(e).notifyError("".concat(l),l));case 4:return t.a(2)}},t,null,[[0,3]])}))()},renderSvg:function(r){return Kp(Up().m(function n(){var i,a;return Up().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,Promise.resolve().then(o.bind(o,32751));case 1:return i=n.v,a=i.renderSvg,n.a(2,a(e,r,t))}},n)}))()}}})};var Jp=o(9121),Zp=o(49315),Qp=o(20808),eh=o(14041);function th(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rh(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rh(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var nh=(0,T.observer)(function(e){var t=e.model,r=t.lineZoneHeight,n=(0,a.useRef)(null),o=th((0,a.useState)(),2),i=o[0],l=o[1],s=th((0,a.useState)(),2),c=s[0],u=s[1];return eh.createElement("div",{ref:n,onMouseMove:function(e){var t,r=null===(t=n.current)||void 0===t?void 0:t.getBoundingClientRect(),o=(null==r?void 0:r.top)||0,i=(null==r?void 0:r.left)||0;l(e.clientY-o),u(e.clientX-i)},onMouseLeave:function(){l(void 0),u(void 0)}},eh.createElement("div",{style:{position:"relative"}},eh.createElement(Jp.A,{model:t}),eh.createElement("div",{style:{position:"absolute",top:r}},eh.createElement(Qp.A,{model:t}),eh.createElement(Id.GQ,e))),c&&i&&i>r?eh.createElement(Zp.A,{mouseX:c,mouseY:i,model:t}):null)});const oh=nh,ih=(0,s.ConfigurationSchema)("LinearVariantMatrixRenderer",{},{explicitlyTyped:!0});function ah(e){return ah="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ah(e)}function lh(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return sh(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(sh(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,sh(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,sh(f,"constructor",c),sh(c,"constructor",s),s.displayName="GeneratorFunction",sh(c,o,"GeneratorFunction"),sh(f),sh(f,o,"Generator"),sh(f,n,function(){return this}),sh(f,"toString",function(){return"[object Generator]"}),(lh=function(){return{w:i,m:d}})()}function sh(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}sh=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){sh(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},sh(e,t,r,n)}function ch(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function uh(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ch(i,n,o,a,l,"next",e)}function l(e){ch(i,n,o,a,l,"throw",e)}a(void 0)})}}function fh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function dh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fh(Object(r),!0).forEach(function(t){ph(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fh(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ph(e,t,r){return(t=function(e){var t=function(e){if("object"!=ah(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ah(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ah(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hh(e){return _.types.compose("LinearVariantMatrixDisplay",Wp(e),_.types.model({type:_.types.literal("LinearVariantMatrixDisplay"),rowHeightSetting:_.types.optional(_.types.number,1),lineZoneHeight:20})).views(function(e){return{get nrow(){var t;return(null===(t=e.sources)||void 0===t?void 0:t.length)||1},get blockType(){return"dynamicBlocks"},get totalHeight(){return e.autoHeight?e.height-e.lineZoneHeight:this.nrow*e.rowHeightSetting},get rowHeight(){return e.autoHeight?e.totalHeight/this.nrow:e.rowHeightSetting},get featuresReady(){return!!e.featuresVolatile}}}).views(function(e){return{renderProps:function(){var t=e.adapterProps();return dh(dh({},t),{},{notReady:t.notReady||!e.sources||!e.featuresReady,renderingMode:e.renderingMode,minorAlleleFrequencyFilter:e.minorAlleleFrequencyFilter,lengthCutoffFilter:e.lengthCutoffFilter,height:e.totalHeight,sources:e.sources})},get canDisplayLabels(){return e.rowHeight>8&&e.showSidebarLabelsSetting}}}).actions(function(e){return{setLineZoneHeight:function(t){return e.lineZoneHeight=(0,u.clamp)(t,10,1e3),e.lineZoneHeight}}}).actions(function(e){var t=e.renderSvg;return{setLineZoneHeight:function(t){return e.lineZoneHeight=(0,u.clamp)(t,10,1e3),e.lineZoneHeight},afterAttach:function(){uh(lh().m(function t(){var r,n,i,a,l;return lh().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,Promise.resolve().then(o.bind(o,74437));case 1:return r=t.v,n=r.getMultiVariantSourcesAutorun,t.n=2,Promise.resolve().then(o.bind(o,65238));case 2:i=t.v,a=i.getMultiVariantFeaturesAutorun,n(e),a(e),t.n=4;break;case 3:t.p=3,l=t.v,(0,_.isAlive)(e)&&(console.error(l),(0,u.getSession)(e).notifyError("".concat(l),l));case 4:return t.a(2)}},t,null,[[0,3]])}))()},renderSvg:function(r){return uh(lh().m(function n(){var i,a;return lh().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,Promise.resolve().then(o.bind(o,36094));case 1:return i=n.v,a=i.renderSvg,n.a(2,a(e,r,t))}},n)}))()}}})}var mh=["mafs"];function yh(e){return yh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yh(e)}function bh(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return vh(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(vh(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,vh(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,vh(f,"constructor",c),vh(c,"constructor",s),s.displayName="GeneratorFunction",vh(c,o,"GeneratorFunction"),vh(f),vh(f,o,"Generator"),vh(f,n,function(){return this}),vh(f,"toString",function(){return"[object Generator]"}),(bh=function(){return{w:i,m:d}})()}function vh(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}vh=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){vh(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},vh(e,t,r,n)}function gh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function wh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gh(Object(r),!0).forEach(function(t){jh(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gh(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Sh(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ah(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Oh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Th(n.key),n)}}function xh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xh=function(){return!!e})()}function kh(e,t,r,n){var o=Ch(Ph(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Ch(){return Ch="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ph(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Ch.apply(null,arguments)}function Ph(e){return Ph=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ph(e)}function Eh(e,t){return Eh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Eh(e,t)}function jh(e,t,r){return(t=Th(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Th(e){var t=function(e){if("object"!=yh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=yh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yh(t)?t:t+""}var _h=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return jh((r=this,n=t,o=[].concat(a),n=Ph(n),e=function(e,t){if(t&&("object"==yh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,xh()?Reflect.construct(n,o||[],Ph(r).constructor):n.apply(r,o))),"supportsSVG",!0),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eh(e,t)}(t,e),r=t,n=[{key:"render",value:(i=bh().m(function e(r){var n,i,a,l,s,c,f,d,p,h,m,y,b,v,g;return bh().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getFeatures(r);case 1:return n=e.v,i=r.height,a=r.sources,l=r.regions,s=r.bpPerPx,c=l[0],f=c.end,d=c.start,p=(f-d)/s,e.n=2,Promise.resolve().then(o.bind(o,48150));case 2:return h=e.v,m=h.makeImageData,e.n=3,(0,u.renderToAbstractCanvas)(p,i,r,function(e){return m({ctx:e,canvasWidth:p,canvasHeight:i,renderArgs:wh(wh({},r),{},{features:n,sources:a})})});case 3:return y=e.v,b=y.mafs,v=Sh(y,mh),e.n=4,kh(t,"render",this,3)([wh(wh(wh({},r),v),{},{features:n,height:i,width:p})]);case 4:return g=e.v,e.a(2,wh(wh(wh({},g),v),{},{features:new Map,simplifiedFeatures:b.map(function(e){var t=e.feature;return new u.SimpleFeature({id:t.id(),data:{start:t.get("start"),end:t.get("end"),refName:t.get("refName")}})}),height:i,width:p}))}},e,this)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){Ah(o,r,n,a,l,"next",e)}function l(e){Ah(o,r,n,a,l,"throw",e)}a(void 0)})},function(e){return a.apply(this,arguments)})}],n&&Oh(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(po.default),Rh=o(14041);const Mh=(0,T.observer)(function(e){var t=e.arr,r=e.width,n=e.height,o=e.displayModel,i=(0,a.useRef)(null);return Rh.createElement("div",{ref:i,onMouseMove:function(e){o.setHoveredGenotype(function(e,a){var l,s,c;if(i.current){var u=i.current.getBoundingClientRect(),f=e-u.left,d=a-u.top,p=t.length,h=(null===(l=t[0])||void 0===l?void 0:l.length)||0,m=null===(s=o.sources[Math.floor(d/n*h)])||void 0===s?void 0:s.name,y=null===(c=t[Math.floor(f/r*p)])||void 0===c?void 0:c[Math.floor(d/n*h)];return y&&m?{name:m,genotype:y}:void 0}}(e.clientX,e.clientY))},onMouseLeave:function(){o.setHoveredGenotype(void 0)},onMouseOut:function(){o.setHoveredGenotype(void 0)},style:{overflow:"visible",position:"relative",height:n}},Rh.createElement(c.PrerenderedCanvas,e))});function Ih(e){return Ih="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ih(e)}function Nh(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Dh(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Dh(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Dh(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Dh(f,"constructor",c),Dh(c,"constructor",s),s.displayName="GeneratorFunction",Dh(c,o,"GeneratorFunction"),Dh(f),Dh(f,o,"Generator"),Dh(f,n,function(){return this}),Dh(f,"toString",function(){return"[object Generator]"}),(Nh=function(){return{w:i,m:d}})()}function Dh(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Dh=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Dh(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Dh(e,t,r,n)}function Fh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Lh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fh(Object(r),!0).forEach(function(t){Uh(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fh(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function zh(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Bh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qh(n.key),n)}}function $h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($h=function(){return!!e})()}function Gh(e,t,r,n){var o=Hh(Vh(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Hh(){return Hh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Vh(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Hh.apply(null,arguments)}function Vh(e){return Vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vh(e)}function Wh(e,t){return Wh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wh(e,t)}function Uh(e,t,r){return(t=qh(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qh(e){var t=function(e){if("object"!=Ih(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ih(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ih(t)?t:t+""}var Xh=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return Uh((r=this,n=t,o=[].concat(a),n=Vh(n),e=function(e,t){if(t&&("object"==Ih(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,$h()?Reflect.construct(n,o||[],Vh(r).constructor):n.apply(r,o))),"supportsSVG",!0),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wh(e,t)}(t,e),r=t,n=[{key:"render",value:(i=Nh().m(function e(r){var n,i,a,l,s,c,f,d,p,h,m;return Nh().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getFeatures(r);case 1:return n=e.v,i=r.height,a=r.referenceDrawingMode,l=r.regions,s=r.bpPerPx,c=l[0],f=(c.end-c.start)/s,e.n=2,Promise.resolve().then(o.bind(o,3035));case 2:return d=e.v,p=d.makeImageData,e.n=3,(0,u.renderToAbstractCanvas)(f,i,r,function(e){return"skip"===a&&(e.fillStyle="#ccc",e.fillRect(0,0,f,i)),p(e,Lh(Lh({},r),{},{features:n}))});case 3:return h=e.v,e.n=4,Gh(t,"render",this,3)([Lh(Lh(Lh({},r),h),{},{features:n,height:i,width:f})]);case 4:return m=e.v,e.a(2,Lh(Lh(Lh({},m),h),{},{features:new Map,height:i,width:f,containsNoTransferables:!0}))}},e,this)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){zh(o,r,n,a,l,"next",e)}function l(e){zh(o,r,n,a,l,"throw",e)}a(void 0)})},function(e){return a.apply(this,arguments)})}],n&&Bh(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(mo.default),Kh=o(77756),Yh=o.n(Kh);function Jh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Zh=o(11409),Qh=o(14041);function em(e){return em="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},em(e)}var tm=["minX","minY","maxX","maxY","genotype","featureId"];function rm(){return rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rm.apply(null,arguments)}function nm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function om(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nm(Object(r),!0).forEach(function(t){im(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nm(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function im(e,t,r){return(t=function(e){var t=function(e){if("object"!=em(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=em(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==em(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const am=(0,T.observer)(function(e){var t=e.featureGenotypeMap,r=e.totalHeight,n=e.scrollTop,o=e.rbush,i=e.displayModel,l=(0,a.useRef)(null),s=(0,a.useMemo)(function(){return(new(Yh())).fromJSON(o)},[o]);function f(e,r){var n=0,o=0;if(l.current){var a=l.current.getBoundingClientRect();n=e-a.left,o=r-a.top-((null==i?void 0:i.scrollTop)||0)}var c=s.search({minX:n,maxX:n+1,minY:o,maxY:o+1});if(c.length){var f=function(e,t){var r,n,o=1/0,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Jh(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jh(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(e);try{for(i.s();!(n=i.n()).done;){var a=n.value,l=t(a);l<o&&(o=l,r=a)}}catch(e){i.e(e)}finally{i.f()}return r}(c,function(e){return e.maxX-e.minX}),d=(f.minX,f.minY,f.maxX,f.maxY,f.genotype),p=f.featureId,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(f,tm),m=t[p];if(m){var y=m.ref,b=m.alt,v=m.name,g=m.description,w=m.length,S=(0,Zh.Fm)(d,y,b);return om(om({},h),{},{genotype:d,alleles:S,featureName:v,description:b.length>=3?"multiple ALT alleles":g,length:(0,u.getBpDisplayStr)(w)})}}}return Qh.createElement("div",{ref:l,onMouseMove:function(e){var t;return null===(t=i.setHoveredGenotype)||void 0===t?void 0:t.call(i,f(e.clientX,e.clientY))},onMouseLeave:function(){var e;null===(e=i.setHoveredGenotype)||void 0===e||e.call(i,void 0)},onMouseOut:function(){var e;null===(e=i.setHoveredGenotype)||void 0===e||e.call(i,void 0)},style:{overflow:"visible",position:"relative",height:r}},Qh.createElement(c.PrerenderedCanvas,rm({},e,{style:{position:"absolute",left:0,top:n}})))}),lm=(0,s.ConfigurationSchema)("MultiVariantRenderer",{},{explicitlyTyped:!0}),sm=(0,s.ConfigurationSchema)("SplitVcfTabixAdapter",{vcfGzLocationMap:{type:"frozen",defaultValue:{}},indexLocationMap:{type:"frozen",defaultValue:{}},indexType:{type:"string",defaultValue:"TBI"},samplesTsvLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/samples.tsv",description:'tsv with header like "name\tpopulation\tetc" where the first column is required, and corresponds to the sample names in the VCF files',locationType:"UriLocation"}}},{explicitlyTyped:!0});var cm=o(49554),um=o(14041);function fm(){return fm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fm.apply(null,arguments)}function dm(e){return function(e){if(Array.isArray(e))return mm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||hm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||hm(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hm(e,t){if(e){if("string"==typeof e)return mm(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mm(e,t):void 0}}function mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ym(e,t){var r=e.region.elided?0:e.region.start,n=e.region.elided?0:e.region.end;return(e.flipped?n-t:t-r)/e.bpPerRadian+e.startRadians}const bm=(0,T.observer)(function(e){var t,r,n,o,i=e.feature,l=e.blocksForRefs,c=e.radius,f=e.config,d=e.bezierRadius,p=e.selected,h=e.onClick,m=pm((0,a.useState)(!1),2),y=m[0],b=m[1],v=l[i.get("refName")];if(!v)return null;i.get("INFO")?r=pm(i.get("INFO").SVTYPE||[],1)[0]:i.get("mate")&&(r="mate");var g=null===(t=i.get("ALT"))||void 0===t?void 0:t[0],w=g&&(0,cm.h)(g),S=i.get("start");if(w){var A=w.MatePosition.split(":");n=+A[1],o=l[A[0]]}else if("<TRA>"===g){var O,x,k=null===(O=i.get("INFO"))||void 0===O||null===(O=O.CHR2)||void 0===O?void 0:O[0],C=null===(x=i.get("INFO"))||void 0===x||null===(x=x.END)||void 0===x?void 0:x[0];n=Number.parseInt(C,10),o=l[k]}else if("mate"===r){var P=i.get("mate"),E=P.refName;n=P.start,o=l[E]}else o=v,n=i.get("end");if(o){var j=ym(v,S),T=ym(o,n),_=(0,u.polarToCartesian)(c,j),R=(0,u.polarToCartesian)(c,T),M=(0,u.polarToCartesian)(d,(T+j)/2),I=p?(0,s.readConfObject)(f,"strokeColorSelected",{feature:i}):(0,s.readConfObject)(f,"strokeColor",{feature:i}),N=(0,s.readConfObject)(f,"strokeColorHover",{feature:i});return um.createElement("path",fm({"data-testid":"chord-".concat(i.id()),cursor:"crosshair",fill:"none",d:["M"].concat(dm(_),["Q"],dm(M),dm(R)).join(" ")},(0,u.getStrokeProps)(y?N:I),{strokeWidth:y?3:1,onClick:function(e){h(i,v.region,o.region,e)},onMouseOver:function(){p||b(!0)},onMouseOut:function(){p||b(!1)}}))}return null});var vm=o(14041);function gm(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=wm(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function wm(e,t){if(e){if("string"==typeof e)return Sm(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sm(e,t):void 0}}function Sm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const Am=(0,T.observer)(function(e){var t,r=e.features,n=e.config,o=e.blockDefinitions,i=e.radius,l=e.bezierRadius,s=e.displayModel,c=e.onChordClick,u=(s||{}).selectedFeatureId,f=(0,a.useMemo)(function(){var e,t={},r=gm(o);try{for(r.s();!(e=r.n()).done;){var n,i=e.value,a=gm(i.region.elided?i.region.regions:[i.region]);try{for(a.s();!(n=a.n()).done;)t[n.value.refName]=i}catch(e){a.e(e)}finally{a.f()}}}catch(e){r.e(e)}finally{r.f()}return t},[o]);return vm.createElement("g",{"data-testid":"structuralVariantChordRenderer"},(t=r.values(),function(e){if(Array.isArray(e))return Sm(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||wm(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=e.id(),r=String(u)===String(t);return vm.createElement(bm,{key:t,feature:e,config:n,radius:i,bezierRadius:l,blocksForRefs:f,selected:r,onClick:c})}))}),Om=(0,s.ConfigurationSchema)("StructuralVariantChordRenderer",{strokeColor:{type:"color",description:"the line color of each arc",defaultValue:"rgba(255,133,0,0.32)",contextVariable:["feature"]},strokeColorSelected:{type:"color",description:"the line color of an arc that has been selected",defaultValue:"black",contextVariable:["feature"]},strokeColorHover:{type:"color",description:"the line color of an arc that is being hovered over with the mouse",defaultValue:"#555",contextVariable:["feature"]}},{explicitlyTyped:!0});var xm=(0,s.ConfigurationSchema)("VariantFeatureWidget",{});function km(e){var t=ge(e);return _.types.compose(t,_.types.model("VariantFeatureWidget",{type:_.types.literal("VariantFeatureWidget"),descriptions:_.types.frozen()}))}function Cm(e){return Cm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cm(e)}function Pm(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Em(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Em(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Em(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Em(f,"constructor",c),Em(c,"constructor",s),s.displayName="GeneratorFunction",Em(c,o,"GeneratorFunction"),Em(f),Em(f,o,"Generator"),Em(f,n,function(){return this}),Em(f,"toString",function(){return"[object Generator]"}),(Pm=function(){return{w:i,m:d}})()}function Em(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Em=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Em(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Em(e,t,r,n)}function jm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Tm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jm(Object(r),!0).forEach(function(t){_m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jm(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _m(e,t,r){return(t=Nm(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rm(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Mm(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Rm(i,n,o,a,l,"next",e)}function l(e){Rm(i,n,o,a,l,"throw",e)}a(void 0)})}}function Im(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Nm(n.key),n)}}function Nm(e){var t=function(e){if("object"!=Cm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Cm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cm(t)?t:t+""}function Dm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dm=function(){return!!e})()}function Fm(e,t,r,n){var o=Lm(zm(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Lm(){return Lm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=zm(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Lm.apply(null,arguments)}function zm(e){return zm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zm(e)}function Bm(e,t){return Bm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bm(e,t)}var $m=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=zm(r=t),function(e,t){if(t&&("object"==Cm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Dm()?Reflect.construct(r,n||[],zm(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bm(e,t)}(t,e),r=t,n=[{key:"deserializeArguments",value:(i=Mm(Pm().m(function e(r,n){var o;return Pm().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Fm(t,"deserializeArguments",this,3)([r,n]);case 1:return o=e.v,e.a(2,Tm(Tm({},o),{},{filters:r.filters?new wp.A({filters:r.filters}):void 0}))}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"serializeArguments",value:(o=Mm(Pm().m(function e(r,n){var o,i,a,l,s;return Pm().w(function(e){for(;;)switch(e.n){case 0:if(a=this.pluginManager,l=null===(o=a.rootModel)||void 0===o||null===(o=o.session)||void 0===o?void 0:o.assemblyManager){e.n=1;break}throw new Error("no assembly manager");case 1:return e.n=2,(0,u.renameRegionsIfNeeded)(l,Tm(Tm({},r),{},{filters:null===(i=r.filters)||void 0===i?void 0:i.toJSON().filters}));case 2:return s=e.v,e.a(2,Fm(t,"serializeArguments",this,3)([s,n]))}},e,this)})),function(e,t){return o.apply(this,arguments)})}],n&&Im(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A);function Gm(e){return function(e){if(Array.isArray(e))return Hm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Hm(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hm(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Vm(e){return Number.parseFloat((100*e).toFixed(1))}function Wm(e,t){for(var r=Math.min(e.length,t.length),n=0,o=0;o<r;o++)n+=(e[o]-t[o])*(e[o]-t[o]);return Math.sqrt(n)}function Um(e,t,r){for(var n=0,o=e.length,i=t.length,a=0;a<o;a++)for(var l=0;l<i;l++)n+=r[e[a]][t[l]];return n/e.length/t.length}function qm(e){for(var t=e.data,r=e.distance,n=void 0===r?Wm:r,o=e.linkage,i=void 0===o?Um:o,a=e.onProgress,l=e.stopToken,s=performance.now(),c=[],u=0;u<t.length;u++){performance.now()-s>400&&((0,Sp.SW)(l),s=performance.now()),a&&a("Making distance matrix: ".concat(Vm(u/(t.length-1)),"%"));for(var f=[],d=0;d<t.length;d++)f.push(n(t[u],t[d]));c.push(f)}var p=t.map(function(e,t){return{height:0,indexes:[Number(t)]}}),h=[];s=performance.now();for(var m=0;m<t.length&&(performance.now()-s>400&&((0,Sp.SW)(l),s=performance.now()),a&&a("Clustering: ".concat(Vm((m+1)/t.length),"%")),h.push(p.map(function(e){return e.indexes})),!(m>=t.length-1));m++){for(var y=1/0,b=0,v=0,g=0;g<p.length;g++)for(var w=g+1;w<p.length;w++){var S=i(p[g].indexes,p[w].indexes,c);S<y&&(y=S,b=g,v=w)}var A={indexes:[].concat(Gm(p[b].indexes),Gm(p[v].indexes)),height:y,children:[p[b],p[v]]};p.splice(Math.max(b,v),1),p.splice(Math.min(b,v),1),p.push(A)}return h=[[]].concat(Gm(h.reverse())),{clusters:p[0],distances:c,order:p[0].indexes,clustersGivenK:h}}var Xm=o(46944);function Km(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Ym(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ym(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ym(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Ym(f,"constructor",c),Ym(c,"constructor",s),s.displayName="GeneratorFunction",Ym(c,o,"GeneratorFunction"),Ym(f),Ym(f,o,"Generator"),Ym(f,n,function(){return this}),Ym(f,"toString",function(){return"[object Generator]"}),(Km=function(){return{w:i,m:d}})()}function Ym(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ym=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ym(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ym(e,t,r,n)}function Jm(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Zm(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zm(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function Zm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Qm(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ey(e){return ty.apply(this,arguments)}function ty(){var e;return e=Km().m(function e(t){var r,n,o,i,a,l,s,c,f,d,p,h,m,y,b,v,g,w,S,A,O,x,k,C,P,E;return Km().w(function(e){for(;;)switch(e.n){case 0:return r=t.pluginManager,n=t.args,o=n.sources,i=n.minorAlleleFrequencyFilter,a=n.regions,l=n.adapterConfig,s=n.sessionId,c=n.lengthCutoffFilter,f=n.stopToken,e.n=1,(0,je.cK)(r,s,l);case 1:return d=e.v,p=d.dataAdapter,h=new Set,x=Xm.Cg,k=i,C=c,P=f,e.n=2,(0,wt._)(p.getFeaturesInMultipleRegions(a,n).pipe((0,St.$)()));case 2:E=e.v,m=x({minorAlleleFrequencyFilter:k,lengthCutoffFilter:C,stopToken:P,features:E}),y=Jm(m);try{for(y.s();!(b=y.n()).done;)for(v=b.value.alleleCounts,g=0,w=Object.keys(v);g<w.length;g++)S=w[g],h.add(S)}catch(e){y.e(e)}finally{y.f()}return A={},O={},(0,u.forEachWithStopTokenCheck)(m,f,function(e){var t,r=e.feature.get("genotypes"),n=Jm(o);try{for(n.s();!(t=n.n()).done;){var i=t.value.name;A[i]||(A[i]=[]);var a=r[i],l=void 0;O[a]?l=O[a]:(l=a.split(/[/|]/),O[a]=l);var s,c,u=0,f=0,d=Jm(l);try{for(d.s();!(s=d.n()).done;){var p=s.value;"."===p?f++:"0"!==p&&u++}}catch(e){d.e(e)}finally{d.f()}c=f===l.length?-1:0===u?0:u===l.length?2:1,A[i].push(c)}}catch(e){n.e(e)}finally{n.f()}}),e.a(2,A)}},e)}),ty=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Qm(i,n,o,a,l,"next",e)}function l(e){Qm(i,n,o,a,l,"throw",e)}a(void 0)})},ty.apply(this,arguments)}function ry(e){return ry="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ry(e)}function ny(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return oy(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(oy(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,oy(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,oy(f,"constructor",c),oy(c,"constructor",s),s.displayName="GeneratorFunction",oy(c,o,"GeneratorFunction"),oy(f),oy(f,o,"Generator"),oy(f,n,function(){return this}),oy(f,"toString",function(){return"[object Generator]"}),(ny=function(){return{w:i,m:d}})()}function oy(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}oy=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){oy(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},oy(e,t,r,n)}function iy(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ay(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uy(n.key),n)}}function ly(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ly=function(){return!!e})()}function sy(e){return sy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sy(e)}function cy(e,t){return cy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cy(e,t)}function uy(e){var t=function(e){if("object"!=ry(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ry(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ry(t)?t:t+""}var fy=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=uy(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=sy(n),e=function(e,t){if(t&&("object"==ry(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,ly()?Reflect.construct(n,o||[],sy(r).constructor):n.apply(r,o))),"name","MultiVariantClusterGenotypeMatrix"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cy(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=ny().m(function e(t,r){var n,o;return ny().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.deserializeArguments(t,r);case 1:return n=e.v,e.n=2,ey({pluginManager:this.pluginManager,args:n});case 2:return o=e.v,e.a(2,qm({data:Object.values(o),stopToken:n.stopToken,onProgress:function(e){n.statusCallback(e)}}))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){iy(i,r,n,a,l,"next",e)}function l(e){iy(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&ay(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function dy(e){return dy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dy(e)}function py(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return hy(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(hy(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,hy(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,hy(f,"constructor",c),hy(c,"constructor",s),s.displayName="GeneratorFunction",hy(c,o,"GeneratorFunction"),hy(f),hy(f,o,"Generator"),hy(f,n,function(){return this}),hy(f,"toString",function(){return"[object Generator]"}),(py=function(){return{w:i,m:d}})()}function hy(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}hy=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){hy(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},hy(e,t,r,n)}function my(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function yy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wy(n.key),n)}}function by(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(by=function(){return!!e})()}function vy(e){return vy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vy(e)}function gy(e,t){return gy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gy(e,t)}function wy(e){var t=function(e){if("object"!=dy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=dy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dy(t)?t:t+""}var Sy=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=wy(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=vy(n),e=function(e,t){if(t&&("object"==dy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,by()?Reflect.construct(n,o||[],vy(r).constructor):n.apply(r,o))),"name","MultiVariantGetGenotypeMatrix"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gy(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=py().m(function e(t,r){var n,o,i,a;return py().w(function(e){for(;;)switch(e.n){case 0:return n=ey,o=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return i=e.v,a={pluginManager:o,args:i},e.a(2,n(a))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){my(i,r,n,a,l,"next",e)}function l(e){my(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&yy(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function Ay(e){return Ay="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ay(e)}function Oy(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return xy(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(xy(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,xy(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,xy(f,"constructor",c),xy(c,"constructor",s),s.displayName="GeneratorFunction",xy(c,o,"GeneratorFunction"),xy(f),xy(f,o,"Generator"),xy(f,n,function(){return this}),xy(f,"toString",function(){return"[object Generator]"}),(Oy=function(){return{w:i,m:d}})()}function xy(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}xy=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){xy(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},xy(e,t,r,n)}function ky(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Cy(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Cy(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Py(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ey(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ry(n.key),n)}}function jy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jy=function(){return!!e})()}function Ty(e){return Ty=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ty(e)}function _y(e,t){return _y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_y(e,t)}function Ry(e){var t=function(e){if("object"!=Ay(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ay(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ay(t)?t:t+""}var My=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Ry(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=Ty(n),e=function(e,t){if(t&&("object"==Ay(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,jy()?Reflect.construct(n,o||[],Ty(r).constructor):n.apply(r,o))),"name","MultiVariantGetSimplifiedFeatures"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_y(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=Oy().m(function e(t,r){var n,o,i,a,l,s,c,f,d,p,h,m,y,b,v,g,w;return Oy().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.deserializeArguments(t,r);case 1:return n=e.v,o=n.lengthCutoffFilter,i=n.minorAlleleFrequencyFilter,a=n.regions,l=n.adapterConfig,s=n.stopToken,c=n.sessionId,e.n=2,(0,je.cK)(this.pluginManager,c,l);case 2:return f=e.v,d=f.dataAdapter,y=Xm.Cg,b=i,v=o,g=s,e.n=3,(0,wt._)(d.getFeaturesInMultipleRegions(a,n).pipe((0,St.$)()));case 3:return w=e.v,p=y({minorAlleleFrequencyFilter:b,lengthCutoffFilter:v,stopToken:g,features:w}),h={},m=!1,(0,u.forEachWithStopTokenCheck)(p,s,function(e){for(var t=e.feature.get("genotypes"),r=0,n=Object.entries(t);r<n.length;r++){var o,i,a=ky(n[r],2),l=a[0],s=a[1],c=s.includes("|");m||(m=c),h[l]={maxPloidy:Math.max((null===(o=h[l])||void 0===o?void 0:o.maxPloidy)||0,s.split("|").length),isPhased:(null===(i=h[l])||void 0===i?void 0:i.isPhased)||c}}}),e.a(2,{hasPhased:m,sampleInfo:h,features:p.map(function(e){var t=e.feature;return{id:t.id(),data:{start:t.get("start"),end:t.get("end"),refName:t.get("refName"),name:t.get("name")}}})})}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){Py(i,r,n,a,l,"next",e)}function l(e){Py(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&Ey(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function Iy(e){return Iy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Iy(e)}function Ny(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Dy(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Dy(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Dy(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Dy(f,"constructor",c),Dy(c,"constructor",s),s.displayName="GeneratorFunction",Dy(c,o,"GeneratorFunction"),Dy(f),Dy(f,o,"Generator"),Dy(f,n,function(){return this}),Dy(f,"toString",function(){return"[object Generator]"}),(Ny=function(){return{w:i,m:d}})()}function Dy(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Dy=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Dy(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Dy(e,t,r,n)}function Fy(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ly(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Gy(n.key),n)}}function zy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zy=function(){return!!e})()}function By(e){return By=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},By(e)}function $y(e,t){return $y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$y(e,t)}function Gy(e){var t=function(e){if("object"!=Iy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Iy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Iy(t)?t:t+""}var Hy=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Gy(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=By(n),e=function(e,t){if(t&&("object"==Iy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,zy()?Reflect.construct(n,o||[],By(r).constructor):n.apply(r,o))),"name","MultiVariantGetSources"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$y(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=Ny().m(function e(t,r){var n,o,i,a,l,s,c;return Ny().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.regions,a=o.adapterConfig,l=o.sessionId,e.n=2,(0,je.cK)(n,l,a);case 2:return s=e.v,c=s.dataAdapter,e.a(2,c.getSources(i,o))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){Fy(i,r,n,a,l,"next",e)}function l(e){Fy(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&Ly(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function Vy(e){return Vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vy(e)}function Wy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Uy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wy(Object(r),!0).forEach(function(t){qy(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wy(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function qy(e,t,r){return(t=function(e){var t=function(e){if("object"!=Vy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Vy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vy(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Xy=(0,s.ConfigurationSchema)("VcfAdapter",{vcfLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.vcf",locationType:"UriLocation"}},samplesTsvLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/samples.tsv",description:"tsv with header like name\tpopulation\tetc. where the first column is required, and is the sample names",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?Uy(Uy({},e),{},{vcfLocation:{uri:e.uri,baseUri:e.baseUri}}):e}});function Ky(e){return Ky="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ky(e)}function Yy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Jy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yy(Object(r),!0).forEach(function(t){Zy(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yy(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Zy(e,t,r){return(t=function(e){var t=function(e){if("object"!=Ky(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ky(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ky(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Qy=(0,s.ConfigurationSchema)("VcfTabixAdapter",{vcfGzLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.vcf.gz",locationType:"UriLocation"}},index:(0,s.ConfigurationSchema)("VcfIndex",{indexType:{model:_.types.enumeration("IndexType",["TBI","CSI"]),type:"stringEnum",defaultValue:"TBI"},location:{type:"fileLocation",defaultValue:{uri:"/path/to/my.vcf.gz.tbi",locationType:"UriLocation"}}}),samplesTsvLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/samples.tsv",description:"tsv with header like name\tpopulation\tetc. where the first column is required, and is the sample names",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?Jy(Jy({},e),{},{vcfGzLocation:{uri:e.uri,baseUri:e.baseUri},index:{location:{uri:"".concat(e.uri,".tbi"),baseUri:e.baseUri}}}):e}});function eb(e){return eb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eb(e)}function tb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ib(n.key),n)}}function rb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rb=function(){return!!e})()}function nb(e){return nb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nb(e)}function ob(e,t){return ob=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ob(e,t)}function ib(e){var t=function(e){if("object"!=eb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=eb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eb(t)?t:t+""}o(35545);var ab=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=ib(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=nb(n),e=function(e,t){if(t&&("object"==eb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,rb()?Reflect.construct(n,o||[],nb(r).constructor):n.apply(r,o))),"name","VariantsPlugin"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ob(e,t)}(t,e),r=t,(n=[{key:"install",value:function(e){var t;!function(e){e.addAdapterType(function(){return new lo.A({name:"VcfAdapter",displayName:"VCF adapter",configSchema:Xy,getAdapterClass:function(){return Promise.resolve().then(o.bind(o,93539)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"VcfTabixAdapter",displayName:"VCF tabix adapter",configSchema:Qy,getAdapterClass:function(){return Promise.resolve().then(o.bind(o,16802)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"SplitVcfTabixAdapter",displayName:"VCF tabix adapter (split across multiple files)",configSchema:sm,getAdapterClass:function(){return Promise.resolve().then(o.bind(o,73784)).then(function(e){return e.default})}})})}(e),function(e){e.addWidgetType(function(){return new Pe.A({name:"VariantFeatureWidget",heading:"Feature details",configSchema:xm,stateModel:km(e),ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,82927))})})})}(e),(t=e).addTrackType(function(){var e,r=(e=t,(0,s.ConfigurationSchema)("VariantTrack",{},{baseConfiguration:(0,Ce.createBaseTrackConfig)(e)}));return new co.A({name:"VariantTrack",displayName:"Variant track",configSchema:r,stateModel:(0,fo.createBaseTrackModel)(t,"VariantTrack",r)})}),function(e){e.addToExtensionPoint("Core-guessAdapterForLocation",function(e){return function(t,r,n){var o=(0,Vo.getFileName)(t),i=r&&(0,Vo.getFileName)(r);return(0,u.testAdapter)(o,/\.vcf\.b?gz$/i,n,"VcfTabixAdapter")?{type:"VcfTabixAdapter",vcfGzLocation:t,index:{location:r||(0,Vo.makeIndex)(t,".tbi"),indexType:(0,Vo.makeIndexType)(i,"CSI","TBI")}}:(0,u.testAdapter)(o,/\.vcf(\.gz)?$/i,n,"VcfAdapter")?{type:"VcfAdapter",vcfLocation:t}:e(t,r,n)}}),e.addToExtensionPoint("Core-guessTrackTypeForLocation",function(e){return function(t){return["VcfTabixAdapter","VcfAdapter"].includes(t)?"VariantTrack":e(t)}})}(e),function(e){e.addDisplayType(function(){var t=function(e){return(0,s.ConfigurationSchema)("LinearVariantDisplay",{},{baseConfiguration:(0,Id.lw)(e),explicitlyTyped:!0})}(e);return new so.A({name:"LinearVariantDisplay",displayName:"Variant display",configSchema:t,stateModel:gp(t),trackType:"VariantTrack",viewType:"LinearGenomeView",ReactComponent:Id.GQ})})}(e),function(e){e.addDisplayType(function(){var t=function(e){return(0,s.ConfigurationSchema)("LinearVariantMatrixDisplay",{renderer:ih,height:{type:"number",defaultValue:250}},{baseConfiguration:(0,Id.lw)(e),explicitlyTyped:!0})}(e);return new so.A({name:"LinearVariantMatrixDisplay",displayName:"Multi-sample variant display (matrix)",configSchema:t,stateModel:hh(t),trackType:"VariantTrack",viewType:"LinearGenomeView",ReactComponent:oh})})}(e),function(e){e.addDisplayType(function(){var t=function(e){var t=e.getRendererType("MultiVariantRenderer").configSchema;return(0,s.ConfigurationSchema)("MultiLinearVariantDisplay",{defaultRendering:{type:"stringEnum",model:_.types.enumeration("Rendering",["multivariant"]),defaultValue:"multivariant"},renderers:(0,s.ConfigurationSchema)("RenderersConfiguration",{MultiVariantRenderer:t}),height:{type:"number",defaultValue:200}},{baseConfiguration:(0,s.ConfigurationSchema)("SharedVariantDisplay",{autoscale:{type:"stringEnum",defaultValue:"local",model:_.types.enumeration("Autoscale type",["global","local","globalsd","localsd","zscore"]),description:"global/local using their min/max values or w/ standard deviations (globalsd/localsd)"},minimalTicks:{type:"boolean",defaultValue:!1,description:"use the minimal amount of ticks"},minScore:{type:"number",defaultValue:Number.MIN_VALUE,description:"minimum value for the y-scale"},maxScore:{type:"number",description:"maximum value for the y-scale",defaultValue:Number.MAX_VALUE},numStdDev:{type:"number",description:"number of standard deviations to use for autoscale types globalsd or localsd",defaultValue:3},scaleType:{type:"stringEnum",model:_.types.enumeration("Scale type",["linear","log"]),description:"The type of scale to use",defaultValue:"linear"},inverted:{type:"boolean",description:"draw upside down",defaultValue:!1}},{baseConfiguration:Id.Ki,explicitlyTyped:!0}),explicitlyTyped:!0})}(e);return new so.A({name:"MultiLinearVariantDisplay",displayName:"Multi-sample variant display (regular)",configSchema:t,stateModel:Yp(t),trackType:"VariantTrack",viewType:"LinearGenomeView",ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,41928))})})})}(e),function(e){e.addRendererType(function(){return new Xh({name:"MultiVariantRenderer",ReactComponent:am,configSchema:lm,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new _h({name:"LinearVariantMatrixRenderer",displayName:"Linear variant matrix renderer",ReactComponent:Mh,configSchema:ih,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new ho.A({name:"StructuralVariantChordRenderer",displayName:"SV chord renderer",ReactComponent:Am,configSchema:Om,pluginManager:e})})}(e),function(e){e.addDisplayType(function(){var t=function(e){return(0,s.ConfigurationSchema)("ChordVariantDisplay",{renderer:_.types.optional(e.pluggableConfigSchemaType("renderer"),{type:"StructuralVariantChordRenderer"})},{baseConfiguration:du,explicitlyTyped:!0})}(e),r=function(e){return _.types.compose("ChordVariantDisplay",Du,_.types.model({type:_.types.literal("ChordVariantDisplay"),configuration:(0,s.ConfigurationReference)(e)})).views(function(e){return{get rendererTypeName(){return e.configuration.renderer.type},renderProps:function(){var t=(0,u.getContainingView)(e);return hp(hp({},(0,Vo.getParentRenderProps)(e)),{},{rpcDriverName:e.rpcDriverName,displayModel:e,bezierRadius:t.radiusPx*e.bezierRadiusRatio,radius:t.radiusPx,blockDefinitions:e.blockDefinitions,config:e.configuration.renderer,onChordClick:function(t){e.onChordClick(t)}})}}})}(t);return new so.A({name:"ChordVariantDisplay",displayName:"Chord variant display",configSchema:t,stateModel:r,trackType:"VariantTrack",viewType:"CircularView",ReactComponent:fu})})}(e),e.addRpcMethod(function(){return new Hy(e)}),e.addRpcMethod(function(){return new Sy(e)}),e.addRpcMethod(function(){return new fy(e)}),e.addRpcMethod(function(){return new My(e)})}}])&&tb(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we.A);function lb(e){return lb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lb(e)}function sb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sb(Object(r),!0).forEach(function(t){ub(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sb(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ub(e,t,r){return(t=function(e){var t=function(e){if("object"!=lb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=lb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lb(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const fb=(0,s.ConfigurationSchema)("BigWigAdapter",{bigWigLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bw",locationType:"UriLocation"}},source:{type:"string",defaultValue:"",description:"Used for multiwiggle"},resolutionMultiplier:{type:"number",defaultValue:1,description:"Initial resolution multiplier"}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?cb(cb({},e),{},{bigWigLocation:{uri:e.uri,baseUri:e.baseUri}}):e}});function db(e){return db="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},db(e)}function pb(e){return function(e){if(Array.isArray(e))return hb(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return hb(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hb(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function mb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function yb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mb(Object(r),!0).forEach(function(t){bb(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mb(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function bb(e,t,r){return(t=function(e){var t=function(e){if("object"!=db(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=db(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==db(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var vb=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,67046))});var gb=["reducedFeatures"];function wb(e){return wb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wb(e)}function Sb(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Ab(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ab(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ab(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Ab(f,"constructor",c),Ab(c,"constructor",s),s.displayName="GeneratorFunction",Ab(c,o,"GeneratorFunction"),Ab(f),Ab(f,o,"Generator"),Ab(f,n,function(){return this}),Ab(f,"toString",function(){return"[object Generator]"}),(Sb=function(){return{w:i,m:d}})()}function Ab(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ab=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ab(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ab(e,t,r,n)}function Ob(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ob(Object(r),!0).forEach(function(t){Mb(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ob(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function kb(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Cb(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Pb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ib(n.key),n)}}function Eb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Eb=function(){return!!e})()}function jb(e,t,r,n){var o=Tb(_b(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Tb(){return Tb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=_b(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Tb.apply(null,arguments)}function _b(e){return _b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_b(e)}function Rb(e,t){return Rb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rb(e,t)}function Mb(e,t,r){return(t=Ib(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ib(e){var t=function(e){if("object"!=wb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=wb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wb(t)?t:t+""}var Nb=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return Mb((r=this,n=t,o=[].concat(a),n=_b(n),e=function(e,t){if(t&&("object"==wb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Eb()?Reflect.construct(n,o||[],_b(r).constructor):n.apply(r,o))),"supportsSVG",!0),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rb(e,t)}(t,e),r=t,n=[{key:"render",value:(o=Sb().m(function e(r){var n,o,i,a,l,s,c,f,d,p,h,m,y,b=this;return Sb().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getFeatures(r);case 1:return n=e.v,o=r.inverted,i=r.height,a=r.regions,l=r.bpPerPx,s=r.statusCallback,c=void 0===s?function(){}:s,f=a[0],d=(f.end-f.start)/l,e.n=2,(0,u.updateStatus)("Rendering plot",c,function(){return(0,u.renderToAbstractCanvas)(d,i,r,function(e){return b.draw(e,xb(xb({},r),{},{features:n,inverted:o}))})});case 2:return p=e.v,h=p.reducedFeatures,m=kb(p,gb),e.n=3,jb(t,"render",this,3)([xb(xb(xb({},r),m),{},{features:n,height:i,width:d})]);case 3:return y=e.v,e.a(2,xb(xb(xb({},y),m),{},{features:h?new Map(h.map(function(e){return[e.id(),e]})):y.features,height:i,width:d,containsNoTransferables:!0}))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){Cb(i,r,n,a,l,"next",e)}function l(e){Cb(i,r,n,a,l,"throw",e)}a(void 0)})},function(e){return i.apply(this,arguments)})}],n&&Pb(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(mo.default);function Db(e){return Db="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Db(e)}function Fb(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Lb(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Lb(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Lb(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Lb(f,"constructor",c),Lb(c,"constructor",s),s.displayName="GeneratorFunction",Lb(c,o,"GeneratorFunction"),Lb(f),Lb(f,o,"Generator"),Lb(f,n,function(){return this}),Lb(f,"toString",function(){return"[object Generator]"}),(Fb=function(){return{w:i,m:d}})()}function Lb(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Lb=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Lb(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Lb(e,t,r,n)}function zb(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Bb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$b(n.key),n)}}function $b(e){var t=function(e){if("object"!=Db(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Db(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Db(t)?t:t+""}function Gb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gb=function(){return!!e})()}function Hb(e){return Hb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hb(e)}function Vb(e,t){return Vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vb(e,t)}var Wb=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=Hb(r=t),function(e,t){if(t&&("object"==Db(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gb()?Reflect.construct(r,n||[],Hb(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vb(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=Fb().m(function e(t,r){var n,i;return Fb().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Promise.resolve().then(o.bind(o,60360));case 1:return n=e.v,i=n.drawDensity,e.a(2,i(t,r))}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){zb(o,r,n,a,l,"next",e)}function l(e){zb(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&Bb(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);const Ub=(0,s.ConfigurationSchema)("WiggleRenderer",{color:{type:"color",description:"the color of track, overrides posColor and negColor",defaultValue:"#f0f",contextVariable:["feature"]},posColor:{type:"color",description:"the color to use when the score is positive",defaultValue:"blue",contextVariable:["feature"]},negColor:{type:"color",description:"the color to use when the score is negative",defaultValue:"red",contextVariable:["feature"]},clipColor:{type:"color",description:"the color of the clipping marker",defaultValue:"red"},bicolorPivot:{type:"stringEnum",model:_.types.enumeration("Scale type",["numeric","mean","z_score","none"]),description:"type of bicolor pivot",defaultValue:"numeric"},bicolorPivotValue:{type:"number",defaultValue:0,description:"value to use for bicolor pivot"}},{explicitlyTyped:!0}),qb=(0,s.ConfigurationSchema)("DensityRenderer",{},{baseConfiguration:Ub,explicitlyTyped:!0});var Xb=o(14041);function Kb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const Yb=(0,T.observer)(function(e){var t=e.regions,r=e.features,n=e.bpPerPx,o=e.width,i=e.height,l=e.onMouseLeave,s=e.onMouseMove,u=e.onFeatureClick,f=t[0],d=(0,a.useRef)(null);function p(e){var t=0;d.current&&(t=d.current.getBoundingClientRect().left);var i,a,l=e-t,s=f.reversed?o-l:l,c=f.start+n*s,u=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Kb(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kb(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(r.values());try{for(u.s();!(a=u.n()).done;){var p=a.value;if(c<=p.get("end")+n&&c>=p.get("start")){i=p;break}}}catch(e){u.e(e)}finally{u.f()}return i}return Xb.createElement("div",{ref:d,"data-testid":"wiggle-rendering-test",onMouseMove:function(e){var t;return null==s?void 0:s(e,null===(t=p(e.clientX))||void 0===t?void 0:t.id())},onClick:function(e){var t;return null==u?void 0:u(e,null===(t=p(e.clientX))||void 0===t?void 0:t.id())},onMouseLeave:function(e){return null==l?void 0:l(e)},style:{overflow:"visible",position:"relative",height:i}},Xb.createElement(c.PrerenderedCanvas,e))}),Jb=(0,s.ConfigurationSchema)("LinePlotRenderer",{displayCrossHatches:{type:"boolean",description:"choose to draw cross hatches (sideways lines)",defaultValue:!1}},{baseConfiguration:Ub,explicitlyTyped:!0});var Zb=o(12546);function Qb(e){return Qb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qb(e)}function ev(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return tv(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(tv(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,tv(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,tv(f,"constructor",c),tv(c,"constructor",s),s.displayName="GeneratorFunction",tv(c,o,"GeneratorFunction"),tv(f),tv(f,o,"Generator"),tv(f,n,function(){return this}),tv(f,"toString",function(){return"[object Generator]"}),(ev=function(){return{w:i,m:d}})()}function tv(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}tv=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){tv(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},tv(e,t,r,n)}function rv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rv(Object(r),!0).forEach(function(t){ov(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ov(e,t,r){return(t=lv(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iv(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function av(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lv(n.key),n)}}function lv(e){var t=function(e){if("object"!=Qb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Qb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qb(t)?t:t+""}function sv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sv=function(){return!!e})()}function cv(e){return cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cv(e)}function uv(e,t){return uv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uv(e,t)}var fv=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=cv(r=t),function(e,t){if(t&&("object"==Qb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sv()?Reflect.construct(r,n||[],cv(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uv(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=ev().m(function e(t,r){var n,i,a,l;return ev().w(function(e){for(;;)switch(e.n){case 0:return n=r.config,i=(0,s.readConfObject)(n,"color"),e.n=1,Promise.resolve().then(o.bind(o,60852));case 1:return a=e.v,l=a.drawLine,e.a(2,l(t,nv(nv({},r),{},{offset:Zb.YSCALEBAR_LABEL_OFFSET,colorCallback:"#f0f"===i?function(){return"grey"}:function(e){return(0,s.readConfObject)(n,"color",{feature:e})}})))}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){iv(o,r,n,a,l,"next",e)}function l(e){iv(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&av(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);function dv(){return(0,s.ConfigurationSchema)("SharedWiggleDisplay",{autoscale:{type:"stringEnum",defaultValue:"local",model:_.types.enumeration("Autoscale type",["global","local","globalsd","localsd","zscore"]),description:"global/local using their min/max values or w/ standard deviations (globalsd/localsd)"},minimalTicks:{type:"boolean",defaultValue:!1,description:"use the minimal amount of ticks"},minScore:{type:"number",defaultValue:Number.MIN_VALUE,description:"minimum value for the y-scale"},maxScore:{type:"number",description:"maximum value for the y-scale",defaultValue:Number.MAX_VALUE},numStdDev:{type:"number",description:"number of standard deviations to use for autoscale types globalsd or localsd",defaultValue:3},scaleType:{type:"stringEnum",model:_.types.enumeration("Scale type",["linear","log"]),description:"The type of scale to use",defaultValue:"linear"},inverted:{type:"boolean",description:"draw upside down",defaultValue:!1}},{baseConfiguration:Id.Ki,explicitlyTyped:!0})}const pv=(0,Tn.A)((0,A.jsx)("path",{d:"M10 20h4V4h-4zm-6 0h4v-8H4zM16 9v11h4V9z"}),"Equalizer"),hv=(0,Tn.A)((0,A.jsx)("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10c1.38 0 2.5-1.12 2.5-2.5 0-.61-.23-1.2-.64-1.67-.08-.1-.13-.21-.13-.33 0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9m5.5 11c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m-3-4c-.83 0-1.5-.67-1.5-1.5S13.67 6 14.5 6s1.5.67 1.5 1.5S15.33 9 14.5 9M5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S7.33 13 6.5 13 5 12.33 5 11.5m6-4c0 .83-.67 1.5-1.5 1.5S8 8.33 8 7.5 8.67 6 9.5 6s1.5.67 1.5 1.5"}),"Palette");var mv=o(95725);function yv(e){return yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yv(e)}function bv(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return vv(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(vv(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,vv(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,vv(f,"constructor",c),vv(c,"constructor",s),s.displayName="GeneratorFunction",vv(c,o,"GeneratorFunction"),vv(f),vv(f,o,"Generator"),vv(f,n,function(){return this}),vv(f,"toString",function(){return"[object Generator]"}),(bv=function(){return{w:i,m:d}})()}function vv(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}vv=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){vv(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},vv(e,t,r,n)}function gv(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function wv(e){return function(e){if(Array.isArray(e))return Av(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Sv(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sv(e,t){if(e){if("string"==typeof e)return Av(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Av(e,t):void 0}}function Av(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ov(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ov(Object(r),!0).forEach(function(t){kv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ov(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function kv(e,t,r){return(t=function(e){var t=function(e){if("object"!=yv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=yv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Cv=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,12460))});function Pv(e){return _.types.compose(Id.Lr,_.types.model({selectedRendering:_.types.optional(_.types.string,""),resolution:_.types.optional(_.types.number,1),fill:_.types.maybe(_.types.boolean),minSize:_.types.maybe(_.types.number),color:_.types.maybe(_.types.string),posColor:_.types.maybe(_.types.string),negColor:_.types.maybe(_.types.string),summaryScoreMode:_.types.maybe(_.types.string),rendererTypeNameState:_.types.maybe(_.types.string),scale:_.types.maybe(_.types.string),autoscale:_.types.maybe(_.types.string),displayCrossHatches:_.types.maybe(_.types.boolean),constraints:_.types.optional(_.types.model({max:_.types.maybe(_.types.number),min:_.types.maybe(_.types.number)}),{}),configuration:(0,s.ConfigurationReference)(e)})).volatile(function(){return{message:void 0,stats:void 0,statsFetchInProgress:void 0}}).actions(function(e){return{updateQuantitativeStats:function(t){var r=t.currStatsBpPerPx,n=t.scoreMin,o=t.scoreMax,i=1e-6;(!e.stats||Math.abs(e.stats.scoreMax-o)>i||Math.abs(e.stats.scoreMin-n)>i)&&(e.stats={currStatsBpPerPx:r,scoreMin:n,scoreMax:o})},setColor:function(t){e.color=t},setPosColor:function(t){e.posColor=t},setNegColor:function(t){e.negColor=t},setStatsLoading:function(t){e.statsFetchInProgress&&(0,Sp.CF)(e.statsFetchInProgress),e.statsFetchInProgress=t},selectFeature:function(t){var r=(0,u.getSession)(e);(0,u.isSelectionContainer)(r)&&r.setSelection(t)},setResolution:function(t){e.resolution=t},setFill:function(t){0===t?(e.fill=!0,e.minSize=0):1===t?(e.fill=!1,e.minSize=1):2===t&&(e.fill=!1,e.minSize=2)},toggleLogScale:function(){e.scale="log"===e.scale?"linear":"log"},setScaleType:function(t){e.scale=t},setSummaryScoreMode:function(t){e.summaryScoreMode=t},setAutoscale:function(t){e.autoscale=t},setMaxScore:function(t){e.constraints.max=t},setRendererType:function(t){e.rendererTypeNameState=t},setMinScore:function(t){e.constraints.min=t},toggleCrossHatches:function(){e.displayCrossHatches=!e.displayCrossHatches},setCrossHatches:function(t){e.displayCrossHatches=t}}}).views(function(e){return{get adapterTypeName(){return e.adapterConfig.type},get rendererTypeNameSimple(){var t;return null!==(t=e.rendererTypeNameState)&&void 0!==t?t:(0,s.getConf)(e,"defaultRendering")},get filters(){},get scaleType(){var t;return null!==(t=e.scale)&&void 0!==t?t:(0,s.getConf)(e,"scaleType")},get maxScore(){var t;return null!==(t=e.constraints.max)&&void 0!==t?t:(0,s.getConf)(e,"maxScore")},get minScore(){var t;return null!==(t=e.constraints.min)&&void 0!==t?t:(0,s.getConf)(e,"minScore")}}}).views(function(e){return{get adapterCapabilities(){var t=e.adapterTypeName;return(0,u.getEnv)(e).pluginManager.getAdapterType(t).adapterCapabilities},get rendererConfig(){var t=e.color,r=e.displayCrossHatches,n=e.fill,o=e.minSize,i=e.negColor,a=e.posColor,l=e.summaryScoreMode,c=e.scaleType,f=e.rendererTypeName,d=(0,s.getConf)(e,["renderers",f])||{};return e.rendererType.configSchema.create(xv(xv(xv(xv(xv(xv(xv(xv(xv({},d),c?{scaleType:c}:{}),void 0!==n?{filled:n}:{}),void 0!==r?{displayCrossHatches:r}:{}),void 0!==l?{summaryScoreMode:l}:{}),void 0!==t?{color:t}:{}),void 0!==i?{negColor:i}:{}),void 0!==a?{posColor:a}:{}),void 0!==o?{minSize:o}:{}),(0,u.getEnv)(e))},get autoscaleType(){var t;return null!==(t=e.autoscale)&&void 0!==t?t:(0,s.getConf)(e,"autoscale")}}}).views(function(e){var t=[0,0];return{get domain(){var r=e.stats,n=e.scaleType,o=e.minScore,i=e.maxScore;if(r){var a=(0,Zb.getNiceDomain)({domain:[r.scoreMin,r.scoreMax],bounds:[o,i],scaleType:n});return"log"===n&&a[1]===Number.MIN_VALUE?[0,Number.MIN_VALUE]:(JSON.stringify(t)!==JSON.stringify(a)&&(t=a),t)}}}}).views(function(e){return{get filled(){var t;return null!==(t=e.fill)&&void 0!==t?t:(0,s.readConfObject)(e.rendererConfig,"filled")},get summaryScoreModeSetting(){var t;return null!==(t=e.summaryScoreMode)&&void 0!==t?t:(0,s.readConfObject)(e.rendererConfig,"summaryScoreMode")},get scaleOpts(){return{domain:e.domain,stats:e.stats,autoscaleType:e.autoscaleType,scaleType:e.scaleType,inverted:(0,s.getConf)(e,"inverted")}},get canHaveFill(){return"XYPlotRenderer"===e.rendererTypeName},get displayCrossHatchesSetting(){var t;return null!==(t=e.displayCrossHatches)&&void 0!==t?t:(0,s.readConfObject)(e.rendererConfig,"displayCrossHatches")},get hasResolution(){return e.adapterCapabilities.includes("hasResolution")},get hasGlobalStats(){return e.adapterCapabilities.includes("hasGlobalStats")}}}).views(function(e){return{scoreTrackMenuItems:function(){return[].concat(wv(e.hasResolution?[{label:"Resolution",subMenu:[{label:"Finer resolution",onClick:function(){e.setResolution(5*e.resolution)}},{label:"Coarser resolution",onClick:function(){e.setResolution(e.resolution/5)}}]},{label:"Summary score mode",subMenu:["min","max","avg","whiskers"].map(function(t){return{label:t,type:"radio",checked:e.summaryScoreModeSetting===t,onClick:function(){e.setSummaryScoreMode(t)}}})}]:[]),[{label:"log"===e.scaleType?"Set linear scale":"Set log scale",onClick:function(){e.toggleLogScale()}},{label:"Autoscale type",subMenu:[["local","Local"]].concat(wv(e.hasGlobalStats?[["global","Global"],["globalsd","Global ± 3σ"]]:[]),[["localsd","Local ± 3σ"]]).map(function(t){var r,n,o=(n=2,function(e){if(Array.isArray(e))return e}(r=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(r,n)||Sv(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0];return{label:o[1],type:"radio",checked:e.autoscaleType===i,onClick:function(){e.setAutoscale(i)}}})},{label:"Set min/max score",onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Cv,{model:e,handleClose:t}]})}}])}}}).actions(function(e){var t=e.reload;return{reload:function(){return(r=bv().m(function r(){return bv().w(function(r){for(;;)switch(r.n){case 0:e.setError(),t();case 1:return r.a(2)}},r)}),function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){gv(i,n,o,a,l,"next",e)}function l(e){gv(i,n,o,a,l,"throw",e)}a(void 0)})})();var r}}})}function Ev(e){return Ev="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ev(e)}function jv(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Tv(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Tv(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Tv(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Tv(f,"constructor",c),Tv(c,"constructor",s),s.displayName="GeneratorFunction",Tv(c,o,"GeneratorFunction"),Tv(f),Tv(f,o,"Generator"),Tv(f,n,function(){return this}),Tv(f,"toString",function(){return"[object Generator]"}),(jv=function(){return{w:i,m:d}})()}function Tv(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Tv=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Tv(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Tv(e,t,r,n)}function _v(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Rv(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){_v(i,n,o,a,l,"next",e)}function l(e){_v(i,n,o,a,l,"throw",e)}a(void 0)})}}function Mv(e){return function(e){if(Array.isArray(e))return Iv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Iv(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Iv(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Iv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Nv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Dv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nv(Object(r),!0).forEach(function(t){Fv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Fv(e,t,r){return(t=function(e){var t=function(e){if("object"!=Ev(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ev(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ev(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Lv=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,50577))}),zv=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,66111))}),Bv=new Map([["xyplot","XYPlotRenderer"],["density","DensityRenderer"],["line","LinePlotRenderer"]]);const $v=function(e,t){return _.types.compose("LinearWiggleDisplay",Pv(t),_.types.model({type:_.types.literal("LinearWiggleDisplay"),invertedSetting:_.types.maybe(_.types.boolean)})).actions(function(e){return{setInverted:function(t){e.invertedSetting=t}}}).views(function(e){return{get TooltipComponent(){return Lv},get rendererTypeName(){var t=e.rendererTypeNameSimple,r=Bv.get(t);if(!r)throw new Error("unknown renderer ".concat(t));return r},get quantitativeStatsRelevantToCurrentZoom(){var t,r=(0,u.getContainingView)(e);return(null===(t=e.stats)||void 0===t?void 0:t.currStatsBpPerPx)===r.bpPerPx},get graphType(){return"XYPlotRenderer"===e.rendererTypeName||"LinePlotRenderer"===e.rendererTypeName},get inverted(){var t;return null!==(t=e.invertedSetting)&&void 0!==t?t:(0,s.getConf)(e,"inverted")}}}).views(function(e){var t=e.renderProps;return{adapterProps:function(){var r=t(),n=e.filters,o=e.resolution,i=e.scaleOpts;return Dv(Dv({},r),{},{rpcDriverName:e.rpcDriverName,displayModel:e,config:e.rendererConfig,displayCrossHatches:e.displayCrossHatchesSetting,scaleOpts:i,resolution:o,filters:n})},get ticks(){var t=e.inverted,r=e.scaleType,n=e.domain,o=e.height,i=(0,s.getConf)(e,"minimalTicks");if(n){var a=(0,mv.axisPropsFromTickScale)((0,Zb.getScale)({scaleType:r,domain:n,range:[o-Zb.YSCALEBAR_LABEL_OFFSET,Zb.YSCALEBAR_LABEL_OFFSET],inverted:t}),4);return o<100||i?Dv(Dv({},a),{},{values:n}):a}}}}).views(function(e){return{renderProps:function(){var t=e.inverted,r=e.ticks,n=e.height,o=e.adapterProps();return Dv(Dv({},e.adapterProps()),{},{notReady:o.notReady||!e.stats,height:n,ticks:r,inverted:t})},get fillSetting(){return e.filled?0:1===e.minSize?1:2},get quantitativeStatsReady(){return(0,u.getContainingView)(e).initialized&&e.statsReadyAndRegionNotTooLarge&&!e.error}}}).views(function(e){var t=e.trackMenuItems,r=(0,s.getConf)(e,"defaultRendering");return{trackMenuItems:function(){return[].concat(Mv(t()),[{label:"Score",icon:pv,subMenu:e.scoreTrackMenuItems()}],Mv(e.graphType?[{label:"Inverted",type:"checkbox",checked:e.inverted,onClick:function(){e.setInverted(!e.inverted)}}]:[]),Mv(e.canHaveFill?[{label:"Fill mode",subMenu:["filled","no fill","no fill w/ emphasis"].map(function(t,r){return{label:t,type:"radio",checked:e.fillSetting===r,onClick:function(){e.setFill(r)}}})}]:[]),Mv(r?[{label:"Renderer type",subMenu:["xyplot","density","line"].map(function(t){return{label:t,type:"radio",checked:e.rendererTypeNameSimple===t,onClick:function(){e.setRendererType(t)}}})}]:[]),[{label:"Color",icon:hv,onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[zv,{model:e,handleClose:t}]})}}],Mv(e.graphType?[{type:"checkbox",icon:Cp.A,label:"Show cross hatches",checked:e.displayCrossHatchesSetting,onClick:function(){e.toggleCrossHatches()}}]:[]))}}}).actions(function(e){var t=e.renderSvg;return{afterAttach:function(){Rv(jv().m(function t(){return jv().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then(o.bind(o,70084));case 1:(0,t.v.getQuantitativeStatsAutorun)(e);case 2:return t.a(2)}},t)}))()},renderSvg:function(r){return Rv(jv().m(function n(){var i,a;return jv().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,Promise.resolve().then(o.bind(o,44887));case 1:return i=n.v,a=i.renderSvg,n.a(2,a(e,r,t))}},n)}))()}}})};o(50577);var Gv=o(6666);const Hv=(0,s.ConfigurationSchema)("MultiDensityRenderer",{},{baseConfiguration:Ub,explicitlyTyped:!0});var Vv=o(14041);function Wv(e){return Wv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wv(e)}var Uv=["refName","start","end","source"];function qv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Xv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qv(Object(r),!0).forEach(function(t){Kv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Kv(e,t,r){return(t=function(e){var t=function(e){if("object"!=Wv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Wv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yv(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Jv(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jv(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function Jv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Zv=(0,T.observer)(function(e){var t=e.regions,r=e.features,n=e.bpPerPx,o=e.width,i=e.height,l=e.sources,s=e.onMouseLeave,f=void 0===s?function(){}:s,d=e.onMouseMove,p=void 0===d?function(){}:d,h=e.onFeatureClick,m=void 0===h?function(){}:h,y=e.displayModel,b=t[0],v=(0,a.useRef)(null),g=(y||{}).isMultiRow;function w(e,t){if(v.current){var a=v.current.getBoundingClientRect(),s=e-a.left,c=t-a.top,f=l[Math.floor(c/i*l.length)];if(f){var d,p=b.reversed?o-s:s,h=b.start+n*p;if(g){var m,y=Yv(r.values());try{for(y.s();!(m=y.n()).done;){var w=m.value;if(w.get("source")===f.name&&h<=w.get("end")+n&&h>=w.get("start")){d=w;break}}}catch(e){y.e(e)}finally{y.f()}}else{var S,A=[],O=Yv(r.values());try{for(O.s();!(S=O.n()).done;){var x=S.value;h<=x.get("end")+n&&h>=x.get("start")&&A.push(x)}}catch(e){O.e(e)}finally{O.f()}if(A.length){var k=Math.floor(h);d=new u.SimpleFeature(Xv(Xv({uniqueId:"mouseoverfeat",sources:Object.fromEntries(A.map(function(e){return e.toJSON()}).map(function(e){return e.refName,e.start,e.end,[e.source,function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Uv)]}))},b),{},{start:k,end:k+1}))}}return d}}}return Vv.createElement("div",{ref:v,onMouseMove:function(e){var t=w(e.clientX,e.clientY);p(e,t)},onClick:function(e){var t=w(e.clientX,e.clientY);m(e,t)},onMouseLeave:function(e){f(e)},style:{overflow:"visible",position:"relative",height:i}},Vv.createElement(c.PrerenderedCanvas,e))});const Qv=Zv;function eg(e){return eg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eg(e)}function tg(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return rg(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(rg(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,rg(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,rg(f,"constructor",c),rg(c,"constructor",s),s.displayName="GeneratorFunction",rg(c,o,"GeneratorFunction"),rg(f),rg(f,o,"Generator"),rg(f,n,function(){return this}),rg(f,"toString",function(){return"[object Generator]"}),(tg=function(){return{w:i,m:d}})()}function rg(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}rg=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){rg(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},rg(e,t,r,n)}function ng(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function og(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ng(Object(r),!0).forEach(function(t){ig(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ng(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ig(e,t,r){return(t=sg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ag(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function lg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,sg(n.key),n)}}function sg(e){var t=function(e){if("object"!=eg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=eg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eg(t)?t:t+""}function cg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cg=function(){return!!e})()}function ug(e){return ug=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ug(e)}function fg(e,t){return fg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fg(e,t)}var dg=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=ug(r=t),function(e,t){if(t&&("object"==eg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cg()?Reflect.construct(r,n||[],ug(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fg(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=tg().m(function e(t,r){var n,i,a,l,s,c,f,d;return tg().w(function(e){for(;;)switch(e.n){case 0:return n=r.stopToken,i=r.sources,a=r.features,l=(0,u.groupBy)(a.values(),function(e){return e.get("source")}),s=r.height/i.length,c=[],e.n=1,Promise.resolve().then(o.bind(o,60360));case 1:return f=e.v,d=f.drawDensity,t.save(),(0,u.forEachWithStopTokenCheck)(i,n,function(e){var n=l[e.name]||[],o=d(t,og(og({},r),{},{features:n,height:s})).reducedFeatures;t.translate(0,s),c=c.concat(o)}),t.restore(),e.a(2,{reducedFeatures:c})}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){ag(o,r,n,a,l,"next",e)}function l(e){ag(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&lg(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);function pg(e){return pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pg(e)}function hg(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return mg(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(mg(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,mg(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,mg(f,"constructor",c),mg(c,"constructor",s),s.displayName="GeneratorFunction",mg(c,o,"GeneratorFunction"),mg(f),mg(f,o,"Generator"),mg(f,n,function(){return this}),mg(f,"toString",function(){return"[object Generator]"}),(hg=function(){return{w:i,m:d}})()}function mg(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}mg=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){mg(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},mg(e,t,r,n)}function yg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function bg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yg(Object(r),!0).forEach(function(t){vg(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yg(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function vg(e,t,r){return(t=Sg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gg(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function wg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sg(n.key),n)}}function Sg(e){var t=function(e){if("object"!=pg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=pg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pg(t)?t:t+""}function Ag(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ag=function(){return!!e})()}function Og(e){return Og=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Og(e)}function xg(e,t){return xg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xg(e,t)}var kg=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=Og(r=t),function(e,t){if(t&&("object"==pg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ag()?Reflect.construct(r,n||[],Og(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xg(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=hg().m(function e(t,r){var n,i,a,l,s,c,f;return hg().w(function(e){for(;;)switch(e.n){case 0:return n=r.stopToken,i=r.sources,a=r.features,l=(0,u.groupBy)(a.values(),function(e){return e.get("source")}),e.n=1,Promise.resolve().then(o.bind(o,60852));case 1:return s=e.v,c=s.drawLine,f=[],(0,u.forEachWithStopTokenCheck)(i,n,function(e){var n=c(t,bg(bg({},r),{},{features:l[e.name]||[],colorCallback:function(){return e.color||"blue"}})).reducedFeatures;f=f.concat(n)}),e.a(2,{reducedFeatures:f})}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){gg(o,r,n,a,l,"next",e)}function l(e){gg(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&wg(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);const Cg=(0,s.ConfigurationSchema)("MultiLineRenderer",{displayCrossHatches:{type:"boolean",description:"choose to draw cross hatches (sideways lines)",defaultValue:!1},summaryScoreMode:{type:"stringEnum",model:_.types.enumeration("Score type",["max","min","avg","whiskers"]),description:"choose whether to use max/min/average or whiskers which combines all three into the same rendering",defaultValue:"avg"}},{baseConfiguration:Ub,explicitlyTyped:!0});var Pg=o(21199);function Eg(e){return Eg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eg(e)}function jg(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Tg(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Tg(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Tg(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Tg(f,"constructor",c),Tg(c,"constructor",s),s.displayName="GeneratorFunction",Tg(c,o,"GeneratorFunction"),Tg(f),Tg(f,o,"Generator"),Tg(f,n,function(){return this}),Tg(f,"toString",function(){return"[object Generator]"}),(jg=function(){return{w:i,m:d}})()}function Tg(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Tg=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Tg(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Tg(e,t,r,n)}function _g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||Ng(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rg(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Mg(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Rg(i,n,o,a,l,"next",e)}function l(e){Rg(i,n,o,a,l,"throw",e)}a(void 0)})}}function Ig(e){return function(e){if(Array.isArray(e))return Dg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ng(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ng(e,t){if(e){if("string"==typeof e)return Dg(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dg(e,t):void 0}}function Dg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Fg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Lg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fg(Object(r),!0).forEach(function(t){zg(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fg(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function zg(e,t,r){return(t=function(e){var t=function(e){if("object"!=Eg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Eg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Eg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Bg=function(){return"#000000".replaceAll("0",function(){return(~~(16*Math.random())).toString(16)})},$g=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,24516))}),Gg=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,38799))}),Hg=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,47627))}),Vg=new Map([["xyplot","MultiXYPlotRenderer"],["multirowxy","MultiRowXYPlotRenderer"],["multirowdensity","MultiDensityRenderer"],["multiline","MultiLineRenderer"],["multirowline","MultiRowLineRenderer"]]);const Wg=function(e,t){return _.types.compose("MultiLinearWiggleDisplay",Pv(t),_.types.model({type:_.types.literal("MultiLinearWiggleDisplay"),layout:_.types.optional(_.types.frozen(),[]),showSidebar:!0})).volatile(function(){return{sourcesLoadingStopToken:void 0,featureUnderMouseVolatile:void 0,sourcesVolatile:void 0}}).actions(function(e){return{setShowSidebar:function(t){e.showSidebar=t},setSourcesLoading:function(t){e.sourcesLoadingStopToken&&(0,Sp.CF)(e.sourcesLoadingStopToken),e.sourcesLoadingStopToken=t},setLayout:function(t){e.layout=t},clearLayout:function(){e.layout=[]},setSources:function(t){Ep()(t,e.sourcesVolatile)||(e.sourcesVolatile=t)},setFeatureUnderMouse:function(t){e.featureUnderMouseVolatile=t}}}).views(function(e){return{get featureUnderMouse(){return e.featureUnderMouseVolatile},get TooltipComponent(){return $g},get rendererTypeName(){var t=e.rendererTypeNameSimple,r=Vg.get(t);if(!r)throw new Error("unknown renderer ".concat(t));return r}}}).views(function(e){return{get graphType(){return"MultiXYPlotRenderer"===e.rendererTypeName||"MultiRowXYPlotRenderer"===e.rendererTypeName||"MultiLineRenderer"===e.rendererTypeName||"MultiRowLineRenderer"===e.rendererTypeName},get needsFullHeightScalebar(){return"MultiXYPlotRenderer"===e.rendererTypeName||"MultiLineRenderer"===e.rendererTypeName},get isMultiRow(){return"MultiRowXYPlotRenderer"===e.rendererTypeName||"MultiRowLineRenderer"===e.rendererTypeName||"MultiDensityRenderer"===e.rendererTypeName},get needsCustomLegend(){return"MultiDensityRenderer"===e.rendererTypeName},get canHaveFill(){return"MultiXYPlotRenderer"===e.rendererTypeName||"MultiRowXYPlotRenderer"===e.rendererTypeName},get renderColorBoxes(){return!("MultiRowLineRenderer"===e.rendererTypeName||"MultiRowXYPlotRenderer"===e.rendererTypeName)},get prefersOffset(){return this.isMultiRow},get sourcesWithoutLayout(){var t,r=this,n=Object.fromEntries((null===(t=e.sourcesVolatile)||void 0===t?void 0:t.map(function(e){return[e.name,e]}))||[]),o=e.sourcesVolatile;return null==o?void 0:o.map(function(e){return Lg(Lg({},n[e.name]),e)}).map(function(e,t){return Lg(Lg({},e),{},{color:e.color||(r.isMultiRow?"blue":Pg.set1[t]||Bg())})})},get sources(){var t,r=this,n=Object.fromEntries((null===(t=e.sourcesVolatile)||void 0===t?void 0:t.map(function(e){return[e.name,e]}))||[]),o=e.layout.length?e.layout:e.sourcesVolatile;return null==o?void 0:o.map(function(e){return Lg(Lg({},n[e.name]),e)}).map(function(e,t){return Lg(Lg({},e),{},{color:e.color||(r.isMultiRow?"blue":Pg.set1[t]||Bg())})})},get quantitativeStatsReady(){return(0,u.getContainingView)(e).initialized&&e.statsReadyAndRegionNotTooLarge&&!e.error}}}).views(function(e){return{get rowHeight(){var t=e.sources,r=e.height;return e.isMultiRow?r/((null==t?void 0:t.length)||1):r},get rowHeightTooSmallForScalebar(){return this.rowHeight<70},get useMinimalTicks(){return(0,s.getConf)(e,"minimalTicks")||this.rowHeightTooSmallForScalebar}}}).views(function(e){var t=e.renderProps;return{adapterProps:function(){return Lg(Lg({},t()),{},{displayModel:e,config:e.rendererConfig,filters:e.filters,resolution:e.resolution,rpcDriverName:e.rpcDriverName,sources:e.sources})},get ticks(){var t=e.scaleType,r=e.domain,n=e.isMultiRow,o=e.rowHeight,i=e.useMinimalTicks;if(r){var a=n?0:Zb.YSCALEBAR_LABEL_OFFSET,l=(0,mv.axisPropsFromTickScale)((0,Zb.getScale)({scaleType:t,domain:r,range:[o-a,a],inverted:(0,s.getConf)(e,"inverted")}),4);return i?Lg(Lg({},l),{},{values:r}):l}},get colors(){return["red","blue","green","orange","purple","cyan","pink","darkblue","darkred","pink"]},get quantitativeStatsRelevantToCurrentZoom(){var t,r=(0,u.getContainingView)(e);return(null===(t=e.stats)||void 0===t?void 0:t.currStatsBpPerPx)===r.bpPerPx}}}).views(function(e){return{get legendFontSize(){return Math.min(e.rowHeight,12)},get canDisplayLegendLabels(){return e.rowHeight>11},get labelWidth(){var t,r=this;return(0,u.max)((null===(t=e.sources)||void 0===t?void 0:t.map(function(e){return(0,u.measureText)(e.name,r.legendFontSize)}).map(function(e){return r.canDisplayLegendLabels?e:20}))||[])},renderProps:function(){var t=e.adapterProps();return Lg(Lg({},t),{},{notReady:t.notReady||!e.sources||!e.stats,displayModel:e,rpcDriverName:e.rpcDriverName,displayCrossHatches:e.displayCrossHatches,height:e.height,ticks:e.ticks,stats:e.stats,scaleOpts:e.scaleOpts,onMouseMove:function(t,r){e.setFeatureUnderMouse(r)},onMouseLeave:function(){e.setFeatureUnderMouse(void 0)}})},get hasResolution(){return e.adapterCapabilities.includes("hasResolution")},get hasGlobalStats(){return e.adapterCapabilities.includes("hasGlobalStats")},get fillSetting(){return e.filled?0:1===e.minSize?1:2}}}).views(function(e){var t=e.trackMenuItems,r=(0,s.getConf)(e,"defaultRendering");return{trackMenuItems:function(){return[].concat(Ig(t()),[{label:"Score",subMenu:e.scoreTrackMenuItems()}],Ig(e.canHaveFill?[{label:"Fill mode",subMenu:["filled","no fill","no fill w/ emphasis"].map(function(t,r){return{label:t,type:"radio",checked:e.fillSetting===r,onClick:function(){e.setFill(r)}}})}]:[]),Ig(r?[{label:"Renderer type",subMenu:["xyplot","multirowxy","multirowdensity","multiline","multirowline"].map(function(t){return{label:t,type:"radio",checked:e.rendererTypeNameSimple===t,onClick:function(){e.setRendererType(t)}}})}]:[]),Ig(e.graphType?[{type:"checkbox",label:"Draw cross hatches",checked:e.displayCrossHatchesSetting,onClick:function(){e.toggleCrossHatches()}}]:[]),[{label:"Cluster by score",onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Hg,{model:e,handleClose:t}]})}},{label:"Show sidebar",type:"checkbox",checked:e.showSidebar,onClick:function(){e.setShowSidebar(!e.showSidebar)}},{label:"Edit colors/arrangement...",onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Gg,{model:e,handleClose:t}]})}}])}}}).actions(function(e){var t=e.renderSvg;return{afterAttach:function(){Mg(jg().m(function t(){var r,n,i,a;return jg().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,Promise.all([Promise.resolve().then(o.bind(o,62238)),Promise.resolve().then(o.bind(o,70084))]);case 1:r=t.v,n=_g(r,2),i=n[0].getMultiWiggleSourcesAutorun,(0,n[1].getQuantitativeStatsAutorun)(e),i(e),t.n=3;break;case 2:t.p=2,a=t.v,(0,_.isAlive)(e)&&(console.error(a),(0,u.getSession)(e).notifyError("".concat(a),a));case 3:return t.a(2)}},t,null,[[0,2]])}))()},renderSvg:function(r){return Mg(jg().m(function n(){var i,a;return jg().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,Promise.resolve().then(o.bind(o,10916));case 1:return i=n.v,a=i.renderSvg,n.a(2,a(e,r,t))}},n)}))()}}})};function Ug(e){return Ug="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ug(e)}function qg(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Xg(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Xg(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Xg(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Xg(f,"constructor",c),Xg(c,"constructor",s),s.displayName="GeneratorFunction",Xg(c,o,"GeneratorFunction"),Xg(f),Xg(f,o,"Generator"),Xg(f,n,function(){return this}),Xg(f,"toString",function(){return"[object Generator]"}),(qg=function(){return{w:i,m:d}})()}function Xg(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Xg=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Xg(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Xg(e,t,r,n)}function Kg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Yg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kg(Object(r),!0).forEach(function(t){Jg(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kg(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Jg(e,t,r){return(t=ew(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zg(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Qg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ew(n.key),n)}}function ew(e){var t=function(e){if("object"!=Ug(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ug(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ug(t)?t:t+""}function tw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tw=function(){return!!e})()}function rw(e){return rw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rw(e)}function nw(e,t){return nw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nw(e,t)}var ow=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=rw(r=t),function(e,t){if(t&&("object"==Ug(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tw()?Reflect.construct(r,n||[],rw(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nw(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=qg().m(function e(t,r){var n,i,a,l,s,c,f,d,p,h,m,y;return qg().w(function(e){for(;;)switch(e.n){case 0:return n=r.stopToken,i=r.bpPerPx,a=r.sources,l=r.regions,s=r.features,c=l[0],f=(0,u.groupBy)(s.values(),function(e){return e.get("source")}),d=r.height/a.length,p=(c.end-c.start)/i,e.n=1,Promise.resolve().then(o.bind(o,60852));case 1:return h=e.v,m=h.drawLine,y=[],t.save(),(0,u.forEachWithStopTokenCheck)(a,n,function(e){var n=m(t,Yg(Yg({},r),{},{features:f[e.name]||[],height:d,colorCallback:function(){return e.color||"blue"}})).reducedFeatures;t.strokeStyle="rgba(200,200,200,0.8)",t.beginPath(),t.moveTo(0,d),t.lineTo(p,d),t.stroke(),t.translate(0,d),y=y.concat(n)}),t.restore(),e.a(2,{reducedFeatures:y})}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){Zg(o,r,n,a,l,"next",e)}function l(e){Zg(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&Qg(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);const iw=(0,s.ConfigurationSchema)("MultiRowLineRenderer",{displayCrossHatches:{type:"boolean",description:"choose to draw cross hatches (sideways lines)",defaultValue:!1},summaryScoreMode:{type:"stringEnum",model:_.types.enumeration("Score type",["max","min","avg","whiskers"]),description:"choose whether to use max/min/average or whiskers which combines all three into the same rendering",defaultValue:"avg"}},{baseConfiguration:Ub,explicitlyTyped:!0});function aw(e){return aw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aw(e)}function lw(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return sw(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(sw(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,sw(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,sw(f,"constructor",c),sw(c,"constructor",s),s.displayName="GeneratorFunction",sw(c,o,"GeneratorFunction"),sw(f),sw(f,o,"Generator"),sw(f,n,function(){return this}),sw(f,"toString",function(){return"[object Generator]"}),(lw=function(){return{w:i,m:d}})()}function sw(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}sw=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){sw(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},sw(e,t,r,n)}function cw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function uw(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cw(Object(r),!0).forEach(function(t){fw(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cw(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function fw(e,t,r){return(t=hw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dw(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function pw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hw(n.key),n)}}function hw(e){var t=function(e){if("object"!=aw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=aw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==aw(t)?t:t+""}function mw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mw=function(){return!!e})()}function yw(e){return yw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yw(e)}function bw(e,t){return bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bw(e,t)}var vw=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=yw(r=t),function(e,t){if(t&&("object"==aw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,mw()?Reflect.construct(r,n||[],yw(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bw(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=lw().m(function e(t,r){var n,i,a,l,s,c,f,d,p,h,m,y;return lw().w(function(e){for(;;)switch(e.n){case 0:return n=r.stopToken,i=r.bpPerPx,a=r.sources,l=r.regions,s=r.features,c=l[0],f=(0,u.groupBy)(s.values(),function(e){return e.get("source")}),d=r.height/a.length,p=(c.end-c.start)/i,e.n=1,Promise.resolve().then(o.bind(o,83237));case 1:return h=e.v,m=h.drawXY,y=[],t.save(),(0,u.forEachWithStopTokenCheck)(a,n,function(e){var n=m(t,uw(uw({},r),{},{features:f[e.name]||[],height:d,colorCallback:function(){return e.color||"blue"}})).reducedFeatures;t.strokeStyle="rgba(200,200,200,0.8)",t.beginPath(),t.moveTo(0,d),t.lineTo(p,d),t.stroke(),t.translate(0,d),y=y.concat(n)}),t.restore(),e.a(2,{reducedFeatures:y})}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){dw(o,r,n,a,l,"next",e)}function l(e){dw(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&pw(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);const gw=(0,s.ConfigurationSchema)("MultiRowXYPlotRenderer",{filled:{type:"boolean",defaultValue:!0},displayCrossHatches:{type:"boolean",description:"choose to draw cross hatches (sideways lines)",defaultValue:!1},summaryScoreMode:{type:"stringEnum",model:_.types.enumeration("Score type",["max","min","avg","whiskers"]),description:"choose whether to use max/min/average or whiskers which combines all three into the same rendering",defaultValue:"whiskers"},minSize:{type:"number",defaultValue:.7}},{baseConfiguration:Ub,explicitlyTyped:!0}),ww=(0,s.ConfigurationSchema)("MultiWiggleAdapter",{subadapters:{type:"frozen",defaultValue:[],description:"array of subadapter JSON objects"},bigWigs:{type:"frozen",description:"array of bigwig filenames, alternative to the subadapters slot",defaultValue:[]}},{explicitlyTyped:!0});function Sw(e){return Sw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sw(e)}function Aw(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Ow(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ow(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ow(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Ow(f,"constructor",c),Ow(c,"constructor",s),s.displayName="GeneratorFunction",Ow(c,o,"GeneratorFunction"),Ow(f),Ow(f,o,"Generator"),Ow(f,n,function(){return this}),Ow(f,"toString",function(){return"[object Generator]"}),(Aw=function(){return{w:i,m:d}})()}function Ow(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ow=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ow(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ow(e,t,r,n)}function xw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function kw(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xw(Object(r),!0).forEach(function(t){Cw(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xw(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Cw(e,t,r){return(t=jw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pw(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ew(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jw(n.key),n)}}function jw(e){var t=function(e){if("object"!=Sw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Sw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sw(t)?t:t+""}function Tw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tw=function(){return!!e})()}function _w(e){return _w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_w(e)}function Rw(e,t){return Rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rw(e,t)}var Mw=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=_w(r=t),function(e,t){if(t&&("object"==Sw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Tw()?Reflect.construct(r,n||[],_w(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rw(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=Aw().m(function e(t,r){var n,i,a,l,s,c,f;return Aw().w(function(e){for(;;)switch(e.n){case 0:return n=r.stopToken,i=r.sources,a=r.features,l=(0,u.groupBy)(a.values(),function(e){return e.get("source")}),e.n=1,Promise.resolve().then(o.bind(o,83237));case 1:return s=e.v,c=s.drawXY,f=[],(0,u.forEachWithStopTokenCheck)(i,n,function(e){var n=l[e.name]||[],o=c(t,kw(kw({},r),{},{features:n,offset:Zb.YSCALEBAR_LABEL_OFFSET,colorCallback:function(){return e.color||"blue"}})).reducedFeatures;f=f.concat(o)}),e.a(2,{reducedFeatures:f})}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){Pw(o,r,n,a,l,"next",e)}function l(e){Pw(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&Ew(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);const Iw=(0,s.ConfigurationSchema)("MultiXYPlotRenderer",{filled:{type:"boolean",defaultValue:!0},displayCrossHatches:{type:"boolean",description:"choose to draw cross hatches (sideways lines)",defaultValue:!1},summaryScoreMode:{type:"stringEnum",model:_.types.enumeration("Score type",["max","min","avg","whiskers"]),description:"choose whether to use max/min/average or whiskers which combines all three into the same rendering",defaultValue:"avg"},minSize:{type:"number",defaultValue:.7}},{baseConfiguration:Ub,explicitlyTyped:!0});function Nw(e){return Nw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nw(e)}function Dw(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Fw(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Fw(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Fw(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Fw(f,"constructor",c),Fw(c,"constructor",s),s.displayName="GeneratorFunction",Fw(c,o,"GeneratorFunction"),Fw(f),Fw(f,o,"Generator"),Fw(f,n,function(){return this}),Fw(f,"toString",function(){return"[object Generator]"}),(Dw=function(){return{w:i,m:d}})()}function Fw(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Fw=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Fw(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Fw(e,t,r,n)}function Lw(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function zw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Hw(n.key),n)}}function Bw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Bw=function(){return!!e})()}function $w(e){return $w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$w(e)}function Gw(e,t){return Gw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gw(e,t)}function Hw(e){var t=function(e){if("object"!=Nw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Nw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nw(t)?t:t+""}var Vw=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Hw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=$w(n),e=function(e,t){if(t&&("object"==Nw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Bw()?Reflect.construct(n,o||[],$w(r).constructor):n.apply(r,o))),"name","MultiWiggleGetSources"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gw(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=Dw().m(function e(t,r){var n,o,i,a,l,s,c;return Dw().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.regions,a=o.adapterConfig,l=o.sessionId,e.n=2,(0,je.cK)(n,l,a);case 2:return s=e.v,c=s.dataAdapter,e.a(2,c.getSources(i,o))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){Lw(i,r,n,a,l,"next",e)}function l(e){Lw(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&zw(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function Ww(e){return Ww="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ww(e)}function Uw(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return qw(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(qw(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,qw(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,qw(f,"constructor",c),qw(c,"constructor",s),s.displayName="GeneratorFunction",qw(c,o,"GeneratorFunction"),qw(f),qw(f,o,"Generator"),qw(f,n,function(){return this}),qw(f,"toString",function(){return"[object Generator]"}),(Uw=function(){return{w:i,m:d}})()}function qw(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}qw=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){qw(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},qw(e,t,r,n)}function Xw(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Kw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qw(n.key),n)}}function Yw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yw=function(){return!!e})()}function Jw(e){return Jw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jw(e)}function Zw(e,t){return Zw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zw(e,t)}function Qw(e){var t=function(e){if("object"!=Ww(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ww(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ww(t)?t:t+""}var eS=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Qw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=Jw(n),e=function(e,t){if(t&&("object"==Ww(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Yw()?Reflect.construct(n,o||[],Jw(r).constructor):n.apply(r,o))),"name","WiggleGetMultiRegionQuantitativeStats"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zw(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=Uw().m(function e(t,r){var n,o,i,a,l,s,c;return Uw().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.regions,a=o.adapterConfig,l=o.sessionId,e.n=2,(0,je.cK)(n,l,a);case 2:return s=e.v,c=s.dataAdapter,e.a(2,c.getMultiRegionQuantitativeStats(i,o))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){Xw(i,r,n,a,l,"next",e)}function l(e){Xw(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&Kw(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function tS(e){return tS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tS(e)}function rS(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return nS(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(nS(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,nS(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,nS(f,"constructor",c),nS(c,"constructor",s),s.displayName="GeneratorFunction",nS(c,o,"GeneratorFunction"),nS(f),nS(f,o,"Generator"),nS(f,n,function(){return this}),nS(f,"toString",function(){return"[object Generator]"}),(rS=function(){return{w:i,m:d}})()}function nS(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}nS=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){nS(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},nS(e,t,r,n)}function oS(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function iS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cS(n.key),n)}}function aS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aS=function(){return!!e})()}function lS(e){return lS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lS(e)}function sS(e,t){return sS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sS(e,t)}function cS(e){var t=function(e){if("object"!=tS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=tS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tS(t)?t:t+""}var uS=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=cS(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=lS(n),e=function(e,t){if(t&&("object"==tS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,aS()?Reflect.construct(n,o||[],lS(r).constructor):n.apply(r,o))),"name","WiggleGetGlobalQuantitativeStats"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sS(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=rS().m(function e(t,r){var n,o,i,a,l,s;return rS().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.adapterConfig,a=o.sessionId,e.n=2,(0,je.cK)(n,a,i);case 2:return l=e.v,s=l.dataAdapter,e.a(2,s.getGlobalStats(o))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){oS(i,r,n,a,l,"next",e)}function l(e){oS(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&iS(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function fS(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return dS(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(dS(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,dS(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,dS(f,"constructor",c),dS(c,"constructor",s),s.displayName="GeneratorFunction",dS(c,o,"GeneratorFunction"),dS(f),dS(f,o,"Generator"),dS(f,n,function(){return this}),dS(f,"toString",function(){return"[object Generator]"}),(fS=function(){return{w:i,m:d}})()}function dS(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}dS=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){dS(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},dS(e,t,r,n)}function pS(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return hS(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hS(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function hS(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function mS(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function yS(e){return bS.apply(this,arguments)}function bS(){var e;return e=fS().m(function e(t){var r,n,o,i,a,l,s,c,f,d,p,h,m,y,b,v,g,w,S,A,O,x,k,C,P,E,j,T,_;return fS().w(function(e){for(;;)switch(e.n){case 0:return r=t.pluginManager,n=t.args,o=n.sources,i=n.regions,a=n.adapterConfig,l=n.sessionId,s=n.bpPerPx,e.n=1,(0,je.cK)(r,l,a);case 1:return c=e.v,f=c.dataAdapter,d=i[0],p=d.end-d.start,h=Math.floor(p/s),e.n=2,(0,wt._)(f.getFeatures(d,n).pipe((0,St.$)()));case 2:m=e.v,y=(0,u.groupBy)(m,function(e){return e.get("source")}),b={},v=pS(o);try{for(v.s();!(g=v.n()).done;){w=g.value,S=w.name,A=y[S]||[],O=new Array(h).fill(0),x=pS(A);try{for(x.s();!(k=x.n()).done;)for(C=k.value,P=C.get("start"),E=C.get("end"),j=C.get("score"),T=P;T<E;T+=s)(_=Math.floor((T-d.start)/s))>=0&&_<h&&(O[_]||(O[_]=j))}catch(e){x.e(e)}finally{x.f()}b[S]=O}}catch(e){v.e(e)}finally{v.f()}return e.a(2,b)}},e)}),bS=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){mS(i,n,o,a,l,"next",e)}function l(e){mS(i,n,o,a,l,"throw",e)}a(void 0)})},bS.apply(this,arguments)}function vS(e){return vS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vS(e)}function gS(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return wS(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(wS(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,wS(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,wS(f,"constructor",c),wS(c,"constructor",s),s.displayName="GeneratorFunction",wS(c,o,"GeneratorFunction"),wS(f),wS(f,o,"Generator"),wS(f,n,function(){return this}),wS(f,"toString",function(){return"[object Generator]"}),(gS=function(){return{w:i,m:d}})()}function wS(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}wS=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){wS(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},wS(e,t,r,n)}function SS(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function AS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,CS(n.key),n)}}function OS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(OS=function(){return!!e})()}function xS(e){return xS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xS(e)}function kS(e,t){return kS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kS(e,t)}function CS(e){var t=function(e){if("object"!=vS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=vS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vS(t)?t:t+""}var PS=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=CS(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=xS(n),e=function(e,t){if(t&&("object"==vS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,OS()?Reflect.construct(n,o||[],xS(r).constructor):n.apply(r,o))),"name","MultiWiggleGetScoreMatrix"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kS(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=gS().m(function e(t,r){var n;return gS().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.deserializeArguments(t,r);case 1:return n=e.v,e.a(2,yS({args:n,pluginManager:this.pluginManager}))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){SS(i,r,n,a,l,"next",e)}function l(e){SS(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&AS(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function ES(e){return ES="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ES(e)}function jS(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return TS(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(TS(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,TS(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,TS(f,"constructor",c),TS(c,"constructor",s),s.displayName="GeneratorFunction",TS(c,o,"GeneratorFunction"),TS(f),TS(f,o,"Generator"),TS(f,n,function(){return this}),TS(f,"toString",function(){return"[object Generator]"}),(jS=function(){return{w:i,m:d}})()}function TS(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}TS=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){TS(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},TS(e,t,r,n)}function _S(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function RS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,DS(n.key),n)}}function MS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(MS=function(){return!!e})()}function IS(e){return IS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},IS(e)}function NS(e,t){return NS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},NS(e,t)}function DS(e){var t=function(e){if("object"!=ES(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ES(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ES(t)?t:t+""}var FS=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=DS(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=IS(n),e=function(e,t){if(t&&("object"==ES(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,MS()?Reflect.construct(n,o||[],IS(r).constructor):n.apply(r,o))),"name","MultiWiggleClusterScoreMatrix"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&NS(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=jS().m(function e(t,r){var n,o;return jS().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.deserializeArguments(t,r);case 1:return n=e.v,e.n=2,yS({pluginManager:this.pluginManager,args:n});case 2:return o=e.v,e.a(2,qm({data:Object.values(o),stopToken:n.stopToken,onProgress:function(e){var t;null===(t=n.statusCallback)||void 0===t||t.call(n,e)}}))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){_S(i,r,n,a,l,"next",e)}function l(e){_S(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&RS(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function LS(e){return LS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},LS(e)}function zS(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return BS(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(BS(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,BS(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,BS(f,"constructor",c),BS(c,"constructor",s),s.displayName="GeneratorFunction",BS(c,o,"GeneratorFunction"),BS(f),BS(f,o,"Generator"),BS(f,n,function(){return this}),BS(f,"toString",function(){return"[object Generator]"}),(zS=function(){return{w:i,m:d}})()}function BS(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}BS=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){BS(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},BS(e,t,r,n)}function $S(e){return function(e){if(Array.isArray(e))return GS(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return GS(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GS(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GS(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function HS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function VS(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?HS(Object(r),!0).forEach(function(t){WS(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HS(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function WS(e,t,r){return(t=XS(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function US(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function qS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,XS(n.key),n)}}function XS(e){var t=function(e){if("object"!=LS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=LS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==LS(t)?t:t+""}function KS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(KS=function(){return!!e})()}function YS(e){return YS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},YS(e)}function JS(e,t){return JS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},JS(e,t)}var ZS=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=YS(r=t),function(e,t){if(t&&("object"==LS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,KS()?Reflect.construct(r,n||[],YS(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&JS(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=zS().m(function e(t,r){var n,i,a,l,c,u,f,d,p;return zS().w(function(e){for(;;)switch(e.n){case 0:return n=r.inverted,i=r.stopToken,a=r.features,l=r.config,e.n=1,Promise.resolve().then(o.bind(o,83237));case 1:return c=e.v,u=c.drawXY,f=(0,s.readConfObject)(l,"bicolorPivotValue"),d=(0,s.readConfObject)(l,"negColor"),p=(0,s.readConfObject)(l,"posColor"),e.a(2,u(t,VS(VS({},r),{},{colorCallback:l.color.isCallback?function(e,t){return(0,s.readConfObject)(l,"color",{feature:e})}:function(e,t){return t<f?d:p},offset:Zb.YSCALEBAR_LABEL_OFFSET,features:$S(a.values()),inverted:n,stopToken:i})))}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){US(o,r,n,a,l,"next",e)}function l(e){US(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&qS(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);const QS=(0,s.ConfigurationSchema)("XYPlotRenderer",{filled:{type:"boolean",defaultValue:!0},displayCrossHatches:{type:"boolean",description:"choose to draw cross hatches (sideways lines)",defaultValue:!1},summaryScoreMode:{type:"stringEnum",model:_.types.enumeration("Score type",["max","min","avg","whiskers"]),description:"choose whether to use max/min/average or whiskers which combines all three into the same rendering",defaultValue:"whiskers"},minSize:{type:"number",defaultValue:.7}},{baseConfiguration:Ub,explicitlyTyped:!0});function eA(e){return eA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eA(e)}function tA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,aA(n.key),n)}}function rA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rA=function(){return!!e})()}function nA(e){return nA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nA(e)}function oA(e,t){return oA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oA(e,t)}function iA(e,t,r){return(t=aA(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aA(e){var t=function(e){if("object"!=eA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=eA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eA(t)?t:t+""}var lA=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return iA((r=this,n=t,o=[].concat(a),n=nA(n),e=function(e,t){if(t&&("object"==eA(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,rA()?Reflect.construct(n,o||[],nA(r).constructor):n.apply(r,o))),"name","WigglePlugin"),iA(e,"exports",{LinearWiggleDisplayReactComponent:Gv.default,XYPlotRendererReactComponent:Yb,XYPlotRenderer:ZS,WiggleBaseRenderer:Nb,linearWiggleDisplayModelFactory:$v,xyPlotRendererConfigSchema:QS,utils:Zb}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oA(e,t)}(t,e),r=t,n=[{key:"install",value:function(e){e.addAdapterType(function(){return new lo.A({name:"MultiWiggleAdapter",displayName:"Multi-wiggle adapter",configSchema:ww,adapterCapabilities:["hasResolution","hasLocalStats","hasGlobalStats"],adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,35409)).then(function(e){return e.default})}})}),e.addAdapterType(function(){return new lo.A({name:"BigWigAdapter",displayName:"BigWig adapter",configSchema:fb,adapterCapabilities:["hasResolution","hasLocalStats","hasGlobalStats"],getAdapterClass:function(){return Promise.resolve().then(o.bind(o,38859)).then(function(e){return e.default})}})}),function(e){e.addTrackType(function(){var t=function(e){return(0,s.ConfigurationSchema)("QuantitativeTrack",{},{baseConfiguration:(0,fo.createBaseTrackConfig)(e)})}(e);return new co.A({name:"QuantitativeTrack",displayName:"Quantitative track",configSchema:t,stateModel:(0,fo.createBaseTrackModel)(e,"QuantitativeTrack",t)})})}(e),function(e){e.addTrackType(function(){var t=function(e){return(0,s.ConfigurationSchema)("MultiQuantitativeTrack",{},{baseConfiguration:(0,fo.createBaseTrackConfig)(e)})}(e);return new co.A({name:"MultiQuantitativeTrack",displayName:"Multi-quantitative track",configSchema:t,stateModel:(0,fo.createBaseTrackModel)(e,"MultiQuantitativeTrack",t)})})}(e),function(e){e.addDisplayType(function(){var t=function(e){var t=e.getRendererType("XYPlotRenderer").configSchema,r=e.getRendererType("DensityRenderer").configSchema,n=e.getRendererType("LinePlotRenderer").configSchema;return(0,s.ConfigurationSchema)("LinearWiggleDisplay",{defaultRendering:{type:"stringEnum",model:_.types.enumeration("Rendering",["density","xyplot","line"]),defaultValue:"xyplot"},renderers:(0,s.ConfigurationSchema)("RenderersConfiguration",{DensityRenderer:r,XYPlotRenderer:t,LinePlotRenderer:n})},{baseConfiguration:dv(),explicitlyTyped:!0})}(e),r=$v(0,t);return new so.A({name:"LinearWiggleDisplay",displayName:"Wiggle display",configSchema:t,stateModel:r,trackType:"QuantitativeTrack",viewType:"LinearGenomeView",ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,6666))})})})}(e),function(e){e.addDisplayType(function(){var t=function(e){var t=e.getRendererType("MultiXYPlotRenderer").configSchema,r=e.getRendererType("MultiDensityRenderer").configSchema,n=e.getRendererType("MultiRowXYPlotRenderer").configSchema,o=e.getRendererType("MultiLineRenderer").configSchema,i=e.getRendererType("MultiRowLineRenderer").configSchema;return(0,s.ConfigurationSchema)("MultiLinearWiggleDisplay",{defaultRendering:{type:"stringEnum",model:_.types.enumeration("Rendering",["multirowxy","xyplot","multirowdensity","multiline","multirowline"]),defaultValue:"multirowxy"},renderers:(0,s.ConfigurationSchema)("RenderersConfiguration",{MultiXYPlotRenderer:t,MultiDensityRenderer:r,MultiRowXYPlotRenderer:n,MultiLineRenderer:o,MultiRowLineRenderer:i}),height:{type:"number",defaultValue:200}},{baseConfiguration:dv(),explicitlyTyped:!0})}(e);return new so.A({name:"MultiLinearWiggleDisplay",displayName:"Multi-wiggle display",configSchema:t,stateModel:Wg(0,t),trackType:"MultiQuantitativeTrack",viewType:"LinearGenomeView",ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,1585))})})})}(e),function(e){e.addRendererType(function(){return new fv({name:"LinePlotRenderer",ReactComponent:Yb,configSchema:Jb,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new ZS({name:"XYPlotRenderer",ReactComponent:Yb,configSchema:QS,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new Wb({name:"DensityRenderer",ReactComponent:Yb,configSchema:qb,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new Mw({name:"MultiXYPlotRenderer",ReactComponent:Qv,configSchema:Iw,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new vw({name:"MultiRowXYPlotRenderer",ReactComponent:Qv,configSchema:gw,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new dg({name:"MultiDensityRenderer",ReactComponent:Qv,configSchema:Hv,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new kg({name:"MultiLineRenderer",ReactComponent:Qv,configSchema:Cg,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new ow({name:"MultiRowLineRenderer",ReactComponent:Qv,configSchema:iw,pluginManager:e})})}(e),function(e){e.addAddTrackWorkflowType(function(){return new Ce.AddTrackWorkflowType({name:"Multi-wiggle track",ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,16149))}),stateModel:_.types.model({})})})}(e),function(e){e.addToExtensionPoint("TrackSelector-multiTrackMenuItems",function(e,t){var r=t.session;return[].concat(pb(e),pb((0,u.isSessionWithAddTracks)(r)?[{label:"Create multi-wiggle track",onClick:function(e){var t=e.selection;(0,u.getSession)(e).queueDialog(function(r){return[vb,{tracks:t,onClose:function(t,n){t&&n&&function(e){var t=e.model,r=e.arg,n=t.selection,o=n.map(function(e){return(0,s.readConfObject)(e,"name")}),i=n.map(function(e){return(0,s.readConfObject)(e,"adapter")}).map(function(e,t){return yb(yb({},e),{},{source:o[t]})}),a=+Date.now(),l="multitrack-".concat(a,"-sessionTrack"),c=(0,u.getSession)(t);(0,u.isSessionWithAddTracks)(c)&&(c.addTrackConf({type:"MultiQuantitativeTrack",trackId:l,name:r.name,assemblyNames:pb(new Set(n.flatMap(function(e){return(0,s.readConfObject)(e,"assemblyNames")}))),adapter:{type:"MultiWiggleAdapter",subadapters:i}}),t.view.showTrack(l))}({model:e,arg:n}),r()}}]})}}]:[]))})}(e),function(e){e.addToExtensionPoint("Core-guessAdapterForLocation",function(e){return function(t,r,n){var o=(0,Vo.getFileName)(t);return(0,u.testAdapter)(o,/\.(bw|bigwig)$/i,n,"BigWigAdapter")?{type:"BigWigAdapter",bigWigLocation:t}:e(t,r,n)}}),e.addToExtensionPoint("Core-guessTrackTypeForLocation",function(e){return function(t){return"BigWigAdapter"===t?"QuantitativeTrack":e(t)}})}(e),e.addRpcMethod(function(){return new uS(e)}),e.addRpcMethod(function(){return new eS(e)}),e.addRpcMethod(function(){return new Vw(e)}),e.addRpcMethod(function(){return new PS(e)}),e.addRpcMethod(function(){return new FS(e)})}}],n&&tA(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we.A);const sA=[Ac,Vu.A,Zf,Hu,fp,ab,lA];function cA(e,t){return _.types.model("Configuration",{configuration:(0,s.ConfigurationSchema)("Root",{rpc:Ol.configSchema,highResolutionScaling:{type:"number",defaultValue:2},formatDetails:(0,s.ConfigurationSchema)("FormatDetails",{feature:{type:"frozen",description:"adds extra fields to the feature details",defaultValue:{},contextVariable:["feature"]},subfeatures:{type:"frozen",description:"adds extra fields to the subfeatures of a feature",defaultValue:{},contextVariable:["feature"]},depth:{type:"number",defaultValue:2,description:"depth to iterate the formatDetails->subfeatures callback on subfeatures (used for example to only apply the callback to the first layer of subfeatures)"},maxDepth:{type:"number",defaultValue:1e4,description:"hide subfeatures greater than a certain depth"}}),formatAbout:(0,s.ConfigurationSchema)("FormatAbout",{config:{type:"frozen",description:"formats configuration object in about dialog",defaultValue:{},contextVariable:["config"]},hideUris:{type:"boolean",defaultValue:!1}}),hierarchical:(0,s.ConfigurationSchema)("hierarchical",{sort:(0,s.ConfigurationSchema)("hierarchicalSort",{trackNames:{type:"boolean",defaultValue:!1},categories:{type:"boolean",defaultValue:!1}}),defaultCollapsed:(0,s.ConfigurationSchema)("defaultCollapsed",{categoryNames:{type:"stringArray",defaultValue:[]},topLevelCategories:{type:"boolean",defaultValue:!1},subCategories:{type:"boolean",defaultValue:!1}})}),theme:{type:"frozen",defaultValue:{}}}),assembly:t,tracks:_.types.array(e.pluggableConfigSchemaType("track")),internetAccounts:_.types.array(e.pluggableConfigSchemaType("internet account")),connections:_.types.array(e.pluggableConfigSchemaType("connection")),aggregateTextSearchAdapters:_.types.array(e.pluggableConfigSchemaType("text search adapter")),plugins:_.types.frozen()}).views(function(e){return{get assemblies(){return[e.assembly]},get assemblyName(){return(0,s.readConfObject)(e.assembly,"name")},get rpcManager(){return(0,_.getParent)(e).rpcManager}}})}var uA=o(9765),fA=o(14041),dA=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,66201))}),pA=o(40295);function hA(e){return hA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hA(e)}function mA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function yA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mA(Object(r),!0).forEach(function(t){bA(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mA(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function bA(e,t,r){return(t=function(e){var t=function(e){if("object"!=hA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=hA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hA(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var gA=128,wA=o(72501);function SA(e,t){if(e){if("string"==typeof e)return AA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?AA(e,t):void 0}}function AA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function OA(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||xA(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xA(e,t){if(e){if("string"==typeof e)return kA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kA(e,t):void 0}}function kA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function CA(e){return _.types.model("ReferenceManagementSessionMixin",{}).views(function(e){return{getReferring:function(t){var r=[];return(0,_.walk)((0,_.getParent)(e),function(e){if((0,_.isModelType)((0,_.getType)(e)))for(var n=(0,_.getMembers)(e),o=0,i=Object.entries(n.properties);o<i.length;o++){var a=OA(i[o],2),l=a[0],s=a[1];(0,_.isReferenceType)(s)&&e[l]===t&&r.push({node:e,key:l})}}),r}}}).actions(function(e){return{removeReferring:function(t,r,n,o){var i,a=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=xA(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(t);try{var l=function(){var t=i.value.node,a=!1;try{var l="open track(s)",s=(0,u.getContainingView)(t);n.push(function(){s.hideTrack(r.trackId)}),a=!0,o[l]||(o[l]=0),o[l]+=1}catch(e){}if((0,u.isSessionModelWithWidgets)(e)&&e.widgets.has(t.id)){var c="configuration editor widget(s)";(0,u.isSessionModelWithWidgets)(e)&&n.push(function(){e.hideWidget(t)}),a=!0,o[c]||(o[c]=0),o[c]+=1}if(!a)throw new Error("Error when closing this connection, the following node is still referring to a track configuration: ".concat(JSON.stringify((0,_.getSnapshot)(t))))};for(a.s();!(i=a.n()).done;)l()}catch(e){a.e(e)}finally{a.f()}}}})}const PA=(0,Tn.A)((0,A.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info");function EA(e){return EA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},EA(e)}function jA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function TA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jA(Object(r),!0).forEach(function(t){_A(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jA(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _A(e,t,r){return(t=function(e){var t=function(e){if("object"!=EA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=EA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==EA(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var RA=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,79625))});function MA(e){return _.types.compose("ReactCircularGenomeViewSession",(0,pA.DH)(e),function(e){var t=e.pluggableMstType("widget","stateModel");return _.types.model({drawerPosition:_.types.optional(_.types.string,function(){return(0,u.localStorageGetItem)("drawerPosition")||"right"}),drawerWidth:_.types.optional(_.types.refinement(_.types.integer,function(e){return e>=gA}),384),widgets:_.types.map(t),activeWidgets:_.types.map(_.types.safeReference(t)),minimized:_.types.optional(_.types.boolean,!1)}).views(function(e){return{get visibleWidget(){if((0,_.isAlive)(e))return(t=e.activeWidgets.values(),function(e){if(Array.isArray(e))return vA(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return vA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vA(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[e.activeWidgets.size-1];var t}}}).actions(function(t){return{setDrawerPosition:function(e){t.drawerPosition=e,localStorage.setItem("drawerPosition",e)},updateDrawerWidth:function(e){if(e===t.drawerWidth)return t.drawerWidth;var r=e;return r<gA&&(r=gA),t.drawerWidth=r,r},resizeDrawer:function(e){"left"===t.drawerPosition&&(e*=-1);var r=t.drawerWidth;return r-this.updateDrawerWidth(r-e)},addWidget:function(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!e.getElementType("widget",r))throw new Error("unknown widget type ".concat(r));var a=yA(yA({},o),{},{id:n,type:r,configuration:i||{type:r}});return t.widgets.set(n,a),t.widgets.get(n)},showWidget:function(e){t.activeWidgets.has(e.id)&&t.activeWidgets.delete(e.id),t.activeWidgets.set(e.id,e),t.minimized=!1},hasWidget:function(e){return t.activeWidgets.has(e.id)},hideWidget:function(e){t.activeWidgets.delete(e.id)},minimizeWidgetDrawer:function(){t.minimized=!0},showWidgetDrawer:function(){t.minimized=!1},hideAllWidgets:function(){t.activeWidgets.clear()},editConfiguration:function(e){if(!(0,s.isConfigurationModel)(e))throw new Error("must pass a configuration model to editConfiguration");var t=this.addWidget("ConfigurationEditorWidget","configEditor",{target:e});this.showWidget(t)},afterAttach:function(){(0,_.addDisposer)(t,(0,le.autorun)(function(){(0,u.localStorageSetItem)("drawerPosition",t.drawerPosition)}))}}})}(e),(0,wA.F)(e),_.types.model("DialogQueueSessionMixin",{}).volatile(function(){return{queueOfDialogs:[]}}).views(function(e){return{get DialogComponent(){var t;return null===(t=e.queueOfDialogs[0])||void 0===t?void 0:t[0]},get DialogProps(){var t;return null===(t=e.queueOfDialogs[0])||void 0===t?void 0:t[1]}}}).actions(function(e){return{removeActiveDialog:function(){e.queueOfDialogs=e.queueOfDialogs.slice(1)},queueDialog:function(t){var r,n,o=this,i=(r=t(function(){o.removeActiveDialog()}),n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(r,n)||SA(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],l=i[1];e.queueOfDialogs=[].concat(function(e){return function(e){if(Array.isArray(e))return AA(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||SA(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.queueOfDialogs),[[a,l]])}}}),function(e){return _.types.compose("TracksManagerSessionMixin",(0,pA.DH)(e),CA()).views(function(e){return{get tracks(){return e.jbrowse.tracks}}}).actions(function(e){return{addTrackConf:function(t){return e.jbrowse.addTrackConf(t)},deleteTrackConf:function(t){var r=[],n=e.getReferring(t);e.removeReferring(n,t,r,{});for(var o=0,i=r;o<i.length;o++)(0,i[o])();if(e.adminMode)return e.jbrowse.deleteTrackConf(t)}}})}(e),CA(),_.types.model({}).volatile(function(){return{snackbarMessages:le.observable.array()}}).views(function(e){return{get snackbarMessageSet(){return new Map(e.snackbarMessages.map(function(e){return[e.message,e]}))}}}).actions(function(e){return{notify:function(e,t,r){var n=this;this.pushSnackbarMessage(e,t,r),"info"!==t&&"success"!==t||setTimeout(function(){n.removeSnackbarMessage(e)},5e3)},notifyError:function(t,r,n){this.notify(t,"error",{name:fA.createElement(uA.A,null),onClick:function(){e.queueDialog(function(e){return[dA,{onClose:e,error:r,extra:n}]})}})},pushSnackbarMessage:function(t,r,n){!n&&e.snackbarMessageSet.has(t)||e.snackbarMessages.push({message:t,level:r,action:n})},popSnackbarMessage:function(){return e.snackbarMessages.pop()},removeSnackbarMessage:function(t){var r=e.snackbarMessageSet.get(t);void 0!==r&&e.snackbarMessages.remove(r)}}})).props({view:e.getViewType("CircularView").stateModel}).volatile(function(){return{task:void 0}}).views(function(e){return{get version(){return(0,_.getParent)(e).version},get assemblies(){return[(0,_.getParent)(e).config.assembly]},get assemblyNames(){return[(0,_.getParent)(e).config.assemblyName]},get connections(){return(0,_.getParent)(e).config.connections},get assemblyManager(){return(0,_.getParent)(e).assemblyManager},get views(){return[e.view]},renderProps:function(){return{theme:(0,s.getConf)(e,"theme"),highResolutionScaling:(0,s.getConf)(e,"highResolutionScaling")}}}}).actions(function(t){return{addView:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.getElementType("view",r))throw new Error("unknown view type ".concat(r));return t.view=TA(TA({},n),{},{type:r}),t.view},removeView:function(){}}}).views(function(e){return{getTrackActionMenuItems:function(t){return[{label:"About track",onClick:function(){e.queueDialog(function(e){return[RA,{config:t,handleClose:e}]})},icon:PA}]}}})}var IA="3.6.0";function NA(e){return function(e){if(Array.isArray(e))return FA(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||DA(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DA(e,t){if(e){if("string"==typeof e)return FA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?FA(e,t):void 0}}function FA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function LA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){throw new Error("no makeWorkerInstance supplied")},r=new Si([].concat(NA(sA),NA(e)).map(function(e){return new e}));r.createPluggableElements();var n=MA(r),o=aa(r),i=ia(o,r);return{model:_.types.model("ReactCircularGenomeView",{config:cA(r,o),session:n,assemblyManager:_.types.optional(i,{}),internetAccounts:_.types.array(r.pluggableMstType("internet account","stateModel"))}).volatile(function(e){return{error:void 0,adminMode:!1,version:IA,rpcManager:new Ol(r,e.config.configuration.rpc,{WebWorkerRpcDriver:{makeWorkerInstance:t},MainThreadRpcDriver:{}}),textSearchManager:new Ai.A(r)}}).actions(function(e){return{setSession:function(t){e.session=(0,_.cast)(t)},renameCurrentSession:function(t){var r=JSON.parse(JSON.stringify((0,_.getSnapshot)(e.session)));r.name=t,this.setSession(r)},setError:function(t){e.error=t},addInternetAccount:function(t){e.internetAccounts.push(t)},findAppropriateInternetAccount:function(t){var r=t.internetAccountId;if(r){var n=e.internetAccounts.find(function(e){return e.internetAccountId===r});if(n)return n}var o,i=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=DA(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(e.internetAccounts);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(a.handlesLocation(t))return a}}catch(e){i.e(e)}finally{i.f()}return null}}}).views(function(e){return{get jbrowse(){return e.config},get pluginManager(){return r}}}),pluginManager:r}}function zA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function BA(e){var t=e.assembly,r=e.tracks,n=e.internetAccounts,o=e.configuration,i=e.aggregateTextSearchAdapters,a=e.plugins,l=e.makeWorkerInstance,s=e.onChange,c=LA(a||[],l),u=c.model,f=c.pluginManager,d=e.defaultSession;d||(d={name:"this session",view:{id:"circularView",type:"CircularView"}});var p,h={config:{configuration:o,assembly:t,tracks:r,internetAccounts:n,aggregateTextSearchAdapters:i,defaultSession:d},session:d},m=u.create(h,{pluginManager:f}),y=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return zA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zA(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(m.config.internetAccounts);try{for(y.s();!(p=y.n()).done;){var b=p.value;if(!f.getInternetAccountType(b.type))throw new Error("unknown internet account type ".concat(b.type));m.addInternetAccount({type:b.type,configuration:b})}}catch(e){y.e(e)}finally{y.f()}return f.setRootModel(m),f.configure(),(0,le.autorun)(function(e){var r,n=m.session,o=m.assemblyManager;if(n.view.initialized){var i=null===(r=o.get(null==t?void 0:t.name))||void 0===r?void 0:r.regions;i&&(n.view.setDisplayedRegions(i),e.dispose())}}),s&&(0,_.onPatch)(m,s),m}var $A=o(99938),GA=o.n($A);function HA(e){return HA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},HA(e)}function VA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function WA(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return UA(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(UA(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,UA(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,UA(f,"constructor",c),UA(c,"constructor",s),s.displayName="GeneratorFunction",UA(c,o,"GeneratorFunction"),UA(f),UA(f,o,"Generator"),UA(f,n,function(){return this}),UA(f,"toString",function(){return"[object Generator]"}),(WA=function(){return{w:i,m:d}})()}function UA(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}UA=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){UA(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},UA(e,t,r,n)}function qA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,XA(n.key),n)}}function XA(e){var t=function(e){if("object"!=HA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=HA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==HA(t)?t:t+""}function KA(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function YA(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){KA(i,n,o,a,l,"next",e)}function l(e){KA(i,n,o,a,l,"throw",e)}a(void 0)})}}function JA(e){return(void 0!==e.umdUrl||void 0!==e.url||void 0!==e.umdLoc)&&void 0!==e.name}function ZA(e){return void 0!==e.esmUrl||void 0!==e.esmLoc}function QA(e){return new Promise(function(t,r){GA()(e,function(e,n){e?r(e):t(n.src)})})}function eO(e){return tO.apply(this,arguments)}function tO(){return(tO=YA(WA().m(function e(t){return WA().w(function(e){for(;;)switch(e.n){case 0:if(oO()){e.n=1;break}return e.a(2,QA(t));case 1:if(!globalThis.importScripts){e.n=3;break}return e.n=2,globalThis.importScripts(t);case 2:case 4:return e.a(2);case 3:throw new Error("cannot figure out how to load external JS scripts in this environment")}},e)}))).apply(this,arguments)}function rO(e){return void 0!==e.cjsUrl}function nO(e){return JA(e)?"UMD plugin ".concat(e.name):ZA(e)?"ESM plugin ".concat(e.esmUrl||e.esmLoc.uri):rO(e)?"CJS plugin ".concat(e.cjsUrl):"unknown plugin"}function oO(){return Boolean("WorkerGlobalScope"in globalThis)}var iO=function(){return e=function e(){var t,r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=[],(r=XA(r="definitions"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.fetchESM=null==i?void 0:i.fetchESM,this.fetchCJS=null==i?void 0:i.fetchCJS,this.definitions=JSON.parse(JSON.stringify(o))},t=[{key:"loadCJSPlugin",value:(a=YA(WA().m(function e(t,r){var n;return WA().w(function(e){for(;;)switch(e.n){case 0:if("http:"===(n=new URL(t.cjsUrl,r)).protocol||"https:"===n.protocol){e.n=1;break}throw new Error('Cannot load plugins using protocol "'.concat(n.protocol,'"'));case 1:if(this.fetchCJS){e.n=2;break}throw new Error("No fetchCJS callback provided");case 2:return e.a(2,this.fetchCJS(n.href))}},e,this)})),function(e,t){return a.apply(this,arguments)})},{key:"loadESMPlugin",value:(i=YA(WA().m(function e(t,r){var n,o;return WA().w(function(e){for(;;)switch(e.n){case 0:if("http:"===(n="esmUrl"in t?new URL(t.esmUrl,r):new URL(t.esmLoc.uri,t.esmLoc.baseUri)).protocol||"https:"===n.protocol){e.n=1;break}throw new Error('cannot load plugins using protocol "'.concat(n.protocol,'"'));case 1:if(this.fetchESM){e.n=2;break}throw new Error("No ESM fetcher installed");case 2:return e.n=3,this.fetchESM(n.href);case 3:if(o=e.v){e.n=4;break}throw new Error("Could not load ESM plugin: ".concat(n));case 4:return e.a(2,o)}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"loadUMDPlugin",value:(o=YA(WA().m(function e(t,r){var n,o,i,a;return WA().w(function(e){for(;;)switch(e.n){case 0:if("http:"===(n="url"in t?new URL(t.url,r):"umdUrl"in t?new URL(t.umdUrl,r):new URL(t.umdLoc.uri,t.umdLoc.baseUri)).protocol||"https:"===n.protocol){e.n=1;break}throw new Error('cannot load plugins using protocol "'.concat(n.protocol,'"'));case 1:if(o=t.name,i="JBrowsePlugin".concat(o),"undefined"!=typeof jest){e.n=3;break}return e.n=2,eO(n.href);case 2:e.n=4;break;case 3:globalThis[i]={default:we.A};case 4:if(a=globalThis[i]){e.n=5;break}throw new Error("Failed to load UMD bundle for ".concat(o,", ").concat(i," is undefined"));case 5:return e.a(2,a)}},e)})),function(e,t){return o.apply(this,arguments)})},{key:"loadPlugin",value:(n=YA(WA().m(function e(t,r){var n;return WA().w(function(e){for(;;)switch(e.n){case 0:if(!u.isElectron||!rO(t)){e.n=2;break}return e.n=1,this.loadCJSPlugin(t,r);case 1:case 3:case 5:n=e.v,e.n=8;break;case 2:if(!ZA(t)){e.n=4;break}return e.n=3,this.loadESMPlugin(t,r);case 4:if(!JA(t)){e.n=6;break}return e.n=5,this.loadUMDPlugin(t,r);case 6:if(u.isElectron||!rO(t)){e.n=7;break}throw new Error("CommonJS plugin found, but not in a NodeJS environment: ".concat(JSON.stringify(t)));case 7:throw new Error("Could not determine plugin type: ".concat(JSON.stringify(t)));case 8:if(n.default){e.n=9;break}throw new Error("".concat(nO(t)," does not have a default export, cannot load"));case 9:return e.a(2,n.default)}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"installGlobalReExports",value:function(e){return e.JBrowseExports=Object.fromEntries(Object.entries(Qo).map(function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return VA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?VA(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return[n[0],n[1]]})),this}},{key:"load",value:(r=YA(WA().m(function e(t){var r=this;return WA().w(function(e){for(;;)if(0===e.n)return e.a(2,Promise.all(this.definitions.map(function(){var e=YA(WA().m(function e(n){var o,i;return WA().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,r.loadPlugin(n,t);case 1:return o=e.v,i=n,e.a(2,{plugin:o,definition:i})}},e)}));return function(t){return e.apply(this,arguments)}}())))},e,this)})),function(e){return r.apply(this,arguments)})}],t&&qA(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,n,o,i,a}();function aO(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return lO(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(lO(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,lO(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,lO(f,"constructor",c),lO(c,"constructor",s),s.displayName="GeneratorFunction",lO(c,o,"GeneratorFunction"),lO(f),lO(f,o,"Generator"),lO(f,n,function(){return this}),lO(f,"toString",function(){return"[object Generator]"}),(aO=function(){return{w:i,m:d}})()}function lO(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}lO=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){lO(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},lO(e,t,r,n)}function sO(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function cO(e,t){return uO.apply(this,arguments)}function uO(){var e;return e=aO().m(function e(t,r){var n;return aO().w(function(e){for(;;)if(0===e.n)return(n=new iO(t,r)).installGlobalReExports(window),e.a(2,n.load(null==r?void 0:r.baseUrl))},e)}),uO=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){sO(i,n,o,a,l,"next",e)}function l(e){sO(i,n,o,a,l,"throw",e)}a(void 0)})},uO.apply(this,arguments)}})(),i})());
228
+ `:null,A=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?(0,a.a)(e.palette[t].main,.62):(0,a.e$)(e.palette[t].main,.5),O=(0,c.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${(0,p.A)(r.color)}`],t[r.variant]]}})((0,u.A)(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter((0,f.A)()).map(([t])=>({props:{color:t},style:{backgroundColor:A(e,t)}})),{props:({ownerState:e})=>"inherit"===e.color&&"buffer"!==e.variant,style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),x=(0,c.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.dashed,t[`dashedColor${(0,p.A)(r.color)}`]]}})((0,u.A)(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter((0,f.A)()).map(([t])=>{const r=A(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`}}})]})),S||{animation:`${w} 3s infinite linear`}),k=(0,c.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.bar,t.bar1,t[`barColor${(0,p.A)(r.color)}`],("indeterminate"===r.variant||"query"===r.variant)&&t.bar1Indeterminate,"determinate"===r.variant&&t.bar1Determinate,"buffer"===r.variant&&t.bar1Buffer]}})((0,u.A)(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter((0,f.A)()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:"transform .4s linear"}},{props:{variant:"buffer"},style:{zIndex:1,transition:"transform .4s linear"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:b||{animation:`${y} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),C=(0,c.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.bar,t.bar2,t[`barColor${(0,p.A)(r.color)}`],("indeterminate"===r.variant||"query"===r.variant)&&t.bar2Indeterminate,"buffer"===r.variant&&t.bar2Buffer]}})((0,u.A)(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter((0,f.A)()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"!==e.color,style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"===e.color,style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter((0,f.A)()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:A(e,t),transition:"transform .4s linear"}})),{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:g||{animation:`${v} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),P=n.forwardRef(function(e,t){const r=(0,d.b)({props:e,name:"MuiLinearProgress"}),{className:n,color:a="primary",value:s,valueBuffer:c,variant:u="indeterminate",...f}=r,y={...r,color:a,variant:u},b=(e=>{const{classes:t,variant:r,color:n}=e,o={root:["root",`color${(0,p.A)(n)}`,r],dashed:["dashed",`dashedColor${(0,p.A)(n)}`],bar1:["bar","bar1",`barColor${(0,p.A)(n)}`,("indeterminate"===r||"query"===r)&&"bar1Indeterminate","determinate"===r&&"bar1Determinate","buffer"===r&&"bar1Buffer"],bar2:["bar","bar2","buffer"!==r&&`barColor${(0,p.A)(n)}`,"buffer"===r&&`color${(0,p.A)(n)}`,("indeterminate"===r||"query"===r)&&"bar2Indeterminate","buffer"===r&&"bar2Buffer"]};return(0,i.A)(o,h.l,t)})(y),v=(0,l.I)(),g={},w={bar1:{},bar2:{}};if(("determinate"===u||"buffer"===u)&&void 0!==s){g["aria-valuenow"]=Math.round(s),g["aria-valuemin"]=0,g["aria-valuemax"]=100;let e=s-100;v&&(e=-e),w.bar1.transform=`translateX(${e}%)`}if("buffer"===u&&void 0!==c){let e=(c||0)-100;v&&(e=-e),w.bar2.transform=`translateX(${e}%)`}return(0,m.jsxs)(O,{className:(0,o.A)(b.root,n),ownerState:y,role:"progressbar",...g,ref:t,...f,children:["buffer"===u?(0,m.jsx)(x,{className:b.dashed,ownerState:y}):null,(0,m.jsx)(k,{className:b.bar1,ownerState:y,style:w.bar1}),"determinate"===u?null:(0,m.jsx)(C,{className:b.bar2,ownerState:y,style:w.bar2})]})})},91786:(e,t,r)=>{"use strict";r.d(t,{T:()=>b});var n=r(89575),o=r(17502),i=r(54357),a=r(14041),l=r(96674),s=r(10591),c=r(7763),u=r(48731),f=r(43433),d=r(9919),p=r(31085);const h=["hideMenu","colDef","id","labelledby","className","children","open"],m=(0,l.Ay)(u.p)(()=>({minWidth:248}));function y(e){e.currentTarget.contains(e.target)&&e.stopPropagation()}const b=(0,s.R)(function(e,t){const{hideMenu:r,id:l,labelledby:s,className:u,children:b,open:v}=e,g=(0,o.A)(e,h),w=(0,d.A)(),S=a.useCallback(e=>{"Tab"===e.key&&e.preventDefault(),(0,c.HF)(e.key)&&r(e)},[r]);return(0,p.jsx)(m,(0,n.A)({as:w.slots.baseMenuList,id:l,className:(0,i.A)(f.x.menuList,u),"aria-labelledby":s,onKeyDown:S,onWheel:y,onTouchMove:y,autoFocus:v},g,{ref:t,children:b}))})},91793:(e,t)=>{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},91847:(e,t,r)=>{"use strict";r.d(t,{m:()=>p});var n=r(89575),o=r(17502),i=r(14041),a=r(10591),l=r(97165),s=r(1769),c=r(9919),u=r(44844),f=r(31085);const d=["render","className","onClick"],p=(0,a.R)(function(e,t){const{render:r,className:a,onClick:p}=e,h=(0,o.A)(e,d),m=(0,c.A)(),{state:y,controlId:b,onExpandedChange:v,triggerRef:g}=(0,u.q)(),w="function"==typeof a?a(y):a,S=(0,s.A)(g,t),A=(0,l._)(m.slots.baseButton,r,(0,n.A)({},m.slotProps?.baseButton,{className:w,"aria-controls":b,"aria-expanded":y.expanded},h,{onClick:e=>{v(!y.expanded),p?.(e)},ref:S}),y);return(0,f.jsx)(i.Fragment,{children:A})})},91877:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r(14041),o=r(54357),i=r(31593),a=r(96674),l=r(42014),s=r(40979),c=r(23523),u=r(31085);const f=(0,c.A)((0,u.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");var d=r(6517),p=r(39455);const h=(0,a.Ay)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],r.colorDefault&&t.colorDefault]}})((0,l.A)(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),m=(0,a.Ay)("img",{name:"MuiAvatar",slot:"Img"})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),y=(0,a.Ay)(f,{name:"MuiAvatar",slot:"Fallback"})({width:"75%",height:"75%"}),b=n.forwardRef(function(e,t){const r=(0,s.b)({props:e,name:"MuiAvatar"}),{alt:a,children:l,className:c,component:f="div",slots:b={},slotProps:v={},imgProps:g,sizes:w,src:S,srcSet:A,variant:O="circular",...x}=r;let k=null;const C={...r,component:f,variant:O},P=function({crossOrigin:e,referrerPolicy:t,src:r,srcSet:o}){const[i,a]=n.useState(!1);return n.useEffect(()=>{if(!r&&!o)return;a(!1);let n=!0;const i=new Image;return i.onload=()=>{n&&a("loaded")},i.onerror=()=>{n&&a("error")},i.crossOrigin=e,i.referrerPolicy=t,i.src=r,o&&(i.srcset=o),()=>{n=!1}},[e,t,r,o]),i}({...g,..."function"==typeof v.img?v.img(C):v.img,src:S,srcSet:A}),E=S||A,j=E&&"error"!==P;C.colorDefault=!j,delete C.ownerState;const T=(e=>{const{classes:t,variant:r,colorDefault:n}=e,o={root:["root",r,n&&"colorDefault"],img:["img"],fallback:["fallback"]};return(0,i.A)(o,d.k,t)})(C),[_,R]=(0,p.A)("root",{ref:t,className:(0,o.A)(T.root,c),elementType:h,externalForwardedProps:{slots:b,slotProps:v,component:f,...x},ownerState:C}),[M,I]=(0,p.A)("img",{className:T.img,elementType:m,externalForwardedProps:{slots:b,slotProps:{img:{...g,...v.img}}},additionalProps:{alt:a,src:S,srcSet:A,sizes:w},ownerState:C}),[N,D]=(0,p.A)("fallback",{className:T.fallback,elementType:y,externalForwardedProps:{slots:b,slotProps:v},shouldForwardComponentProp:!0,ownerState:C});return k=j?(0,u.jsx)(M,{...I}):l||0===l?l:E&&a?a[0]:(0,u.jsx)(N,{...D}),(0,u.jsx)(_,{...R,children:k})})},92371:(e,t,r)=>{"use strict";function n(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}r.d(t,{A:()=>n})},92427:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,n:()=>i});var n=r(42395),o=r(3807);function i(e){return(0,o.Ay)("MuiAccordionDetails",e)}const a=(0,n.A)("MuiAccordionDetails",["root"])},92709:(e,t,r)=>{"use strict";r.d(t,{J:()=>l,h:()=>a});var n=r(92927),o=r(39755);const i=e=>null==e?null:Number(e),a=e=>null==e||Number.isNaN(e)||""===e?null:t=>i(t)===i(e),l=()=>[{value:"=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>i(t)===e.value,InputComponent:n.y,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>i(t)!==e.value,InputComponent:n.y,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&i(t)>e.value,InputComponent:n.y,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&i(t)>=e.value,InputComponent:n.y,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&i(t)<e.value,InputComponent:n.y,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&i(t)<=e.value,InputComponent:n.y,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:o.M,InputComponentProps:{type:"number"}}]},92739:(e,t,r)=>{"use strict";r.d(t,{W:()=>n});const n=(0,r(16190).gz)(e=>e.listViewColumn)},92819:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(14041);function o(e){return n.Children.toArray(e).filter(e=>n.isValidElement(e))}},92847:(e,t,r)=>{"use strict";r.d(t,{O:()=>s});var n=r(89575),o=r(14041),i=r(63e3),a=r(5483),l=r(31085);function s(e){return(0,l.jsxs)(o.Fragment,{children:[(0,l.jsx)(i.l,(0,n.A)({},e)),(0,l.jsx)(a.s,(0,n.A)({},e))]})}},92857:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>A});var n=r(14041),o=r(9810),i=r(95305),a=r(8837),l=r(68805),s=r(89025),c=r(60595),u=r(53125),f=r(82464),d=r(97469),p=r(98819),h=r(22980),m=r(28730),y=r(14041);function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var g=(0,m.n9)()(function(e){return{formElt:{margin:e.spacing(3),width:400},dialogContent:{width:"80em"},root:{padding:4}}});function w(e){return y.createElement("div",null,y.createElement(i.A,e))}function S(e){var t=e.children;return y.createElement("div",null,y.createElement(a.A,null,t))}const A=(0,h.observer)(function(e){var t=e.handleClose,r=e.model,i=g().classes,a=r.upperCaseCDS,h=b((0,n.useState)("".concat(r.intronBp)),2),m=h[0],v=h[1],A=b((0,n.useState)("".concat(r.upDownBp)),2),O=A[0],x=A[1],k=!Number.isNaN(+m),C=!Number.isNaN(+O);return y.createElement(o.Dialog,{maxWidth:"xl",open:!0,onClose:function(){t()},title:"Feature sequence settings"},y.createElement(l.A,{className:i.dialogContent},y.createElement(w,{label:"Number of intronic bases around splice site to display",className:i.formElt,value:m,helperText:k?"":"Not a number",error:!k,onChange:function(e){v(e.target.value)}}),y.createElement(w,{label:"Number of bases up/down stream of feature to display",className:i.formElt,value:O,helperText:C?"":"Not a number",error:!C,onChange:function(e){x(e.target.value)}}),y.createElement(S,null,y.createElement(s.A,null,"Sequence capitalization"),y.createElement(c.A,{value:a?"cds":"unchanged",onChange:function(e){r.setUpperCaseCDS("cds"===e.target.value)}},y.createElement(u.A,{value:"cds",control:y.createElement(f.A,{className:i.root,size:"small"}),label:"Capitalize CDS and lower case everything else"}),y.createElement(u.A,{value:"unchanged",control:y.createElement(f.A,{className:i.root,size:"small"}),label:"Capitalization from reference genome sequence"})))),y.createElement(d.A,null,y.createElement(p.A,{onClick:function(){r.setIntronBp(+m),r.setUpDownBp(+O),t()},disabled:!k||!C,color:"primary",variant:"contained"},"Submit"),y.createElement(p.A,{onClick:function(){t()},color:"secondary",autoFocus:!0,variant:"contained"},"Cancel")))})},92869:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r(14041),o=r(31593),i=r(10749),a=r(88581),l=r(96674),s=r(40979),c=r(51517),u=r(39455),f=r(31085);const d=(0,l.Ay)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>[{[`& .${c.A.title}`]:t.title},{[`& .${c.A.subheader}`]:t.subheader},t.root]})({display:"flex",alignItems:"center",padding:16}),p=(0,l.Ay)("div",{name:"MuiCardHeader",slot:"Avatar"})({display:"flex",flex:"0 0 auto",marginRight:16}),h=(0,l.Ay)("div",{name:"MuiCardHeader",slot:"Action"})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),m=(0,l.Ay)("div",{name:"MuiCardHeader",slot:"Content"})({flex:"1 1 auto",[`.${i.A.root}:where(& .${c.A.title})`]:{display:"block"},[`.${i.A.root}:where(& .${c.A.subheader})`]:{display:"block"}}),y=n.forwardRef(function(e,t){const r=(0,s.b)({props:e,name:"MuiCardHeader"}),{action:n,avatar:i,component:l="div",disableTypography:y=!1,subheader:b,subheaderTypographyProps:v,title:g,titleTypographyProps:w,slots:S={},slotProps:A={},...O}=r,x={...r,component:l,disableTypography:y},k=(e=>{const{classes:t}=e;return(0,o.A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},c.u,t)})(x),C={slots:S,slotProps:{title:w,subheader:v,...A}};let P=g;const[E,j]=(0,u.A)("title",{className:k.title,elementType:a.A,externalForwardedProps:C,ownerState:x,additionalProps:{variant:i?"body2":"h5",component:"span"}});null==P||P.type===a.A||y||(P=(0,f.jsx)(E,{...j,children:P}));let T=b;const[_,R]=(0,u.A)("subheader",{className:k.subheader,elementType:a.A,externalForwardedProps:C,ownerState:x,additionalProps:{variant:i?"body2":"body1",color:"textSecondary",component:"span"}});null==T||T.type===a.A||y||(T=(0,f.jsx)(_,{...R,children:T}));const[M,I]=(0,u.A)("root",{ref:t,className:k.root,elementType:d,externalForwardedProps:{...C,...O,component:l},ownerState:x}),[N,D]=(0,u.A)("avatar",{className:k.avatar,elementType:p,externalForwardedProps:C,ownerState:x}),[F,L]=(0,u.A)("content",{className:k.content,elementType:m,externalForwardedProps:C,ownerState:x}),[z,B]=(0,u.A)("action",{className:k.action,elementType:h,externalForwardedProps:C,ownerState:x});return(0,f.jsxs)(M,{...I,children:[i&&(0,f.jsx)(N,{...D,children:i}),(0,f.jsxs)(F,{...L,children:[P,T]}),n&&(0,f.jsx)(z,{...B,children:n})]})})},92891:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>R,getSpeedDialUtilityClass:()=>k,speedDialClasses:()=>C});var n=r(14041),o=r(54357),i=r(31593),a=r(17941),l=r(39731),s=r(96674),c=r(90389),u=r(42014),f=r(40979),d=r(32258),p=r(20789),h=r(45172),m=r(38870),y=r(31085);const b={entering:{transform:"none"},entered:{transform:"none"}},v=n.forwardRef(function(e,t){const r=(0,c.A)(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:l,easing:s,in:u,onEnter:f,onEntered:v,onEntering:g,onExit:w,onExited:S,onExiting:A,style:O,timeout:x=o,TransitionComponent:k=d.Ay,...C}=e,P=n.useRef(null),E=(0,m.A)(P,(0,p.A)(l),t),j=e=>t=>{if(e){const r=P.current;void 0===t?e(r):e(r,t)}},T=j(g),_=j((e,t)=>{(0,h.q)(e);const n=(0,h.c)({style:O,timeout:x,easing:s},{mode:"enter"});e.style.webkitTransition=r.transitions.create("transform",n),e.style.transition=r.transitions.create("transform",n),f&&f(e,t)}),R=j(v),M=j(A),I=j(e=>{const t=(0,h.c)({style:O,timeout:x,easing:s},{mode:"exit"});e.style.webkitTransition=r.transitions.create("transform",t),e.style.transition=r.transitions.create("transform",t),w&&w(e)}),N=j(S);return(0,y.jsx)(k,{appear:a,in:u,nodeRef:P,onEnter:_,onEntered:R,onEntering:T,onExit:I,onExited:N,onExiting:M,addEndListener:e=>{i&&i(P.current,e)},timeout:x,...C,children:(e,{ownerState:t,...r})=>n.cloneElement(l,{style:{transform:"scale(0)",visibility:"exited"!==e||u?void 0:"hidden",...b[e],...O,...l.props.style},ref:E,...r})})});var g=r(82165),w=r(38216),S=r(71589),A=r(25337),O=r(42395),x=r(3807);function k(e){return(0,x.Ay)("MuiSpeedDial",e)}const C=(0,O.A)("MuiSpeedDial",["root","fab","directionUp","directionDown","directionLeft","directionRight","actions","actionsClosed"]);var P=r(39455);function E(e){return"up"===e||"down"===e?"vertical":"right"===e||"left"===e?"horizontal":void 0}const j=(0,s.Ay)("div",{name:"MuiSpeedDial",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`direction${(0,w.A)(r.direction)}`]]}})((0,u.A)(({theme:e})=>({zIndex:(e.vars||e).zIndex.speedDial,display:"flex",alignItems:"center",pointerEvents:"none",variants:[{props:{direction:"up"},style:{flexDirection:"column-reverse",[`& .${C.actions}`]:{flexDirection:"column-reverse",marginBottom:-32,paddingBottom:48}}},{props:{direction:"down"},style:{flexDirection:"column",[`& .${C.actions}`]:{flexDirection:"column",marginTop:-32,paddingTop:48}}},{props:{direction:"left"},style:{flexDirection:"row-reverse",[`& .${C.actions}`]:{flexDirection:"row-reverse",marginRight:-32,paddingRight:48}}},{props:{direction:"right"},style:{flexDirection:"row",[`& .${C.actions}`]:{flexDirection:"row",marginLeft:-32,paddingLeft:48}}}]}))),T=(0,s.Ay)(g.A,{name:"MuiSpeedDial",slot:"Fab"})({pointerEvents:"auto"}),_=(0,s.Ay)("div",{name:"MuiSpeedDial",slot:"Actions",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.actions,!r.open&&t.actionsClosed]}})({display:"flex",pointerEvents:"auto",variants:[{props:({ownerState:e})=>!e.open,style:{transition:"top 0s linear 0.2s",pointerEvents:"none"}}]}),R=n.forwardRef(function(e,t){const r=(0,f.b)({props:e,name:"MuiSpeedDial"}),s=(0,c.A)(),u={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{ariaLabel:d,FabProps:{ref:p,...h}={},children:b,className:g,direction:O="up",hidden:x=!1,icon:C,onBlur:R,onClose:M,onFocus:I,onKeyDown:N,onMouseEnter:D,onMouseLeave:F,onOpen:L,open:z,openIcon:B,slots:$={},slotProps:G={},TransitionComponent:H,TransitionProps:V,transitionDuration:W=u,...U}=r,[q,X]=(0,A.A)({controlled:z,default:!1,name:"SpeedDial",state:"open"}),K={...r,open:q,direction:O},Y=(e=>{const{classes:t,open:r,direction:n}=e,o={root:["root",`direction${(0,w.A)(n)}`],fab:["fab"],actions:["actions",!r&&"actionsClosed"]};return(0,i.A)(o,k,t)})(K),J=(0,a.A)(),Z=n.useRef(0),Q=n.useRef(),ee=n.useRef([]);ee.current=[ee.current[0]];const te=n.useCallback(e=>{ee.current[0]=e},[]),re=(0,m.A)(p,te),ne=(e,t)=>r=>{ee.current[e+1]=r,t&&t(r)};n.useEffect(()=>{q||(Z.current=0,Q.current=void 0)},[q]);const oe=e=>{"mouseleave"===e.type&&F&&F(e),"blur"===e.type&&R&&R(e),J.clear(),"blur"===e.type?J.start(0,()=>{X(!1),M&&M(e,"blur")}):(X(!1),M&&M(e,"mouseLeave"))},ie=e=>{"mouseenter"===e.type&&D&&D(e),"focus"===e.type&&I&&I(e),J.clear(),q||J.start(0,()=>{X(!0),L&&L(e,{focus:"focus",mouseenter:"mouseEnter"}[e.type])})},ae=d.replace(/^[^a-z]+|[^\w:.-]+/gi,""),le=n.Children.toArray(b).filter(e=>n.isValidElement(e)),se=le.map((e,t)=>{const{FabProps:{ref:r,...o}={},tooltipPlacement:i}=e.props,a=i||("vertical"===E(O)?"left":"top");return n.cloneElement(e,{FabProps:{...o,ref:ne(t,r)},delay:30*(q?t:le.length-t),open:q,tooltipPlacement:a,id:`${ae}-action-${t}`})}),ce={slots:{transition:H,...$},slotProps:{transition:V,...G}},[ue,fe]=(0,P.A)("root",{elementType:j,externalForwardedProps:{...ce,...U},ownerState:K,ref:t,className:(0,o.A)(Y.root,g),additionalProps:{role:"presentation"},getSlotProps:e=>({...e,onKeyDown:t=>{e.onKeyDown?.(t),(e=>{N&&N(e);const t=e.key.replace("Arrow","").toLowerCase(),{current:r=t}=Q;if("Escape"===e.key)return X(!1),ee.current[0].focus(),void(M&&M(e,"escapeKeyDown"));if(E(t)===E(r)&&void 0!==E(t)){e.preventDefault();const n=t===r?1:-1,o=(0,l.A)(Z.current+n,0,ee.current.length-1);ee.current[o].focus(),Z.current=o,Q.current=r}})(t)},onBlur:t=>{e.onBlur?.(t),oe(t)},onFocus:t=>{e.onFocus?.(t),ie(t)},onMouseEnter:t=>{e.onMouseEnter?.(t),ie(t)},onMouseLeave:t=>{e.onMouseLeave?.(t),oe(t)}})}),[de,pe]=(0,P.A)("transition",{elementType:v,externalForwardedProps:ce,ownerState:K});return(0,y.jsxs)(ue,{...fe,children:[(0,y.jsx)(de,{in:!x,timeout:W,unmountOnExit:!0,...pe,children:(0,y.jsx)(T,{color:"primary","aria-label":d,"aria-haspopup":"true","aria-expanded":q,"aria-controls":`${ae}-actions`,...h,onClick:e=>{h.onClick&&h.onClick(e),J.clear(),q?(X(!1),M&&M(e,"toggle")):(X(!0),L&&L(e,"toggle"))},className:(0,o.A)(Y.fab,h.className),ref:re,ownerState:K,children:n.isValidElement(C)&&(0,S.A)(C,["SpeedDialIcon"])?n.cloneElement(C,{open:q}):C})}),(0,y.jsx)(_,{id:`${ae}-actions`,role:"menu","aria-orientation":E(O),className:(0,o.A)(Y.actions,!q&&Y.actionsClosed),ownerState:K,children:se})]})})},92892:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,getTableContainerUtilityClass:()=>o.I,tableContainerClasses:()=>o.A});var n=r(16089),o=r(51849)},92927:(e,t,r)=>{"use strict";r.d(t,{y:()=>f});var n=r(89575),o=r(17502),i=r(14041),a=r(58203),l=r(17941),s=r(9919),c=r(31085);const u=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","slotProps","clearButton","headerFilterMenu"];function f(e){const{item:t,applyValue:r,type:f,apiRef:p,focusElementRef:h,tabIndex:m,disabled:y,slotProps:b,clearButton:v,headerFilterMenu:g}=e,w=(0,o.A)(e,u),S=b?.root,A=(0,l.A)(),[O,x]=i.useState(d(t.value)),[k,C]=i.useState(!1),P=(0,a.A)(),E=(0,s.A)(),j=i.useCallback(e=>{const o=d(e.target.value);x(o),C(!0),A.start(E.filterDebounceMs,()=>{const e=(0,n.A)({},t,{value:"number"!==f||Number.isNaN(Number(o))?o:Number(o),fromInput:P});r(e),C(!1)})},[A,E.filterDebounceMs,t,f,P,r]);return i.useEffect(()=>{t.fromInput===P&&null!=t.value||x(d(t.value))},[P,t]),(0,c.jsxs)(i.Fragment,{children:[(0,c.jsx)(E.slots.baseTextField,(0,n.A)({id:P,label:p.current.getLocaleText("filterPanelInputLabel"),placeholder:p.current.getLocaleText("filterPanelInputPlaceholder"),value:O??"",onChange:j,type:f||"text",disabled:y,slotProps:(0,n.A)({},S?.slotProps,{input:(0,n.A)({endAdornment:k?(0,c.jsx)(E.slots.loadIcon,{fontSize:"small",color:"action"}):null},S?.slotProps?.input),htmlInput:(0,n.A)({tabIndex:m},S?.slotProps?.htmlInput)}),inputRef:h},E.slotProps?.baseTextField,w,S)),g,v]})}function d(e){if(null!=e&&""!==e)return String(e)}},92944:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>b,HX:()=>v,tT:()=>w});var n=r(89575),o=r(8539),i=r(85557),a=r(16558),l=r(85780),s=r(14041),c=r(34556),u=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,f=(0,c.A)(function(e){return u.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),d=function(e){return"theme"!==e},p=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?f:d},h=function(e,t,r){var n;if(t){var o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},m=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,l.SF)(t,r,n),(0,a.s)(function(){return(0,l.sk)(t,r,n)}),null},y=function e(t,r){var a,c,u=t.__emotion_real===t,f=u&&t.__emotion_base||t;void 0!==r&&(a=r.label,c=r.target);var d=h(t,r,u),y=d||p(f),b=!y("as");return function(){var v=arguments,g=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&g.push("label:"+a+";"),null==v[0]||void 0===v[0].raw)g.push.apply(g,v);else{var w=v[0];g.push(w[0]);for(var S=v.length,A=1;A<S;A++)g.push(v[A],w[A])}var O=(0,o.w)(function(e,t,r){var n=b&&e.as||f,a="",u=[],h=e;if(null==e.theme){for(var v in h={},e)h[v]=e[v];h.theme=s.useContext(o.T)}"string"==typeof e.className?a=(0,l.Rk)(t.registered,u,e.className):null!=e.className&&(a=e.className+" ");var w=(0,i.J)(g.concat(u),t.registered,h);a+=t.key+"-"+w.name,void 0!==c&&(a+=" "+c);var S=b&&void 0===d?p(n):y,A={};for(var O in e)b&&"as"===O||S(O)&&(A[O]=e[O]);return A.className=a,r&&(A.ref=r),s.createElement(s.Fragment,null,s.createElement(m,{cache:t,serialized:w,isStringTag:"string"==typeof n}),s.createElement(n,A))});return O.displayName=void 0!==a?a:"Styled("+("string"==typeof f?f:f.displayName||f.name||"Component")+")",O.defaultProps=t.defaultProps,O.__emotion_real=O,O.__emotion_base=f,O.__emotion_styles=g,O.__emotion_forwardProp=d,Object.defineProperty(O,"toString",{value:function(){return"."+c}}),O.withComponent=function(t,o){return e(t,(0,n.A)({},r,o,{shouldForwardProp:h(O,o,!0)})).apply(void 0,g)},O}}.bind(null);function b(e,t){return y(e,t)}function v(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){y[e]=y(e)});const g=[];function w(e){return g[0]=e,(0,i.J)(g)}},92975:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getDefaultValue:()=>l,getEnumerationValues:()=>s,getPropertyType:()=>a,getSubType:()=>o,getUnionSubTypes:()=>i,resolveLateType:()=>c});var n=r(77099);function o(e){var t;if((0,n.isOptionalType)(e))t=e._subtype||e.type;else{if(!(0,n.isArrayType)(e)&&!(0,n.isMapType)(e)){if("function"==typeof e.getSubType)return e.getSubType();throw new TypeError("unsupported mst type")}t=e._subtype||e._subType||e.subType}if(!t)throw new Error("failed to get subtype");return t}function i(e){if(!(0,n.isUnionType)(e))throw new TypeError("not an MST union type");var t=e._types||e.types||o(e)._types||o(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}function a(e,t){return e.properties[t]}function l(e){if(!(0,n.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue}function s(e){return i(e).map(function(e){return e.value})}function c(e){return(0,n.isUnionType)(e)||(0,n.isArrayType)(e)||!(0,n.isLateType)(e)?e:e.getSubType()}},93085:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,getStepLabelUtilityClass:()=>o.p,stepLabelClasses:()=>o.A});var n=r(97573),o=r(72701)},93206:(e,t,r)=>{"use strict";r.d(t,{x:()=>i});var n=r(49758),o=r(14460);function i(e){return(0,o.T)(null==e?void 0:e[n.l])}},93296:(e,t,r)=>{"use strict";var n=r(14041),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,a=n.useEffect,l=n.useLayoutEffect,s=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o(e,r)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),o=n[0].inst,u=n[1];return l(function(){o.value=r,o.getSnapshot=t,c(o)&&u({inst:o})},[e,r,t]),a(function(){return c(o)&&u({inst:o}),e(function(){c(o)&&u({inst:o})})},[e]),s(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u},93307:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ae});var n=r(9810),o=r(68805),i=r(22980),a=r(27313),l=r(28730),s=r(14041),c=r(81296),u=r(88912),f=r(60758),d=r(4431),p=r(81453),h=r(43557),m=r(8837),y=r(88581),b=r(79177),v=r(14041);function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(e){if("string"==typeof e)return S(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var A=(0,l.n9)()(function(e){return{facet:{margin:0,marginLeft:e.spacing(2)},select:{marginBottom:e.spacing(2)}}});function O(e){var t=e.onClick;return v.createElement(p.A,{title:"Clear selection on this facet filter"},v.createElement(h.A,{onClick:function(){t()},size:"small"},v.createElement(f.A,null)))}function x(e){var t=e.visible,r=e.onClick;return v.createElement(p.A,{title:"Minimize/expand this facet filter"},v.createElement(h.A,{onClick:function(){r()},size:"small"},t?v.createElement(d.A,null):v.createElement(u.A,null)))}const k=(0,i.observer)(function(e){var t=e.column,r=e.vals,n=e.model,o=A().classes,i=g((0,s.useState)(!0),2),a=i[0],l=i[1],u=n.faceted,f=u.filters,d=t.field;return v.createElement(m.A,{className:o.facet,fullWidth:!0},v.createElement("div",null,v.createElement(y.A,{component:"span"},d),v.createElement(O,{onClick:function(){u.setFilter(d,[])}}),v.createElement(x,{visible:a,onClick:function(){l(!a)}})),a?v.createElement(b.A,{multiple:!0,native:!0,className:o.select,value:f.get(t.field)||[],onChange:function(e){var r;u.setFilter(t.field,(r=e.target.options,function(e){if(Array.isArray(e))return S(e)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||w(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter(function(e){return e.selected}).map(function(e){return e.value}))}},r.sort(function(e,t){return e[0].localeCompare(t[0])}).map(function(e){var t=g(e,2),r=t[0],n=t[1];return v.createElement("option",{key:r,value:r},(0,c.coarseStripHTML)(r)," (",n,")")})):null)});var C=r(19779),P=r(14041);function E(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=j(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function j(e,t){if(e){if("string"==typeof e)return T(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const _=(0,i.observer)(function(e){var t,r=e.rows,n=e.columns,o=e.model,i=o.faceted,a=i.filters,l=n.slice(1),s=new Map(n.slice(1).map(function(e){return[e.field,new Map]})),c=i.filters.keys(),u=l.map(function(e){return e.field}),f=new Set,d=E(c);try{for(d.s();!(t=d.n()).done;){var p,h=t.value;null!==(p=a.get(h))&&void 0!==p&&p.length&&f.add(h)}}catch(e){d.e(e)}finally{d.f()}var m,y=E(u);try{for(y.s();!(m=y.n()).done;){var b=m.value;f.add(b)}}catch(e){y.e(e)}finally{y.f()}var v,g=r,w=E(f);try{var S=function(){var e,t=v.value,r=s.get(t);if(r){var n,o=E(g);try{for(o.s();!(n=o.n()).done;){var i=n.value,l=(0,C.a)(t,i),c=r.get(l);l&&(void 0===c?r.set(l,1):r.set(l,c+1))}}catch(e){o.e(e)}finally{o.f()}}var u=null!==(e=a.get(t))&&void 0!==e&&e.length?new Set(a.get(t)):void 0;g=g.filter(function(e){return void 0===u||u.has((0,C.a)(t,e))})};for(w.s();!(v=w.n()).done;)S()}catch(e){w.e(e)}finally{w.f()}return P.createElement("div",null,l.map(function(e){return P.createElement(k,{key:e.field,vals:(t=s.get(e.field),function(e){if(Array.isArray(e))return T(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||j(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),column:e,model:o});var t}))});var R=r(64773),M=r(83794),I=r(77099),N=r(14041);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function F(e){return function(e){if(Array.isArray(e))return G(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach(function(t){B(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function B(e,t,r){return(t=function(e){var t=function(e){if("object"!=D(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=D(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==D(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $(e,t){if(e){if("string"==typeof e)return G(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?G(e,t):void 0}}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const H=(0,i.observer)(function(e){var t,r,n=e.model,o=e.columns,i=e.shownTrackIds,a=e.selection,l=(0,c.getEnv)(n).pluginManager,u=n.view,f=n.faceted,d=f.rows,p=f.useShoppingCart,h=f.showOptions,m=f.filteredRows,y=f.filteredNonMetadataKeys,b=f.filteredMetadataKeys,v=f.visible,g=(t=(0,s.useState)(z(z({name:(0,c.measureGridWidth)(d.map(function(e){return e.name}),{maxWidth:500,stripHTML:!0})+15},Object.fromEntries(y.filter(function(e){return v[e]}).map(function(e){return[e,(0,c.measureGridWidth)(d.map(function(t){return t[e]}),{maxWidth:400,stripHTML:!0})]}))),Object.fromEntries(b.filter(function(e){return v["metadata.".concat(e)]}).map(function(e){return["metadata.".concat(e),(0,c.measureGridWidth)(d.map(function(t){return t.metadata[e]}),{maxWidth:400,stripHTML:!0})]})))),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||$(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),w=g[0],S=g[1];return N.createElement(R.z,{rowHeight:25,columnHeaderHeight:35,checkboxSelection:!0,disableRowSelectionOnClick:!0,keepNonExistentRowsSelected:!0,rows:m,columnVisibilityModel:v,showToolbar:h,onColumnWidthChange:function(e){S(z(z({},w),{},B({},e.colDef.field,e.width)))},onColumnVisibilityModelChange:function(e){n.faceted.setVisible(e)},onRowSelectionModelChange:function(e){if(p){var t=(0,I.getRoot)(n),r=l.pluggableConfigSchemaType("track");n.setSelection(F(e.ids).map(function(e){return(0,I.resolveIdentifier)(r,t,e)}))}else{var o=i,a=e.ids;(0,M.transaction)(function(){F(o).filter(function(e){return!a.has(e)}).map(function(e){return u.hideTrack(e)}),F(a).filter(function(e){return!o.has(e)}).map(function(e){u.showTrack(e),n.addToRecentlyUsed(e)})})}},rowSelectionModel:{type:"include",ids:new Set(p?a.map(function(e){return e.trackId}):F(i))},columns:o.map(function(e){return z(z({},e),{},{width:w[e.field]})})})});var V=r(61041),W=r(41885),U=r(95305),q=r(12935),X=r(1687),K=r(14041);function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function J(e){var t,r,o=e.model,i=o.faceted,a=(t=(0,s.useState)(null),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return Y(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=a[0],c=a[1],u=i.showOptions,d=i.showFilters,p=i.showSparse,m=i.useShoppingCart;return K.createElement(K.Fragment,null,K.createElement(W.A,{container:!0,spacing:4,alignItems:"center"},K.createElement(U.A,{label:"Search...",value:i.filterText,onChange:function(e){i.setFilterText(e.target.value)},slotProps:{input:{endAdornment:K.createElement(q.A,{position:"end"},K.createElement(h.A,{onClick:function(){i.setFilterText("")}},K.createElement(f.A,null)))}}}),K.createElement(h.A,{onClick:function(e){c(e.currentTarget)}},K.createElement(V.A,null)),K.createElement(X.A,{model:o})),K.createElement(n.Menu,{anchorEl:l,open:!!l,onClose:function(){c(null)},onMenuItemClick:function(e,t){t(),c(null)},menuItems:[{label:"Add tracks to selection instead of turning them on/off",onClick:function(){i.setUseShoppingCart(!m)},type:"checkbox",checked:m},{label:"Show sparse metadata columns",onClick:function(){i.setShowSparse(!p)},checked:p,type:"checkbox"},{label:"Show facet filters",onClick:function(){i.setShowFilters(!d)},checked:d,type:"checkbox"},{label:"Show extra table options",onClick:function(){i.setShowOptions(!u)},checked:u,type:"checkbox"}]}))}var Z=r(67313),Q=r(14041);function ee(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return te(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?te(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var re=(0,l.n9)()({cell:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},resizeHandle:{marginLeft:5,background:"grey",width:5}}),ne=.75;const oe=(0,i.observer)(function(e){var t=e.model,r=re().classes,o=t.selection,i=t.shownTrackIds,l=t.faceted,s=l.rows,c=l.panelWidth,u=l.showFilters,f=l.filteredNonMetadataKeys,d=l.filteredMetadataKeys,p=[{field:"name",hideable:!1,renderCell:function(e){var n=e.value,o=e.row,i=o.id,l=o.conf;return Q.createElement("div",{className:r.cell},Q.createElement(a.A,{html:n}),Q.createElement(Z.A,{id:i,conf:l,trackId:i,model:t}))}}].concat(ee(f.map(function(e){return{field:e,renderCell:function(e){var t=e.value;return t?Q.createElement(a.A,{className:r.cell,html:t}):""}}})),ee(d.map(function(e){return{field:"metadata.".concat(e),headerName:["name"].concat(ee(f)).includes(e)?"".concat(e," (from metadata)"):e,valueGetter:function(t,r){var n;return"".concat(null!==(n=r.metadata[e])&&void 0!==n?n:"")},renderCell:function(e){var t=e.value;return t?Q.createElement(a.A,{className:r.cell,html:t}):""}}})));return Q.createElement(Q.Fragment,null,Q.createElement(J,{model:t}),Q.createElement("div",{style:{display:"flex",overflow:"hidden",height:window.innerHeight*ne,width:window.innerWidth*ne}},Q.createElement("div",{style:{height:window.innerHeight*ne,width:window.innerWidth*ne-(u?c:0)}},Q.createElement(H,{model:t,columns:p,shownTrackIds:i,selection:o})),u?Q.createElement(Q.Fragment,null,Q.createElement(n.ResizeHandle,{vertical:!0,onDrag:function(e){return l.setPanelWidth(c-e)},className:r.resizeHandle}),Q.createElement("div",{style:{width:c,overflow:"auto"}},Q.createElement(_,{model:t,rows:s,columns:p}))):null))});var ie=r(14041);const ae=(0,i.observer)(function(e){var t=e.handleClose;return ie.createElement(n.Dialog,{open:!0,onClose:t,maxWidth:"xl",title:"Faceted track selector"},ie.createElement(o.A,null,ie.createElement(oe,e)))})},93539:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E});const n=class e{constructor(e,t){this.low=e,this.high=t}clone(){return new e(this.low,this.high)}get max(){return this.clone()}less_than(e){return this.low<e.low||this.low===e.low&&this.high<e.high}equal_to(e){return this.low===e.low&&this.high===e.high}intersect(e){return!this.not_intersect(e)}not_intersect(e){return this.high<e.low||e.high<this.low}merge(t){return new e(void 0===this.low?t.low:this.low<t.low?this.low:t.low,void 0===this.high?t.high:this.high>t.high?this.high:t.high)}output(){return[this.low,this.high]}static comparable_max(e,t){return e.merge(t)}static comparable_less_than(e,t){return e<t}};class o{constructor(e=void 0,t=void 0,r=null,o=null,i=null,a=1){if(this.left=r,this.right=o,this.parent=i,this.color=a,this.item={key:e,value:t},e&&e instanceof Array&&2===e.length&&!Number.isNaN(e[0])&&!Number.isNaN(e[1])){let[t,r]=e;t>r&&([t,r]=[r,t]),this.item.key=new n(t,r)}this.max=this.item.key?this.item.key.max:void 0}isNil(){return void 0===this.item.key&&void 0===this.item.value&&null===this.left&&null===this.right&&1===this.color}_value_less_than(e){return this.item.value&&e.item.value&&this.item.value.less_than?this.item.value.less_than(e.item.value):this.item.value<e.item.value}less_than(e){return this.item.value===this.item.key&&e.item.value===e.item.key?this.item.key.less_than(e.item.key):this.item.key.less_than(e.item.key)||this.item.key.equal_to(e.item.key)&&this._value_less_than(e)}_value_equal(e){return this.item.value&&e.item.value&&this.item.value.equal_to?this.item.value.equal_to(e.item.value):this.item.value===e.item.value}equal_to(e){return this.item.value===this.item.key&&e.item.value===e.item.key?this.item.key.equal_to(e.item.key):this.item.key.equal_to(e.item.key)&&this._value_equal(e)}intersect(e){return this.item.key.intersect(e.item.key)}copy_data(e){this.item.key=e.item.key,this.item.value=e.item.value}update_max(){if(this.max=this.item.key?this.item.key.max:void 0,this.right&&this.right.max){const e=this.item.key.constructor.comparable_max;this.max=e(this.max,this.right.max)}if(this.left&&this.left.max){const e=this.item.key.constructor.comparable_max;this.max=e(this.max,this.left.max)}}not_intersect_left_subtree(e){return(0,this.item.key.constructor.comparable_less_than)(void 0!==this.left.max.high?this.left.max.high:this.left.max,e.item.key.low)}not_intersect_right_subtree(e){const t=this.item.key.constructor.comparable_less_than;let r=void 0!==this.right.max.low?this.right.max.low:this.right.item.key.low;return t(e.item.key.high,r)}}class i{constructor(){this.root=null,this.nil_node=new o}get size(){let e=0;return this.tree_walk(this.root,()=>e++),e}get keys(){let e=[];return this.tree_walk(this.root,t=>e.push(t.item.key.output?t.item.key.output():t.item.key)),e}get values(){let e=[];return this.tree_walk(this.root,t=>e.push(t.item.value)),e}get items(){let e=[];return this.tree_walk(this.root,t=>e.push({key:t.item.key.output?t.item.key.output():t.item.key,value:t.item.value})),e}isEmpty(){return null==this.root||this.root===this.nil_node}clear(){this.root=null}insert(e,t=e){if(void 0===e)return;let r=new o(e,t,this.nil_node,this.nil_node,null,0);return this.tree_insert(r),this.recalc_max(r),r}exist(e,t=e){let r=new o(e,t);return!!this.tree_search(this.root,r)}remove(e,t=e){let r=new o(e,t),n=this.tree_search(this.root,r);return n&&this.tree_delete(n),n}search(e,t=(e,t)=>e===t?t.output():e){let r=new o(e),n=[];return this.tree_search_interval(this.root,r,n),n.map(e=>t(e.item.value,e.item.key))}intersect_any(e){let t=new o(e);return this.tree_find_any_interval(this.root,t)}forEach(e){this.tree_walk(this.root,t=>e(t.item.key,t.item.value))}map(e){const t=new i;return this.tree_walk(this.root,r=>t.insert(r.item.key,e(r.item.value,r.item.key))),t}*iterate(e,t=(e,t)=>e===t?t.output():e){let r;for(e?r=this.tree_search_nearest_forward(this.root,new o(e)):this.root&&(r=this.local_minimum(this.root));r;)yield t(r.item.value,r.item.key),r=this.tree_successor(r)}recalc_max(e){let t=e;for(;null!=t.parent;)t.parent.update_max(),t=t.parent}tree_insert(e){let t=this.root,r=null;if(null==this.root||this.root===this.nil_node)this.root=e;else{for(;t!==this.nil_node;)r=t,t=e.less_than(t)?t.left:t.right;e.parent=r,e.less_than(r)?r.left=e:r.right=e}this.insert_fixup(e)}insert_fixup(e){let t,r;for(t=e;t!==this.root&&0===t.parent.color;)t.parent===t.parent.parent.left?(r=t.parent.parent.right,0===r.color?(t.parent.color=1,r.color=1,t.parent.parent.color=0,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,this.rotate_left(t)),t.parent.color=1,t.parent.parent.color=0,this.rotate_right(t.parent.parent))):(r=t.parent.parent.left,0===r.color?(t.parent.color=1,r.color=1,t.parent.parent.color=0,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,this.rotate_right(t)),t.parent.color=1,t.parent.parent.color=0,this.rotate_left(t.parent.parent)));this.root.color=1}tree_delete(e){let t,r;t=e.left===this.nil_node||e.right===this.nil_node?e:this.tree_successor(e),r=t.left!==this.nil_node?t.left:t.right,r.parent=t.parent,t===this.root?this.root=r:(t===t.parent.left?t.parent.left=r:t.parent.right=r,t.parent.update_max()),this.recalc_max(r),t!==e&&(e.copy_data(t),e.update_max(),this.recalc_max(e)),1===t.color&&this.delete_fixup(r)}delete_fixup(e){let t,r=e;for(;r!==this.root&&null!=r.parent&&1===r.color;)r===r.parent.left?(t=r.parent.right,0===t.color&&(t.color=1,r.parent.color=0,this.rotate_left(r.parent),t=r.parent.right),1===t.left.color&&1===t.right.color?(t.color=0,r=r.parent):(1===t.right.color&&(t.color=0,t.left.color=1,this.rotate_right(t),t=r.parent.right),t.color=r.parent.color,r.parent.color=1,t.right.color=1,this.rotate_left(r.parent),r=this.root)):(t=r.parent.left,0===t.color&&(t.color=1,r.parent.color=0,this.rotate_right(r.parent),t=r.parent.left),1===t.left.color&&1===t.right.color?(t.color=0,r=r.parent):(1===t.left.color&&(t.color=0,t.right.color=1,this.rotate_left(t),t=r.parent.left),t.color=r.parent.color,r.parent.color=1,t.left.color=1,this.rotate_right(r.parent),r=this.root));r.color=1}tree_search(e,t){if(null!=e&&e!==this.nil_node)return t.equal_to(e)?e:t.less_than(e)?this.tree_search(e.left,t):this.tree_search(e.right,t)}tree_search_nearest_forward(e,t){let r,n=e;for(;n&&n!==this.nil_node;)n.less_than(t)?n.intersect(t)?(r=n,n=n.left):n=n.right:(r&&!n.less_than(r)||(r=n),n=n.left);return r||null}tree_search_interval(e,t,r){null!=e&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(t)||this.tree_search_interval(e.left,t,r),e.intersect(t)&&r.push(e),e.right===this.nil_node||e.not_intersect_right_subtree(t)||this.tree_search_interval(e.right,t,r))}tree_find_any_interval(e,t){let r=!1;return null!=e&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(t)||(r=this.tree_find_any_interval(e.left,t)),r||(r=e.intersect(t)),r||e.right===this.nil_node||e.not_intersect_right_subtree(t)||(r=this.tree_find_any_interval(e.right,t))),r}local_minimum(e){let t=e;for(;null!=t.left&&t.left!==this.nil_node;)t=t.left;return t}local_maximum(e){let t=e;for(;null!=t.right&&t.right!==this.nil_node;)t=t.right;return t}tree_successor(e){let t,r,n;if(e.right!==this.nil_node)t=this.local_minimum(e.right);else{for(r=e,n=e.parent;null!=n&&n.right===r;)r=n,n=n.parent;t=n}return t}rotate_left(e){let t=e.right;e.right=t.left,t.left!==this.nil_node&&(t.left.parent=e),t.parent=e.parent,e===this.root?this.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,null!=e&&e!==this.nil_node&&e.update_max(),t=e.parent,null!=t&&t!==this.nil_node&&t.update_max()}rotate_right(e){let t=e.left;e.left=t.right,t.right!==this.nil_node&&(t.right.parent=e),t.parent=e.parent,e===this.root?this.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.right=e,e.parent=t,null!==e&&e!==this.nil_node&&e.update_max(),t=e.parent,null!=t&&t!==this.nil_node&&t.update_max()}tree_walk(e,t){null!=e&&e!==this.nil_node&&(this.tree_walk(e.left,t),t(e),this.tree_walk(e.right,t))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(t){0===t.color&&(1===t.left.color&&1===t.right.color||(e=!1))}),e}testBlackHeightProperty(e){let t=0,r=0,n=0;if(1===e.color&&t++,r=e.left!==this.nil_node?this.testBlackHeightProperty(e.left):1,n=e.right!==this.nil_node?this.testBlackHeightProperty(e.right):1,r!==n)throw new Error("Red-black height property violated");return t+=r,t}}var a=r(49554),l=r(60654),s=r(81296),c=r(68020),u=r(98412),f=r(35545);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){C(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function m(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function y(e,t){if(e){if("string"==typeof e)return b(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function v(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return g(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(g(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,g(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,g(f,"constructor",c),g(c,"constructor",s),s.displayName="GeneratorFunction",g(c,o,"GeneratorFunction"),g(f),g(f,o,"Generator"),g(f,n,function(){return this}),g(f,"toString",function(){return"[object Generator]"}),(v=function(){return{w:i,m:d}})()}function g(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}g=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){g(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},g(e,t,r,n)}function w(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function S(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){w(i,n,o,a,l,"next",e)}function l(e){w(i,n,o,a,l,"throw",e)}a(void 0)})}}function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,P(n.key),n)}}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(O=function(){return!!e})()}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function C(e,t,r){return(t=P(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}var E=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return C((r=this,n=t,o=[].concat(a),n=x(n),e=function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,O()?Reflect.construct(n,o||[],x(r).constructor):n.apply(r,o))),"calculatedIntervalTreeMap",{}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(t,e),r=t,n=[{key:"getHeader",value:(w=S(v().m(function e(){var t,r;return v().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.setup();case 1:return t=e.v,r=t.header,e.a(2,r)}},e,this)})),function(){return w.apply(this,arguments)})},{key:"getMetadata",value:(g=S(v().m(function e(){var t,r;return v().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.setup();case 1:return t=e.v,r=t.parser,e.a(2,r.getMetadata())}},e,this)})),function(){return g.apply(this,arguments)})},{key:"setupP",value:(b=S(v().m(function e(t){var r,n,o,l,u,d,p,h,b,g,w,S,A,O,x,k,C,P=this;return v().w(function(e){for(;;)switch(e.n){case 0:return r=(t||{}).statusCallback,n=void 0===r?function(){}:r,o=(0,c.openLocation)(this.getConf("vcfLocation"),this.pluginManager),e.n=1,(0,s.fetchAndMaybeUnzip)(o,t);case 1:for(l=e.v,u=[],d={},p=0,h=new TextDecoder("utf8"),b=0;p<l.length;)g=l.indexOf(10,p),w=-1===g?l.subarray(p):l.subarray(p,g),(S=h.decode(w).trim())&&(S.startsWith("#")?u.push(S):(A=S.indexOf("\t"),O=S.slice(0,A),d[O]||(d[O]=[]),d[O].push(S))),b++%1e4==0&&n("Loading ".concat((0,s.getProgressDisplayStr)(p,l.length))),p=g+1;return x=u.join("\n"),k=new a.A({header:x}),C=Object.fromEntries(Object.entries(d).map(function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||y(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],a=n[1];return[o,function(e){if(!P.calculatedIntervalTreeMap[o]){null==e||e("Parsing VCF data");var t,r=0,n=new i,l=m(a);try{for(l.s();!(t=l.n()).done;){var s=t.value,c=new f.A({variant:k.parseLine(s),parser:k,id:"".concat(P.id,"-").concat(o,"-").concat(r++)});n.insert([c.get("start"),c.get("end")],c)}}catch(e){l.e(e)}finally{l.f()}P.calculatedIntervalTreeMap[o]=n}return P.calculatedIntervalTreeMap[o]}]})),e.a(2,{header:x,parser:k,intervalTreeMap:C})}},e,this)})),function(e){return b.apply(this,arguments)})},{key:"setup",value:(p=S(v().m(function e(){var t=this;return v().w(function(e){for(;;)if(0===e.n)return this.vcfFeatures||(this.vcfFeatures=this.setupP().catch(function(e){throw t.vcfFeatures=void 0,e})),e.a(2,this.vcfFeatures)},e,this)})),function(){return p.apply(this,arguments)})},{key:"getRefNames",value:(l=S(v().m(function e(){var t,r;return v().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.setup();case 1:return t=e.v,r=t.intervalTreeMap,e.a(2,Object.keys(r))}},e,this)})),function(){return l.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.ObservableCreate)(function(){var n=S(v().m(function n(o){var i,a,l,s,c,u,f,d,p,h;return v().w(function(n){for(;;)switch(n.n){case 0:return n.p=0,a=e.start,l=e.end,s=e.refName,n.n=1,t.setup();case 1:c=n.v,u=c.intervalTreeMap,f=m((null===(i=u[s])||void 0===i?void 0:i.call(u,r.statusCallback).search([a,l]))||[]);try{for(f.s();!(d=f.n()).done;)p=d.value,o.next(p)}catch(e){f.e(e)}finally{f.f()}o.complete(),n.n=3;break;case 2:n.p=2,h=n.v,o.error(h);case 3:return n.a(2)}},n,null,[[0,2]])}));return function(e){return n.apply(this,arguments)}}(),r.stopToken)}},{key:"getSources",value:(o=S(v().m(function e(){var t,r,n,o,i,a,l,s,u;return v().w(function(e){for(;;)switch(e.n){case 0:if(""!==(t=this.getConf("samplesTsvLocation")).uri&&"/path/to/samples.tsv"!==t.uri){e.n=2;break}return e.n=1,this.setup();case 1:return r=e.v,n=r.parser,e.a(2,n.samples.map(function(e){return{name:e}}));case 2:return e.n=3,(0,c.openLocation)(t).readFile("utf8");case 3:return o=e.v,i=o.split(/\n|\r\n|\r/),a=i[0].split("\t"),e.n=4,this.setup();case 4:return l=e.v,s=l.parser,u=new Set(s.samples),e.a(2,i.slice(1).map(function(e){var t=e.split("\t");return h({name:t[0]},Object.fromEntries(t.slice(1).map(function(e,t){return[a[t+1],e]})))}).filter(function(e){return u.has(e.name)}));case 5:return e.a(2)}},e,this)})),function(){return o.apply(this,arguments)})}],n&&A(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,l,p,b,g,w}(l.BaseFeatureDataAdapter);C(E,"capabilities",["getFeatures","getRefNames"])},93821:(e,t,r)=>{"use strict";function n(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const r=e.length;if(r!==t.length)return!1;for(let o=0;o<r;o+=1)if(!n(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const r=Array.from(e.entries());for(let e=0;e<r.length;e+=1)if(!t.has(r[e][0]))return!1;for(let e=0;e<r.length;e+=1){const o=r[e];if(!n(o[1],t.get(o[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const r=Array.from(e.entries());for(let e=0;e<r.length;e+=1)if(!t.has(r[e][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const r=e.length;if(r!==t.length)return!1;for(let n=0;n<r;n+=1)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),o=r.length;if(o!==Object.keys(t).length)return!1;for(let e=0;e<o;e+=1)if(!Object.prototype.hasOwnProperty.call(t,r[e]))return!1;for(let i=0;i<o;i+=1){const o=r[i];if(!n(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}r.d(t,{H:()=>n})},94042:(e,t,r)=>{"use strict";r.d(t,{L:()=>o,o:()=>i});var n=r(34051);const o=(e,t,r,o,i)=>{const a=t===r-1;return!(e!==n.yL.LEFT||!a)||!!o&&(e===n.yL.LEFT||(e===n.yL.RIGHT?!a:!a||i))},i=(e,t)=>e===n.yL.RIGHT&&0===t},94263:(e,t,r)=>{"use strict";r.d(t,{A:()=>S});var n=r(14041),o=r(54357),i=r(31593),a=r(83589),l=r(48156),s=r(96674),c=r(42014),u=r(40979),f=r(60224),d=r(59054),p=r(38256),h=r(38870),m=r(10997),y=r(54195),b=r(14779),v=r(53827),g=r(31085);const w=(0,s.Ay)(d.A,{shouldForwardProp:e=>(0,l.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})((0,c.A)(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${v.A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,a.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${v.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,a.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${v.A.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,a.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,a.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${v.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${v.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${m.A.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${m.A.inset}`]:{marginLeft:52},[`& .${b.A.root}`]:{marginTop:0,marginBottom:0},[`& .${b.A.inset}`]:{paddingLeft:36},[`& .${y.A.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${y.A.root} svg`]:{fontSize:"1.25rem"}}}]}))),S=n.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiMenuItem"}),{autoFocus:a=!1,component:l="li",dense:s=!1,divider:c=!1,disableGutters:d=!1,focusVisibleClassName:m,role:y="menuitem",tabIndex:b,className:S,...A}=r,O=n.useContext(f.A),x=n.useMemo(()=>({dense:s||O.dense||!1,disableGutters:d}),[O.dense,s,d]),k=n.useRef(null);(0,p.A)(()=>{a&&k.current&&k.current.focus()},[a]);const C={...r,dense:x.dense,divider:c,disableGutters:d},P=(e=>{const{disabled:t,dense:r,divider:n,disableGutters:o,selected:a,classes:l}=e,s={root:["root",r&&"dense",t&&"disabled",!o&&"gutters",n&&"divider",a&&"selected"]},c=(0,i.A)(s,v.Z,l);return{...l,...c}})(r),E=(0,h.A)(k,t);let j;return r.disabled||(j=void 0!==b?b:-1),(0,g.jsx)(f.A.Provider,{value:x,children:(0,g.jsx)(w,{ref:E,role:y,tabIndex:j,component:l,focusVisibleClassName:(0,o.A)(P.focusVisible,m),className:(0,o.A)(P.root,S),...A,ownerState:C,classes:P})})})},94460:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>F,getRatingUtilityClass:()=>x,ratingClasses:()=>k});var n=r(14041),o=r(54357),i=r(39731),a=r(46667),l=r(31593),s=r(37570),c=r(16681),u=r(38216),f=r(65866),d=r(25337),p=r(38870),h=r(23523),m=r(31085);const y=(0,h.A)((0,m.jsx)("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),b=(0,h.A)((0,m.jsx)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarBorder");var v=r(96674),g=r(42014),w=r(40979),S=r(89516),A=r(42395),O=r(3807);function x(e){return(0,O.Ay)("MuiRating",e)}const k=(0,A.A)("MuiRating",["root","sizeSmall","sizeMedium","sizeLarge","readOnly","disabled","focusVisible","visuallyHidden","pristine","label","labelEmptyValueActive","icon","iconEmpty","iconFilled","iconHover","iconFocus","iconActive","decimal"]);var C=r(39455);function P(e,t){if(null==e)return e;const r=Math.round(e/t)*t;return Number(r.toFixed(function(e){const t=e.toString().split(".")[1];return t?t.length:0}(t)))}const E=(0,v.Ay)("span",{name:"MuiRating",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${k.visuallyHidden}`]:t.visuallyHidden},t.root,t[`size${(0,u.A)(r.size)}`],r.readOnly&&t.readOnly]}})((0,g.A)(({theme:e})=>({display:"inline-flex",position:"relative",fontSize:e.typography.pxToRem(24),color:"#faaf00",cursor:"pointer",textAlign:"left",width:"min-content",WebkitTapHighlightColor:"transparent",[`&.${k.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${k.focusVisible} .${k.iconActive}`]:{outline:"1px solid #999"},[`& .${k.visuallyHidden}`]:a.A,variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(30)}},{props:({ownerState:e})=>e.readOnly,style:{pointerEvents:"none"}}]}))),j=(0,v.Ay)("label",{name:"MuiRating",slot:"Label",overridesResolver:({ownerState:e},t)=>[t.label,e.emptyValueFocused&&t.labelEmptyValueActive]})({cursor:"inherit",variants:[{props:({ownerState:e})=>e.emptyValueFocused,style:{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"}}]}),T=(0,v.Ay)("span",{name:"MuiRating",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.iconEmpty&&t.iconEmpty,r.iconFilled&&t.iconFilled,r.iconHover&&t.iconHover,r.iconFocus&&t.iconFocus,r.iconActive&&t.iconActive]}})((0,g.A)(({theme:e})=>({display:"flex",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),pointerEvents:"none",variants:[{props:({ownerState:e})=>e.iconActive,style:{transform:"scale(1.2)"}},{props:({ownerState:e})=>e.iconEmpty,style:{color:(e.vars||e).palette.action.disabled}}]}))),_=(0,v.Ay)("span",{name:"MuiRating",slot:"Decimal",shouldForwardProp:e=>(0,S.A)(e)&&"iconActive"!==e,overridesResolver:(e,t)=>{const{iconActive:r}=e;return[t.decimal,r&&t.iconActive]}})({position:"relative",variants:[{props:({iconActive:e})=>e,style:{transform:"scale(1.2)"}}]});function R(e){const{value:t,...r}=e;return(0,m.jsx)("span",{...r})}function M(e){const{classes:t,disabled:r,emptyIcon:i,focus:a,getLabelText:l,highlightSelectedOnly:s,hover:c,icon:u,IconContainerComponent:d,isActive:p,itemValue:h,labelProps:y,name:b,onBlur:v,onChange:g,onClick:w,onFocus:S,readOnly:A,ownerState:O,ratingValue:x,ratingValueRounded:k,slots:P={},slotProps:E={}}=e,_=s?h===x:h<=x,R=h<=c,M=h<=a,I=h===k,N=`${b}-${(0,f.A)()}`,D={slots:P,slotProps:E},[F,L]=(0,C.A)("icon",{elementType:T,className:(0,o.A)(t.icon,_?t.iconFilled:t.iconEmpty,R&&t.iconHover,M&&t.iconFocus,p&&t.iconActive),externalForwardedProps:D,ownerState:{...O,iconEmpty:!_,iconFilled:_,iconHover:R,iconFocus:M,iconActive:p},additionalProps:{value:h},internalForwardedProps:{as:d}}),[z,B]=(0,C.A)("label",{elementType:j,externalForwardedProps:D,ownerState:{...O,emptyValueFocused:void 0},additionalProps:{style:y?.style,htmlFor:N}}),$=(0,m.jsx)(F,{...L,children:i&&!_?i:u});return A?(0,m.jsx)("span",{...y,children:$}):(0,m.jsxs)(n.Fragment,{children:[(0,m.jsxs)(z,{...B,children:[$,(0,m.jsx)("span",{className:t.visuallyHidden,children:l(h)})]}),(0,m.jsx)("input",{className:t.visuallyHidden,onFocus:S,onBlur:v,onChange:g,onClick:w,disabled:r,value:h,id:N,type:"radio",name:b,checked:I})]})}const I=(0,m.jsx)(y,{fontSize:"inherit"}),N=(0,m.jsx)(b,{fontSize:"inherit"});function D(e){return`${e||"0"} Star${1!==e?"s":""}`}const F=n.forwardRef(function(e,t){const r=(0,w.b)({name:"MuiRating",props:e}),{component:a="span",className:h,defaultValue:y=null,disabled:b=!1,emptyIcon:v=N,emptyLabelText:g="Empty",getLabelText:S=D,highlightSelectedOnly:A=!1,icon:O=I,IconContainerComponent:k=R,max:T=5,name:F,onChange:L,onChangeActive:z,onMouseLeave:B,onMouseMove:$,precision:G=1,readOnly:H=!1,size:V="medium",value:W,slots:U={},slotProps:q={},...X}=r,K=(0,f.A)(F),[Y,J]=(0,d.A)({controlled:W,default:y,name:"Rating"}),Z=P(Y,G),Q=(0,s.I)(),[{hover:ee,focus:te},re]=n.useState({hover:-1,focus:-1});let ne=Z;-1!==ee&&(ne=ee),-1!==te&&(ne=te);const[oe,ie]=n.useState(!1),ae=n.useRef(),le=(0,p.A)(ae,t),se=e=>{let t=""===e.target.value?null:parseFloat(e.target.value);-1!==ee&&(t=ee),J(t),L&&L(e,t)},ce=e=>{0===e.clientX&&0===e.clientY||(re({hover:-1,focus:-1}),J(null),L&&parseFloat(e.target.value)===Z&&L(e,null))},ue=e=>{(0,c.A)(e.target)&&ie(!0);const t=parseFloat(e.target.value);re(e=>({hover:e.hover,focus:t}))},fe=e=>{-1===ee&&((0,c.A)(e.target)||ie(!1),re(e=>({hover:e.hover,focus:-1})))},[de,pe]=n.useState(!1),he={...r,component:a,defaultValue:y,disabled:b,emptyIcon:v,emptyLabelText:g,emptyValueFocused:de,focusVisible:oe,getLabelText:S,icon:O,IconContainerComponent:k,max:T,precision:G,readOnly:H,size:V},me=(e=>{const{classes:t,size:r,readOnly:n,disabled:o,emptyValueFocused:i,focusVisible:a}=e,s={root:["root",`size${(0,u.A)(r)}`,o&&"disabled",a&&"focusVisible",n&&"readOnly"],label:["label","pristine"],labelEmptyValue:[i&&"labelEmptyValueActive"],icon:["icon"],iconEmpty:["iconEmpty"],iconFilled:["iconFilled"],iconHover:["iconHover"],iconFocus:["iconFocus"],iconActive:["iconActive"],decimal:["decimal"],visuallyHidden:["visuallyHidden"]};return(0,l.A)(s,x,t)})(he),ye={slots:U,slotProps:q},[be,ve]=(0,C.A)("root",{ref:le,className:(0,o.A)(me.root,h),elementType:E,externalForwardedProps:{...ye,...X,component:a},getSlotProps:e=>({...e,onMouseMove:t=>{(e=>{$&&$(e);const t=ae.current,{right:r,left:n,width:o}=t.getBoundingClientRect();let a;a=Q?(r-e.clientX)/o:(e.clientX-n)/o;let l=P(T*a+G/2,G);l=(0,i.A)(l,G,T),re(e=>e.hover===l&&e.focus===l?e:{hover:l,focus:l}),ie(!1),z&&ee!==l&&z(e,l)})(t),e.onMouseMove?.(t)},onMouseLeave:t=>{(e=>{B&&B(e),re({hover:-1,focus:-1}),z&&-1!==ee&&z(e,-1)})(t),e.onMouseLeave?.(t)}}),ownerState:he,additionalProps:{role:H?"img":null,"aria-label":H?S(ne):null}}),[ge,we]=(0,C.A)("label",{className:(0,o.A)(me.label,me.labelEmptyValue),elementType:j,externalForwardedProps:ye,ownerState:he}),[Se,Ae]=(0,C.A)("decimal",{className:me.decimal,elementType:_,externalForwardedProps:ye,ownerState:he});return(0,m.jsxs)(be,{...ve,children:[Array.from(new Array(T)).map((e,t)=>{const r=t+1,i={classes:me,disabled:b,emptyIcon:v,focus:te,getLabelText:S,highlightSelectedOnly:A,hover:ee,icon:O,IconContainerComponent:k,name:K,onBlur:fe,onChange:se,onClick:ce,onFocus:ue,ratingValue:ne,ratingValueRounded:Z,readOnly:H,ownerState:he,slots:U,slotProps:q},a=r===Math.ceil(ne)&&(-1!==ee||-1!==te);if(G<1){const e=Array.from(new Array(1/G));return(0,n.createElement)(Se,{...Ae,key:r,className:(0,o.A)(Ae.className,a&&me.iconActive),iconActive:a},e.map((t,n)=>{const o=P(r-1+(n+1)*G,G);return(0,m.jsx)(M,{...i,isActive:!1,itemValue:o,labelProps:{style:e.length-1===n?{}:{width:o===ne?(n+1)*G*100+"%":"0%",overflow:"hidden",position:"absolute"}}},o)}))}return(0,m.jsx)(M,{...i,isActive:a,itemValue:r},r)}),!H&&!b&&(0,m.jsxs)(ge,{...we,children:[(0,m.jsx)("input",{className:me.visuallyHidden,value:"",id:`${K}-empty`,type:"radio",name:K,checked:null==Z,onFocus:()=>pe(!0),onBlur:()=>pe(!1),onChange:se}),(0,m.jsx)("span",{className:me.visuallyHidden,children:g})]})]})})},94466:(e,t,r)=>{"use strict";r.d(t,{A:()=>L});var n=r(14041),o=r(23523),i=r(31085);const a=(0,o.A)((0,i.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");var l=r(94263),s=r(87495),c=r(88303),u=r(87373),f=r(89981),d=r(26629);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h.apply(null,arguments)}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function b(e,t,r){return(t=function(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const v=n.forwardRef(function(e,t){return n.createElement(u.A,h({},e,{ref:t,style:y({pointerEvents:"none"},e.style),slotProps:y(y({},e.slotProps),{},{paper:{style:{pointerEvents:"auto"}}})}))});var g=r(40129),w=r(44775),S=r(14041),A=["onClick","closeAfterItemClick"],O=["title","Icon","inset"],x=["popupState","onMenuItemClick","menuItems","classes"],k=["popupState","onMenuItemClick","menuItems"],C=["onMenuItemClick","closeAfterItemClick","menuItems"],P=["closeAfterItemClick"];function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(null,arguments)}function j(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var T=(0,n.createContext)({parentPopupState:void 0,rootPopupState:void 0});function _(e){var t=e.onClick,r=e.closeAfterItemClick,o=j(e,A),i=(0,n.useContext)(T),a=i.rootPopupState,s=i.parentPopupState;if(!a)throw new Error("must be used inside a CascadingMenu");return S.createElement(l.A,E({},o,{onClick:function(e){r&&a.close(),null==t||t(e)},onMouseOver:function(){null!=s&&s.childHandle&&(s.childHandle.close(),s.setChildHandle(void 0))}}))}function R(e){var t=e.title,r=e.Icon,o=e.inset,i=j(e,O),u=(0,n.useContext)(T).parentPopupState,f=(0,w.T6)({parentPopupState:u});return S.createElement(S.Fragment,null,S.createElement(l.A,E({},(0,w.oe)(f),{onMouseOver:function(e){null!=u&&u.childHandle&&(u.childHandle.close(),u.setChildHandle(void 0)),(0,w._k)(f).onMouseOver(e)}}),r?S.createElement(s.A,null,S.createElement(r,null)):null,S.createElement(c.A,{primary:t,inset:o}),S.createElement(a,null)),S.createElement(M,E({},i,{anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},popupState:f})))}function M(e){var t=e.popupState,r=(e.onMenuItemClick,e.menuItems,e.classes,j(e,x)),o=(0,n.useContext)(T).rootPopupState,i=(0,n.useMemo)(function(){return{rootPopupState:o||t,parentPopupState:t}},[o,t]);return S.createElement(T.Provider,{value:i},S.createElement(v,E({},r,(0,w.NA)(t))))}function I(e){var t=e.popupState,r=(e.onMenuItemClick,e.menuItems,j(e,k)),o=(0,n.useContext)(T).rootPopupState,i=(0,n.useMemo)(function(){return{rootPopupState:o||t,parentPopupState:t}},[o,t]);return S.createElement(T.Provider,{value:i},S.createElement(u.A,E({},r,(0,w.NA)(t))))}function N(e){var t=e.item;return"subMenu"in t?S.createElement(g.m,{type:"subMenu"}):"checkbox"===t.type||"radio"===t.type?S.createElement(g.m,{type:t.type,checked:t.checked,disabled:t.disabled}):null}function D(e){var t=e.onMenuItemClick,r=e.closeAfterItemClick,n=e.menuItems,o=j(e,C),i=n.some(function(e){return"icon"in e&&e.icon});return S.createElement(S.Fragment,null,n.toSorted(function(e,t){return(t.priority||0)-(e.priority||0)}).map(function(e,n){return"subMenu"in e?S.createElement(R,{key:"subMenu-".concat(e.label,"-").concat(n),title:e.label,Icon:e.icon,inset:i&&!e.icon,onMenuItemClick:t,menuItems:e.subMenu},S.createElement(D,E({},o,{closeAfterItemClick:r,onMenuItemClick:t,menuItems:e.subMenu}))):"divider"===e.type?S.createElement(f.A,{key:"divider-".concat(JSON.stringify(e),"-").concat(n),component:"li"}):"subHeader"===e.type?S.createElement(d.A,{key:"subHeader-".concat(e.label,"-").concat(n)},e.label):S.createElement(_,{key:"".concat(e.label,"-").concat(n),closeAfterItemClick:r,onClick:"onClick"in e?function(r){t(r,e.onClick)}:void 0,disabled:Boolean(e.disabled)},e.icon?S.createElement(s.A,null,S.createElement(e.icon,null)):null," ",S.createElement(c.A,{primary:e.label,secondary:e.subLabel,inset:i&&!e.icon}),S.createElement(F,null),S.createElement(N,{item:e}))}))}function F(){return S.createElement("div",{style:{flexGrow:1,minWidth:10}})}const L=function(e){var t=e.closeAfterItemClick,r=void 0===t||t,n=j(e,P);return S.createElement(I,n,S.createElement(D,E({},n,{closeAfterItemClick:r})))}},94497:(e,t,r)=>{"use strict";var n=r(4293)(r(90147)),o={functions:"Jexl Function",transforms:"Transform"};t.ArrayLiteral=function(e){return this.evalArray(e.value)},t.BinaryExpression=function(e){var t=this,r=this._grammar.elements[e.operator];if(r.evalOnDemand){var n=function(e){return{eval:function(){return t.eval(e)}}};return r.evalOnDemand(n(e.left),n(e.right))}return this.Promise.all([this.eval(e.left),this.eval(e.right)]).then(function(e){return r.eval(e[0],e[1])})},t.ConditionalExpression=function(e){var t=this;return this.eval(e.test).then(function(r){return r?e.consequent?t.eval(e.consequent):r:t.eval(e.alternate)})},t.FilterExpression=function(e){var t=this;return this.eval(e.subject).then(function(r){return e.relative?t._filterRelative(r,e.expr):t._filterStatic(r,e.expr)})},t.Identifier=function(e){return e.from?this.eval(e.from).then(function(t){if(null!=t)return Array.isArray(t)&&(t=t[0]),t[e.value]}):e.relative?this._relContext[e.value]:this._context[e.value]},t.Literal=function(e){return e.value},t.ObjectLiteral=function(e){return this.evalMap(e.value)},t.FunctionCall=function(e){var t=o[e.pool];if(!t)throw new Error("Corrupt AST: Pool '".concat(e.pool,"' not found"));var r=this._grammar[e.pool][e.name];if(!r)throw new Error("".concat(t," ").concat(e.name," is not defined."));return this.evalArray(e.args||[]).then(function(e){return r.apply(void 0,(0,n.default)(e))})},t.UnaryExpression=function(e){var t=this;return this.eval(e.right).then(function(r){return t._grammar.elements[e.operator].eval(r)})}},94521:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(14041),o=r(31593),i=r(38216),a=r(48156),l=r(96674),s=r(25337),c=r(31042),u=r(59054),f=r(42395),d=r(3807);function p(e){return(0,d.Ay)("PrivateSwitchBase",e)}(0,f.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var h=r(39455),m=r(31085);const y=(0,l.Ay)(u.A,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),b=(0,l.Ay)("input",{name:"MuiSwitchBase",shouldForwardProp:a.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),v=n.forwardRef(function(e,t){const{autoFocus:r,checked:n,checkedIcon:a,defaultChecked:l,disabled:u,disableFocusRipple:f=!1,edge:d=!1,icon:v,id:g,inputProps:w,inputRef:S,name:A,onBlur:O,onChange:x,onFocus:k,readOnly:C,required:P=!1,tabIndex:E,type:j,value:T,slots:_={},slotProps:R={},...M}=e,[I,N]=(0,s.A)({controlled:n,default:Boolean(l),name:"SwitchBase",state:"checked"}),D=(0,c.A)();let F=u;D&&void 0===F&&(F=D.disabled);const L="checkbox"===j||"radio"===j,z={...e,checked:I,disabled:F,disableFocusRipple:f,edge:d},B=(e=>{const{classes:t,checked:r,disabled:n,edge:a}=e,l={root:["root",r&&"checked",n&&"disabled",a&&`edge${(0,i.A)(a)}`],input:["input"]};return(0,o.A)(l,p,t)})(z),$={slots:_,slotProps:{input:w,...R}},[G,H]=(0,h.A)("root",{ref:t,elementType:y,className:B.root,shouldForwardComponentProp:!0,externalForwardedProps:{...$,component:"span",...M},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{k&&k(e),D&&D.onFocus&&D.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{O&&O(e),D&&D.onBlur&&D.onBlur(e)})(t)}}),ownerState:z,additionalProps:{centerRipple:!0,focusRipple:!f,disabled:F,role:void 0,tabIndex:null}}),[V,W]=(0,h.A)("input",{ref:S,elementType:b,className:B.input,externalForwardedProps:$,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;N(t),x&&x(e,t)})(t)}}),ownerState:z,additionalProps:{autoFocus:r,checked:n,defaultChecked:l,disabled:F,id:L?g:void 0,name:A,readOnly:C,required:P,tabIndex:E,type:j,..."checkbox"===j&&void 0===T?{}:{value:T}}});return(0,m.jsxs)(G,{...H,children:[(0,m.jsx)(V,{...W}),I?a:v]})})},94571:(e,t,r)=>{"use strict";r.d(t,{h:()=>x});var n=r(88357),o=r(24254),i=r(46195),a=r(38509),l=new a.c(function(e){return e.complete()}),s=r(14460);function c(e){return e[e.length-1]}var u=r(54184),f=r(22185),d=r(869);function p(e,t){return void 0===t&&(t=0),(0,f.N)(function(r,n){r.subscribe((0,d._)(n,function(r){return(0,u.N)(n,e,function(){return n.next(r)},t)},function(){return(0,u.N)(n,e,function(){return n.complete()},t)},function(r){return(0,u.N)(n,e,function(){return n.error(r)},t)}))})}function h(e,t){return void 0===t&&(t=0),(0,f.N)(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}var m=r(49758);function y(e,t){if(!e)throw new Error("Iterable cannot be null");return new a.c(function(r){(0,u.N)(r,t,function(){var n=e[Symbol.asyncIterator]();(0,u.N)(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}var b=r(23330),v=r(26691),g=r(31604),w=r(93206),S=r(74956),A=r(64904),O=r(98523);function x(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=function(e){return(t=c(e))&&(0,s.T)(t.schedule)?e.pop():void 0;var t}(e),f=function(e){return"number"==typeof c(e)?e.pop():1/0}(e),d=e;return d.length?1===d.length?(0,i.Tg)(d[0]):function(e){return void 0===e&&(e=1/0),(0,n.Z)(o.D,e)}(f)(function(e,t){return t?function(e,t){if(null!=e){if((0,b.l)(e))return function(e,t){return(0,i.Tg)(e).pipe(h(t),p(t))}(e,t);if((0,g.X)(e))return function(e,t){return new a.c(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}(e,t);if((0,v.y)(e))return function(e,t){return(0,i.Tg)(e).pipe(h(t),p(t))}(e,t);if((0,S.T)(e))return y(e,t);if((0,w.x)(e))return function(e,t){return new a.c(function(r){var n;return(0,u.N)(r,t,function(){n=e[m.l](),(0,u.N)(r,t,function(){var e,t,o;try{t=(e=n.next()).value,o=e.done}catch(e){return void r.error(e)}o?r.complete():r.next(t)},0,!0)}),function(){return(0,s.T)(null==n?void 0:n.return)&&n.return()}})}(e,t);if((0,O.U)(e))return function(e,t){return y((0,O.C)(e),t)}(e,t)}throw(0,A.L)(e)}(e,t):(0,i.Tg)(e)}(d,r)):l}},94820:(e,t,r)=>{"use strict";r.d(t,{Gh:()=>s,HZ:()=>c,Mk:()=>l,OL:()=>i,Oq:()=>S,Qy:()=>w,SN:()=>v,TW:()=>p,VO:()=>h,Z:()=>f,Ze:()=>b,e$:()=>u,fS:()=>d,gb:()=>a,l_:()=>y,nF:()=>m,nW:()=>A,ro:()=>g});var n=r(89575),o=r(38036);const i="auto-generated-group-node-root",a=Symbol("mui.id_autogenerated"),l=()=>({type:"group",id:i,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function s(e,t,r="A row was provided without id in the rows prop:"){if(null==e)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",r,JSON.stringify(t)].join("\n"))}const c=(e,t,r)=>{const n=t?t(e):e.id;return s(n,e,r),n},u=(e,t,r)=>{const n=t.field;if(!t||!t.valueGetter)return e[n];const o=e[t.field];return t.valueGetter(o,e,t,r)},f=({rows:e,getRowId:t,loading:r,rowCount:n})=>{const o={type:"full",rows:[]},i={};for(let r=0;r<e.length;r+=1){const n=e[r],a=c(n,t);i[a]=n,o.rows.push(a)}return{rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:r,rowCountPropBeforePartialUpdates:n,updates:o,dataRowIdToModelLookup:i}},d=({tree:e,rowCountProp:t=0})=>{const r=e[i];return Math.max(t,r.children.length+(null==r.footerId?0:1))},p=({apiRef:e,rowCountProp:t=0,loadingProp:r,previousTree:o,previousTreeDepths:i,previousGroupsToFetch:a})=>{const l=e.current.caches.rows,{tree:s,treeDepths:c,dataRowIds:u,groupingName:f,groupsToFetch:p=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:o,previousTreeDepths:i,updates:l.updates,dataRowIdToModelLookup:l.dataRowIdToModelLookup,previousGroupsToFetch:a}),h=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:c,dataRowIds:u,dataRowIdToModelLookup:l.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},(0,n.A)({},h,{totalRowCount:Math.max(t,h.dataRowIds.length),totalTopLevelRowCount:d({tree:h.tree,rowCountProp:t}),groupingName:f,loading:r,groupsToFetch:p})},h=e=>a in e,m=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,y=(e,t,r)=>{const n=e[t];if("group"!==n.type)return[];const o=[];for(let t=0;t<n.children.length;t+=1){const i=n.children[t];r&&m(e[i])||o.push(i);const a=y(e,i,r);for(let e=0;e<a.length;e+=1)o.push(a[e])}return r||null==n.footerId||o.push(n.footerId),o},b=({previousCache:e,getRowId:t,updates:r,groupKeys:o})=>{if("full"===e.updates.type)throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const i=new Map;r.forEach(e=>{const r=c(e,t,"A row was provided without id when calling updateRows():");i.has(r)?i.set(r,(0,n.A)({},i.get(r),e)):i.set(r,e)});const a={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:(0,n.A)({},e.updates.idToActionLookup),groupKeys:o},l=(0,n.A)({},e.dataRowIdToModelLookup),s={insert:{},modify:{},remove:{}};i.forEach((e,t)=>{const r=a.idToActionLookup[t];if("delete"===e._action){if("remove"===r||!l[t])return;return null!=r&&(s[r][t]=!0),a.actions.remove.push(t),void delete l[t]}const o=l[t];if(o)return"remove"===r?(s.remove[t]=!0,a.actions.modify.push(t)):null==r&&a.actions.modify.push(t),void(l[t]=(0,n.A)({},o,e));"remove"===r?(s.remove[t]=!0,a.actions.insert.push(t)):null==r&&a.actions.insert.push(t),l[t]=e});const u=Object.keys(s);for(let e=0;e<u.length;e+=1){const t=u[e],r=s[t];Object.keys(r).length>0&&(a.actions[t]=a.actions[t].filter(e=>!r[e]))}return{dataRowIdToModelLookup:l,updates:a,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}},v="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function g(e,t,r){const i=[];return t.forEach(t=>{const a=c(t,r,"A row was provided without id when calling updateRows():"),l=(0,o.Qu)(e,a);if("pinnedRow"===l?.type){const r=e.current.caches.pinnedRows,o=r.idLookup[a];o&&(r.idLookup[a]=(0,n.A)({},o,t))}else i.push(t)}),i}const w=(e,t,r)=>"number"==typeof e&&e>0?e:t,S=["MUI X: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),A=["MUI X: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n")},95305:(e,t,r)=>{"use strict";r.d(t,{A:()=>S});var n=r(14041),o=r(54357),i=r(31593),a=r(58203),l=r(96674),s=r(40979),c=r(14133),u=r(38617),f=r(24e3),d=r(89327),p=r(8837),h=r(21733),m=r(79177),y=r(42777),b=r(39455),v=r(31085);const g={standard:c.A,filled:u.A,outlined:f.A},w=(0,l.Ay)(p.A,{name:"MuiTextField",slot:"Root"})({}),S=n.forwardRef(function(e,t){const r=(0,s.b)({props:e,name:"MuiTextField"}),{autoComplete:n,autoFocus:l=!1,children:c,className:u,color:f="primary",defaultValue:p,disabled:S=!1,error:A=!1,FormHelperTextProps:O,fullWidth:x=!1,helperText:k,id:C,InputLabelProps:P,inputProps:E,InputProps:j,inputRef:T,label:_,maxRows:R,minRows:M,multiline:I=!1,name:N,onBlur:D,onChange:F,onFocus:L,placeholder:z,required:B=!1,rows:$,select:G=!1,SelectProps:H,slots:V={},slotProps:W={},type:U,value:q,variant:X="outlined",...K}=r,Y={...r,autoFocus:l,color:f,disabled:S,error:A,fullWidth:x,multiline:I,required:B,select:G,variant:X},J=(e=>{const{classes:t}=e;return(0,i.A)({root:["root"]},y._,t)})(Y),Z=(0,a.A)(C),Q=k&&Z?`${Z}-helper-text`:void 0,ee=_&&Z?`${Z}-label`:void 0,te=g[X],re={slots:V,slotProps:{input:j,inputLabel:P,htmlInput:E,formHelperText:O,select:H,...W}},ne={},oe=re.slotProps.inputLabel;"outlined"===X&&(oe&&void 0!==oe.shrink&&(ne.notched=oe.shrink),ne.label=_),G&&(H&&H.native||(ne.id=void 0),ne["aria-describedby"]=void 0);const[ie,ae]=(0,b.A)("root",{elementType:w,shouldForwardComponentProp:!0,externalForwardedProps:{...re,...K},ownerState:Y,className:(0,o.A)(J.root,u),ref:t,additionalProps:{disabled:S,error:A,fullWidth:x,required:B,color:f,variant:X}}),[le,se]=(0,b.A)("input",{elementType:te,externalForwardedProps:re,additionalProps:ne,ownerState:Y}),[ce,ue]=(0,b.A)("inputLabel",{elementType:d.A,externalForwardedProps:re,ownerState:Y}),[fe,de]=(0,b.A)("htmlInput",{elementType:"input",externalForwardedProps:re,ownerState:Y}),[pe,he]=(0,b.A)("formHelperText",{elementType:h.A,externalForwardedProps:re,ownerState:Y}),[me,ye]=(0,b.A)("select",{elementType:m.A,externalForwardedProps:re,ownerState:Y}),be=(0,v.jsx)(le,{"aria-describedby":Q,autoComplete:n,autoFocus:l,defaultValue:p,fullWidth:x,multiline:I,name:N,rows:$,maxRows:R,minRows:M,type:U,value:q,id:Z,inputRef:T,onBlur:D,onChange:F,onFocus:L,placeholder:z,inputProps:de,slots:{input:V.htmlInput?fe:void 0},...se});return(0,v.jsxs)(ie,{...ae,children:[null!=_&&""!==_&&(0,v.jsx)(ce,{htmlFor:Z,id:ee,...ue,children:_}),G?(0,v.jsx)(me,{"aria-describedby":Q,id:Z,labelId:ee,value:q,input:be,...ye,children:c}):be,k&&(0,v.jsx)(pe,{id:Q,...he,children:k})]})})},95381:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e,t=[]){if(void 0===e)return{};const r={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r)).forEach(t=>{r[t]=e[t]}),r}},95689:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,N:()=>i});var n=r(42395),o=r(3807);function i(e){return(0,o.Ay)("MuiFilledInput",e)}const a={...r(18913).A,...(0,n.A)("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])}},95725:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LEFT=t.BOTTOM=t.RIGHT=t.TOP=t.Axis=t.axisPropsFromTickScale=void 0;var o=r(72887);Object.defineProperty(t,"axisPropsFromTickScale",{enumerable:!0,get:function(){return n(o).default}});var i=r(49104);Object.defineProperty(t,"Axis",{enumerable:!0,get:function(){return n(i).default}}),Object.defineProperty(t,"TOP",{enumerable:!0,get:function(){return i.TOP}}),Object.defineProperty(t,"RIGHT",{enumerable:!0,get:function(){return i.RIGHT}}),Object.defineProperty(t,"BOTTOM",{enumerable:!0,get:function(){return i.BOTTOM}}),Object.defineProperty(t,"LEFT",{enumerable:!0,get:function(){return i.LEFT}})},95733:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,h:()=>i});var n=r(42395),o=r(3807);function i(e){return(0,o.Ay)("MuiCardContent",e)}const a=(0,n.A)("MuiCardContent",["root"])},95734:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(14041).createContext({})},95790:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>b,getTabUtilityClass:()=>p,tabClasses:()=>h});var n=r(14041),o=r(54357),i=r(31593),a=r(59054),l=r(38216),s=r(96674),c=r(42014),u=r(40979),f=r(42395),d=r(3807);function p(e){return(0,d.Ay)("MuiTab",e)}const h=(0,f.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]);var m=r(31085);const y=(0,s.Ay)(a.A,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t[`textColor${(0,l.A)(r.textColor)}`],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped,{[`& .${h.iconWrapper}`]:t.iconWrapper},{[`& .${h.icon}`]:t.icon}]}})((0,c.A)(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${h.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${h.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${h.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${h.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${h.selected}`]:{opacity:1},[`&.${h.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${h.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${h.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${h.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${h.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),b=n.forwardRef(function(e,t){const r=(0,u.b)({props:e,name:"MuiTab"}),{className:a,disabled:s=!1,disableFocusRipple:c=!1,fullWidth:f,icon:d,iconPosition:h="top",indicator:b,label:v,onChange:g,onClick:w,onFocus:S,selected:A,selectionFollowsFocus:O,textColor:x="inherit",value:k,wrapped:C=!1,...P}=r,E={...r,disabled:s,disableFocusRipple:c,selected:A,icon:!!d,iconPosition:h,label:!!v,fullWidth:f,textColor:x,wrapped:C},j=(e=>{const{classes:t,textColor:r,fullWidth:n,wrapped:o,icon:a,label:s,selected:c,disabled:u}=e,f={root:["root",a&&s&&"labelIcon",`textColor${(0,l.A)(r)}`,n&&"fullWidth",o&&"wrapped",c&&"selected",u&&"disabled"],icon:["iconWrapper","icon"]};return(0,i.A)(f,p,t)})(E),T=d&&v&&n.isValidElement(d)?n.cloneElement(d,{className:(0,o.A)(j.icon,d.props.className)}):d;return(0,m.jsxs)(y,{focusRipple:!c,className:(0,o.A)(j.root,a),ref:t,role:"tab","aria-selected":A,disabled:s,onClick:e=>{!A&&g&&g(e,k),w&&w(e)},onFocus:e=>{O&&!A&&g&&g(e,k),S&&S(e)},ownerState:E,tabIndex:A?0:-1,...P,children:["top"===h||"start"===h?(0,m.jsxs)(n.Fragment,{children:[T,v]}):(0,m.jsxs)(n.Fragment,{children:[v,T]}),b]})})},95818:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=r(14041).createContext()},95924:(e,t,r)=>{"use strict";r.d(t,{$c:()=>O,AP:()=>a,Bx:()=>p,Dq:()=>y,Dy:()=>o,Rb:()=>m,Rv:()=>h,TA:()=>f,Tq:()=>d,YI:()=>b,Zw:()=>A,dL:()=>x,fl:()=>i,iF:()=>g,j4:()=>k,mH:()=>w,u:()=>l,v_:()=>c,xE:()=>u});var n=r(43433);function o(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function i(e,t){return e.closest(`.${t}`)}function a(e){return e.replace(/["\\]/g,"\\$&")}function l(e,t){return e.querySelector(`[role="columnheader"][data-field="${a(t)}"]`)}function s(e){return`.${n.x.row}[data-id="${a(String(e))}"]`}function c(e,t){return e.querySelector(s(t))}function u(e,{id:t,field:r}){const o=`${s(t)} .${n.x.cell}[data-field="${a(r)}"]`;return e.querySelector(o)}function f(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}function d(e){return e.getAttribute("data-field")}function p(e,t){return e.querySelector(`[data-field="${a(t)}"]`)}function h(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function m(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${a(t)}-|"]`)??[])}function y(e,t){if(!i(e,n.x.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,a=[];return t.virtualScrollerRef?.current?(C(t).forEach(e=>{const r=e.getAttribute("data-id");if(!r)return;let n=o;const i=t.unstable_getCellColSpanInfo(r,o);i&&i.spannedByColSpan&&(n=i.leftVisibleCellIndex);const l=e.querySelector(`[data-colindex="${n}"]`);l&&a.push(l)}),a):[]}function b(e,t){return e.rootElementRef.current.querySelector(`.${n.x[t]}`)}const v=({api:e,colIndex:t,position:r,filterFn:o})=>{if(null===t)return[];const i=[];return C(e).forEach(e=>{e.getAttribute("data-id")&&e.querySelectorAll(`.${n.x["left"===r?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(e=>{const t=P(e);null!==t&&o(t)&&i.push(e)})}),i};function g(e,t,r){const n=P(t);return v({api:e,colIndex:n,position:r?"right":"left",filterFn:e=>r?e<n:e>n})}function w(e,t,r){const n=P(t);return v({api:e,colIndex:n,position:r?"left":"right",filterFn:e=>r?e>n:e<n})}const S=({api:e,colIndex:t,position:r,filterFn:o})=>{if(!e.columnHeadersContainerRef?.current)return[];if(null===t)return[];const i=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${n.x["left"===r?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(e=>{const t=P(e);null!==t&&o(t,e)&&i.push(e)}),i};function A(e,t,r){const n=P(t);return S({api:e,position:r?"right":"left",colIndex:n,filterFn:e=>r?e<n:e>n})}function O(e,t,r){const o=P(t);return S({api:e,position:r?"left":"right",colIndex:o,filterFn:(e,t)=>!t.classList.contains(n.x["columnHeader--last"])&&(r?e>o:e<o)})}function x(e,t){return e.columnHeadersContainerRef.current.querySelector(`:scope > div > [data-field="${a(t)}"][role="columnheader"]`)}function k(e,t){const r=e.virtualScrollerRef.current;return Array.from(r.querySelectorAll(`:scope > div > div > div > [data-field="${a(t)}"][role="gridcell"]`))}function C(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${n.x.row}`)}function P(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}},95944:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(35979),o=r.n(n);function i(){var e=new(o().Jexl);return e.addFunction("get",function(e,t){return e.get(t)}),e.addFunction("parent",function(e){return e.parent()}),e.addFunction("id",function(e){return e.id()}),e.addFunction("cast",function(e){return e}),e.addFunction("log",function(e){return console.log(e),e}),e.addFunction("max",Math.max),e.addFunction("min",Math.min),e.addFunction("sqrt",Math.sqrt),e.addFunction("ceil",Math.ceil),e.addFunction("floor",Math.floor),e.addFunction("round",Math.round),e.addFunction("abs",Math.abs),e.addFunction("log10",Math.log10),e.addFunction("parseInt",Number.parseInt),e.addFunction("parseFloat",Number.parseFloat),e.addFunction("split",function(e,t){return e.split(t)}),e.addFunction("charAt",function(e,t){return e.charAt(t)}),e.addFunction("charCodeAt",function(e,t){return e.charCodeAt(t)}),e.addFunction("codePointAt",function(e,t){return e.codePointAt(t)}),e.addFunction("startsWith",function(e,t,r){return e.startsWith(t,r)}),e.addFunction("endsWith",function(e,t,r){return e.endsWith(t,r)}),e.addFunction("padEnd",function(e,t,r){return e.padEnd(t,r)}),e.addFunction("padStart",function(e,t,r){return e.padStart(t,r)}),e.addFunction("repeat",function(e,t){return e.repeat(t)}),e.addFunction("replace",function(e,t,r){return e.replace(t,r)}),e.addFunction("replaceAll",function(e,t,r){return e.replaceAll(t,r)}),e.addFunction("slice",function(e,t,r){return e.slice(t,r)}),e.addFunction("startsWith",function(e,t,r){return e.startsWith(t,r)}),e.addFunction("substring",function(e,t,r){return e.substring(t,r)}),e.addFunction("toLowerCase",function(e){return e.toLowerCase()}),e.addFunction("toUpperCase",function(e){return e.toUpperCase()}),e.addFunction("jsonParse",function(e){return JSON.parse(e)}),e.addFunction("trim",function(e){return e.trim()}),e.addFunction("trimEnd",function(e){return e.trimEnd()}),e.addFunction("trimStart",function(e){return e.trimStart()}),e.addFunction("getTag",function(e,t){var r=e.get("tags");return r?r[t]:e.get(t)}),e.addBinaryOp("&",15,function(e,t){return e&t}),e}},96024:(e,t,r)=>{"use strict";r.d(t,{f:()=>G});var n=r(89575),o=r(17502),i=r(14041),a=r(41491),l=r(10591),s=r(54357),c=r(96674),u=r(57936),f=r(9919),d=r(58385),p=r(67591),h=r(37047),m=r(61651),y=r(53283),b=r(16037),v=r(58203),g=r(31593),w=r(37570),S=r(43433),A=r(97909),O=r(5334),x=r(72370),k=r(95924),C=r(34051),P=r(54012),E=r(31085);function j(e){const{groupId:t,width:r,depth:o,maxDepth:a,fields:l,height:s,colIndex:c,hasFocus:d,tabIndex:p,isLastColumn:h,pinnedPosition:m,pinnedOffset:y}=e,b=(0,f.A)(),j=(0,w.I)(),T=i.useRef(null),_=(0,O.h)(),R=(0,u.Nc)(_,A.ED),M=t?R[t]:{},{headerName:I=t??"",description:N="",headerAlign:D}=M;let F;const L=t&&R[t]?.renderHeaderGroup,z=i.useMemo(()=>({groupId:t,headerName:I,description:N,depth:o,maxDepth:a,fields:l,colIndex:c,isLastColumn:h}),[t,I,N,o,a,l,c,h]);t&&L&&(F=L(z));const B=(0,n.A)({},e,{classes:b.classes,headerAlign:D,depth:o,isDragging:!1}),$=I??t,G=(0,v.A)(),H=null===t?`empty-group-cell-${G}`:t,V=(e=>{const{classes:t,headerAlign:r,isDragging:n,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:l,pinnedPosition:s}=e,c={root:["columnHeader","left"===r&&"columnHeader--alignLeft","center"===r&&"columnHeader--alignCenter","right"===r&&"columnHeader--alignRight",n&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",null===l?"columnHeader--emptyGroup":"columnHeader--filledGroup",s===C.yL.LEFT&&"columnHeader--pinnedLeft",s===C.yL.RIGHT&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,g.A)(c,S.B,t)})(B);i.useLayoutEffect(()=>{if(d){const e=T.current.querySelector('[tabindex="0"]')||T.current;e?.focus()}},[_,d]);const W=i.useCallback(e=>t=>{(0,k.TA)(t)||_.current.publishEvent(e,z,t)},[_,z]),U=i.useMemo(()=>({onKeyDown:W("columnGroupHeaderKeyDown"),onFocus:W("columnGroupHeaderFocus"),onBlur:W("columnGroupHeaderBlur")}),[W]),q="function"==typeof M.headerClassName?M.headerClassName(z):M.headerClassName,X=i.useMemo(()=>(0,P.l)((0,n.A)({},e.style),j,m,y),[m,y,e.style,j]);return(0,E.jsx)(x.a,(0,n.A)({ref:T,classes:V,columnMenuOpen:!1,colIndex:c,height:s,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:p,isDraggable:!1,headerComponent:F,headerClassName:q,description:N,elementId:H,width:r,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:$,"aria-colspan":l.length,"data-fields":`|-${l.join("-|-")}-|`,style:X},U))}var T=r(55136),_=r(4012),R=r(27869),M=r(5877),I=r(94042);const N=(0,c.Ay)("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow"})({display:"flex"});var D=r(86053);const F=["className"],L=(0,D.A)("div",{name:"MuiDataGrid",slot:"ColumnHeaders"})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),z=(0,l.R)(function(e,t){const{className:r}=e,i=(0,o.A)(e,F),a=(0,f.A)(),l=(e=>{const{classes:t}=e;return(0,g.A)({root:["columnHeaders"]},S.B,t)})(a);return(0,E.jsx)(L,(0,n.A)({className:(0,s.A)(l.root,r),ownerState:a},i,{role:"presentation",ref:t}))}),B=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],$=(0,l.R)(function(e,t){const{visibleColumns:r,sortColumnLookup:a,filterColumnLookup:l,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:v,columnHeaderFocus:g,columnGroupHeaderFocus:w,headerGroupingMaxDepth:O,columnMenuState:x,columnVisibility:k,columnGroupsHeaderStructure:P,hasOtherElementInTabSequence:D}=e,F=(0,o.A)(e,B),{getInnerProps:L,getColumnHeadersRow:$,getColumnGroupHeadersRows:G}=(e=>{const{visibleColumns:t,sortColumnLookup:r,filterColumnLookup:o,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:l,columnHeaderFocus:c,columnGroupHeaderFocus:v,headerGroupingMaxDepth:g,columnMenuState:w,columnVisibility:O,columnGroupsHeaderStructure:x,hasOtherElementInTabSequence:k}=e,[P,D]=i.useState(""),[F,L]=i.useState(""),z=(0,d.E)(),B=(0,f.A)(),$=(0,u.Nc)(z,A.TQ),G=(0,u.Nc)(z,T.Sw),H=(0,u.Nc)(z,y.EG),V=(0,u.Nc)(z,T.Q1),W=(0,u.Nc)(z,T.gv),U=(0,b.Yr)(G,H,V.left.length),q=(0,u.Nc)(z,m.fc),X=(0,u.Nc)(z,m.sj),K=(0,u.Nc)(z,m._b),Y=(0,u.Nc)(z,m.hH),J=(0,u.Nc)(z,m.Y9),Z=i.useCallback(e=>L(e.field),[]),Q=i.useCallback(()=>L(""),[]),ee=i.useCallback(e=>D(e.field),[]),te=i.useCallback(()=>D(""),[]),re=i.useMemo(()=>V.left.length?{firstColumnIndex:0,lastColumnIndex:V.left.length}:null,[V.left.length]),ne=i.useMemo(()=>V.right.length?{firstColumnIndex:t.length-V.right.length,lastColumnIndex:t.length}:null,[V.right.length,t.length]);(0,p._W)(z,"columnResizeStart",Z),(0,p._W)(z,"columnResizeStop",Q),(0,p._W)(z,"columnHeaderDragStart",ee),(0,p._W)(z,"columnHeaderDragEndNative",te);const oe=e=>{const{renderContext:r=H}=e||{},n=r.firstColumnIndex,o=r.lastColumnIndex;return{renderedColumns:t.slice(n,o),firstColumnToRender:n,lastColumnToRender:o}},ie=(e,t,r,n=!1)=>{const o=e?.position===C.yL.RIGHT,a=void 0===e?.position,l=V.right.length>0&&o||0===V.right.length&&a,c=U-r;return(0,E.jsxs)(i.Fragment,{children:[a&&(0,E.jsx)("div",{role:"presentation",style:{width:c}}),t,a&&(0,E.jsx)("div",{role:"presentation",className:(0,s.A)(S.x.filler,n&&S.x["filler--borderBottom"])}),l&&(0,E.jsx)(_.t,{header:!0,pinnedRight:o,borderBottom:n,borderTop:!1})]})},ae=(e,t={})=>{const{renderedColumns:i,firstColumnToRender:l}=oe(e),s=[];for(let u=0;u<i.length;u+=1){const f=i[u],d=l+u,p=0===d,m=null!==a&&a.field===f.field||p&&!k?0:-1,y=null!==c&&c.field===f.field,b=w.open&&w.field===f.field,v=e?.position,g=(0,R.Y)(v,f.computedWidth,d,G,q,J),S=v===C.yL.RIGHT?i[u-1]:i[u+1],A=!!S&&null!==c&&c.field===S.field,O=d+1===G.length-V.right.length,x=u,j=i.length,T=(0,I.o)(v,x),_=(0,I.L)(v,x,j,B.showColumnVerticalBorder,X);s.push((0,E.jsx)(h.d,(0,n.A)({},r[f.field],{columnMenuOpen:b,filterItemsCounter:o[f.field]&&o[f.field].length,headerHeight:K,isDragging:f.field===P,colDef:f,colIndex:d,isResizing:F===f.field,isLast:d===G.length-1,hasFocus:y,tabIndex:m,pinnedPosition:v,pinnedOffset:g,isLastUnpinned:O,isSiblingFocused:A,showLeftBorder:T,showRightBorder:_},t),f.field))}return ie(e,s,0)},le=({depth:e,params:r})=>{const o=oe(r);if(0===o.renderedColumns.length)return null;const{firstColumnToRender:i,lastColumnToRender:a}=o,s=x[e],c=t[i].field,u=$[c]?.[e]??null,f=s.findIndex(({groupId:e,columnFields:t})=>e===u&&t.includes(c)),d=t[a-1].field,p=$[d]?.[e]??null,h=s.findIndex(({groupId:e,columnFields:t})=>e===p&&t.includes(d)),m=s.slice(f,h+1).map(e=>(0,n.A)({},e,{columnFields:e.columnFields.filter(e=>!1!==O[e])})).filter(e=>e.columnFields.length>0),y=m[0].columnFields.indexOf(c),b=m[0].columnFields.slice(0,y).reduce((e,t)=>e+(W[t].computedWidth??0),0);let w=i;const S=m.map(({groupId:t,columnFields:n},o)=>{const i=null!==v&&v.depth===e&&n.includes(v.field),a=null!==l&&l.depth===e&&n.includes(l.field)?0:-1,s={groupId:t,width:n.reduce((e,t)=>e+W[t].computedWidth,0),fields:n,colIndex:w,hasFocus:i,tabIndex:a},c=r.position,u=(0,R.Y)(c,s.width,w,G,q,J);w+=n.length;let f=o;return c===C.yL.LEFT&&(f=w-1),(0,E.jsx)(j,{groupId:t,width:s.width,fields:s.fields,colIndex:s.colIndex,depth:e,isLastColumn:o===m.length-1,maxDepth:g,height:Y,hasFocus:i,tabIndex:a,pinnedPosition:c,pinnedOffset:u,showLeftBorder:(0,I.o)(c,f),showRightBorder:(0,I.L)(c,f,m.length,B.showColumnVerticalBorder,X)},o)});return ie(r,S,b)};return{renderContext:H,leftRenderContext:re,rightRenderContext:ne,pinnedColumns:V,visibleColumns:t,columnPositions:G,getFillers:ie,getColumnHeadersRow:()=>(0,E.jsxs)(N,{role:"row","aria-rowindex":g+1,ownerState:B,className:S.x["row--borderBottom"],style:{height:K},children:[re&&ae({position:C.yL.LEFT,renderContext:re},{disableReorder:!0}),ae({renderContext:H}),ne&&ae({position:C.yL.RIGHT,renderContext:ne},{disableReorder:!0,separatorSide:M.j.Left})]}),getColumnsToRender:oe,getColumnGroupHeadersRows:()=>{if(0===g)return null;const e=[];for(let t=0;t<g;t+=1)e.push((0,E.jsxs)(N,{role:"row","aria-rowindex":t+1,ownerState:B,style:{height:Y},children:[re&&le({depth:t,params:{position:C.yL.LEFT,renderContext:re,maxLastColumn:re.lastColumnIndex}}),le({depth:t,params:{renderContext:H}}),ne&&le({depth:t,params:{position:C.yL.RIGHT,renderContext:ne,maxLastColumn:ne.lastColumnIndex}})]},t));return e},getPinnedCellOffset:R.Y,isDragging:!!P,getInnerProps:()=>({role:"rowgroup"})}})({visibleColumns:r,sortColumnLookup:a,filterColumnLookup:l,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:v,columnHeaderFocus:g,columnGroupHeaderFocus:w,headerGroupingMaxDepth:O,columnMenuState:x,columnVisibility:k,columnGroupsHeaderStructure:P,hasOtherElementInTabSequence:D});return(0,E.jsxs)(z,(0,n.A)({},F,L(),{ref:t,children:[G(),$()]}))}),G=(0,a.n)($)},96201:(e,t)=>{"use strict";t.getGrammar=function(){return{elements:{".":{type:"dot"},"[":{type:"openBracket"},"]":{type:"closeBracket"},"|":{type:"pipe"},"{":{type:"openCurl"},"}":{type:"closeCurl"},":":{type:"colon"},",":{type:"comma"},"(":{type:"openParen"},")":{type:"closeParen"},"?":{type:"question"},"+":{type:"binaryOp",precedence:30,eval:function(e,t){return e+t}},"-":{type:"binaryOp",precedence:30,eval:function(e,t){return e-t}},"*":{type:"binaryOp",precedence:40,eval:function(e,t){return e*t}},"/":{type:"binaryOp",precedence:40,eval:function(e,t){return e/t}},"//":{type:"binaryOp",precedence:40,eval:function(e,t){return Math.floor(e/t)}},"%":{type:"binaryOp",precedence:50,eval:function(e,t){return e%t}},"^":{type:"binaryOp",precedence:50,eval:function(e,t){return Math.pow(e,t)}},"==":{type:"binaryOp",precedence:20,eval:function(e,t){return e==t}},"!=":{type:"binaryOp",precedence:20,eval:function(e,t){return e!=t}},">":{type:"binaryOp",precedence:20,eval:function(e,t){return e>t}},">=":{type:"binaryOp",precedence:20,eval:function(e,t){return e>=t}},"<":{type:"binaryOp",precedence:20,eval:function(e,t){return e<t}},"<=":{type:"binaryOp",precedence:20,eval:function(e,t){return e<=t}},"&&":{type:"binaryOp",precedence:10,evalOnDemand:function(e,t){return e.eval().then(function(e){return e?t.eval():e})}},"||":{type:"binaryOp",precedence:10,evalOnDemand:function(e,t){return e.eval().then(function(e){return e||t.eval()})}},in:{type:"binaryOp",precedence:20,eval:function(e,t){return"string"==typeof t?-1!==t.indexOf(e):!!Array.isArray(t)&&t.some(function(t){return t===e})}},"!":{type:"unaryOp",precedence:1/0,eval:function(e){return!e}}},functions:{},transforms:{}}}},96217:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r(14041),o=r(54357),i=r(31593),a=r(4686),l=r(96674),s=r(40979),c=r(75721),u=r(31085);const f=(0,l.Ay)("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),d={variant:"head"},p="thead",h=n.forwardRef(function(e,t){const r=(0,s.b)({props:e,name:"MuiTableHead"}),{className:n,component:l=p,...h}=r,m={...r,component:l},y=(e=>{const{classes:t}=e;return(0,i.A)({root:["root"]},c.X,t)})(m);return(0,u.jsx)(a.A.Provider,{value:d,children:(0,u.jsx)(f,{as:l,className:(0,o.A)(y.root,n),ref:t,role:l===p?null:"rowgroup",ownerState:m,...h})})})},96232:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C});var n=r(14041),o=r(9810),i=r(81296),a=r(63507),l=r(88581),s=r(95305),c=r(68805),u=r(94263),f=r(53125),d=r(72899),p=r(97469),h=r(98819),m=r(14041),y=["children"];function b(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return v(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(v(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,v(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,v(f,"constructor",c),v(c,"constructor",s),s.displayName="GeneratorFunction",v(c,o,"GeneratorFunction"),v(f),v(f,o,"Generator"),v(f,n,function(){return this}),v(f,"toString",function(){return"[object Generator]"}),(b=function(){return{w:i,m:d}})()}function v(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}v=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){v(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},v(e,t,r,n)}function g(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function w(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){g(i,n,o,a,l,"next",e)}function l(e){g(i,n,o,a,l,"throw",e)}a(void 0)})}}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function O(){return m.createElement("div",null,m.createElement(a.A,{size:20,style:{marginRight:20}}),m.createElement(l.A,{display:"inline"},"Creating SVG"))}function x(e){var t=e.children,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,y);return m.createElement("div",null,m.createElement(s.A,r,t))}function k(e,t){return(0,i.useLocalStorage)("svg-".concat(e),t)}function C(e){var t=e.model,r=e.handleClose,a=(0,i.getSession)(t),s="undefined"!=typeof OffscreenCanvas,y=S((0,n.useState)(s),2),v=y[0],g=y[1],A=S((0,n.useState)(!1),2),C=A[0],P=A[1],E=S((0,n.useState)(),2),j=E[0],T=E[1],_=S(k("file","jbrowse.svg"),2),R=_[0],M=_[1],I=S(k("theme",a.themeName||"default"),2),N=I[0],D=I[1];return m.createElement(o.Dialog,{open:!0,onClose:r,title:"Export SVG"},m.createElement(c.A,null,j?m.createElement(o.ErrorMessage,{error:j}):C?m.createElement(O,null):null,m.createElement(x,{helperText:"filename",value:R,onChange:function(e){M(e.target.value)}}),a.allThemes?m.createElement(x,{select:!0,label:"Theme",value:N,onChange:function(e){D(e.target.value)}},Object.entries(a.allThemes()).map(function(e){var t=S(e,2),r=t[0],n=t[1];return m.createElement(u.A,{key:r,value:r},n.name||"(Unknown name)")})):null,s?m.createElement(f.A,{control:m.createElement(d.A,{checked:v,onChange:function(){g(function(e){return!e})}}),label:"Rasterize canvas based tracks? File may be much larger if this is turned off"}):m.createElement(l.A,null,"Note: rasterizing layers not yet supported in this browser, so SVG size may be large")),m.createElement(p.A,null,m.createElement(h.A,{variant:"contained",color:"secondary",onClick:function(){r()}},"Cancel"),m.createElement(h.A,{variant:"contained",color:"primary",type:"submit",onClick:w(b().m(function e(){var n;return b().w(function(e){for(;;)switch(e.n){case 0:return P(!0),T(void 0),e.p=1,e.n=2,t.exportSvg({rasterizeLayers:v,filename:R,themeName:N});case 2:r(),e.n=4;break;case 3:e.p=3,n=e.v,console.error(n),T(n);case 4:return e.p=4,P(!1),e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))},"Submit")))}},96674:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>l});var n=r(62221),o=r(69839),i=r(2234),a=r(48156);const l=(0,n.Ay)({themeId:i.A,defaultTheme:o.A,rootShouldForwardProp:a.A})},96708:(e,t,r)=>{"use strict";r.d(t,{H:()=>s});var n=r(89575),o=(r(14041),r(63817)),i=r(5334),a=r(51023),l=r(31085);function s({columnMenuId:e,columnMenuButtonId:t,ContentComponent:r,contentComponentProps:s,field:c,open:u,target:f,onExited:d}){const p=(0,i.h)(),h=p.current.getColumn(c),m=(0,o.A)(e=>{e&&(e.stopPropagation(),f?.contains(e.target))||p.current.hideColumnMenu()});return f&&h?(0,l.jsx)(a.U,{position:"bottom-"+("right"===h.align?"start":"end"),open:u,target:f,onClose:m,onExited:d,children:(0,l.jsx)(r,(0,n.A)({colDef:h,hideMenu:m,open:u,id:e,labelledby:t},s))}):null}},96728:(e,t,r)=>{var n=r(75414),o=Object.prototype.hasOwnProperty,i="undefined"!=typeof Map;function a(){this._array=[],this._set=i?new Map:Object.create(null)}a.fromArray=function(e,t){for(var r=new a,n=0,o=e.length;n<o;n++)r.add(e[n],t);return r},a.prototype.size=function(){return i?this._set.size:Object.getOwnPropertyNames(this._set).length},a.prototype.add=function(e,t){var r=i?e:n.toSetString(e),a=i?this.has(e):o.call(this._set,r),l=this._array.length;a&&!t||this._array.push(e),a||(i?this._set.set(e,l):this._set[r]=l)},a.prototype.has=function(e){if(i)return this._set.has(e);var t=n.toSetString(e);return o.call(this._set,t)},a.prototype.indexOf=function(e){if(i){var t=this._set.get(e);if(t>=0)return t}else{var r=n.toSetString(e);if(o.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},a.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},a.prototype.toArray=function(){return this._array.slice()},t.C=a},96829:(e,t,r)=>{"use strict";r.d(t,{D:()=>A});var n=r(89575),o=r(14041),i=r(31593),a=r(96674),l=r(18913),s=r(91437),c=r(55136),u=r(57936),f=r(5334),d=r(9919),p=r(43433);const h=(e,t)=>{const r=new Set(Object.keys(e).filter(t=>!1===e[t])),n=new Set(Object.keys(t).filter(e=>!1===t[e]));if(r.size!==n.size)return!1;let o=!0;return r.forEach(e=>{n.has(e)||(o=!1)}),o},m=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1;var y=r(48731),b=r(25010),v=r(88465),g=r(31085);const w=e=>{const{classes:t}=e;return(0,i.A)({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},p.B,t)},S=new Intl.Collator;function A(e){const t=(0,f.h)(),r=o.useRef(null),i=(0,u.Nc)(t,c.FX),a=(0,u.Nc)(t,c.FY),l=(0,d.A)(),[s,p]=o.useState(""),y=w(l),b=(0,u.Nc)(t,c.OV),A=(0,u.Nc)(t,v.MX),j=(0,u.Nc)(t,v.xi),T=o.useMemo(()=>A?Array.from(j.values()):b,[A,j,b]),{sort:_,searchPredicate:R=m,autoFocusSearchField:M=!0,disableShowHideToggle:I=!1,disableResetButton:N=!1,toggleAllMode:D="all",getTogglableColumns:F,searchInputProps:L}=e,z=o.useMemo(()=>h(a,i),[a,i]),B=o.useMemo(()=>{switch(_){case"asc":return[...T].sort((e,t)=>S.compare(e.headerName||e.field,t.headerName||t.field));case"desc":return[...T].sort((e,t)=>-S.compare(e.headerName||e.field,t.headerName||t.field));default:return T}},[T,_]),$=e=>{const{name:r}=e.target;t.current.setColumnVisibility(r,!1===a[r])},G=o.useMemo(()=>{const e=F?F(B):null,t=e?B.filter(({field:t})=>e.includes(t)):B;return s?t.filter(e=>R(e,s.toLowerCase())):t},[B,s,R,F]),H=o.useCallback(e=>{const r=(0,c.FY)(t),o=(0,n.A)({},r),i=F?F(T):null;return("filteredOnly"===D?G:T).forEach(t=>{t.hideable&&(null==i||i.includes(t.field))&&(e?delete o[t.field]:o[t.field]=!1)}),t.current.setColumnVisibilityModel(o)},[t,T,F,D,G]),V=o.useCallback(e=>{p(e.target.value)},[]),W=o.useMemo(()=>G.filter(e=>e.hideable),[G]),U=o.useMemo(()=>W.every(e=>null==a[e.field]||!1!==a[e.field]),[a,W]),q=o.useMemo(()=>W.every(e=>!1===a[e.field]),[a,W]),X=o.useRef(null);o.useEffect(()=>{M?r.current?.focus():X.current&&"function"==typeof X.current.focus&&X.current.focus()},[M]);let K=!1;const Y=e=>!1===K&&!1!==e.hideable&&(K=!0,!0),J=o.useCallback(()=>{p(""),r.current?.focus()},[]);return(0,g.jsxs)(o.Fragment,{children:[(0,g.jsx)(k,{className:y.header,ownerState:l,children:(0,g.jsx)(C,(0,n.A)({as:l.slots.baseTextField,ownerState:l,placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:r,className:y.searchInput,value:s,onChange:V,size:"small",type:"search",slotProps:{input:{startAdornment:(0,g.jsx)(l.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:(0,g.jsx)(l.slots.baseIconButton,(0,n.A)({size:"small","aria-label":t.current.getLocaleText("columnsManagementDeleteIconLabel"),style:s?{visibility:"visible"}:{visibility:"hidden"},tabIndex:-1,onClick:J,edge:"end"},l.slotProps?.baseIconButton,{children:(0,g.jsx)(l.slots.quickFilterClearIcon,{fontSize:"small"})}))},htmlInput:{"aria-label":t.current.getLocaleText("columnsManagementSearchTitle")}},autoComplete:"off",fullWidth:!0},l.slotProps?.baseTextField,L))}),(0,g.jsx)(x,{ownerState:l,children:(0,g.jsxs)(O,{className:y.root,ownerState:l,children:[G.map(e=>(0,g.jsx)(l.slots.baseCheckbox,(0,n.A)({className:y.row,disabled:!1===e.hideable||A,checked:!1!==a[e.field],onChange:$,name:e.field,inputRef:Y(e)?X:void 0,label:e.headerName||e.field,density:"compact",fullWidth:!0},l.slotProps?.baseCheckbox),e.field)),0===G.length&&(0,g.jsx)(E,{ownerState:l,children:t.current.getLocaleText("columnsManagementNoColumns")})]})}),I&&N?null:(0,g.jsxs)(P,{ownerState:l,className:y.footer,children:[I?(0,g.jsx)("span",{}):(0,g.jsx)(l.slots.baseCheckbox,(0,n.A)({disabled:0===W.length||A,checked:U,indeterminate:!U&&!q,onChange:()=>H(!U),name:t.current.getLocaleText("columnsManagementShowHideAllText"),label:t.current.getLocaleText("columnsManagementShowHideAllText"),density:"compact"},l.slotProps?.baseCheckbox)),N?null:(0,g.jsx)(l.slots.baseButton,(0,n.A)({onClick:()=>t.current.setColumnVisibilityModel(i),disabled:z||A},l.slotProps?.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]})]})}const O=(0,a.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagement"})({display:"flex",flexDirection:"column",padding:s.f.spacing(.5,1.5)}),x=(0,a.Ay)(b.R,{name:"MuiDataGrid",slot:"ColumnsManagementScrollArea"})({maxHeight:300}),k=(0,a.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader"})({padding:s.f.spacing(1.5,2),borderBottom:`1px solid ${s.f.colors.border.base}`}),C=(0,a.Ay)(y.p,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput"})({[`& .${l.A.input}::-webkit-search-decoration,\n & .${l.A.input}::-webkit-search-cancel-button,\n & .${l.A.input}::-webkit-search-results-button,\n & .${l.A.input}::-webkit-search-results-decoration`]:{display:"none"}}),P=(0,a.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter"})({padding:s.f.spacing(1,1,1,1.5),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${s.f.colors.border.base}`}),E=(0,a.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagementEmptyText"})({padding:s.f.spacing(1,0),alignSelf:"center",font:s.f.typography.font.body})},96876:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(6853),o=r(81453),i=r(28730),a=r(14041),l=(0,i.n9)()({ellipses:{textOverflow:"ellipsis",overflow:"hidden"}});function s(e){var t=e.message,r=e.severity,i=e.action,s=l().classes;return a.createElement(n.A,{severity:r,action:i,classes:{message:s.ellipses},onMouseDown:function(e){e.stopPropagation()}},a.createElement(o.A,{title:t},a.createElement("div",null,t)))}},96946:(e,t,r)=>{"use strict";r.d(t,{U:()=>f,h:()=>u});var n=r(89575),o=r(17502),i=r(14041),a=r(58203),l=r(9919),s=r(31085);const c=["item","applyValue","apiRef","focusElementRef","isFilterActive","headerFilterMenu","clearButton","tabIndex","slotProps"];function u(e){const{item:t,applyValue:r,apiRef:u,focusElementRef:d,headerFilterMenu:p,clearButton:h,tabIndex:m,slotProps:y}=e,b=(0,o.A)(e,c),[v,g]=i.useState(f(t.value)),w=(0,l.A)(),S=(0,a.A)(),A=(0,a.A)(),O=w.slotProps?.baseSelect||{},x=O.native??!1,k=w.slotProps?.baseSelectOption||{},C=i.useCallback(e=>{const o=f(e.target.value);g(o),r((0,n.A)({},t,{value:o}))},[r,t]);i.useEffect(()=>{g(f(t.value))},[t.value]);const P=y?.root.label??u.current.getLocaleText("filterPanelInputLabel"),E=y?.root.slotProps;return(0,s.jsxs)(i.Fragment,{children:[(0,s.jsxs)(w.slots.baseSelect,(0,n.A)({fullWidth:!0,labelId:S,id:A,label:P,value:void 0===v?"":String(v),onChange:C,native:x,slotProps:{htmlInput:(0,n.A)({ref:d,tabIndex:m},E?.htmlInput)}},O,b,y?.root,{children:[(0,s.jsx)(w.slots.baseSelectOption,(0,n.A)({},k,{native:x,value:"",children:u.current.getLocaleText("filterValueAny")})),(0,s.jsx)(w.slots.baseSelectOption,(0,n.A)({},k,{native:x,value:"true",children:u.current.getLocaleText("filterValueTrue")})),(0,s.jsx)(w.slots.baseSelectOption,(0,n.A)({},k,{native:x,value:"false",children:u.current.getLocaleText("filterValueFalse")}))]})),p,h]})}function f(e){return"true"===String(e).toLowerCase()||"false"!==String(e).toLowerCase()&&void 0}},96949:(e,t,r)=>{"use strict";r.d(t,{A:()=>He});var n=r(14041),o=r.t(n,2);function i(){return"undefined"!=typeof window}function a(e){return c(e)?(e.nodeName||"").toLowerCase():"#document"}function l(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function s(e){var t;return null==(t=(c(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function c(e){return!!i()&&(e instanceof Node||e instanceof l(e).Node)}function u(e){return!!i()&&(e instanceof Element||e instanceof l(e).Element)}function f(e){return!!i()&&(e instanceof HTMLElement||e instanceof l(e).HTMLElement)}function d(e){return!(!i()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof l(e).ShadowRoot)}const p=new Set(["inline","contents"]);function h(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=C(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!p.has(o)}const m=new Set(["table","td","th"]);function y(e){return m.has(a(e))}const b=[":popover-open",":modal"];function v(e){return b.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const g=["transform","translate","scale","rotate","perspective"],w=["transform","translate","scale","rotate","perspective","filter"],S=["paint","layout","strict","content"];function A(e){const t=O(),r=u(e)?C(e):e;return g.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||w.some(e=>(r.willChange||"").includes(e))||S.some(e=>(r.contain||"").includes(e))}function O(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const x=new Set(["html","body","#document"]);function k(e){return x.has(a(e))}function C(e){return l(e).getComputedStyle(e)}function P(e){return u(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function E(e){if("html"===a(e))return e;const t=e.assignedSlot||e.parentNode||d(e)&&e.host||s(e);return d(t)?t.host:t}function j(e){const t=E(e);return k(t)?e.ownerDocument?e.ownerDocument.body:e.body:f(t)&&h(t)?t:j(t)}function T(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=j(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=l(o);if(i){const e=_(a);return t.concat(a,a.visualViewport||[],h(o)?o:[],e&&r?T(e):[])}return t.concat(o,T(o,[],r))}function _(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var R="undefined"!=typeof document?n.useLayoutEffect:function(){};const M={...o}.useInsertionEffect||(e=>e());function I(e){const t=n.useRef(()=>{});return M(()=>{t.current=e}),n.useCallback(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)},[])}r(31085);var N=r(43144);const D=Math.min,F=Math.max,L=Math.round,z=(Math.floor,e=>({x:e,y:e}));function B(e){return e.split("-")[0]}function $(e){return e.split("-")[1]}const G=new Set(["top","bottom"]);function H(e){return G.has(B(e))?"y":"x"}function V(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function W(e,t,r){let{reference:n,floating:o}=e;const i=H(t),a=function(e){return"x"===H(e)?"y":"x"}(t),l="y"===a?"height":"width",s=B(t),c="y"===i,u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch($(t)){case"start":p[a]-=d*(r&&c?-1:1);break;case"end":p[a]+=d*(r&&c?-1:1)}return p}const U=new Set(["left","top"]);function q(e){const t=C(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=f(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=L(r)!==i||L(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function X(e){return u(e)?e:e.contextElement}function K(e){const t=X(e);if(!f(t))return z(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=q(t);let a=(i?L(r.width):r.width)/n,l=(i?L(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const Y=z(0);function J(e){const t=l(e);return O()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Y}function Z(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=X(e);let a=z(1);t&&(n?u(n)&&(a=K(n)):a=K(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==l(e))&&t}(i,r,n)?J(i):z(0);let c=(o.left+s.x)/a.x,f=(o.top+s.y)/a.y,d=o.width/a.x,p=o.height/a.y;if(i){const e=l(i),t=n&&u(n)?l(n):n;let r=e,o=_(r);for(;o&&n&&t!==r;){const e=K(o),t=o.getBoundingClientRect(),n=C(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,f*=e.y,d*=e.x,p*=e.y,c+=i,f+=a,r=l(o),o=_(r)}}return V({width:d,height:p,x:c,y:f})}function Q(e,t){const r=P(e).scrollLeft;return t?t.left+r:Z(s(e)).left+r}function ee(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Q(e,n)),y:n.top+t.scrollTop}}const te=new Set(["absolute","fixed"]);function re(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=l(e),n=s(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,c=0,u=0;if(o){i=o.width,a=o.height;const e=O();(!e||e&&"fixed"===t)&&(c=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:c,y:u}}(e,r);else if("document"===t)n=function(e){const t=s(e),r=P(e),n=e.ownerDocument.body,o=F(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=F(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Q(e);const l=-r.scrollTop;return"rtl"===C(n).direction&&(a+=F(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(s(e));else if(u(t))n=function(e,t){const r=Z(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=f(e)?K(e):z(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=J(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return V(n)}function ne(e,t){const r=E(e);return!(r===t||!u(r)||k(r))&&("fixed"===C(r).position||ne(r,t))}function oe(e,t,r){const n=f(t),o=s(t),i="fixed"===r,l=Z(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const u=z(0);function d(){u.x=Q(o)}if(n||!n&&!i)if(("body"!==a(t)||h(o))&&(c=P(t)),n){const e=Z(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&d();i&&!n&&o&&d();const p=!o||n||i?z(0):ee(o,c);return{x:l.left+c.scrollLeft-u.x-p.x,y:l.top+c.scrollTop-u.y-p.y,width:l.width,height:l.height}}function ie(e){return"static"===C(e).position}function ae(e,t){if(!f(e)||"fixed"===C(e).position)return null;if(t)return t(e);let r=e.offsetParent;return s(e)===r&&(r=r.ownerDocument.body),r}function le(e,t){const r=l(e);if(v(e))return r;if(!f(e)){let t=E(e);for(;t&&!k(t);){if(u(t)&&!ie(t))return t;t=E(t)}return r}let n=ae(e,t);for(;n&&y(n)&&ie(n);)n=ae(n,t);return n&&k(n)&&ie(n)&&!A(n)?r:n||function(e){let t=E(e);for(;f(t)&&!k(t);){if(A(t))return t;if(v(t))return null;t=E(t)}return null}(e)||r}const se={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,l=s(n),c=!!t&&v(t.floating);if(n===l||c&&i)return r;let u={scrollLeft:0,scrollTop:0},d=z(1);const p=z(0),m=f(n);if((m||!m&&!i)&&(("body"!==a(n)||h(l))&&(u=P(n)),f(n))){const e=Z(n);d=K(n),p.x=e.x+n.clientLeft,p.y=e.y+n.clientTop}const y=!l||m||i?z(0):ee(l,u,!0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+p.x+y.x,y:r.y*d.y-u.scrollTop*d.y+p.y+y.y}},getDocumentElement:s,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[..."clippingAncestors"===r?v(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=T(e,[],!1).filter(e=>u(e)&&"body"!==a(e)),o=null;const i="fixed"===C(e).position;let l=i?E(e):e;for(;u(l)&&!k(l);){const t=C(l),r=A(l);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&te.has(o.position)||h(l)&&!r&&ne(e,l))?n=n.filter(e=>e!==l):o=t,l=E(l)}return t.set(e,n),n}(t,this._c):[].concat(r),n],l=i[0],s=i.reduce((e,r)=>{const n=re(t,r,o);return e.top=F(n.top,e.top),e.right=D(n.right,e.right),e.bottom=D(n.bottom,e.bottom),e.left=F(n.left,e.left),e},re(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:le,getElementRects:async function(e){const t=this.getOffsetParent||le,r=this.getDimensions,n=await r(e.floating);return{reference:oe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=q(e);return{width:t,height:r}},getScale:K,isElement:u,isRTL:function(e){return"rtl"===C(e).direction}},ce=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=B(r),l=$(r),s="y"===H(r),c=U.has(a)?-1:1,u=i&&s?-1:1,f="function"==typeof(d=t)?d(e):d;var d;let{mainAxis:p,crossAxis:h,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof m&&(h="end"===l?-1*m:m),s?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(r=l.offset)?void 0:r.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},ue=(e,t,r)=>{const n=new Map,o={platform:se,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=W(c,n,s),d=n,p={},h=0;for(let r=0;r<l.length;r++){const{name:i,fn:m}=l[r],{x:y,y:b,data:v,reset:g}=await m({x:u,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=y?y:u,f=null!=b?b:f,p={...p,[i]:{...p[i],...v}},g&&h<=50&&(h++,"object"==typeof g&&(g.placement&&(d=g.placement),g.rects&&(c=!0===g.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):g.rects),({x:u,y:f}=W(c,d,s))),r=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var fe="undefined"!=typeof document?n.useLayoutEffect:function(){};function de(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!de(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(!("_owner"===r&&e.$$typeof||de(e[r],t[r])))return!1}return!0}return e!=e&&t!=t}function pe(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function he(e,t){const r=pe(e);return Math.round(t*r)/r}function me(e){const t=n.useRef(e);return fe(()=>{t.current=e}),t}const ye=(e,t)=>({...ce(e),options:[e,t]}),be="data-floating-ui-focusable",ve="active",ge="selected",we={...o};let Se=!1,Ae=0;const Oe=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ae++,xe=we.useId||function(){const[e,t]=n.useState(()=>Se?Oe():void 0);return R(()=>{null==e&&t(Oe())},[]),n.useEffect(()=>{Se=!0},[]),e};const ke=n.createContext(null),Ce=n.createContext(null),Pe=()=>{var e;return(null==(e=n.useContext(ke))?void 0:e.id)||null},Ee=()=>n.useContext(Ce);function je(e){return null!=e&&null!=e.clientX}function Te(e){void 0===e&&(e={});const{nodeId:t}=e,r=function(e){const{open:t=!1,onOpenChange:r,elements:o}=e,i=xe(),a=n.useRef({}),[l]=n.useState(()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach(e=>e(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){var n;null==(n=e.get(t))||n.delete(r)}}}()),s=null!=Pe(),[c,u]=n.useState(o.reference),f=I((e,t,n)=>{a.current.openEvent=e?t:void 0,l.emit("openchange",{open:e,event:t,reason:n,nested:s}),null==r||r(e,t,n)}),d=n.useMemo(()=>({setPositionReference:u}),[]),p=n.useMemo(()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference}),[c,o.reference,o.floating]);return n.useMemo(()=>({dataRef:a,open:t,onOpenChange:f,elements:p,events:l,floatingId:i,refs:d}),[t,f,p,l,i,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||r,i=o.elements,[a,l]=n.useState(null),[s,c]=n.useState(null),f=(null==i?void 0:i.domReference)||a,d=n.useRef(null),p=Ee();R(()=>{f&&(d.current=f)},[f]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,d]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=n.useState(o);de(p,o)||h(o);const[m,y]=n.useState(null),[b,v]=n.useState(null),g=n.useCallback(e=>{e!==O.current&&(O.current=e,y(e))},[]),w=n.useCallback(e=>{e!==x.current&&(x.current=e,v(e))},[]),S=a||m,A=l||b,O=n.useRef(null),x=n.useRef(null),k=n.useRef(f),C=null!=c,P=me(c),E=me(i),j=me(u),T=n.useCallback(()=>{if(!O.current||!x.current)return;const e={placement:t,strategy:r,middleware:p};E.current&&(e.platform=E.current),ue(O.current,x.current,e).then(e=>{const t={...e,isPositioned:!1!==j.current};_.current&&!de(k.current,t)&&(k.current=t,N.flushSync(()=>{d(t)}))})},[p,t,r,E,j]);fe(()=>{!1===u&&k.current.isPositioned&&(k.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);const _=n.useRef(!1);fe(()=>(_.current=!0,()=>{_.current=!1}),[]),fe(()=>{if(S&&(O.current=S),A&&(x.current=A),S&&A){if(P.current)return P.current(S,A,T);T()}},[S,A,T,P,C]);const R=n.useMemo(()=>({reference:O,floating:x,setReference:g,setFloating:w}),[g,w]),M=n.useMemo(()=>({reference:S,floating:A}),[S,A]),I=n.useMemo(()=>{const e={position:r,left:0,top:0};if(!M.floating)return e;const t=he(M.floating,f.x),n=he(M.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...pe(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,s,M.floating,f.x,f.y]);return n.useMemo(()=>({...f,update:T,refs:R,elements:M,floatingStyles:I}),[f,T,R,M,I])}({...e,elements:{...i,...s&&{reference:s}}}),m=n.useCallback(e=>{const t=u(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),h.refs.setReference(t)},[h.refs]),y=n.useCallback(e=>{(u(e)||null===e)&&(d.current=e,l(e)),(u(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!u(e))&&h.refs.setReference(e)},[h.refs]),b=n.useMemo(()=>({...h.refs,setReference:y,setPositionReference:m,domReference:d}),[h.refs,y,m]),v=n.useMemo(()=>({...h.elements,domReference:f}),[h.elements,f]),g=n.useMemo(()=>({...h,...o,refs:b,elements:v,nodeId:t}),[h,b,v,t,o]);return R(()=>{o.dataRef.current.floatingContext=g;const e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=g)}),n.useMemo(()=>({...h,context:g,refs:b,elements:v}),[h,b,v,g])}function _e(e,t,r){const n=new Map,o="item"===r;let i=e;if(o&&e){const{[ve]:t,[ge]:r,...n}=e;i=n}return{..."floating"===r&&{tabIndex:-1,[be]:""},...i,...t.map(t=>{const n=t?t[r]:null;return"function"==typeof n?e?n(e):null:n}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[r,i]=t;var a;o&&[ve,ge].includes(r)||(0===r.indexOf("on")?(n.has(r)||n.set(r,[]),"function"==typeof i&&(null==(a=n.get(r))||a.push(i),e[r]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=n.get(r))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[r]=i)}),e):e,{})}}var Re=r(83589),Me=r(90389),Ie=r(51659),Ne=r(28730),De=r(14041);function Fe(e){return Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fe(e)}function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Le.apply(null,arguments)}function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(r),!0).forEach(function(t){$e(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ze(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function $e(e,t,r){return(t=function(e){var t=function(e){if("object"!=Fe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Fe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ge=(0,Ne.n9)()(function(e){return{tooltip:{position:"absolute",pointerEvents:"none",backgroundColor:(0,Re.X4)(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.fontSize,lineHeight:"".concat(Math.round(14e4)/1e5,"em"),maxWidth:300,wordWrap:"break-word"}}});function He(e){var t,r,o=e.clientPoint,i=e.children,a=e.placement,s=void 0===a?"right":a,c=null===(t=(0,Me.A)().components)||void 0===t?void 0:t.MuiPopper,u=Ge().classes,f=Te({placement:s,strategy:"fixed",middleware:[ye(5)]}),p=f.refs,h=f.floatingStyles,m=function(e,t){void 0===t&&(t={});const{open:r,dataRef:o,elements:{floating:i,domReference:a},refs:s}=e,{enabled:c=!0,axis:u="both",x:f=null,y:p=null}=t,h=n.useRef(!1),m=n.useRef(null),[y,b]=n.useState(),[v,g]=n.useState([]),w=I((e,t)=>{h.current||o.current.openEvent&&!je(o.current.openEvent)||s.setPositionReference(function(e,t){let r=null,n=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=(null==e?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},l="x"===t.axis||"both"===t.axis,s="y"===t.axis||"both"===t.axis,c=["mouseenter","mousemove"].includes((null==(i=t.dataRef.current.openEvent)?void 0:i.type)||"")&&"touch"!==t.pointerType;let u=a.width,f=a.height,d=a.x,p=a.y;return null==r&&t.x&&l&&(r=a.x-t.x),null==n&&t.y&&s&&(n=a.y-t.y),d-=r||0,p-=n||0,u=0,f=0,!o||c?(u="y"===t.axis?a.width:0,f="x"===t.axis?a.height:0,d=l&&null!=t.x?t.x:d,p=s&&null!=t.y?t.y:p):o&&!c&&(f="x"===t.axis?a.height:f,u="y"===t.axis?a.width:u),o=!0,{width:u,height:f,x:d,y:p,top:p,right:d+u,bottom:p+f,left:d}}}}(a,{x:e,y:t,axis:u,dataRef:o,pointerType:y}))}),S=I(e=>{null==f&&null==p&&(r?m.current||g([]):w(e.clientX,e.clientY))}),A=function(e){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}(y)?i:r,O=n.useCallback(()=>{if(!A||!c||null!=f||null!=p)return;const e=l(i);function t(r){const n=function(e){return"composedPath"in e?e.composedPath()[0]:e.target}(r);!function(e,t){if(!e||!t)return!1;const r=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&d(r)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}(i,n)?w(r.clientX,r.clientY):(e.removeEventListener("mousemove",t),m.current=null)}if(!o.current.openEvent||je(o.current.openEvent)){e.addEventListener("mousemove",t);const r=()=>{e.removeEventListener("mousemove",t),m.current=null};return m.current=r,r}s.setPositionReference(a)},[A,c,f,p,i,o,s,a,w]);n.useEffect(()=>O(),[O,v]),n.useEffect(()=>{c&&!i&&(h.current=!1)},[c,i]),n.useEffect(()=>{!c&&r&&(h.current=!0)},[c,r]),R(()=>{!c||null==f&&null==p||(h.current=!1,w(f,p))},[c,f,p,w]);const x=n.useMemo(()=>{function e(e){let{pointerType:t}=e;b(t)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:S,onMouseEnter:S}},[S]);return n.useMemo(()=>c?{reference:x}:{},[c,x])}(f.context,o),y=function(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),r=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),i=n.useCallback(t=>_e(t,e,"reference"),t),a=n.useCallback(t=>_e(t,e,"floating"),r),l=n.useCallback(t=>_e(t,e,"item"),o);return n.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:l}),[i,a,l])}([m]),b=y.getFloatingProps;return De.createElement(Ie.A,{container:null==c||null===(r=c.defaultProps)||void 0===r?void 0:r.container},De.createElement("div",Le({className:u.tooltip,ref:p.setFloating,style:Be(Be({},h),{},{zIndex:1e5,visibility:"translate(0px, 0px)"===h.transform?"hidden":void 0,pointerEvents:"none"})},b()),i))}},97025:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(60654),o=r(81296),i=r(98412),a=r(81912),l=r(2033);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){p(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function p(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return m(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(m(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,m(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,m(f,"constructor",c),m(c,"constructor",s),s.displayName="GeneratorFunction",m(c,o,"GeneratorFunction"),m(f),m(f,o,"Generator"),m(f,n,function(){return this}),m(f,"toString",function(){return"[object Generator]"}),(h=function(){return{w:i,m:d}})()}function m(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}m=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){m(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},m(e,t,r,n)}function y(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function b(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,l,"next",e)}function l(e){y(i,n,o,a,l,"throw",e)}a(void 0)})}}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function g(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(w=function(){return!!e})()}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}var O=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=S(r=t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,w()?Reflect.construct(r,n||[],S(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(t,e),r=t,n=[{key:"configure",value:(f=b(h().m(function e(){var t,r;return h().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(t=this.getSubAdapter)||void 0===t?void 0:t.call(this,this.getConf("sequenceAdapter"));case 1:if(r=e.v){e.n=2;break}throw new Error("Error getting subadapter");case 2:return e.a(2,r.dataAdapter)}},e,this)})),function(){return f.apply(this,arguments)})},{key:"getRefNames",value:(u=b(h().m(function e(){var t;return h().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.configure();case 1:return t=e.v,e.a(2,t.getRefNames())}},e,this)})),function(){return u.apply(this,arguments)})},{key:"getFeatures",value:function(e,t){var r=this;return(0,i.ObservableCreate)(function(){var n=b(h().m(function n(i){var s,u,f,p,m,y,b,v,g,w,S,A,O,x,k,C,P,E,j,T,_,R,M,I;return h().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,r.configure();case 1:if(u=n.v,f=e.end+1e4,p=Math.max(0,e.start-1e4),!(f<0||p>f)){n.n=2;break}return i.complete(),n.a(2);case 2:return m=u.getFeatures(d(d({},e),{},{start:p,end:f}),t),n.n=3,(0,a._)(m.pipe((0,l.$)()));case 3:if(y=n.v,b=(null===(s=y[0])||void 0===s?void 0:s.get("seq"))||"",v=r.getConf("search"),g=r.getConf("searchForward"),w=r.getConf("searchReverse"),S=r.getConf("caseInsensitive"),A=new RegExp(v,"g".concat(S?"i":"")),v){if(g){O=b.matchAll(A),x=c(O);try{for(x.s();!(k=x.n()).done;)C=k.value,P=p+C.index,E=p+C.index+C[0].length,(0,o.doesIntersect2)(P,E,e.start,e.end)&&i.next(new o.SimpleFeature({uniqueId:"".concat(r.id,"-").concat(P,"-").concat(C[0],"-pos"),refName:e.refName,start:P,end:E,name:C[0],strand:1}))}catch(e){x.e(e)}finally{x.f()}}if(w){j=(0,o.revcom)(b).matchAll(A),T=c(j);try{for(T.s();!(_=T.n()).done;)R=_.value,M=f-R.index,I=f-R.index-R[0].length,(0,o.doesIntersect2)(I,M,e.start,e.end)&&i.next(new o.SimpleFeature({uniqueId:"".concat(r.id,"-").concat(I,"-").concat(R[0],"-neg"),refName:e.refName,start:I,end:M,name:R[0],strand:-1}))}catch(e){T.e(e)}finally{T.f()}}}i.complete();case 4:return n.a(2)}},n)}));return function(e){return n.apply(this,arguments)}}())}}],n&&v(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,u,f}(n.BaseFeatureDataAdapter)},97165:(e,t,r)=>{"use strict";r.d(t,{_:()=>i});var n=r(89575),o=r(14041);function i(e,t,r,i={}){return"function"==typeof t?t(r,i):t?(t.props.className&&(r.className=(a=t.props.className,l=r.className,a&&l?`${a} ${l}`:a||l)),(t.props.style||r.style)&&(r.style=(0,n.A)({},r.style,t.props.style)),o.cloneElement(t,r)):o.createElement(e,r);var a,l}},97355:(e,t,r)=>{"use strict";r.d(t,{F:()=>i});var n=r(21587);function o(e){return(0,n.Q)(e)||void 0===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)}function i(e={}){const t={...e};return function e(t){const r=Object.entries(t);for(let i=0;i<r.length;i++){const[a,l]=r[i];!o(l)||a.startsWith("unstable_")?delete t[a]:(0,n.Q)(l)&&(t[a]={...l},e(t[a]))}}(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(t,null,2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`}},97377:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>l,BO:()=>a,Yn:()=>i});var n=r(40133),o=r(14009);function i(e,t,r=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&r){const r=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=r)return r}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function a(e,t,r,n=r){let o;return o="function"==typeof e?e(r):Array.isArray(e)?e[r]||n:i(e,r)||n,t&&(o=t(o,n,e)),o}const l=function(e){const{prop:t,cssProperty:r=e.prop,themeKey:l,transform:s}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=i(e.theme,l)||{};return(0,o.NI)(e,c,e=>{let o=a(u,s,e);return e===o&&"string"==typeof e&&(o=a(u,s,`${t}${"default"===e?"":(0,n.A)(e)}`,e)),!1===r?o:{[r]:o}})};return c.propTypes={},c.filterProps=[t],c}},97412:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(60654),o=r(68020);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var a=n&&n.prototype instanceof c?n:c,u=Object.create(a.prototype);return l(u,"_invoke",function(r,n,o){var i,a,l,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,a=0,l=e,d.n=r,s}};function p(r,n){for(a=r,l=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(l=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(a=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,a=0))}if(o||r>1)return s;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),a=u,l=h;(t=a<2?e:l)||!f;){i||(a?a<3?(a>1&&(d.n=-1),p(a,l)):d.n=l:d.v=l);try{if(c=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(f=d.n<0)?l:r.call(n,d))!==s)break}catch(t){i=e,a=1,l=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),u}var s={};function c(){}function u(){}function f(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(l(t={},n,function(){return this}),t),p=f.prototype=c.prototype=Object.create(d);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return u.prototype=f,l(p,"constructor",f),l(f,"constructor",u),u.displayName="GeneratorFunction",l(f,o,"GeneratorFunction"),l(p),l(p,o,"Generator"),l(p,n,function(){return this}),l(p,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:h}})()}function l(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}l=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){l(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},l(e,t,r,n)}function s(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var h=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=d(r=t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(r,n||[],d(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,n=[{key:"getRefNameAliases",value:(l=a().m(function e(){var t,r,n,i,l,s,c,u,f;return a().w(function(e){for(;;)switch(e.n){case 0:if(""!==(t=this.getConf("location")).uri&&"/path/to/my/sequence_report.tsv"!==t.uri){e.n=1;break}return e.a(2,[]);case 1:return r=this.getConf("useNameOverride"),e.n=2,(0,o.openLocation)(t,this.pluginManager).readFile("utf8");case 2:if(n=e.v,i=n.split(/\n|\r\n|\r/).filter(function(e){return!!e.trim()}).map(function(e){return e.split("\t")}),l=i[0]||[],s=l.indexOf("GenBank seq accession"),c=l.indexOf("RefSeq seq accession"),u=l.indexOf("UCSC style name"),f=l.indexOf("Sequence name"),-1!==s&&-1!==c&&-1!==u){e.n=3;break}throw new Error('Header line must include "GenBank seq accession", "RefSeq seq accession", "UCSC style name", and "Sequence name"');case 3:return e.a(2,i.slice(1).filter(function(e){return!!e[u]||!!e[f]}).map(function(e){return{refName:e[u]||e[f],aliases:[e[s],e[c],e[u],e[f]].filter(function(e){return!!e}),override:r}}).filter(function(e){return!!e.refName}))}},e,this)}),u=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=l.apply(e,t);function i(e){s(o,r,n,i,a,"next",e)}function a(e){s(o,r,n,i,a,"throw",e)}i(void 0)})},function(){return u.apply(this,arguments)})}],n&&c(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,l,u}(n.BaseAdapter)},97469:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(14041),o=r(54357),i=r(31593),a=r(96674),l=r(40979),s=r(99061),c=r(31085);const u=(0,a.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),f=n.forwardRef(function(e,t){const r=(0,l.b)({props:e,name:"MuiDialogActions"}),{className:n,disableSpacing:a=!1,...f}=r,d={...r,disableSpacing:a},p=(e=>{const{classes:t,disableSpacing:r}=e,n={root:["root",!r&&"spacing"]};return(0,i.A)(n,s.C,t)})(d);return(0,c.jsx)(u,{className:(0,o.A)(p.root,n),ownerState:d,ref:t,...f})})},97555:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,r:()=>i});var n=r(42395),o=r(3807);function i(e){return(0,o.Ay)("MuiAutocomplete",e)}const a=(0,n.A)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"])},97573:(e,t,r)=>{"use strict";r.d(t,{A:()=>w});var n=r(31593),o=r(54357),i=r(14041),a=r(988),l=r(34946),s=r(20374),c=r(96674),u=r(42014),f=r(40979),d=r(72701),p=r(39455),h=r(31085);const m=(0,c.Ay)("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation]]}})({display:"flex",alignItems:"center",[`&.${d.A.alternativeLabel}`]:{flexDirection:"column"},[`&.${d.A.disabled}`]:{cursor:"default"},variants:[{props:{orientation:"vertical"},style:{textAlign:"left",padding:"8px 0"}}]}),y=(0,c.Ay)("span",{name:"MuiStepLabel",slot:"Label"})((0,u.A)(({theme:e})=>({...e.typography.body2,display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${d.A.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${d.A.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${d.A.alternativeLabel}`]:{marginTop:16},[`&.${d.A.error}`]:{color:(e.vars||e).palette.error.main}}))),b=(0,c.Ay)("span",{name:"MuiStepLabel",slot:"IconContainer"})({flexShrink:0,display:"flex",paddingRight:8,[`&.${d.A.alternativeLabel}`]:{paddingRight:0}}),v=(0,c.Ay)("span",{name:"MuiStepLabel",slot:"LabelContainer"})((0,u.A)(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${d.A.alternativeLabel}`]:{textAlign:"center"}}))),g=i.forwardRef(function(e,t){const r=(0,f.b)({props:e,name:"MuiStepLabel"}),{children:c,className:u,componentsProps:g={},error:w=!1,icon:S,optional:A,slots:O={},slotProps:x={},StepIconComponent:k,StepIconProps:C,...P}=r,{alternativeLabel:E,orientation:j}=i.useContext(s.A),{active:T,disabled:_,completed:R,icon:M}=i.useContext(a.A),I=S||M;let N=k;I&&!N&&(N=l.A);const D={...r,active:T,alternativeLabel:E,completed:R,disabled:_,error:w,orientation:j},F=(e=>{const{classes:t,orientation:r,active:o,completed:i,error:a,disabled:l,alternativeLabel:s}=e,c={root:["root",r,a&&"error",l&&"disabled",s&&"alternativeLabel"],label:["label",o&&"active",i&&"completed",a&&"error",l&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",o&&"active",i&&"completed",a&&"error",l&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]};return(0,n.A)(c,d.p,t)})(D),L={slots:O,slotProps:{stepIcon:C,...g,...x}},[z,B]=(0,p.A)("root",{elementType:m,externalForwardedProps:{...L,...P},ownerState:D,ref:t,className:(0,o.A)(F.root,u)}),[$,G]=(0,p.A)("label",{elementType:y,externalForwardedProps:L,ownerState:D}),[H,V]=(0,p.A)("stepIcon",{elementType:N,externalForwardedProps:L,ownerState:D});return(0,h.jsxs)(z,{...B,children:[I||H?(0,h.jsx)(b,{className:F.iconContainer,ownerState:D,children:(0,h.jsx)(H,{completed:R,active:T,error:w,icon:I,...V})}):null,(0,h.jsxs)(v,{className:F.labelContainer,ownerState:D,children:[c?(0,h.jsx)($,{...G,className:(0,o.A)(F.label,G?.className),children:c}):null,A]})]})});g.muiName="StepLabel";const w=g},97630:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,getSvgIconUtilityClass:()=>o.E,svgIconClasses:()=>o.A});var n=r(61845),o=r(66093)},97651:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(7603);function o(e){return(0,n.A)(e).defaultView||window}},97743:(e,t,r)=>{"use strict";r.d(t,{Q:()=>o,a:()=>n});var n=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(n||{}),o=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(o||{})},97832:(e,t,r)=>{"use strict";r.d(t,{L:()=>_});var n=r(89575),o=r(17502),i=r(14041),a=r(54357),l=r(1769),s=r(31593),c=r(7603),u=r(40133),f=r(41491),d=r(37570),p=r(10591);let h;var m=r(43433),y=r(30693),b=r(57936),v=r(9919),g=r(29393),w=r(12985),S=r(34051),A=r(84760),O=r(58385),x=r(45795),k=r(54012),C=r(80507),P=r(31085);const E=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],j=["changeReason","unstable_updateValueOnRender"];S.yL.LEFT,w.K.LEFT,S.yL.RIGHT,w.K.RIGHT,S.yL.NONE,S.yL.VIRTUAL;const T=(0,p.R)(function(e,t){const{column:r,row:f,rowId:p,rowNode:w,align:T,colIndex:_,width:R,className:M,style:I,colSpan:N,disableDragEvents:D,isNotVisible:F,pinnedOffset:L,pinnedPosition:z,showRightBorder:B,showLeftBorder:$,onClick:G,onDoubleClick:H,onMouseDown:V,onMouseUp:W,onMouseOver:U,onKeyDown:q,onKeyUp:X,onDragEnter:K,onDragOver:Y}=e,J=(0,o.A)(e,E),Z=(0,O.E)(),Q=(0,v.A)(),ee=(0,d.I)(),te=r.field,re=(0,b.Nc)(Z,x.R9,{rowId:p,field:te}),ne=(0,C.Q)().hooks.useCellAggregationResult(p,te),oe=re?y.bs.Edit:y.bs.View,ie=Z.current.getCellParamsForRow(p,te,f,{colDef:r,cellMode:oe,rowNode:w,tabIndex:(0,b.Nc)(Z,()=>{const e=(0,g.H5)(Z);return e&&e.field===te&&e.id===p?0:-1}),hasFocus:(0,b.Nc)(Z,()=>{const e=(0,g.MO)(Z);return e?.id===p&&e.field===te})});ie.api=Z.current,ne&&(ie.value=ne.value,ie.formattedValue=r.valueFormatter?r.valueFormatter(ie.value,f,r,Z):ie.value);const ae=(0,b.Nc)(Z,()=>Z.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:p,field:te})),le=(0,b.Nc)(Z,A.xX),se=(0,b.Nc)(Z,A.ET),{hasFocus:ce,isEditable:ue=!1,value:fe}=ie,de="actions"===r.type&&r.getActions?.(Z.current.getRowParams(p)).some(e=>!e.props.disabled),pe="view"!==oe&&ue||de?-1:ie.tabIndex,{classes:he,getCellClassName:me}=Q,ye=[(0,b.Nc)(Z,()=>Z.current.unstable_applyPipeProcessors("cellClassName",[],{id:p,field:te}).filter(Boolean).join(" "))];r.cellClassName&&ye.push("function"==typeof r.cellClassName?r.cellClassName(ie):r.cellClassName),"flex"===r.display&&ye.push(m.x["cell--flex"]),me&&ye.push(me(ie));const be=ie.formattedValue??fe,ve=i.useRef(null),ge=(0,l.A)(t,ve),we=i.useRef(null),Se=Q.cellSelection??!1,Ae=(e=>{const{align:t,showLeftBorder:r,showRightBorder:n,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:l,classes:c}=e,f={root:["cell",`cell--text${(0,u.A)(t)}`,a&&"selected",i&&"cell--editable",r&&"cell--withLeftBorder",n&&"cell--withRightBorder",o===S.yL.LEFT&&"cell--pinnedLeft",o===S.yL.RIGHT&&"cell--pinnedRight",l&&!i&&"cell--selectionMode"]};return(0,s.A)(f,m.B,c)})({align:T,showLeftBorder:$,showRightBorder:B,isEditable:ue,classes:Q.classes,pinnedPosition:z,isSelected:ae,isSelectionMode:Se}),Oe=i.useCallback(e=>t=>{const r=Z.current.getCellParams(p,te||"");Z.current.publishEvent(e,r,t),W&&W(t)},[Z,te,W,p]),xe=i.useCallback(e=>t=>{const r=Z.current.getCellParams(p,te||"");Z.current.publishEvent(e,r,t),V&&V(t)},[Z,te,V,p]),ke=i.useCallback((e,t)=>r=>{if(!Z.current.getRow(p))return;const n=Z.current.getCellParams(p,te||"");Z.current.publishEvent(e,n,r),t&&t(r)},[Z,te,p]),Ce=le[p]?.[te]??!1,Pe=se[p]?.[te]??1,Ee=i.useMemo(()=>{if(F)return{padding:0,opacity:0,width:0,height:0,border:0};const e=(0,k.l)((0,n.A)({"--width":`${R}px`},I),ee,z,L),t=z===S.yL.LEFT,r=z===S.yL.RIGHT;return Pe>1&&(e.height=`calc(var(--height) * ${Pe})`,e.zIndex=10,(t||r)&&(e.zIndex=40)),e},[R,F,I,L,z,ee,Pe]);if(i.useEffect(()=>{if(!ce||oe===y.bs.Edit)return;const e=(0,c.A)(Z.current.rootElementRef.current);if(ve.current&&!ve.current.contains(e.activeElement)){const e=ve.current.querySelector('[tabindex="0"]'),t=we.current||e||ve.current;if(void 0===h&&document.createElement("div").focus({get preventScroll(){return h=!0,!1}}),h)t.focus({preventScroll:!0});else{const e=Z.current.getScrollPosition();t.focus(),Z.current.scroll(e)}}},[ce,oe,Z]),Ce)return(0,P.jsx)("div",{"data-colindex":_,role:"presentation",style:(0,n.A)({width:"var(--width)"},Ee)});let je,Te,_e=J.onFocus;if(null===re&&r.renderCell&&(je=r.renderCell(ie)),null!==re&&r.renderEditCell){const e=Z.current.getRowWithUpdatedValues(p,r.field),t=(0,o.A)(re,j),i=r.valueFormatter?r.valueFormatter(re.value,e,r,Z):ie.formattedValue,a=(0,n.A)({},ie,{row:e,formattedValue:i},t);je=r.renderEditCell(a),ye.push(m.x["cell--editing"]),ye.push(he?.["cell--editing"])}if(void 0===je){const e=be?.toString();je=e,Te=e}i.isValidElement(je)&&de&&(je=i.cloneElement(je,{focusElementRef:we}));const Re=D?null:{onDragEnter:ke("cellDragEnter",K),onDragOver:ke("cellDragOver",Y)};return(0,P.jsx)("div",(0,n.A)({className:(0,a.A)(Ae.root,ye,M),role:"gridcell","data-field":te,"data-colindex":_,"aria-colindex":_+1,"aria-colspan":N,"aria-rowspan":Pe,style:Ee,title:Te,tabIndex:pe,onClick:ke("cellClick",G),onDoubleClick:ke("cellDoubleClick",H),onMouseOver:ke("cellMouseOver",U),onMouseDown:xe("cellMouseDown"),onMouseUp:Oe("cellMouseUp"),onKeyDown:ke("cellKeyDown",q),onKeyUp:ke("cellKeyUp",X)},Re,J,{onFocus:_e,ref:ge,children:je}))}),_=(0,f.n)(T)},97909:(e,t,r)=>{"use strict";r.d(t,{ED:()=>a,GD:()=>l,TQ:()=>i,aC:()=>s,tf:()=>o});var n=r(16190);const o=(0,n.gz)(e=>e.columnGrouping),i=(0,n.S)(o,e=>e?.unwrappedGroupingModel??{}),a=(0,n.S)(o,e=>e?.lookup??{}),l=(0,n.S)(o,e=>e?.headerStructure??[]),s=(0,n.Mz)(o,e=>e?.maxDepth??0)},97967:(e,t,r)=>{"use strict";e.exports=r(66310)},98176:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(66201),o=r(81296),i=r(49936),a=r(9765),l=r(81453),s=r(43557),c=r(22980),u=r(96876),f=r(14041);const d=(0,c.observer)(function(e){var t=e.model;return f.createElement(u.A,{message:"".concat(t.error),severity:"error",action:f.createElement(f.Fragment,null,f.createElement(l.A,{title:"Reload track"},f.createElement(s.A,{"data-testid":"reload_button",onClick:function(){t.reload()}},f.createElement(i.A,null))),f.createElement(l.A,{title:"Show stack trace"},f.createElement(s.A,{onClick:function(){(0,o.getSession)(t).queueDialog(function(e){return[n.default,{onClose:e,error:t.error}]})}},f.createElement(a.A,null))))})})},98245:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(81296),o=r(14041);function i(e){var t=e.feature,r=t.strand,i={"-1":"-",0:"",1:"+"},a=i[r]?"(".concat(i[r],")"):"",l=(0,n.assembleLocString)(t);return o.createElement(o.Fragment,null,"".concat(l," ").concat(a))}var a=r(90261),l=r(14041);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(null,arguments)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function h(e,t,r){return(t=function(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=e.feature,r=p(p({},t),t.__jbrowsefmt),o=r.start,s=r.end,u=p(p({},r),{},{length:(0,n.toLocale)(s-o)});return l.createElement(l.Fragment,null,l.createElement(a.A,{name:"Position",value:l.createElement(i,f({},e,{feature:r}))}),Object.entries({description:"Description",name:"Name",length:"Length",type:"Type"}).map(function(e){var t=c(e,2),r=t[0];return[t[1],u[r]]}).filter(function(e){return null!=c(e,2)[1]}).map(function(e){var t=c(e,2),r=t[0],n=t[1];return l.createElement(a.A,{key:r,name:r,value:n})}))}},98331:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>D});var n=r(14041),o=r(9810),i=r(81296),a=r(87211),l=r(23523),s=r(31085);const c=(0,l.A)((0,s.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp");var u=r(68805),f=r(95305),d=r(28773),p=r(53125),h=r(72899),m=r(88581),y=r(97469),b=r(98819),v=r(40200),g=r.n(v),w=r(45060),S=r(22980),A=r(28730),O=r(46658);function x(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return k(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(k(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,k(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,k(f,"constructor",c),k(c,"constructor",s),s.displayName="GeneratorFunction",k(c,o,"GeneratorFunction"),k(f),k(f,o,"Generator"),k(f,n,function(){return this}),k(f,"toString",function(){return"[object Generator]"}),(x=function(){return{w:i,m:d}})()}function k(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}k=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){k(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},k(e,t,r,n)}function C(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function P(e,t){return E.apply(this,arguments)}function E(){var e;return e=x().m(function e(t,r){var n,o,a,l,s,c,u,f,d;return x().w(function(e){for(;;)switch(e.n){case 0:if(n=(0,i.getSession)(t),o=t.leftOffset,a=t.rightOffset,o&&a){e.n=1;break}throw new Error("no offsets on model to use for range");case 1:if(!(new Set(r.map(function(e){return e.assemblyName})).size>1)){e.n=2;break}throw new Error("not able to fetch sequences from multiple assemblies currently");case 2:if(l=n.rpcManager,s=n.assemblyManager,c=o.assemblyName||a.assemblyName||"",u=s.get(c)){e.n=3;break}throw new Error("assembly ".concat(c," not found"));case 3:return f=(0,O.getConf)(u,["sequence","adapter"]),d="getSequence",e.a(2,l.call(d,"CoreGetFeatures",{adapterConfig:f,regions:r,sessionId:d}))}},e)}),E=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){C(i,n,o,a,l,"next",e)}function l(e){C(i,n,o,a,l,"throw",e)}a(void 0)})},E.apply(this,arguments)}var j=r(14041);function T(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return _(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(_(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,_(f,"constructor",c),_(c,"constructor",s),s.displayName="GeneratorFunction",_(c,o,"GeneratorFunction"),_(f),_(f,o,"Generator"),_(f,n,function(){return this}),_(f,"toString",function(){return"[object Generator]"}),(T=function(){return{w:i,m:d}})()}function _(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}_=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){_(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},_(e,t,r,n)}function R(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function M(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return I(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var N=(0,A.n9)()({dialogContent:{width:"80em"},textAreaFont:{fontFamily:"Courier New"},ml:{marginLeft:10}});const D=(0,S.observer)(function(e){var t=e.model,r=e.handleClose,l=N().classes,s=M((0,n.useState)(),2),v=s[0],S=s[1],A=M((0,n.useState)(),2),O=A[0],x=A[1],k=M((0,n.useState)(!1),2),C=k[0],E=k[1],_=M((0,n.useState)(!1),2),I=_[0],D=_[1],F=M((0,n.useState)(!1),2),L=F[0],z=F[1],B=t.leftOffset,$=t.rightOffset,G=void 0===O;(0,n.useEffect)(function(){var e,r=new AbortController;return(e=T().m(function e(){var r,n,o,i;return T().w(function(e){for(;;)switch(e.n){case 0:if(e.p=0,0!==(r=t.getSelectedRegions(B,$)).length){e.n=1;break}throw new Error("Selected region is out of bounds");case 1:return n=x,e.n=2,P(t,r);case 2:o=e.v,n(o),e.n=4;break;case 3:e.p=3,i=e.v,console.error(i),S(i);case 4:return e.a(2)}},e,null,[[0,3]])}),function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){R(i,n,o,a,l,"next",e)}function l(e){R(i,n,o,a,l,"throw",e)}a(void 0)})})(),function(){r.abort()}},[t,B,$]);var H=O?O.map(function(e){var t,r=e.get("seq"),n=e.get("refName"),o=e.get("start")+1,a=e.get("end"),l="".concat(n,":").concat(o,"-").concat(a);if((null===(t=r)||void 0===t?void 0:t.length)!==a-o+1)throw new Error("".concat(l," returned ").concat(r.length.toLocaleString()," bases, but should have returned ").concat((a-o).toLocaleString()));return C&&(r=(0,i.reverse)(r)),L&&(r=(0,i.complement)(r)),{header:l+(C?"-rev":"")+(L?"-comp":""),seq:r}}).map(function(e){return">".concat(e.header,"\n").concat(e.seq.replaceAll(/(.{1,80})/g,"$1\n").trimEnd())}).join("\n"):"",V=!!H&&H.length>1e6;return j.createElement(o.Dialog,{maxWidth:"xl",open:!0,onClose:function(){r(),t.setOffsets()},title:"Reference sequence"},j.createElement(u.A,null,v?j.createElement(o.ErrorMessage,{error:v}):G?j.createElement(o.LoadingEllipses,{message:"Retrieving sequences"}):null,j.createElement(f.A,{"data-testid":"rubberband-sequence",variant:"outlined",multiline:!0,minRows:5,maxRows:10,disabled:V,className:l.dialogContent,fullWidth:!0,value:V?"Reference sequence too large to display, use the download FASTA button":H,slotProps:{input:{readOnly:!0,classes:{input:l.textAreaFont}}}}),j.createElement(d.A,null,j.createElement(p.A,{control:j.createElement(h.A,{value:C,onChange:function(e){E(e.target.checked)}}),label:"Reverse sequence"}),j.createElement(p.A,{control:j.createElement(h.A,{value:L,onChange:function(e){z(e.target.checked)}}),label:"Complement sequence"})),j.createElement(m.A,{style:{margin:10}},'Note: Check both boxes for the "reverse complement"')),j.createElement(y.A,null,j.createElement(b.A,{onClick:function(){g()(H),D(!0),setTimeout(function(){D(!1)},500)},disabled:G||!!v||V,color:"primary",startIcon:j.createElement(a.A,null)},I?"Copied":"Copy to clipboard"),j.createElement(b.A,{onClick:function(){(0,w.saveAs)(new Blob([H||""],{type:"text/x-fasta;charset=utf-8"}),"jbrowse_ref_seq.fa")},disabled:G||!!v,color:"primary",startIcon:j.createElement(c,null)},"Download FASTA"),j.createElement(b.A,{onClick:r,variant:"contained"},"Close")))})},98355:e=>{function t(e){var r,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(r=0;r<i;r++)e[r]&&(n=t(e[r]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function r(){for(var e,r,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(r=t(e))&&(o&&(o+=" "),o+=r);return o}e.exports=r,e.exports.clsx=r},98412:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ObservableCreate:()=>i});var n=r(38509),o=r(10568);function i(e,t){return(0,o.SW)(t),new n.c(function(t){try{var r=e(t);null!=r&&r.catch&&r.catch(function(e){t.error(e)})}catch(e){t.error(e)}})}},98438:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},98453:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=function(e){return"string"==typeof e}},98523:(e,t,r)=>{"use strict";r.d(t,{C:()=>i,U:()=>a});var n=r(85608),o=r(14460);function i(e){return(0,n.AQ)(this,arguments,function(){var t,r,o;return(0,n.YH)(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,(0,n.N3)(t.read())];case 3:return r=i.sent(),o=r.value,r.done?[4,(0,n.N3)(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,(0,n.N3)(o)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function a(e){return(0,o.T)(null==e?void 0:e.getReader)}},98537:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C});var n=r(81912),o=r(2033),i=r(35431),a=r(60654),l=r(57859),s=r(81296),c=r(865),u=r(10568);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function d(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return p(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(p(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,p(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,p(f,"constructor",c),p(c,"constructor",s),s.displayName="GeneratorFunction",p(c,o,"GeneratorFunction"),p(f),p(f,o,"Generator"),p(f,n,function(){return this}),p(f,"toString",function(){return"[object Generator]"}),(d=function(){return{w:i,m:h}})()}function p(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}p=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){p(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},p(e,t,r,n)}function h(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function m(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,l,"next",e)}function l(e){h(i,n,o,a,l,"throw",e)}a(void 0)})}}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(t){v(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function v(e,t,r){return(t=w(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,w(n.key),n)}}function w(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}function A(e,t,r,n){var o=O(x(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function O(){return O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=x(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},O.apply(null,arguments)}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}var C=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=x(r=t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(r,n||[],x(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(t,e),r=t,i=[{key:"serializeArgsInClient",value:function(e){return A(t,"serializeArgsInClient",this,3)([b(b({},e),{},{displayModel:void 0,regions:structuredClone(e.regions)})])}},{key:"deserializeResultsInClient",value:function(e,r){var n=new Map(e.features.map(function(e){return c.A.fromJSON(e)}).map(function(e){return[e.id(),e]})),o=A(t,"deserializeResultsInClient",this,3)([b(b({},e),{},{features:n}),r]);return b(b({},o),{},{blockKey:r.blockKey,features:n})}},{key:"serializeResultsInWorker",value:function(e,r){var n=A(t,"serializeResultsInWorker",this,3)([e,r]),o=e.features;return b(b({},n),{},{features:(0,s.iterMap)(o.values(),function(e){return e.toJSON()},o.size)})}},{key:"getExpandedRegion",value:function(e,t){return e}},{key:"getFeatures",value:(h=m(d().m(function e(t){var r,i,s,c,f,p,h,m,y,v,g,w=this;return d().w(function(e){for(;;)switch(e.n){case 0:return r=this.pluginManager,i=t.stopToken,s=t.regions,c=t.sessionId,f=t.adapterConfig,e.n=1,(0,l.cK)(r,c,f);case 1:if(p=e.v,h=p.dataAdapter,(0,a.isFeatureAdapter)(h)){e.n=2;break}throw new Error("Adapter does not support retrieving features");case 2:return(0,u.SW)(i),m=s.map(function(e){return b(b({},e),{},{start:Math.floor(e.start),end:Math.ceil(e.end)})}),y=m[0],v=1===m.length?h.getFeatures(this.getExpandedRegion(y,t),t):h.getFeaturesInMultipleRegions(m,t),e.n=3,(0,n._)(v.pipe((0,o.$)()));case 3:return g=e.v,(0,u.SW)(i),e.a(2,new Map(g.filter(function(e){return w.featurePassesFilters(t,e)}).map(function(e){return[e.id(),e]})))}},e,this)})),function(e){return h.apply(this,arguments)})},{key:"featurePassesFilters",value:function(e,t){return!e.filters||e.filters.passes(t,e)}},{key:"render",value:(p=m(d().m(function e(r){var n,o,i;return d().w(function(e){for(;;)switch(e.n){case 0:if(i=r.features){e.n=2;break}return e.n=1,this.getFeatures(r);case 1:i=e.v;case 2:return n=i,e.n=3,A(t,"render",this,3)([b(b({},r),{},{features:n})]);case 3:return o=e.v,e.a(2,b(b({},o),{},{features:n}))}},e,this)})),function(e){return p.apply(this,arguments)})}],i&&g(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i,p,h}(i.default)},98539:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,getSwitchUtilityClass:()=>o.n,switchClasses:()=>o.A});var n=r(11419),o=r(15503)},98696:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PopoverPaper:()=>n.IJ,PopoverRoot:()=>n.yt,default:()=>n.Ay,getOffsetLeft:()=>n.fB,getOffsetTop:()=>n.Dy,getPopoverUtilityClass:()=>o.K,popoverClasses:()=>o.A});var n=r(25101),o=r(17349)},98715:(e,t,r)=>{"use strict";r.d(t,{ai:()=>y,ep:()=>b,aU:()=>g,HO:()=>v});var n=r(89575),o=r(17502),i=r(14041),a=r(10591),l=r(9919),s=r(58385);const c=["displayOrder"];var u=r(91786),f=r(92847),d=r(49678),p=r(49972),h=r(31085);const m=["defaultSlots","defaultSlotProps","slots","slotProps"],y={columnMenuSortItem:p.H,columnMenuFilterItem:d.r,columnMenuColumnsItem:f.O},b={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},v=(0,a.R)(function(e,t){const{defaultSlots:r,defaultSlotProps:a,slots:f,slotProps:d}=e,p=(0,o.A)(e,m),y=(e=>{const t=(0,s.E)(),r=(0,l.A)(),{defaultSlots:a,defaultSlotProps:u,slots:f={},slotProps:d={},hideMenu:p,colDef:h,addDividers:m=!0}=e,y=i.useMemo(()=>(0,n.A)({},a,f),[a,f]),b=i.useMemo(()=>{if(!d||0===Object.keys(d).length)return u;const e=(0,n.A)({},d);return Object.entries(u).forEach(([t,r])=>{e[t]=(0,n.A)({},r,d[t]||{})}),e},[u,d]),v=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),g=i.useMemo(()=>{const e=Object.keys(a);return Object.keys(f).filter(t=>!e.includes(t))},[f,a]);return i.useMemo(()=>{const e=Array.from(new Set([...v,...g])).filter(e=>null!=y[e]).sort((e,t)=>{const r=b[e],n=b[t];return(Number.isFinite(r?.displayOrder)?r.displayOrder:100)-(Number.isFinite(n?.displayOrder)?n.displayOrder:100)});return e.reduce((t,i,a)=>{let l={colDef:h,onClick:p};const s=b[i];if(s){const e=(0,o.A)(s,c);l=(0,n.A)({},l,e)}return m&&a!==e.length-1?[...t,[y[i],l],[r.slots.baseDivider,{}]]:[...t,[y[i],l]]},[])},[m,h,v,p,y,b,g,r.slots.baseDivider])})((0,n.A)({},p,{defaultSlots:r,defaultSlotProps:a,slots:f,slotProps:d}));return(0,h.jsx)(u.T,(0,n.A)({},p,{ref:t,children:y.map(([e,t],r)=>(0,h.jsx)(e,(0,n.A)({},t),r))}))}),g=(0,a.R)(function(e,t){return(0,h.jsx)(v,(0,n.A)({},e,{ref:t,defaultSlots:y,defaultSlotProps:b}))})},98758:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O,getSpeedDialActionUtilityClass:()=>m,speedDialActionClasses:()=>y});var n=r(14041),o=r(54357),i=r(31593),a=r(83589),l=r(96674),s=r(42014),c=r(40979),u=r(82165),f=r(81453),d=r(38216),p=r(42395),h=r(3807);function m(e){return(0,h.Ay)("MuiSpeedDialAction",e)}const y=(0,p.A)("MuiSpeedDialAction",["fab","fabClosed","staticTooltip","staticTooltipClosed","staticTooltipLabel","tooltipPlacementLeft","tooltipPlacementRight"]);var b=r(39455),v=r(964),g=r(31085);const w=(0,l.Ay)(u.A,{name:"MuiSpeedDialAction",slot:"Fab",skipVariantsResolver:!1,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.fab,!r.open&&t.fabClosed]}})((0,s.A)(({theme:e})=>({margin:8,color:(e.vars||e).palette.text.secondary,backgroundColor:(e.vars||e).palette.background.paper,"&:hover":{backgroundColor:e.vars?e.vars.palette.SpeedDialAction.fabHoverBg:(0,a.tL)(e.palette.background.paper,.15)},transition:`${e.transitions.create("transform",{duration:e.transitions.duration.shorter})}, opacity 0.8s`,opacity:1,variants:[{props:({ownerState:e})=>!e.open,style:{opacity:0,transform:"scale(0)"}}]}))),S=(0,l.Ay)("span",{name:"MuiSpeedDialAction",slot:"StaticTooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.staticTooltip,!r.open&&t.staticTooltipClosed,t[`tooltipPlacement${(0,d.A)(r.tooltipPlacement)}`]]}})((0,s.A)(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",[`& .${y.staticTooltipLabel}`]:{transition:e.transitions.create(["transform","opacity"],{duration:e.transitions.duration.shorter}),opacity:1},variants:[{props:({ownerState:e})=>!e.open,style:{[`& .${y.staticTooltipLabel}`]:{opacity:0,transform:"scale(0.5)"}}},{props:{tooltipPlacement:"left"},style:{[`& .${y.staticTooltipLabel}`]:{transformOrigin:"100% 50%",right:"100%",marginRight:8}}},{props:{tooltipPlacement:"right"},style:{[`& .${y.staticTooltipLabel}`]:{transformOrigin:"0% 50%",left:"100%",marginLeft:8}}}]}))),A=(0,l.Ay)("span",{name:"MuiSpeedDialAction",slot:"StaticTooltipLabel"})((0,s.A)(({theme:e})=>({position:"absolute",...e.typography.body1,backgroundColor:(e.vars||e).palette.background.paper,borderRadius:(e.vars||e).shape.borderRadius,boxShadow:(e.vars||e).shadows[1],color:(e.vars||e).palette.text.secondary,padding:"4px 16px",wordBreak:"keep-all"}))),O=n.forwardRef(function(e,t){const r=(0,c.b)({props:e,name:"MuiSpeedDialAction"}),{className:a,delay:l=0,FabProps:s={},icon:u,id:p,open:h,TooltipClasses:y,tooltipOpen:O=!1,tooltipPlacement:x="left",tooltipTitle:k,slots:C={},slotProps:P={},...E}=r,j={...r,tooltipPlacement:x},T=(e=>{const{open:t,tooltipPlacement:r,classes:n}=e,o={fab:["fab",!t&&"fabClosed"],staticTooltip:["staticTooltip",`tooltipPlacement${(0,d.A)(r)}`,!t&&"staticTooltipClosed"],staticTooltipLabel:["staticTooltipLabel"]};return(0,i.A)(o,m,n)})(j),_={slots:C,slotProps:{fab:s,...P,tooltip:(0,v.A)("function"==typeof P.tooltip?P.tooltip(j):P.tooltip,{title:k,open:O,placement:x,classes:y})}},[R,M]=n.useState(_.slotProps.tooltip?.open),I={transitionDelay:`${l}ms`},[N,D]=(0,b.A)("fab",{elementType:w,externalForwardedProps:_,ownerState:j,shouldForwardComponentProp:!0,className:(0,o.A)(T.fab,a),additionalProps:{style:I,tabIndex:-1,role:"menuitem",size:"small"}}),[F,L]=(0,b.A)("tooltip",{elementType:f.A,externalForwardedProps:_,shouldForwardComponentProp:!0,ref:t,additionalProps:{id:p},ownerState:j,getSlotProps:e=>({...e,onClose:t=>{e.onClose?.(t),M(!1)},onOpen:t=>{e.onOpen?.(t),M(!0)}})}),[z,B]=(0,b.A)("staticTooltip",{elementType:S,externalForwardedProps:_,ownerState:j,ref:t,className:T.staticTooltip,additionalProps:{id:p}}),[$,G]=(0,b.A)("staticTooltipLabel",{elementType:A,externalForwardedProps:_,ownerState:j,className:T.staticTooltipLabel,additionalProps:{style:I,id:`${p}-label`}}),H=(0,g.jsx)(N,{...D,children:u});return L.open?(0,g.jsxs)(z,{...B,...E,children:[(0,g.jsx)($,{...G,children:L.title}),n.cloneElement(H,{"aria-labelledby":`${p}-label`})]}):(!h&&R&&M(!1),(0,g.jsx)(F,{...L,title:L.title,open:h&&R,placement:L.placement,classes:L.classes,...E,children:H}))})},98819:(e,t,r)=>{"use strict";r.d(t,{A:()=>P});var n=r(14041),o=r(54357),i=r(58265),a=r(31593),l=r(83589),s=r(65866),c=r(48156),u=r(96674),f=r(42014),d=r(40979),p=r(59054),h=r(63507),m=r(38216),y=r(22162),b=r(76855),v=r(70718),g=r(37566),w=r(31085);const S=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],A=(0,u.Ay)(p.A,{shouldForwardProp:e=>(0,c.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${(0,m.A)(r.color)}`],t[`size${(0,m.A)(r.size)}`],t[`${r.variant}Size${(0,m.A)(r.size)}`],"inherit"===r.color&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,r.loading&&t.loading]}})((0,f.A)(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],r="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${b.A.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${b.A.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${b.A.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${b.A.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter((0,y.A)()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,l.X4)(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette[t].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,l.X4)(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${b.A.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${b.A.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${b.A.loading}`]:{color:"transparent"}}}]}})),O=(0,u.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,r.loading&&t.startIconLoadingStart,t[`iconSize${(0,m.A)(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...S]})),x=(0,u.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,r.loading&&t.endIconLoadingEnd,t[`iconSize${(0,m.A)(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...S]})),k=(0,u.Ay)("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),C=(0,u.Ay)("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),P=n.forwardRef(function(e,t){const r=n.useContext(v.A),l=n.useContext(g.A),c=(0,i.A)(r,e),u=(0,d.b)({props:c,name:"MuiButton"}),{children:f,color:p="primary",component:y="button",className:S,disabled:P=!1,disableElevation:E=!1,disableFocusRipple:j=!1,endIcon:T,focusVisibleClassName:_,fullWidth:R=!1,id:M,loading:I=null,loadingIndicator:N,loadingPosition:D="center",size:F="medium",startIcon:L,type:z,variant:B="text",...$}=u,G=(0,s.A)(M),H=N??(0,w.jsx)(h.A,{"aria-labelledby":G,color:"inherit",size:16}),V={...u,color:p,component:y,disabled:P,disableElevation:E,disableFocusRipple:j,fullWidth:R,loading:I,loadingIndicator:H,loadingPosition:D,size:F,type:z,variant:B},W=(e=>{const{color:t,disableElevation:r,fullWidth:n,size:o,variant:i,loading:l,loadingPosition:s,classes:c}=e,u={root:["root",l&&"loading",i,`${i}${(0,m.A)(t)}`,`size${(0,m.A)(o)}`,`${i}Size${(0,m.A)(o)}`,`color${(0,m.A)(t)}`,r&&"disableElevation",n&&"fullWidth",l&&`loadingPosition${(0,m.A)(s)}`],startIcon:["icon","startIcon",`iconSize${(0,m.A)(o)}`],endIcon:["icon","endIcon",`iconSize${(0,m.A)(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},f=(0,a.A)(u,b.B,c);return{...c,...f}})(V),U=(L||I&&"start"===D)&&(0,w.jsx)(O,{className:W.startIcon,ownerState:V,children:L||(0,w.jsx)(C,{className:W.loadingIconPlaceholder,ownerState:V})}),q=(T||I&&"end"===D)&&(0,w.jsx)(x,{className:W.endIcon,ownerState:V,children:T||(0,w.jsx)(C,{className:W.loadingIconPlaceholder,ownerState:V})}),X=l||"",K="boolean"==typeof I?(0,w.jsx)("span",{className:W.loadingWrapper,style:{display:"contents"},children:I&&(0,w.jsx)(k,{className:W.loadingIndicator,ownerState:V,children:H})}):null;return(0,w.jsxs)(A,{ownerState:V,className:(0,o.A)(r.className,W.root,S,X),component:y,disabled:P||I,focusRipple:!j,focusVisibleClassName:(0,o.A)(W.focusVisible,_),ref:t,type:z,id:I?G:M,...$,classes:W,children:[U,"end"!==D&&K,f,"end"===D&&K,q]})})},98847:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var n=r(11154),o=r(98245),i=r(14041);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(null,arguments)}function l(e){var t=e.title,r=void 0===t?"Primary data":t;return i.createElement(n.default,a({},e,{title:r}),i.createElement(o.A,e))}},98886:(e,t,r)=>{"use strict";r.d(t,{h:()=>s});var n=r(89575),o=(r(14041),r(10591)),i=r(5334),a=r(34425),l=r(31085);const s=(0,o.R)(function(e,t){const r=(0,i.h)().current.getLocaleText("noRowsLabel");return(0,l.jsx)(a.$,(0,n.A)({},e,{ref:t,children:r}))})},99061:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,C:()=>i});var n=r(42395),o=r(3807);function i(e){return(0,o.Ay)("MuiDialogActions",e)}const a=(0,n.A)("MuiDialogActions",["root","spacing"])},99281:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>C});var n=r(14041),o=r(9810),i=r(81296),a=r(63507),l=r(88581),s=r(95305),c=r(68805),u=r(94263),f=r(53125),d=r(72899),p=r(97469),h=r(98819),m=r(14041),y=["children"];function b(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return v(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(v(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,v(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,v(f,"constructor",c),v(c,"constructor",s),s.displayName="GeneratorFunction",v(c,o,"GeneratorFunction"),v(f),v(f,o,"Generator"),v(f,n,function(){return this}),v(f,"toString",function(){return"[object Generator]"}),(b=function(){return{w:i,m:d}})()}function v(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}v=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){v(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},v(e,t,r,n)}function g(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function w(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){g(i,n,o,a,l,"next",e)}function l(e){g(i,n,o,a,l,"throw",e)}a(void 0)})}}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function O(){return m.createElement("div",null,m.createElement(a.A,{size:20,style:{marginRight:20}}),m.createElement(l.A,{display:"inline"},"Creating SVG"))}function x(e,t){return(0,i.useLocalStorage)("svg-".concat(e),t)}function k(e){var t=e.children,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,y);return m.createElement("div",null,m.createElement(s.A,r,t))}function C(e){var t=e.model,r=e.handleClose,a=(0,i.getSession)(t),s="undefined"!=typeof OffscreenCanvas,y=S((0,n.useState)(s),2),v=y[0],g=y[1],A=S((0,n.useState)(!1),2),C=A[0],P=A[1],E=S((0,n.useState)(),2),j=E[0],T=E[1],_=S(x("file","jbrowse.svg"),2),R=_[0],M=_[1],I=S(x("tracklabels","offset"),2),N=I[0],D=I[1],F=S(x("theme",a.themeName||"default"),2),L=F[0],z=F[1];return m.createElement(o.Dialog,{open:!0,onClose:r,title:"Export SVG"},m.createElement(c.A,null,j?m.createElement(o.ErrorMessage,{error:j}):C?m.createElement(O,null):null,m.createElement(k,{helperText:"filename",value:R,onChange:function(e){M(e.target.value)}}),m.createElement(k,{select:!0,label:"Track label positioning",variant:"outlined",style:{width:150},value:N,onChange:function(e){D(e.target.value)}},m.createElement(u.A,{value:"offset"},"Offset"),m.createElement(u.A,{value:"overlay"},"Overlay"),m.createElement(u.A,{value:"left"},"Left"),m.createElement(u.A,{value:"none"},"None")),a.allThemes?m.createElement(k,{select:!0,label:"Theme",variant:"outlined",value:L,onChange:function(e){z(e.target.value)}},Object.entries(a.allThemes()).map(function(e){var t=S(e,2),r=t[0],n=t[1];return m.createElement(u.A,{key:r,value:r},n.name||"(Unknown name)")})):null,s?m.createElement(f.A,{control:m.createElement(d.A,{checked:v,onChange:function(){g(function(e){return!e})}}),label:"Rasterize canvas based tracks? File may be much larger if this is turned off"}):m.createElement(l.A,null,"Note: rasterizing layers not yet supported in this browser, so SVG size may be large")),m.createElement(p.A,null,m.createElement(h.A,{variant:"contained",color:"secondary",onClick:function(){r()}},"Cancel"),m.createElement(h.A,{variant:"contained",color:"primary",type:"submit",onClick:w(b().m(function e(){var n;return b().w(function(e){for(;;)switch(e.n){case 0:return P(!0),T(void 0),e.p=1,e.n=2,t.exportSvg({rasterizeLayers:v,filename:R,trackLabels:N,themeName:L});case 2:r(),e.n=4;break;case 3:e.p=3,n=e.v,console.error(n),T(n);case 4:return e.p=4,P(!1),e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}))},"Submit")))}},99286:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.A,getListSubheaderUtilityClass:()=>o.g,listSubheaderClasses:()=>o.A});var n=r(26629),o=r(77501)},99494:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(8837),o=r(79177),i=r(94263),a=r(22980),l=r(28730),s=r(14041);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){p(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function p(e,t,r){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var h=(0,l.n9)()({formControl:{margin:0,marginLeft:4}});const m=(0,a.observer)(function(e){var t=e.model,r=h().classes,a=t.intronBp,l=t.upDownBp,c=t.mode,f=t.hasCDS,p=t.hasExonOrCDS;return s.createElement(n.A,{className:r.formControl},s.createElement(o.A,{size:"small",value:c,onChange:function(e){t.setMode(e.target.value)}},Object.entries(d(d(d(d(d(d(d(d(d({},f?{cds:"CDS"}:{}),f?{protein:"Protein"}:{}),p?{cdna:"cDNA"}:{}),p?{gene:"Genomic w/ full introns"}:{}),p?{gene_updownstream:"Genomic w/ full introns +/- ".concat(l,"bp up+down stream")}:{}),p?{gene_collapsed_intron:"Genomic w/ ".concat(a,"bp intron")}:{}),p?{gene_updownstream_collapsed_intron:"Genomic w/ ".concat(a,"bp intron +/- ").concat(l,"bp up+down stream ")}:{}),p?{}:{genomic:"Genomic"}),p?{}:{genomic_sequence_updownstream:"Genomic +/- ".concat(l,"bp up+down stream")})).map(function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],a=n[1];return s.createElement(i.A,{key:o,value:o},a)})))})},99696:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>R});var n=r(47482),o=r(88581),i=r(89981),a=r(34901),l=r(14041),s=r(22664),c=r(8837),u=r(98819),f=r(43557),d=r(22980),p=r(28730),h=r(9810),m=r(81296),y=r(14041);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var v=(0,l.lazy)(function(){return Promise.resolve().then(r.bind(r,81899))}),g=(0,l.lazy)(function(){return Promise.resolve().then(r.bind(r,22495))}),w=(0,p.n9)()(function(e){return{formControl:{margin:0},container:{marginTop:e.spacing(4),marginBottom:e.spacing(4)}}});const S=(0,d.observer)(function(e){var t,r,n=e.model,o=e.feature,i=w().classes,a=(t=(0,l.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=a[0],p=a[1];return y.createElement("div",{className:i.container},y.createElement(c.A,{className:i.formControl},y.createElement(u.A,{variant:"contained",onClick:function(){p(!d)}},d?"Hide feature sequence":"Show feature sequence")),y.createElement(f.A,{onClick:function(){(0,m.getSession)(n).queueDialog(function(e){return[g,{handleClose:e}]})}},y.createElement(s.A,null)),d?y.createElement(l.Suspense,{fallback:y.createElement(h.LoadingEllipses,null)},y.createElement(v,{key:o.uniqueId,model:n,feature:o})):null)});var A=r(3845),O=r(11154),x=r(98245),k=r(14041);function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P.apply(null,arguments)}function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach(function(t){T(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function T(e,t,r){return(t=function(e){var t=function(e){if("object"!=C(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==C(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var _=["name","start","end","strand","refName","description","type"];function R(e){var t=e.omit,r=void 0===t?[]:t,l=e.model,s=e.feature,c=e.depth,u=void 0===c?0:c,f=l.maxDepth,d=s.mate,p=s.name,y=void 0===p?"":p,b=s.id,v=void 0===b?"":b,g=s.type,w=void 0===g?"":g,C=s.subfeatures,E=s.uniqueId,T=(0,m.getEnv)(l).pluginManager,M=(0,m.getSession)(l),I=T.evaluateExtensionPoint("Core-extraFeaturePanel",null,{session:M,feature:s,model:l}),N=d;return k.createElement(O.default,{title:(0,a.KS)(y,v,w)},k.createElement(o.A,null,"Core details"),k.createElement(x.A,e),N?k.createElement(k.Fragment,null,k.createElement(i.A,null),k.createElement(o.A,null,"Mate details"),k.createElement(x.A,P({},e,{feature:j(j({},N),{},{start:N.start,end:N.end,refName:N.refName,uniqueId:"".concat(E,"-mate")})}))):null,k.createElement(i.A,null),k.createElement(o.A,null,"Attributes"),k.createElement(A.default,P({attributes:s},e,{omit:r,omitSingleLevel:_})),k.createElement(n.t,{FallbackComponent:function(e){return k.createElement(h.ErrorMessage,{error:e.error})}},k.createElement(S,e)),I?k.createElement(k.Fragment,null,k.createElement(i.A,null),k.createElement(O.default,{title:I.name},k.createElement(I.Component,e))):null,u<f&&null!=C&&C.length?k.createElement(O.default,{title:"Subfeatures",defaultExpanded:u<1},C.map(function(e,t){return k.createElement(R,{key:JSON.stringify(e),feature:j(j({},e),{},{uniqueId:"".concat(E,"_").concat(t)}),model:l,depth:u+1})})):null)}},99708:(e,t,r)=>{"use strict";var n=r(71824);function o(e){for(var t=e.length;--t>=0;)e[t]=0}var i=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],s=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);o(c);var u=new Array(60);o(u);var f=new Array(512);o(f);var d=new Array(256);o(d);var p=new Array(29);o(p);var h,m,y,b=new Array(30);function v(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}function g(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function w(e){return e<256?f[e]:f[256+(e>>>7)]}function S(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function A(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,S(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function O(e,t,r){A(e,r[2*t],r[2*t+1])}function x(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function k(e,t,r){var n,o,i=new Array(16),a=0;for(n=1;n<=15;n++)i[n]=a=a+r[n-1]<<1;for(o=0;o<=t;o++){var l=e[2*o+1];0!==l&&(e[2*o]=x(i[l]++,l))}}function C(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function P(e){e.bi_valid>8?S(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function E(e,t,r,n){var o=2*t,i=2*r;return e[o]<e[i]||e[o]===e[i]&&n[t]<=n[r]}function j(e,t,r){for(var n=e.heap[r],o=r<<1;o<=e.heap_len&&(o<e.heap_len&&E(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!E(t,n,e.heap[o],e.depth));)e.heap[r]=e.heap[o],r=o,o<<=1;e.heap[r]=n}function T(e,t,r){var n,o,l,s,c=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],o=e.pending_buf[e.l_buf+c],c++,0===n?O(e,o,t):(O(e,(l=d[o])+256+1,t),0!==(s=i[l])&&A(e,o-=p[l],s),O(e,l=w(--n),r),0!==(s=a[l])&&A(e,n-=b[l],s))}while(c<e.last_lit);O(e,256,t)}function _(e,t){var r,n,o,i=t.dyn_tree,a=t.stat_desc.static_tree,l=t.stat_desc.has_stree,s=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<s;r++)0!==i[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):i[2*r+1]=0;for(;e.heap_len<2;)i[2*(o=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[o]=0,e.opt_len--,l&&(e.static_len-=a[2*o+1]);for(t.max_code=c,r=e.heap_len>>1;r>=1;r--)j(e,i,r);o=s;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],j(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*o]=i[2*r]+i[2*n],e.depth[o]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=o,e.heap[1]=o++,j(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,o,i,a,l,s=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,f=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,h=t.stat_desc.max_length,m=0;for(i=0;i<=15;i++)e.bl_count[i]=0;for(s[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(i=s[2*s[2*(n=e.heap[r])+1]+1]+1)>h&&(i=h,m++),s[2*n+1]=i,n>c||(e.bl_count[i]++,a=0,n>=p&&(a=d[n-p]),l=s[2*n],e.opt_len+=l*(i+a),f&&(e.static_len+=l*(u[2*n+1]+a)));if(0!==m){do{for(i=h-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[h]--,m-=2}while(m>0);for(i=h;0!==i;i--)for(n=e.bl_count[i];0!==n;)(o=e.heap[--r])>c||(s[2*o+1]!==i&&(e.opt_len+=(i-s[2*o+1])*s[2*o],s[2*o+1]=i),n--)}}(e,t),k(i,c,e.bl_count)}function R(e,t,r){var n,o,i=-1,a=t[1],l=0,s=7,c=4;for(0===a&&(s=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=t[2*(n+1)+1],++l<s&&o===a||(l<c?e.bl_tree[2*o]+=l:0!==o?(o!==i&&e.bl_tree[2*o]++,e.bl_tree[32]++):l<=10?e.bl_tree[34]++:e.bl_tree[36]++,l=0,i=o,0===a?(s=138,c=3):o===a?(s=6,c=3):(s=7,c=4))}function M(e,t,r){var n,o,i=-1,a=t[1],l=0,s=7,c=4;for(0===a&&(s=138,c=3),n=0;n<=r;n++)if(o=a,a=t[2*(n+1)+1],!(++l<s&&o===a)){if(l<c)do{O(e,o,e.bl_tree)}while(0!==--l);else 0!==o?(o!==i&&(O(e,o,e.bl_tree),l--),O(e,16,e.bl_tree),A(e,l-3,2)):l<=10?(O(e,17,e.bl_tree),A(e,l-3,3)):(O(e,18,e.bl_tree),A(e,l-11,7));l=0,i=o,0===a?(s=138,c=3):o===a?(s=6,c=3):(s=7,c=4)}}o(b);var I=!1;function N(e,t,r,o){A(e,0+(o?1:0),3),function(e,t,r){P(e),S(e,r),S(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}t._tr_init=function(e){I||(function(){var e,t,r,n,o,s=new Array(16);for(r=0,n=0;n<28;n++)for(p[n]=r,e=0;e<1<<i[n];e++)d[r++]=n;for(d[r-1]=n,o=0,n=0;n<16;n++)for(b[n]=o,e=0;e<1<<a[n];e++)f[o++]=n;for(o>>=7;n<30;n++)for(b[n]=o<<7,e=0;e<1<<a[n]-7;e++)f[256+o++]=n;for(t=0;t<=15;t++)s[t]=0;for(e=0;e<=143;)c[2*e+1]=8,e++,s[8]++;for(;e<=255;)c[2*e+1]=9,e++,s[9]++;for(;e<=279;)c[2*e+1]=7,e++,s[7]++;for(;e<=287;)c[2*e+1]=8,e++,s[8]++;for(k(c,287,s),e=0;e<30;e++)u[2*e+1]=5,u[2*e]=x(e,5);h=new v(c,i,257,286,15),m=new v(u,a,0,30,15),y=new v(new Array(0),l,0,19,7)}(),I=!0),e.l_desc=new g(e.dyn_ltree,h),e.d_desc=new g(e.dyn_dtree,m),e.bl_desc=new g(e.bl_tree,y),e.bi_buf=0,e.bi_valid=0,C(e)},t._tr_stored_block=N,t._tr_flush_block=function(e,t,r,n){var o,i,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),_(e,e.l_desc),_(e,e.d_desc),a=function(e){var t;for(R(e,e.dyn_ltree,e.l_desc.max_code),R(e,e.dyn_dtree,e.d_desc.max_code),_(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*s[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),o=e.opt_len+3+7>>>3,(i=e.static_len+3+7>>>3)<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==t?N(e,t,r,n):4===e.strategy||i===o?(A(e,2+(n?1:0),3),T(e,c,u)):(A(e,4+(n?1:0),3),function(e,t,r,n){var o;for(A(e,t-257,5),A(e,r-1,5),A(e,n-4,4),o=0;o<n;o++)A(e,e.bl_tree[2*s[o]+1],3);M(e,e.dyn_ltree,t-1),M(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),T(e,e.dyn_ltree,e.dyn_dtree)),C(e),n&&P(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(d[r]+256+1)]++,e.dyn_dtree[2*w(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){A(e,2,3),O(e,256,c),function(e){16===e.bi_valid?(S(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},99728:(e,t,r)=>{"use strict";var n=r(82001),o=r.n(n),i=r(40935);r.n(i)()(o()).push([e.id,"/* Placeholder file to ensure CSS imports are working */\n\n.MuiDataGrid {\n display: block;\n}\n","",{version:3,sources:["webpack://./../../node_modules/@mui/x-data-grid/esm/index.css"],names:[],mappings:"AAAA,uDAAuD;;AAEvD;EACE,cAAc;AAChB",sourcesContent:["/* Placeholder file to ensure CSS imports are working */\n\n.MuiDataGrid {\n display: block;\n}\n"],sourceRoot:""}])},99938:e=>{function t(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function r(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,n,o){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");"function"==typeof n&&(o=n,n={}),n=n||{},o=o||function(){},a.type=n.type||"text/javascript",a.charset=n.charset||"utf8",a.async=!("async"in n)||!!n.async,a.src=e,n.attrs&&function(e,t){for(var r in t)e.setAttribute(r,t[r])}(a,n.attrs),n.text&&(a.text=""+n.text),("onload"in a?t:r)(a,o),a.onload||t(a,o),i.appendChild(a)}},99972:(e,t,r)=>{"use strict";r.d(t,{A:()=>P});var n=r(72971),o=r(21587);function i(e=""){function t(...r){if(!r.length)return"";const n=r[0];return"string"!=typeof n||n.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${n}`:`, var(--${e?`${e}-`:""}${n}${t(...r.slice(1))})`}return(r,...n)=>`var(--${e?`${e}-`:""}${r}${t(...n)})`}var a=r(80009),l=r(12926);function s(e){const t={};return Object.entries(e).forEach(e=>{const[r,n]=e;"object"==typeof n&&(t[r]=`${n.fontStyle?`${n.fontStyle} `:""}${n.fontVariant?`${n.fontVariant} `:""}${n.fontWeight?`${n.fontWeight} `:""}${n.fontStretch?`${n.fontStretch} `:""}${n.fontSize||""}${n.lineHeight?`/${n.lineHeight} `:""}${n.fontFamily||""}`)}),t}const c=(e,t,r,n=[])=>{let o=e;t.forEach((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=r:o&&"object"==typeof o&&(o[e]=r):o&&"object"==typeof o&&(o[e]||(o[e]=n.includes(e)?[]:{}),o=o[e])})};function u(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},i={},a={};var l,s;return l=(e,t,l)=>{if(!("string"!=typeof t&&"number"!=typeof t||n&&n(e,t))){const n=`--${r?`${r}-`:""}${e.join("-")}`,s=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(o,{[n]:s}),c(i,e,`var(${n})`,l),c(a,e,`var(${n}, ${s})`,l)}},s=e=>"vars"===e[0],function e(t,r=[],n=[]){Object.entries(t).forEach(([t,o])=>{(!s||s&&!s([...r,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...r,t],Array.isArray(o)?[...n,t]:n):l([...r,t],o,n))})}(e),{css:o,vars:i,varsWithDefaults:a}}const f=function(e,t={}){const{getSelector:r=v,disableCssColorScheme:n,colorSchemeSelector:i}=t,{colorSchemes:a={},components:l,defaultColorScheme:s="light",...c}=e,{vars:f,css:d,varsWithDefaults:p}=u(c,t);let h=p;const m={},{[s]:y,...b}=a;if(Object.entries(b||{}).forEach(([e,r])=>{const{vars:n,css:i,varsWithDefaults:a}=u(r,t);h=(0,o.A)(h,a),m[e]={css:i,vars:n}}),y){const{css:e,vars:r,varsWithDefaults:n}=u(y,t);h=(0,o.A)(h,n),m[s]={css:e,vars:r}}function v(t,r){let n=i;if("class"===i&&(n=".%s"),"data"===i&&(n="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(n=`[${i}="%s"]`),t){if("media"===n){if(e.defaultColorScheme===t)return":root";const n=a[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${n})`]:{":root":r}}}if(n)return e.defaultColorScheme===t?`:root, ${n.replace("%s",String(t))}`:n.replace("%s",String(t))}return":root"}return{vars:h,generateThemeVars:()=>{let e={...f};return Object.entries(m).forEach(([,{vars:t}])=>{e=(0,o.A)(e,t)}),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function i(e,r){Object.keys(r).length&&t.push("string"==typeof e?{[e]:{...r}}:e)}i(r(void 0,{...d}),d);const{[o]:l,...s}=m;if(l){const{css:e}=l,t=a[o]?.palette?.mode,s=!n&&t?{colorScheme:t,...e}:{...e};i(r(o,{...s}),s)}return Object.entries(s).forEach(([e,{css:t}])=>{const o=a[e]?.palette?.mode,l=!n&&o?{colorScheme:o,...t}:{...t};i(r(e,{...l}),l)}),t}}};var d=r(481),p=r(65073),h=r(83589),m=r(1463),y=r(9273),b=r(52312),v=r(25238);const g=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return(0,v.A)(e.cssVarPrefix).forEach(e=>{o[e]=r[e],delete r[e]}),"media"===i?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:o}}:i?{[i.replace("%s",t)]:o,[`${n}, ${i.replace("%s",t)}`]:r}:{[n]:{...r,...o}}}if(i&&"media"!==i)return`${n}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(i)return i.replace("%s",String(t))}return n};var w=r(97355);function S(e,t,r){!e[t]&&r&&(e[t]=r)}function A(e){return"string"==typeof e&&e.startsWith("hsl")?(0,h.YL)(e):e}function O(e,t){`${t}Channel`in e||(e[`${t}Channel`]=(0,h.Me)(A(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\nTo suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}const x=e=>{try{return e()}catch(e){}},k=(e="mui")=>i(e);function C(e,t,r,n){if(!t)return;t=!0===t?{}:t;const o="dark"===n?"dark":"light";if(!r)return void(e[n]=(0,y.Ay)({...t,palette:{mode:o,...t?.palette}}));const{palette:i,...a}=(0,m.A)({...r,palette:{mode:o,...t?.palette}});return e[n]={...t,palette:i,opacity:{...(0,y.UL)(o),...t?.opacity},overlays:t?.overlays||(0,y.Qw)(o)},a}function P(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:i,disableCssColorScheme:c=!1,cssVarPrefix:u="mui",shouldSkipGeneratingVar:m=b.A,colorSchemeSelector:y=(r.light&&r.dark?"media":void 0),rootSelector:v=":root",...P}=e,E=Object.keys(r)[0],j=i||(r.light&&"light"!==E?"light":E),T=k(u),{[j]:_,light:R,dark:M,...I}=r,N={...I};let D=_;if(("dark"===j&&!("dark"in r)||"light"===j&&!("light"in r))&&(D=!0),!D)throw new Error((0,n.A)(21,j));const F=C(N,D,P,j);R&&!N.light&&C(N,R,void 0,"light"),M&&!N.dark&&C(N,M,void 0,"dark");let L={defaultColorScheme:j,...F,cssVarPrefix:u,colorSchemeSelector:y,rootSelector:v,getCssVar:T,colorSchemes:N,font:{...s(F.typography),...F.font},spacing:(z=P.spacing,"number"==typeof z?`${z}px`:"string"==typeof z||"function"==typeof z||Array.isArray(z)?z:"8px")};var z;Object.keys(L.colorSchemes).forEach(e=>{const t=L.colorSchemes[e].palette,r=e=>{const r=e.split("-"),n=r[1],o=r[2];return T(e,t[n][o])};var n;if("light"===t.mode&&(S(t.common,"background","#fff"),S(t.common,"onBackground","#000")),"dark"===t.mode&&(S(t.common,"background","#000"),S(t.common,"onBackground","#fff")),n=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach(e=>{n[e]||(n[e]={})}),"light"===t.mode){S(t.Alert,"errorColor",(0,h.Nd)(t.error.light,.6)),S(t.Alert,"infoColor",(0,h.Nd)(t.info.light,.6)),S(t.Alert,"successColor",(0,h.Nd)(t.success.light,.6)),S(t.Alert,"warningColor",(0,h.Nd)(t.warning.light,.6)),S(t.Alert,"errorFilledBg",r("palette-error-main")),S(t.Alert,"infoFilledBg",r("palette-info-main")),S(t.Alert,"successFilledBg",r("palette-success-main")),S(t.Alert,"warningFilledBg",r("palette-warning-main")),S(t.Alert,"errorFilledColor",x(()=>t.getContrastText(t.error.main))),S(t.Alert,"infoFilledColor",x(()=>t.getContrastText(t.info.main))),S(t.Alert,"successFilledColor",x(()=>t.getContrastText(t.success.main))),S(t.Alert,"warningFilledColor",x(()=>t.getContrastText(t.warning.main))),S(t.Alert,"errorStandardBg",(0,h.j4)(t.error.light,.9)),S(t.Alert,"infoStandardBg",(0,h.j4)(t.info.light,.9)),S(t.Alert,"successStandardBg",(0,h.j4)(t.success.light,.9)),S(t.Alert,"warningStandardBg",(0,h.j4)(t.warning.light,.9)),S(t.Alert,"errorIconColor",r("palette-error-main")),S(t.Alert,"infoIconColor",r("palette-info-main")),S(t.Alert,"successIconColor",r("palette-success-main")),S(t.Alert,"warningIconColor",r("palette-warning-main")),S(t.AppBar,"defaultBg",r("palette-grey-100")),S(t.Avatar,"defaultBg",r("palette-grey-400")),S(t.Button,"inheritContainedBg",r("palette-grey-300")),S(t.Button,"inheritContainedHoverBg",r("palette-grey-A100")),S(t.Chip,"defaultBorder",r("palette-grey-400")),S(t.Chip,"defaultAvatarColor",r("palette-grey-700")),S(t.Chip,"defaultIconColor",r("palette-grey-700")),S(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),S(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),S(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),S(t.LinearProgress,"primaryBg",(0,h.j4)(t.primary.main,.62)),S(t.LinearProgress,"secondaryBg",(0,h.j4)(t.secondary.main,.62)),S(t.LinearProgress,"errorBg",(0,h.j4)(t.error.main,.62)),S(t.LinearProgress,"infoBg",(0,h.j4)(t.info.main,.62)),S(t.LinearProgress,"successBg",(0,h.j4)(t.success.main,.62)),S(t.LinearProgress,"warningBg",(0,h.j4)(t.warning.main,.62)),S(t.Skeleton,"bg",`rgba(${r("palette-text-primaryChannel")} / 0.11)`),S(t.Slider,"primaryTrack",(0,h.j4)(t.primary.main,.62)),S(t.Slider,"secondaryTrack",(0,h.j4)(t.secondary.main,.62)),S(t.Slider,"errorTrack",(0,h.j4)(t.error.main,.62)),S(t.Slider,"infoTrack",(0,h.j4)(t.info.main,.62)),S(t.Slider,"successTrack",(0,h.j4)(t.success.main,.62)),S(t.Slider,"warningTrack",(0,h.j4)(t.warning.main,.62));const e=(0,h.Y9)(t.background.default,.8);S(t.SnackbarContent,"bg",e),S(t.SnackbarContent,"color",x(()=>t.getContrastText(e))),S(t.SpeedDialAction,"fabHoverBg",(0,h.Y9)(t.background.paper,.15)),S(t.StepConnector,"border",r("palette-grey-400")),S(t.StepContent,"border",r("palette-grey-400")),S(t.Switch,"defaultColor",r("palette-common-white")),S(t.Switch,"defaultDisabledColor",r("palette-grey-100")),S(t.Switch,"primaryDisabledColor",(0,h.j4)(t.primary.main,.62)),S(t.Switch,"secondaryDisabledColor",(0,h.j4)(t.secondary.main,.62)),S(t.Switch,"errorDisabledColor",(0,h.j4)(t.error.main,.62)),S(t.Switch,"infoDisabledColor",(0,h.j4)(t.info.main,.62)),S(t.Switch,"successDisabledColor",(0,h.j4)(t.success.main,.62)),S(t.Switch,"warningDisabledColor",(0,h.j4)(t.warning.main,.62)),S(t.TableCell,"border",(0,h.j4)((0,h.Cg)(t.divider,1),.88)),S(t.Tooltip,"bg",(0,h.Cg)(t.grey[700],.92))}if("dark"===t.mode){S(t.Alert,"errorColor",(0,h.j4)(t.error.light,.6)),S(t.Alert,"infoColor",(0,h.j4)(t.info.light,.6)),S(t.Alert,"successColor",(0,h.j4)(t.success.light,.6)),S(t.Alert,"warningColor",(0,h.j4)(t.warning.light,.6)),S(t.Alert,"errorFilledBg",r("palette-error-dark")),S(t.Alert,"infoFilledBg",r("palette-info-dark")),S(t.Alert,"successFilledBg",r("palette-success-dark")),S(t.Alert,"warningFilledBg",r("palette-warning-dark")),S(t.Alert,"errorFilledColor",x(()=>t.getContrastText(t.error.dark))),S(t.Alert,"infoFilledColor",x(()=>t.getContrastText(t.info.dark))),S(t.Alert,"successFilledColor",x(()=>t.getContrastText(t.success.dark))),S(t.Alert,"warningFilledColor",x(()=>t.getContrastText(t.warning.dark))),S(t.Alert,"errorStandardBg",(0,h.Nd)(t.error.light,.9)),S(t.Alert,"infoStandardBg",(0,h.Nd)(t.info.light,.9)),S(t.Alert,"successStandardBg",(0,h.Nd)(t.success.light,.9)),S(t.Alert,"warningStandardBg",(0,h.Nd)(t.warning.light,.9)),S(t.Alert,"errorIconColor",r("palette-error-main")),S(t.Alert,"infoIconColor",r("palette-info-main")),S(t.Alert,"successIconColor",r("palette-success-main")),S(t.Alert,"warningIconColor",r("palette-warning-main")),S(t.AppBar,"defaultBg",r("palette-grey-900")),S(t.AppBar,"darkBg",r("palette-background-paper")),S(t.AppBar,"darkColor",r("palette-text-primary")),S(t.Avatar,"defaultBg",r("palette-grey-600")),S(t.Button,"inheritContainedBg",r("palette-grey-800")),S(t.Button,"inheritContainedHoverBg",r("palette-grey-700")),S(t.Chip,"defaultBorder",r("palette-grey-700")),S(t.Chip,"defaultAvatarColor",r("palette-grey-300")),S(t.Chip,"defaultIconColor",r("palette-grey-300")),S(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),S(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),S(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),S(t.LinearProgress,"primaryBg",(0,h.Nd)(t.primary.main,.5)),S(t.LinearProgress,"secondaryBg",(0,h.Nd)(t.secondary.main,.5)),S(t.LinearProgress,"errorBg",(0,h.Nd)(t.error.main,.5)),S(t.LinearProgress,"infoBg",(0,h.Nd)(t.info.main,.5)),S(t.LinearProgress,"successBg",(0,h.Nd)(t.success.main,.5)),S(t.LinearProgress,"warningBg",(0,h.Nd)(t.warning.main,.5)),S(t.Skeleton,"bg",`rgba(${r("palette-text-primaryChannel")} / 0.13)`),S(t.Slider,"primaryTrack",(0,h.Nd)(t.primary.main,.5)),S(t.Slider,"secondaryTrack",(0,h.Nd)(t.secondary.main,.5)),S(t.Slider,"errorTrack",(0,h.Nd)(t.error.main,.5)),S(t.Slider,"infoTrack",(0,h.Nd)(t.info.main,.5)),S(t.Slider,"successTrack",(0,h.Nd)(t.success.main,.5)),S(t.Slider,"warningTrack",(0,h.Nd)(t.warning.main,.5));const e=(0,h.Y9)(t.background.default,.98);S(t.SnackbarContent,"bg",e),S(t.SnackbarContent,"color",x(()=>t.getContrastText(e))),S(t.SpeedDialAction,"fabHoverBg",(0,h.Y9)(t.background.paper,.15)),S(t.StepConnector,"border",r("palette-grey-600")),S(t.StepContent,"border",r("palette-grey-600")),S(t.Switch,"defaultColor",r("palette-grey-300")),S(t.Switch,"defaultDisabledColor",r("palette-grey-600")),S(t.Switch,"primaryDisabledColor",(0,h.Nd)(t.primary.main,.55)),S(t.Switch,"secondaryDisabledColor",(0,h.Nd)(t.secondary.main,.55)),S(t.Switch,"errorDisabledColor",(0,h.Nd)(t.error.main,.55)),S(t.Switch,"infoDisabledColor",(0,h.Nd)(t.info.main,.55)),S(t.Switch,"successDisabledColor",(0,h.Nd)(t.success.main,.55)),S(t.Switch,"warningDisabledColor",(0,h.Nd)(t.warning.main,.55)),S(t.TableCell,"border",(0,h.Nd)((0,h.Cg)(t.divider,1),.68)),S(t.Tooltip,"bg",(0,h.Cg)(t.grey[700],.92))}O(t.background,"default"),O(t.background,"paper"),O(t.common,"background"),O(t.common,"onBackground"),O(t,"divider"),Object.keys(t).forEach(e=>{const r=t[e];"tonalOffset"!==e&&r&&"object"==typeof r&&(r.main&&S(t[e],"mainChannel",(0,h.Me)(A(r.main))),r.light&&S(t[e],"lightChannel",(0,h.Me)(A(r.light))),r.dark&&S(t[e],"darkChannel",(0,h.Me)(A(r.dark))),r.contrastText&&S(t[e],"contrastTextChannel",(0,h.Me)(A(r.contrastText))),"text"===e&&(O(t[e],"primary"),O(t[e],"secondary")),"action"===e&&(r.active&&O(t[e],"active"),r.selected&&O(t[e],"selected")))})}),L=t.reduce((e,t)=>(0,o.A)(e,t),L);const B={prefix:u,disableCssColorScheme:c,shouldSkipGeneratingVar:m,getSelector:g(L)},{vars:$,generateThemeVars:G,generateStyleSheets:H}=f(L,B);return L.vars=$,Object.entries(L.colorSchemes[L.defaultColorScheme]).forEach(([e,t])=>{L[e]=t}),L.generateThemeVars=G,L.generateStyleSheets=H,L.generateSpacing=function(){return(0,a.A)(P.spacing,(0,l.LX)(this))},L.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(y),L.spacing=L.generateSpacing(),L.shouldSkipGeneratingVar=m,L.unstable_sxConfig={...d.A,...P?.unstable_sxConfig},L.unstable_sx=function(e){return(0,p.A)({sx:e,theme:this})},L.toRuntimeSource=w.F,L}},99987:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(14041),o=r(54357),i=r(31593),a=r(96674),l=r(40979),s=r(39455),c=r(58315),u=r(85383),f=r(31085);const d=(0,a.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),p=n.forwardRef(function(e,t){const r=(0,l.b)({props:e,name:"MuiBackdrop"}),{children:n,className:a,component:p="div",invisible:h=!1,open:m,components:y={},componentsProps:b={},slotProps:v={},slots:g={},TransitionComponent:w,transitionDuration:S,...A}=r,O={...r,component:p,invisible:h},x=(e=>{const{classes:t,invisible:r}=e,n={root:["root",r&&"invisible"]};return(0,i.A)(n,u.R,t)})(O),k={component:p,slots:{transition:w,root:y.Root,...g},slotProps:{...b,...v}},[C,P]=(0,s.A)("root",{elementType:d,externalForwardedProps:k,className:(0,o.A)(x.root,a),ownerState:O}),[E,j]=(0,s.A)("transition",{elementType:c.A,externalForwardedProps:k,ownerState:O});return(0,f.jsx)(E,{in:m,timeout:S,...A,...j,children:(0,f.jsx)(C,{"aria-hidden":!0,...P,classes:x,ref:t,children:n})})})}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={id:e,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var l=2&n&&r;("object"==typeof l||"function"==typeof l)&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach(e=>a[e]=()=>r[e]);return a.default=()=>r,o.d(i,a),i},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var i={};return(()=>{"use strict";o.r(i),o.d(i,{JBrowseCircularGenomeView:()=>ie,React:()=>l,createModel:()=>LA,createRoot:()=>Jn.createRoot,createViewState:()=>BA,hydrateRoot:()=>Jn.hydrateRoot,loadPlugins:()=>cO,version:()=>Jn.version});var e={};o.r(e),o.d(e,{CoreFreeResources:()=>fr,CoreGetFeatureDensityStats:()=>Pr,CoreGetFeatureDetails:()=>Qe,CoreGetFeatures:()=>Lt,CoreGetFileInfo:()=>gt,CoreGetMetadata:()=>ct,CoreGetRefNames:()=>Be,CoreRender:()=>Zt});var t={};o.r(t),o.d(t,{CssVarsProvider:()=>vn.Zr,Experimental_CssVarsProvider:()=>vn.Gk,StyledEngineProvider:()=>hn,THEME_ID:()=>Vr.A,ThemeProvider:()=>re.A,adaptV4Theme:()=>qr,alpha:()=>z.X4,createColorScheme:()=>rn.Ay,createStyles:()=>Zr,createTheme:()=>Gr.A,createTransitions:()=>tn.Ay,css:()=>Xr.AH,darken:()=>z.e$,decomposeColor:()=>z.rP,duration:()=>tn.p0,easing:()=>tn.cz,emphasize:()=>z.tL,experimental_extendTheme:()=>Sn,experimental_sx:()=>Pn,extendTheme:()=>gn.A,getContrastRatio:()=>z.eM,getInitColorSchemeScript:()=>vn.Gs,getLuminance:()=>z.J1,getOverlayAlpha:()=>An.A,hexToRgb:()=>z.E2,hslToRgb:()=>z.YL,keyframes:()=>Xr.i7,lighten:()=>z.a,makeStyles:()=>mn,private_createMixins:()=>kn.A,private_createTypography:()=>xn.A,private_excludeVariablesFromRoot:()=>Cn.A,recomposeColor:()=>z.X0,responsiveFontSizes:()=>en,rgbToHex:()=>z.Ob,shouldSkipGeneratingVar:()=>On.A,styled:()=>p.Ay,unstable_createBreakpoints:()=>Ur.A,unstable_createMuiStrictModeTheme:()=>Yr,unstable_getUnit:()=>Qr.l_,unstable_toUnitless:()=>Qr.db,useColorScheme:()=>vn.Ut,useTheme:()=>F.A,useThemeProps:()=>an,withStyles:()=>yn,withTheme:()=>bn});var r={};o.r(r),o.d(r,{capitalize:()=>y.A,createChainedFunction:()=>jn.A,createSvgIcon:()=>Tn.A,debounce:()=>_n.A,deprecatedPropType:()=>Rn,isMuiElement:()=>Mn.A,mergeSlotProps:()=>Vn.A,ownerDocument:()=>In.A,ownerWindow:()=>Nn.A,requirePropFactory:()=>Dn,setRef:()=>Fn,unstable_ClassNameGenerator:()=>Wn,unstable_memoTheme:()=>h.A,unstable_useEnhancedEffect:()=>Ln.A,unstable_useId:()=>zn.A,unsupportedProp:()=>Bn,useControlled:()=>$n.A,useEventCallback:()=>Gn.A,useForkRef:()=>Hn.A});var n={};o.r(n),o.d(n,{GranularRectLayout:()=>Ao.A,MultiLayout:()=>Oo.A,PrecomputedLayout:()=>xo.A,PrecomputedMultiLayout:()=>Do,SceneGraph:()=>$o});var a=o(14041),l=o.t(a,2),s=o(46658),c=o(9810),u=o(81296),f=o(54357),d=o(31593),p=o(96674),h=o(42014),m=o(40979),y=o(38216),b=o(22162),v=o(65585),g=o(42395),w=o(3807);function S(e){return(0,w.Ay)("MuiAppBar",e)}(0,g.A)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);var A=o(31085),O=o.t(A,2);const x=(e,t)=>e?`${e?.replace(")","")}, ${t})`:t,k=(0,p.Ay)(v.A,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${(0,y.A)(r.position)}`],t[`color${(0,y.A)(r.color)}`]]}})((0,h.A)(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter((0,b.A)(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:e=>!0===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>!1===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?x(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?x(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),C=a.forwardRef(function(e,t){const r=(0,m.b)({props:e,name:"MuiAppBar"}),{className:n,color:o="primary",enableColorOnDark:i=!1,position:a="fixed",...l}=r,s={...r,color:o,position:a,enableColorOnDark:i},c=(e=>{const{color:t,position:r,classes:n}=e,o={root:["root",`color${(0,y.A)(t)}`,`position${(0,y.A)(r)}`]};return(0,d.A)(o,S,n)})(s);return(0,A.jsx)(k,{square:!0,component:"header",ownerState:s,elevation:4,className:(0,f.A)(c.root,n,"fixed"===a&&"mui-fixed"),ref:t,...l})}),P=C;var E=o(32757),j=o(88581),T=o(22980),_=o(77099),R=o(28730),M=o(14041),I=(0,R.n9)()({paper:{overflow:"auto"}}),N=(0,T.observer)(function(e){var t=e.session,r=I().classes,n=t.visibleWidget,o=(0,_.getEnv)(t).pluginManager;if(!n)return null;var i=o.getWidgetType(n.type),l=i.ReactComponent,s=i.HeadingComponent,u=i.heading,f=o.evaluateExtensionPoint("Core-replaceWidget",l,{session:t,model:n});return M.createElement(c.Dialog,{open:!0,onClose:function(){t.hideAllWidgets()},maxWidth:"xl",header:M.createElement(P,{position:"static"},M.createElement(E.A,null,s?M.createElement(s,{model:n}):M.createElement(j.A,{variant:"h6"},u)))},M.createElement(a.Suspense,{fallback:M.createElement("div",null,"Loading...")},M.createElement(v.A,{className:r.paper},M.createElement(f,{model:n,session:t,overrideDimensions:{height:5*window.innerHeight/8,width:800}}))))});const D=N;var F=o(90389),L=o(1557),z=o(83589),B=o(43557),$=o(44775),G=o(83636),H=o(14041);function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},V.apply(null,arguments)}var W=(0,T.observer)(function(e){var t=e.model,r=e.IconButtonProps,n=e.IconProps,o=(0,$.T6)({variant:"popover"});return H.createElement(H.Fragment,null,H.createElement(B.A,V({},r,(0,$.cO)(o),{"data-testid":"view_menu_icon"}),H.createElement(G.A,n)),H.createElement(c.CascadingMenu,V({},(0,$.dB)(o),{onMenuItemClick:function(e,t){t()},menuItems:t.menuItems(),popupState:o})))});const U=W;var q=o(14041);function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var K=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,2452))}),Y=(0,R.n9)()(function(e){return{icon:{color:e.palette.secondary.contrastText},displayName:{marginTop:2,color:e.palette.secondary.contrastText},grow:{flexGrow:1},container:{display:"flex"},iconRoot:{"&:hover":{backgroundColor:(0,z.X4)(e.palette.secondary.contrastText,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}}}});const J=(0,T.observer)(function(e){var t,r,n=e.view,o=Y().classes,i=n.displayName,l=(t=(0,a.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return X(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=l[0],f=l[1],d=(0,u.getSession)(n);return q.createElement("div",{className:o.container},q.createElement(U,{model:n,IconButtonProps:{classes:{root:o.iconRoot},edge:"start"},IconProps:{className:o.icon}}),q.createElement("div",{className:o.grow}),i?q.createElement(j.A,{variant:"body2",className:o.displayName},i):null,q.createElement("div",{className:o.grow}),q.createElement(B.A,{onClick:function(){f(!0)}},q.createElement("div",{style:{width:22,height:22}},q.createElement(c.Logomark,{variant:"white"}))),s?q.createElement(a.Suspense,{fallback:null},q.createElement(K,{open:!0,onClose:function(){f(!1)},version:d.version})):null)});var Z=o(14041),Q=(0,R.n9)()(function(e){return{avoidParentStyle:{all:"initial"},viewContainer:{overflow:"hidden",background:e.palette.secondary.main,margin:e.spacing(.5),padding:"0 ".concat(e.spacing(1)," ").concat(e.spacing(1))}}}),ee=(0,T.observer)(function(e){var t=e.view,r=e.children,n=Q().classes,o=(0,u.getSession)(t),i=(0,F.A)(),l=(0,u.useWidthSetter)(t,i.spacing(1));return Z.createElement(v.A,{elevation:12,ref:l,className:n.viewContainer},o.DialogComponent?Z.createElement(a.Suspense,{fallback:null},Z.createElement(o.DialogComponent,o.DialogProps)):null,Z.createElement(J,{view:t}),Z.createElement(v.A,null,r))});const te=(0,T.observer)(function(e){var t=e.view,r=e.children,n=Q().classes;return Z.createElement("div",{className:n.avoidParentStyle},Z.createElement(L.A,null,Z.createElement(ee,{view:t},r)))});var re=o(70836),ne=o(14041),oe=(0,T.observer)(function(e){var t=e.viewState,r=t.session,n=r.view,o=(0,u.getEnv)(r).pluginManager.getViewType(n.type);if(!o)throw new Error("unknown view type ".concat(n.type));var i=o.ReactComponent,l=(0,c.createJBrowseTheme)((0,s.readConfObject)(t.config.configuration,"theme"));return ne.createElement(re.A,{theme:l},ne.createElement(te,{key:"view-".concat(n.id),view:n},ne.createElement(a.Suspense,{fallback:ne.createElement("div",null,"Loading...")},ne.createElement(i,{model:n,session:r}))),ne.createElement(D,{session:r}))});const ie=oe;var ae=(0,s.ConfigurationSchema)("BaseFeatureWidget",{}),le=o(83794);function se(e,t){(0,u.localStorageSetItem)(e,JSON.stringify(t))}var ce="sequenceFeatureDetails";var ue=o(32168),fe=o(21735),de=["featureData","finalizedFeatureData"],pe=["unformattedFeatureData","featureData"];function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function me(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function ye(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(r),!0).forEach(function(t){ve(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ve(e,t,r){return(t=function(e){var t=function(e){if("object"!=he(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=he(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==he(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ge(e){return _.types.model("BaseFeatureWidget",{id:fe.ElementId,type:_.types.literal("BaseFeatureWidget"),featureData:_.types.frozen(),formattedFields:_.types.frozen(),unformattedFeatureData:_.types.frozen(),view:_.types.safeReference(e.pluggableMstType("view","stateModel")),track:_.types.safeReference(e.pluggableMstType("track","stateModel")),trackId:_.types.maybe(_.types.string),trackType:_.types.maybe(_.types.string),maxDepth:_.types.maybe(_.types.number),sequenceFeatureDetails:_.types.optional(_.types.model("SequenceFeatureDetails").volatile(function(){return{showCoordinatesSetting:(0,u.localStorageGetItem)("".concat(ce,"-showCoordinatesSetting"))||"none",intronBp:(0,u.localStorageGetNumber)("".concat(ce,"-intronBp"),10),upDownBp:(0,u.localStorageGetNumber)("".concat(ce,"-upDownBp"),100),upperCaseCDS:(0,u.localStorageGetBoolean)("".concat(ce,"-upperCaseCDS"),!0),charactersPerRow:100,feature:void 0,mode:""}}).actions(function(e){return{setFeature:function(t){e.feature=t},setUpDownBp:function(t){e.upDownBp=t},setIntronBp:function(t){e.intronBp=t},setUpperCaseCDS:function(t){e.upperCaseCDS=t},setShowCoordinates:function(t){e.showCoordinatesSetting=t},setMode:function(t){e.mode=t}}}).views(function(e){return{get showCoordinates(){return"none"!==e.showCoordinatesSetting},get showGenomicCoordsOption(){return"gene"===e.mode||"gene_updownstream"===e.mode||"genomic"===e.mode||"genomic_sequence_updownstream"===e.mode},get hasCDS(){var t;return null===(t=e.feature)||void 0===t||null===(t=t.subfeatures)||void 0===t?void 0:t.some(function(e){return"CDS"===e.type})},get hasExon(){var t;return null===(t=e.feature)||void 0===t||null===(t=t.subfeatures)||void 0===t?void 0:t.some(function(e){return"exon"===e.type})},get hasExonOrCDS(){return this.hasExon||this.hasCDS}}}).actions(function(e){return{afterAttach:function(){(0,_.addDisposer)(e,(0,le.autorun)(function(){var t,r;se("".concat(ce,"-upDownBp"),e.upDownBp),se("".concat(ce,"-intronBp"),e.intronBp),t="".concat(ce,"-upperCaseCDS"),r=e.upperCaseCDS,(0,u.localStorageSetItem)(t,JSON.stringify(r)),(0,u.localStorageSetItem)("".concat(ce,"-showCoordinatesSetting"),e.showCoordinatesSetting)})),(0,_.addDisposer)(e,(0,le.autorun)(function(){e.setMode(e.hasCDS?"cds":e.hasExon?"cdna":"genomic")}))}}}),{}),descriptions:_.types.frozen()}).volatile(function(){return{error:void 0}}).actions(function(e){return{setFeatureData:function(t){e.unformattedFeatureData=t},clearFeatureData:function(){e.featureData=void 0},setFormattedData:function(t){e.featureData=t},setExtra:function(t,r,n){e.trackId=r,e.trackType=t,e.maxDepth=n},setError:function(t){e.error=t}}}).actions(function(e){return{afterCreate:function(){(0,_.addDisposer)(e,(0,le.autorun)(function(){try{var t=e.unformattedFeatureData,r=e.track,n=(0,u.getSession)(e);if(r&&e.setExtra(r.type,r.configuration.trackId,(0,s.getConf)(r,["formatDetails","maxDepth"])),t){var o=structuredClone(t),i=function(e,t){return be(be({},(0,s.getConf)(n,["formatDetails",e],{feature:t})),(0,s.getConf)(r,["formatDetails",e],{feature:t}))};r&&(o.__jbrowsefmt=i("feature",o),(0,ue.fq)(o,(0,s.getConf)(r,["formatDetails","depth"]),function(e){e.__jbrowsefmt=i("subfeatures",e)})),e.setFormattedData(o)}}catch(t){console.error(t),e.setError(t)}}))}}}).preProcessSnapshot(function(e){return be({unformattedFeatureData:e.featureData,featureData:e.finalizedFeatureData},me(e,de))}).postProcessSnapshot(function(e){var t=e,r=(t.unformattedFeatureData,t.featureData),n=me(t,pe),o=JSON.stringify(r,function(e,t){return void 0===t?null:t});return be({finalizedFeatureData:!o||o.length>2e6?void 0:JSON.parse(o)},n)})}var we=o(22261);function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Oe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach(function(t){xe(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function xe(e,t,r){return(t=function(e){var t=function(e){if("object"!=Se(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Se(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Se(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ke=(0,s.ConfigurationSchema)("CytobandAdapter",{cytobandLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/cytoband.txt.gz"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?Oe(Oe({},e),{},{cytobandLocation:{uri:e.uri,baseUri:e.baseUri}}):e}});var Ce=o(58185),Pe=o(38647),Ee=o(60654),je=o(57859),Te=o(85132);function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function Re(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Me(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Me(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Me(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Me(f,"constructor",c),Me(c,"constructor",s),s.displayName="GeneratorFunction",Me(c,o,"GeneratorFunction"),Me(f),Me(f,o,"Generator"),Me(f,n,function(){return this}),Me(f,"toString",function(){return"[object Generator]"}),(Re=function(){return{w:i,m:d}})()}function Me(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Me=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Me(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Me(e,t,r,n)}function Ie(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ne(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ze(n.key),n)}}function De(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(De=function(){return!!e})()}function Fe(e){return Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fe(e)}function Le(e,t){return Le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Le(e,t)}function ze(e){var t=function(e){if("object"!=_e(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=_e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_e(t)?t:t+""}var Be=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=ze(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=Fe(n),e=function(e,t){if(t&&("object"==_e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,De()?Reflect.construct(n,o||[],Fe(r).constructor):n.apply(r,o))),"name","CoreGetRefNames"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Le(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=Re().m(function e(t,r){var n,o,i,a,l,s;return Re().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.sessionId,a=o.adapterConfig,e.n=2,(0,je.cK)(n,i,a);case 2:if(l=e.v,s=l.dataAdapter,!(0,Ee.isFeatureAdapter)(s)){e.n=3;break}return e.a(2,s.getRefNames(o));case 3:return e.a(2,[])}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){Ie(i,r,n,a,l,"next",e)}function l(e){Ie(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&Ne(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A);function $e(e){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(e)}function Ge(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return He(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(He(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,He(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,He(f,"constructor",c),He(c,"constructor",s),s.displayName="GeneratorFunction",He(c,o,"GeneratorFunction"),He(f),He(f,o,"Generator"),He(f,n,function(){return this}),He(f,"toString",function(){return"[object Generator]"}),(Ge=function(){return{w:i,m:d}})()}function He(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}He=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){He(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},He(e,t,r,n)}function Ve(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function We(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Ve(i,n,o,a,l,"next",e)}function l(e){Ve(i,n,o,a,l,"throw",e)}a(void 0)})}}function Ue(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ze(n.key),n)}}function qe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qe=function(){return!!e})()}function Xe(e,t,r,n){var o=Ke(Ye(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Ke(){return Ke="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ye(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Ke.apply(null,arguments)}function Ye(e){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ye(e)}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}function Ze(e){var t=function(e){if("object"!=$e(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=$e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$e(t)?t:t+""}var Qe=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Ze(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=Ye(n),e=function(e,t){if(t&&("object"==$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,qe()?Reflect.construct(n,o||[],Ye(r).constructor):n.apply(r,o))),"name","CoreGetFeatureDetails"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Je(e,t)}(t,e),r=t,n=[{key:"serializeArguments",value:(i=We(Ge().m(function e(r,n){var o,i,a,l,s,c;return Ge().w(function(e){for(;;)switch(e.n){case 0:return o=this.pluginManager.rootModel,i=o.session.assemblyManager,e.n=1,(0,u.renameRegionsIfNeeded)(i,r);case 1:return a=e.v,e.n=2,Xe(t,"serializeArguments",this,3)([a,n]);case 2:if(l=e.v,"MainThreadRpcDriver"!==n){e.n=3;break}return e.a(2,l);case 3:return s=r.rendererType,c=this.pluginManager.getRendererType(s),e.a(2,c.serializeArgsInClient(l))}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"execute",value:(o=We(Ge().m(function e(t,r){var n,o,i,a,l,s;return Ge().w(function(e){for(;;)switch(e.n){case 0:if(o=t,"MainThreadRpcDriver"===r){e.n=2;break}return e.n=1,this.deserializeArguments(t,r);case 1:o=e.v;case 2:return a=(i=o).rendererType,l=i.featureId,s=this.pluginManager.getRendererType(a),e.a(2,{feature:null===(n=s.getLayoutSession(t))||void 0===n||null===(n=n.cachedLayout.layout.getDataByID(l))||void 0===n?void 0:n.toJSON()})}},e,this)})),function(e,t){return o.apply(this,arguments)})}],n&&Ue(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A);function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}function tt(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return rt(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(rt(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,rt(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,rt(f,"constructor",c),rt(c,"constructor",s),s.displayName="GeneratorFunction",rt(c,o,"GeneratorFunction"),rt(f),rt(f,o,"Generator"),rt(f,n,function(){return this}),rt(f,"toString",function(){return"[object Generator]"}),(tt=function(){return{w:i,m:d}})()}function rt(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}rt=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){rt(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},rt(e,t,r,n)}function nt(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ot(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,st(n.key),n)}}function it(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(it=function(){return!!e})()}function at(e){return at=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},at(e)}function lt(e,t){return lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lt(e,t)}function st(e){var t=function(e){if("object"!=et(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=et(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==et(t)?t:t+""}var ct=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=st(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=at(n),e=function(e,t){if(t&&("object"==et(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,it()?Reflect.construct(n,o||[],at(r).constructor):n.apply(r,o))),"name","CoreGetMetadata"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lt(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=tt().m(function e(t,r){var n,o,i,a,l,s;return tt().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.sessionId,a=o.adapterConfig,e.n=2,(0,je.cK)(n,i,a);case 2:return l=e.v,s=l.dataAdapter,e.a(2,(0,Ee.isFeatureAdapter)(s)?s.getMetadata(o):null)}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){nt(i,r,n,a,l,"next",e)}function l(e){nt(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&ot(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A);function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}function ft(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return dt(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(dt(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,dt(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,dt(f,"constructor",c),dt(c,"constructor",s),s.displayName="GeneratorFunction",dt(c,o,"GeneratorFunction"),dt(f),dt(f,o,"Generator"),dt(f,n,function(){return this}),dt(f,"toString",function(){return"[object Generator]"}),(ft=function(){return{w:i,m:d}})()}function dt(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}dt=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){dt(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},dt(e,t,r,n)}function pt(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ht(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vt(n.key),n)}}function mt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mt=function(){return!!e})()}function yt(e){return yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yt(e)}function bt(e,t){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bt(e,t)}function vt(e){var t=function(e){if("object"!=ut(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ut(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ut(t)?t:t+""}var gt=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=vt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=yt(n),e=function(e,t){if(t&&("object"==ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,mt()?Reflect.construct(n,o||[],yt(r).constructor):n.apply(r,o))),"name","CoreGetInfo"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bt(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=ft().m(function e(t,r){var n,o,i,a,l,s;return ft().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.sessionId,a=o.adapterConfig,e.n=2,(0,je.cK)(n,i,a);case 2:return l=e.v,s=l.dataAdapter,e.a(2,(0,Ee.isFeatureAdapter)(s)?s.getHeader(o):null)}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){pt(i,r,n,a,l,"next",e)}function l(e){pt(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&ht(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A),wt=o(81912),St=o(2033),At=o(865);function Ot(e){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ot(e)}function xt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(r),!0).forEach(function(t){Dt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ct(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Pt(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Pt(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Pt(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Pt(f,"constructor",c),Pt(c,"constructor",s),s.displayName="GeneratorFunction",Pt(c,o,"GeneratorFunction"),Pt(f),Pt(f,o,"Generator"),Pt(f,n,function(){return this}),Pt(f,"toString",function(){return"[object Generator]"}),(Ct=function(){return{w:i,m:d}})()}function Pt(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Pt=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Pt(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Pt(e,t,r,n)}function Et(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function jt(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Et(i,n,o,a,l,"next",e)}function l(e){Et(i,n,o,a,l,"throw",e)}a(void 0)})}}function Tt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ft(n.key),n)}}function _t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_t=function(){return!!e})()}function Rt(e,t,r,n){var o=Mt(It(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Mt(){return Mt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=It(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Mt.apply(null,arguments)}function It(e){return It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},It(e)}function Nt(e,t){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nt(e,t)}function Dt(e,t,r){return(t=Ft(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ft(e){var t=function(e){if("object"!=Ot(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ot(t)?t:t+""}var Lt=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return Dt((r=this,n=t,o=[].concat(a),n=It(n),e=function(e,t){if(t&&("object"==Ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,_t()?Reflect.construct(n,o||[],It(r).constructor):n.apply(r,o))),"name","CoreGetFeatures"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nt(e,t)}(t,e),r=t,n=[{key:"deserializeReturn",value:(a=jt(Ct().m(function e(r,n,o){var i;return Ct().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Rt(t,"deserializeReturn",this,3)([r,n,o]);case 1:return i=e.v,e.a(2,i.map(function(e){return new At.A(e)}))}},e,this)})),function(e,t,r){return a.apply(this,arguments)})},{key:"serializeArguments",value:(i=jt(Ct().m(function e(r,n){var o,i,a;return Ct().w(function(e){for(;;)switch(e.n){case 0:return o=this.pluginManager.rootModel,i=o.session.assemblyManager,e.n=1,(0,u.renameRegionsIfNeeded)(i,r);case 1:return a=e.v,e.a(2,Rt(t,"serializeArguments",this,3)([a,n]))}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"execute",value:(o=jt(Ct().m(function e(t,r){var n,o,i,a,l,s,c,u,f;return Ct().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.deserializeArguments(t,r);case 1:return n=e.v,o=n.stopToken,i=n.statusCallback,a=n.sessionId,l=n.adapterConfig,s=n.regions,c=n.opts,e.n=2,(0,je.cK)(this.pluginManager,a,l);case 2:return u=e.v.dataAdapter,e.n=3,(0,wt._)(u.getFeaturesInMultipleRegions(s,kt(kt({},c),{},{statusCallback:i,stopToken:o})).pipe((0,St.$)()));case 3:return f=e.v,e.a(2,f.map(function(e){return e.toJSON()}))}},e,this)})),function(e,t){return o.apply(this,arguments)})}],n&&Tt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i,a}(Te.A);function zt(e,t){if(!t.ReactComponent)throw new Error("renderer ".concat(e," has no ReactComponent, it may not be completely implemented yet"));return t}function Bt(e){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bt(e)}function $t(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Gt(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Gt(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Gt(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Gt(f,"constructor",c),Gt(c,"constructor",s),s.displayName="GeneratorFunction",Gt(c,o,"GeneratorFunction"),Gt(f),Gt(f,o,"Generator"),Gt(f,n,function(){return this}),Gt(f,"toString",function(){return"[object Generator]"}),($t=function(){return{w:i,m:d}})()}function Gt(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Gt=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Gt(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Gt(e,t,r,n)}function Ht(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Vt(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Ht(i,n,o,a,l,"next",e)}function l(e){Ht(i,n,o,a,l,"throw",e)}a(void 0)})}}function Wt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jt(n.key),n)}}function Ut(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ut=function(){return!!e})()}function qt(e,t,r,n){var o=Xt(Kt(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Xt(){return Xt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Kt(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Xt.apply(null,arguments)}function Kt(e){return Kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kt(e)}function Yt(e,t){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yt(e,t)}function Jt(e){var t=function(e){if("object"!=Bt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Bt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Bt(t)?t:t+""}var Zt=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Jt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=Kt(n),e=function(e,t){if(t&&("object"==Bt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Ut()?Reflect.construct(n,o||[],Kt(r).constructor):n.apply(r,o))),"name","CoreRender"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yt(e,t)}(t,e),r=t,n=[{key:"serializeArguments",value:(a=Vt($t().m(function e(r,n){var o,i,a,l;return $t().w(function(e){for(;;)switch(e.n){case 0:return o=this.pluginManager.rootModel,i=o.session.assemblyManager,e.n=1,(0,u.renameRegionsIfNeeded)(i,r);case 1:return a=e.v,e.n=2,qt(t,"serializeArguments",this,3)([a,n]);case 2:if(l=e.v,"MainThreadRpcDriver"!==n){e.n=3;break}return e.a(2,l);case 3:return e.a(2,zt(r.rendererType,this.pluginManager.getRendererType(r.rendererType)).serializeArgsInClient(l))}},e,this)})),function(e,t){return a.apply(this,arguments)})},{key:"execute",value:(i=Vt($t().m(function e(t,r){var n,o,i,a,l,s;return $t().w(function(e){for(;;)switch(e.n){case 0:if(n=t,"MainThreadRpcDriver"===r){e.n=2;break}return e.n=1,this.deserializeArguments(t,r);case 1:n=e.v;case 2:if(i=(o=n).sessionId,a=o.rendererType,i){e.n=3;break}throw new Error("must pass a unique session id");case 3:if(l=zt(a,this.pluginManager.getRendererType(a)),"MainThreadRpcDriver"!==r){e.n=5;break}return e.n=4,l.render(n);case 4:s=e.v,e.n=7;break;case 5:return e.n=6,l.renderInWorker(n);case 6:s=e.v;case 7:return e.a(2,s)}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"deserializeReturn",value:(o=Vt($t().m(function e(r,n,o){var i;return $t().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,qt(t,"deserializeReturn",this,3)([r,n,o]);case 1:if(i=e.v,"MainThreadRpcDriver"!==o){e.n=2;break}return e.a(2,i);case 2:return e.a(2,zt(n.rendererType,this.pluginManager.getRendererType(n.rendererType)).deserializeResultsInClient(i,n))}},e,this)})),function(e,t,r){return o.apply(this,arguments)})}],n&&Wt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i,a}(Te.A);function Qt(e){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(e)}function er(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return tr(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(tr(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,tr(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,tr(f,"constructor",c),tr(c,"constructor",s),s.displayName="GeneratorFunction",tr(c,o,"GeneratorFunction"),tr(f),tr(f,o,"Generator"),tr(f,n,function(){return this}),tr(f,"toString",function(){return"[object Generator]"}),(er=function(){return{w:i,m:d}})()}function tr(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}tr=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){tr(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},tr(e,t,r,n)}function rr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return nr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function or(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ir(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){or(i,n,o,a,l,"next",e)}function l(e){or(i,n,o,a,l,"throw",e)}a(void 0)})}}function ar(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ur(n.key),n)}}function lr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lr=function(){return!!e})()}function sr(e){return sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sr(e)}function cr(e,t){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cr(e,t)}function ur(e){var t=function(e){if("object"!=Qt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qt(t)?t:t+""}var fr=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=ur(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=sr(n),e=function(e,t){if(t&&("object"==Qt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,lr()?Reflect.construct(n,o||[],sr(r).constructor):n.apply(r,o))),"name","CoreFreeResources"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cr(e,t)}(t,e),r=t,n=[{key:"execute",value:(i=ir(er().m(function e(t){var r,n;return er().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,(0,je.pZ)(t);case 1:r=rr(this.pluginManager.getRendererTypes());try{for(r.s();!(n=r.n()).done;)n.value.freeResources(t)}catch(e){r.e(e)}finally{r.f()}case 2:return e.a(2)}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"serializeArguments",value:(o=ir(er().m(function e(t,r){return er().w(function(e){for(;;)if(0===e.n)return e.a(2,t)},e)})),function(e,t){return o.apply(this,arguments)})}],n&&ar(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A);function dr(e){return dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dr(e)}function pr(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return hr(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(hr(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,hr(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,hr(f,"constructor",c),hr(c,"constructor",s),s.displayName="GeneratorFunction",hr(c,o,"GeneratorFunction"),hr(f),hr(f,o,"Generator"),hr(f,n,function(){return this}),hr(f,"toString",function(){return"[object Generator]"}),(pr=function(){return{w:i,m:d}})()}function hr(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}hr=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){hr(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},hr(e,t,r,n)}function mr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function yr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mr(Object(r),!0).forEach(function(t){kr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function br(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function vr(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){br(i,n,o,a,l,"next",e)}function l(e){br(i,n,o,a,l,"throw",e)}a(void 0)})}}function gr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Cr(n.key),n)}}function wr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wr=function(){return!!e})()}function Sr(e,t,r,n){var o=Ar(Or(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Ar(){return Ar="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Or(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Ar.apply(null,arguments)}function Or(e){return Or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Or(e)}function xr(e,t){return xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xr(e,t)}function kr(e,t,r){return(t=Cr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cr(e){var t=function(e){if("object"!=dr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=dr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dr(t)?t:t+""}var Pr=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return kr((r=this,n=t,o=[].concat(a),n=Or(n),e=function(e,t){if(t&&("object"==dr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,wr()?Reflect.construct(n,o||[],Or(r).constructor):n.apply(r,o))),"name","CoreGetFeatureDensityStats"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xr(e,t)}(t,e),r=t,n=[{key:"serializeArguments",value:(i=vr(pr().m(function e(r,n){var o,i,a,l;return pr().w(function(e){for(;;)switch(e.n){case 0:return i=this.pluginManager.rootModel,a=i.session.assemblyManager,e.n=1,(0,u.renameRegionsIfNeeded)(a,yr(yr({},r),{},{filters:null===(o=r.filters)||void 0===o?void 0:o.toJSON().filters}));case 1:return l=e.v,e.a(2,Sr(t,"serializeArguments",this,3)([l,n]))}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"execute",value:(o=vr(pr().m(function e(t,r){var n,o,i,a,l,s,c;return pr().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.adapterConfig,a=o.sessionId,l=o.regions,e.n=2,(0,je.cK)(n,a,i);case 2:if(s=e.v,c=s.dataAdapter,(0,Ee.isFeatureAdapter)(c)){e.n=3;break}throw new Error("Adapter does not support retrieving features");case 3:return e.a(2,c.getMultiRegionFeatureDensityStats(l,o))}},e,this)})),function(e,t){return o.apply(this,arguments)})}],n&&gr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A);function Er(e){return Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Er(e)}function jr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Mr(n.key),n)}}function Tr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tr=function(){return!!e})()}function _r(e){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_r(e)}function Rr(e,t){return Rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rr(e,t)}function Mr(e){var t=function(e){if("object"!=Er(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Er(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Er(t)?t:t+""}var Ir=function(t){function r(){var e,t,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Mr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((t=this,n=r,o=[].concat(a),n=_r(n),e=function(e,t){if(t&&("object"==Er(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(t,Tr()?Reflect.construct(n,o||[],_r(t).constructor):n.apply(t,o))),"name","CorePlugin"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rr(e,t)}(r,t),n=r,i=[{key:"install",value:function(t){for(var r=function(){var e=i[n];t.addRpcMethod(function(){return new e(t)})},n=0,i=Object.values(e);n<i.length;n++)r();!function(e){e.addAdapterType(function(){return new Ce.AdapterType({name:"CytobandAdapter",configSchema:ke,adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,54273)).then(function(e){return e.default})}})})}(t),t.addWidgetType(function(){return new Pe.A({name:"BaseFeatureWidget",heading:"Feature details",configSchema:ae,stateModel:ge(t),ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,25863))})})})}}],i&&jr(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(we.A);function Nr(e){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nr(e)}function Dr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Fr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function Fr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Lr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Br(n.key),n)}}function zr(e,t,r){return(t=Br(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Br(e){var t=function(e){if("object"!=Nr(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Nr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nr(t)?t:t+""}var $r=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),zr(this,"phaseCallbacks",new Map),zr(this,"phaseOrder",[]);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.phaseOrder=r},(t=[{key:"add",value:function(e,t){if(!this.phaseOrder.includes(e))throw new Error("unknown phase ".concat(e));var r=this.phaseCallbacks.get(e);r||(r=[],this.phaseCallbacks.set(e,r)),r.push(t)}},{key:"run",value:function(){var e,t=Dr(this.phaseOrder);try{for(t.s();!(e=t.n()).done;){var r,n=e.value,o=Dr(this.phaseCallbacks.get(n)||[]);try{for(o.s();!(r=o.n()).done;)(0,r.value)()}catch(e){o.e(e)}finally{o.f()}}}catch(e){t.e(e)}finally{t.f()}}}])&&Lr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),Gr=o(59612),Hr=o(72971),Vr=o(2234),Wr=o(80009),Ur=o(19661);function qr(e){const{defaultProps:t={},mixins:r={},overrides:n={},palette:o={},props:i={},styleOverrides:a={},...l}=e,s={...l,components:{}};Object.keys(t).forEach(e=>{const r=s.components[e]||{};r.defaultProps=t[e],s.components[e]=r}),Object.keys(i).forEach(e=>{const t=s.components[e]||{};t.defaultProps=i[e],s.components[e]=t}),Object.keys(a).forEach(e=>{const t=s.components[e]||{};t.styleOverrides=a[e],s.components[e]=t}),Object.keys(n).forEach(e=>{const t=s.components[e]||{};t.styleOverrides=n[e],s.components[e]=t}),s.spacing=(0,Wr.A)(e.spacing);const c=(0,Ur.A)(e.breakpoints||{}),u=s.spacing;s.mixins={gutters:(e={})=>({paddingLeft:u(2),paddingRight:u(2),...e,[c.up("sm")]:{paddingLeft:u(3),paddingRight:u(3),...e[c.up("sm")]}}),...r};const{type:f,mode:d,...p}=o,h=d||f||"light";return s.palette={text:{hint:"dark"===h?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:h,type:h,...p},s}var Xr=o(15428),Kr=o(21587);function Yr(e,...t){return(0,Gr.A)((0,Kr.A)({unstable_strictMode:!0},e),...t)}let Jr=!1;function Zr(e){return Jr||(console.warn(["MUI: createStyles from @mui/material/styles is deprecated.","Please use @mui/styles/createStyles"].join("\n")),Jr=!0),e}var Qr=o(80525);function en(e,t={}){const{breakpoints:r=["sm","md","lg"],disableAlign:n=!1,factor:o=2,variants:i=["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]}=t,a={...e};a.typography={...a.typography};const l=a.typography,s=(0,Qr.I3)(l.htmlFontSize),c=r.map(e=>a.breakpoints.values[e]);return i.forEach(e=>{const t=l[e];if(!t)return;const r=parseFloat(s(t.fontSize,"rem"));if(r<=1)return;const i=r,a=1+(i-1)/o;let{lineHeight:u}=t;if(!(0,Qr.a9)(u)&&!n)throw new Error((0,Hr.A)(6));(0,Qr.a9)(u)||(u=parseFloat(s(u,"rem"))/parseFloat(r));let f=null;n||(f=e=>(0,Qr.VR)({size:e,grid:(0,Qr.qW)({pixels:4,lineHeight:u,htmlFontSize:l.htmlFontSize})})),l[e]={...t,...(0,Qr.yL)({cssProperty:"fontSize",min:a,max:i,unit:"rem",breakpoints:c,transform:f})}}),a}var tn=o(70453),rn=o(9273),nn=o(74873),on=o(69839);function an({props:e,name:t}){return(0,nn.A)({props:e,name:t,defaultTheme:on.A,themeId:Vr.A})}var ln=o(8539),sn=o(67024),cn=o(48658);const un=new Map,fn={insert:void 0},dn=(e,t)=>{const r=(0,sn.A)(e);return r.sheet=new t({key:r.key,nonce:r.sheet.nonce,container:r.sheet.container,speedy:r.sheet.isSpeedy,prepend:r.sheet.prepend,insertionPoint:r.sheet.insertionPoint}),r};let pn;if("object"==typeof document&&(pn=document.querySelector('[name="emotion-insertion-point"]'),!pn)){pn=document.createElement("meta"),pn.setAttribute("name","emotion-insertion-point"),pn.setAttribute("content","");const e=document.querySelector("head");e&&e.prepend(pn)}function hn(e){const{injectFirst:t,enableCssLayer:r,children:n}=e,o=a.useMemo(()=>{const e=`${t}-${r}`;if("object"==typeof document&&un.has(e))return un.get(e);const n=function(e,t){if(e||t){class r extends cn.v{insert(e,t){return fn.insert?fn.insert(e,t):(this.key&&this.key.endsWith("global")&&(this.before=pn),super.insert(e,t))}}const n=dn({key:"css",insertionPoint:e?pn:void 0},r);if(t){const e=n.insert;n.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return n}}(t,r);return un.set(e,n),n},[t,r]);return o?(0,A.jsx)(ln.C,{value:o,children:n}):n}function mn(){throw new Error((0,Hr.A)(14))}function yn(){throw new Error((0,Hr.A)(15))}function bn(){throw new Error((0,Hr.A)(16))}var vn=o(1702),gn=o(99972);let wn=!1;function Sn(...e){return wn||(console.warn(["MUI: The `experimental_extendTheme` has been stabilized.","","You should use `import { extendTheme } from '@mui/material/styles'`"].join("\n")),wn=!0),(0,gn.A)(...e)}var An=o(81441),On=o(52312),xn=o(23340),kn=o(92371),Cn=o(25238);function Pn(){throw new Error((0,Hr.A)(19))}var En=o(77709),jn=o(5948),Tn=o(23523),_n=o(65069);const Rn=function(e,t){return()=>null};var Mn=o(71589),In=o(70414),Nn=o(58063);const Dn=function(e,t){return()=>()=>null},Fn=o(63835).A;var Ln=o(38256),zn=o(65866);const Bn=function(e,t,r,n,o){return null};var $n=o(25337),Gn=o(75220),Hn=o(38870),Vn=o(964);const Wn={configure:e=>{En.A.configure(e)}};var Un=o(5334),qn=o(19120),Xn=o(9919),Kn=o(43144),Yn=o.t(Kn,2),Jn=o(25873),Zn=o.t(Jn,2),Qn=o(14041);function eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function to(){return to=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},to.apply(null,arguments)}function ro(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.fromEntries(Object.entries(e).map(function(e){var r,n,o=(n=2,function(e){if(Array.isArray(e))return e}(r=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(r,n)||function(e,t){if(e){if("string"==typeof e)return eo(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eo(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],l=o[1];return function(e,t){var r=(0,a.forwardRef)(function(e,r){return Qn.createElement(a.Suspense,{fallback:null},Qn.createElement(t,to({},e,{ref:r})))});return r.displayName=e,[e,r]}("".concat(t).concat(i),l)}))}var no=ro({Attributes:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,3845))}),FeatureDetails:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,99696))}),BaseCard:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,11154))}),BaseAttributes:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,30943))}),BaseCoreDetails:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,98847))})},"@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/"),oo={DataGrid:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.DataGrid}})}),GridActionsCellItem:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridActionsCellItem}})}),GridAddIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridAddIcon}})}),GridArrowDownwardIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridArrowDownwardIcon}})}),GridArrowUpwardIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridArrowUpwardIcon}})}),GridCellCheckboxForwardRef:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridCellCheckboxForwardRef}})}),GridCellCheckboxRenderer:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridCellCheckboxRenderer}})}),GridCheckCircleIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridCheckCircleIcon}})}),GridCheckIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridCheckIcon}})}),GridCloseIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridCloseIcon}})}),GridColumnHeaderSeparator:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridColumnHeaderSeparator}})}),GridColumnHeaderSortIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridColumnHeaderSortIcon}})}),GridColumnIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridColumnIcon}})}),GridColumnMenu:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridColumnMenu}})}),GridColumnMenuContainer:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridColumnMenuContainer}})}),GridDragIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridDragIcon}})}),GridExpandMoreIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridExpandMoreIcon}})}),GridFilterAltIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridFilterAltIcon}})}),GridFilterForm:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridFilterForm}})}),GridFilterListIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridFilterListIcon}})}),GridFilterPanel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridFilterPanel}})}),GridFooter:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridFooter}})}),GridFooterContainer:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridFooterContainer}})}),GridHeader:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridHeader}})}),GridHeaderCheckbox:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridHeaderCheckbox}})}),GridKeyboardArrowRight:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridKeyboardArrowRight}})}),GridLoadIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridLoadIcon}})}),GridLoadingOverlay:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridLoadingOverlay}})}),GridMenuIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridMenuIcon}})}),GridMoreVertIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridMoreVertIcon}})}),GridNoRowsOverlay:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridNoRowsOverlay}})}),GridOverlay:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridOverlay}})}),GridPagination:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridPagination}})}),GridPanel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridPanel}})}),GridPanelWrapper:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridPanelWrapper}})}),GridRemoveIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridRemoveIcon}})}),GridRoot:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridRoot}})}),GridRowCount:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridRowCount}})}),GridSearchIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridSearchIcon}})}),GridSelectedRowCount:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridSelectedRowCount}})}),GridSeparatorIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridSeparatorIcon}})}),GridTableRowsIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridTableRowsIcon}})}),GridToolbarExportContainer:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridToolbarExportContainer}})}),GridTripleDotsVerticalIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridTripleDotsVerticalIcon}})}),GridViewHeadlineIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridViewHeadlineIcon}})}),GridViewStreamIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39451)).then(function(e){return{default:e.GridViewStreamIcon}})})},io={Accordion:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,91435))}),AccordionActions:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,2791))}),AccordionDetails:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,41211))}),AccordionSummary:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,55577))}),Alert:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,32135))}),AlertTitle:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,89642))}),Autocomplete:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,81439))}),Avatar:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,47826))}),AvatarGroup:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,9047))}),Backdrop:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,78141))}),Badge:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,25978))}),Box:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,46160))}),Breadcrumbs:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,85157))}),Button:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,6467))}),ButtonGroup:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,57089))}),Card:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,90017))}),CardActions:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,72352))}),CardActionArea:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,84565))}),CardContent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,60730))}),CardHeader:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,75860))}),CardMedia:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,53539))}),CircularProgress:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,60477))}),Collapse:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,41372))}),ClickAwayListener:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,7819))}),Chip:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,91517))}),Checkbox:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,6266))}),Container:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,74550))}),Dialog:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,90895))}),DialogActions:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,72378))}),DialogTitle:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,52295))}),DialogContent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,38908))}),DialogContentText:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,40415))}),Divider:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,63820))}),Drawer:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,53331))}),Fab:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,69356))}),Fade:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,66937))}),FilledInput:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,75893))}),FormLabel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,80461))}),FormControl:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,64194))}),FormControlLabel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,74327))}),FormHelperText:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,84570))}),FormGroup:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,35500))}),Grid:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,21448))}),Grid2:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,21448))}),Grow:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,25260))}),Icon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,76846))}),IconButton:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,57906))}),Input:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,45269))}),InputBase:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,4504))}),InputLabel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,63613))}),InputAdornment:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,53409))}),Link:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,32039))}),LinearProgress:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,4453))}),List:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,25763))}),ListItem:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,44696))}),ListItemAvatar:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,63007))}),ListItemSecondaryAction:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,44616))}),ListItemIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,8905))}),ListSubheader:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,99286))}),ListItemText:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,10307))}),Menu:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,62752))}),MenuItem:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,68195))}),MenuList:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,8072))}),Modal:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,51376))}),NativeSelect:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,46262))}),OutlinedInput:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,75983))}),Pagination:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,60612))}),PaginationItem:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,6196))}),Paper:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,60943))}),Popover:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,98696))}),Popper:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,18017))}),Portal:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,69829))}),Radio:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,64982))}),RadioGroup:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,19805))}),Rating:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,94460))}),ScopedCssBaseline:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,62769))}),Select:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,80811))}),Skeleton:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,66568))}),Slider:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,76058))}),Snackbar:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,8807))}),SnackbarContent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,91513))}),SpeedDial:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,92891))}),SpeedDialAction:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,98758))}),SpeedDialIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,65990))}),Stack:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,23110))}),Step:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,67253))}),StepButton:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,68861))}),StepConnector:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39904))}),StepLabel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,93085))}),StepIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,44536))}),Stepper:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,42980))}),SvgIcon:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,97630))}),Switch:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,98539))}),Tab:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,95790))}),Table:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,79857))}),TableBody:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,12353))}),TableCell:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,14433))}),TableContainer:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,92892))}),TableFooter:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,84449))}),TableHead:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,76571))}),TablePagination:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,7581))}),TableRow:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,20051))}),TableSortLabel:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,23017))}),Tabs:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,93))}),TextField:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,73980))}),TextareaAutosize:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,68039))}),ToggleButton:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,84663))}),ToggleButtonGroup:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39614))}),Toolbar:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,82618))}),Tooltip:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,63610))}),Typography:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,39798))})};const ao=["mobx","mobx-state-tree","react","react/jsx-runtime","react-dom","react-dom/client","mobx-react","@mui/x-data-grid","@mui/material/utils","@material-ui/core/utils","tss-react/mui","@material-ui/core","@mui/material","@mui/material/styles","@material-ui/core/styles","@material-ui/core/Accordion","@material-ui/core/AccordionActions","@material-ui/core/AccordionDetails","@material-ui/core/AccordionSummary","@material-ui/core/Alert","@material-ui/core/AlertTitle","@material-ui/core/Autocomplete","@material-ui/core/Avatar","@material-ui/core/AvatarGroup","@material-ui/core/Backdrop","@material-ui/core/Badge","@material-ui/core/Box","@material-ui/core/Breadcrumbs","@material-ui/core/Button","@material-ui/core/ButtonGroup","@material-ui/core/Card","@material-ui/core/CardActions","@material-ui/core/CardActionArea","@material-ui/core/CardContent","@material-ui/core/CardHeader","@material-ui/core/CardMedia","@material-ui/core/CircularProgress","@material-ui/core/Collapse","@material-ui/core/ClickAwayListener","@material-ui/core/Chip","@material-ui/core/Checkbox","@material-ui/core/Container","@material-ui/core/Dialog","@material-ui/core/DialogActions","@material-ui/core/DialogTitle","@material-ui/core/DialogContent","@material-ui/core/DialogContentText","@material-ui/core/Divider","@material-ui/core/Drawer","@material-ui/core/Fab","@material-ui/core/Fade","@material-ui/core/FilledInput","@material-ui/core/FormLabel","@material-ui/core/FormControl","@material-ui/core/FormControlLabel","@material-ui/core/FormHelperText","@material-ui/core/FormGroup","@material-ui/core/Grid","@material-ui/core/Grid2","@material-ui/core/Grow","@material-ui/core/Icon","@material-ui/core/IconButton","@material-ui/core/Input","@material-ui/core/InputBase","@material-ui/core/InputLabel","@material-ui/core/InputAdornment","@material-ui/core/Link","@material-ui/core/LinearProgress","@material-ui/core/List","@material-ui/core/ListItem","@material-ui/core/ListItemAvatar","@material-ui/core/ListItemSecondaryAction","@material-ui/core/ListItemIcon","@material-ui/core/ListSubheader","@material-ui/core/ListItemText","@material-ui/core/Menu","@material-ui/core/MenuItem","@material-ui/core/MenuList","@material-ui/core/Modal","@material-ui/core/NativeSelect","@material-ui/core/OutlinedInput","@material-ui/core/Pagination","@material-ui/core/PaginationItem","@material-ui/core/Paper","@material-ui/core/Popover","@material-ui/core/Popper","@material-ui/core/Portal","@material-ui/core/Radio","@material-ui/core/RadioGroup","@material-ui/core/Rating","@material-ui/core/ScopedCssBaseline","@material-ui/core/Select","@material-ui/core/Skeleton","@material-ui/core/Slider","@material-ui/core/Snackbar","@material-ui/core/SnackbarContent","@material-ui/core/SpeedDial","@material-ui/core/SpeedDialAction","@material-ui/core/SpeedDialIcon","@material-ui/core/Stack","@material-ui/core/Step","@material-ui/core/StepButton","@material-ui/core/StepConnector","@material-ui/core/StepLabel","@material-ui/core/StepIcon","@material-ui/core/Stepper","@material-ui/core/SvgIcon","@material-ui/core/Switch","@material-ui/core/Tab","@material-ui/core/Table","@material-ui/core/TableBody","@material-ui/core/TableCell","@material-ui/core/TableContainer","@material-ui/core/TableFooter","@material-ui/core/TableHead","@material-ui/core/TablePagination","@material-ui/core/TableRow","@material-ui/core/TableSortLabel","@material-ui/core/Tabs","@material-ui/core/TextField","@material-ui/core/TextareaAutosize","@material-ui/core/ToggleButton","@material-ui/core/ToggleButtonGroup","@material-ui/core/Toolbar","@material-ui/core/Tooltip","@material-ui/core/Typography","@mui/material/Accordion","@mui/material/AccordionActions","@mui/material/AccordionDetails","@mui/material/AccordionSummary","@mui/material/Alert","@mui/material/AlertTitle","@mui/material/Autocomplete","@mui/material/Avatar","@mui/material/AvatarGroup","@mui/material/Backdrop","@mui/material/Badge","@mui/material/Box","@mui/material/Breadcrumbs","@mui/material/Button","@mui/material/ButtonGroup","@mui/material/Card","@mui/material/CardActions","@mui/material/CardActionArea","@mui/material/CardContent","@mui/material/CardHeader","@mui/material/CardMedia","@mui/material/CircularProgress","@mui/material/Collapse","@mui/material/ClickAwayListener","@mui/material/Chip","@mui/material/Checkbox","@mui/material/Container","@mui/material/Dialog","@mui/material/DialogActions","@mui/material/DialogTitle","@mui/material/DialogContent","@mui/material/DialogContentText","@mui/material/Divider","@mui/material/Drawer","@mui/material/Fab","@mui/material/Fade","@mui/material/FilledInput","@mui/material/FormLabel","@mui/material/FormControl","@mui/material/FormControlLabel","@mui/material/FormHelperText","@mui/material/FormGroup","@mui/material/Grid","@mui/material/Grid2","@mui/material/Grow","@mui/material/Icon","@mui/material/IconButton","@mui/material/Input","@mui/material/InputBase","@mui/material/InputLabel","@mui/material/InputAdornment","@mui/material/Link","@mui/material/LinearProgress","@mui/material/List","@mui/material/ListItem","@mui/material/ListItemAvatar","@mui/material/ListItemSecondaryAction","@mui/material/ListItemIcon","@mui/material/ListSubheader","@mui/material/ListItemText","@mui/material/Menu","@mui/material/MenuItem","@mui/material/MenuList","@mui/material/Modal","@mui/material/NativeSelect","@mui/material/OutlinedInput","@mui/material/Pagination","@mui/material/PaginationItem","@mui/material/Paper","@mui/material/Popover","@mui/material/Popper","@mui/material/Portal","@mui/material/Radio","@mui/material/RadioGroup","@mui/material/Rating","@mui/material/ScopedCssBaseline","@mui/material/Select","@mui/material/Skeleton","@mui/material/Slider","@mui/material/Snackbar","@mui/material/SnackbarContent","@mui/material/SpeedDial","@mui/material/SpeedDialAction","@mui/material/SpeedDialIcon","@mui/material/Stack","@mui/material/Step","@mui/material/StepButton","@mui/material/StepConnector","@mui/material/StepLabel","@mui/material/StepIcon","@mui/material/Stepper","@mui/material/SvgIcon","@mui/material/Switch","@mui/material/Tab","@mui/material/Table","@mui/material/TableBody","@mui/material/TableCell","@mui/material/TableContainer","@mui/material/TableFooter","@mui/material/TableHead","@mui/material/TablePagination","@mui/material/TableRow","@mui/material/TableSortLabel","@mui/material/Tabs","@mui/material/TextField","@mui/material/TextareaAutosize","@mui/material/ToggleButton","@mui/material/ToggleButtonGroup","@mui/material/Toolbar","@mui/material/Tooltip","@mui/material/Typography","@material-ui/lab/ToggleButton","@material-ui/lab/ToggleButtonGroup","@material-ui/lab/Autocomplete","@material-ui/lab/Alert","@material-ui/lab","@jbrowse/core/Plugin","@jbrowse/core/pluggableElementTypes","@jbrowse/core/pluggableElementTypes/ViewType","@jbrowse/core/pluggableElementTypes/AdapterType","@jbrowse/core/pluggableElementTypes/DisplayType","@jbrowse/core/pluggableElementTypes/TrackType","@jbrowse/core/pluggableElementTypes/WidgetType","@jbrowse/core/pluggableElementTypes/models","@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType","@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType","@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType","@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType","@jbrowse/core/pluggableElementTypes/renderers/RendererType","@jbrowse/core/configuration","@jbrowse/core/util/types/mst","@jbrowse/core/ui","@jbrowse/core/ui/theme","@jbrowse/core/util","@jbrowse/core/util/color","@jbrowse/core/util/layouts","@jbrowse/core/util/tracks","@jbrowse/core/util/Base1DViewModel","@jbrowse/core/util/io","@jbrowse/core/util/mst-reflection","@jbrowse/core/util/rxjs","@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail","@jbrowse/core/data_adapters/BaseAdapter"];var lo=o(47200),so=o(60929),co=o(50736),uo=o(9434),fo=o(14777),po=o(61909),ho=o(39336),mo=o(98537),yo=o(51871),bo=o(35431),vo=o(20702),go=o(45323),wo=o(78412),So=o(68020),Ao=o(20693),Oo=o(35778),xo=o(39421);function ko(e){return ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ko(e)}function Co(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Po(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Po(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Po(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Eo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Eo=function(){return!!e})()}function jo(e){return jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jo(e)}function To(e,t){return To=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},To(e,t)}function _o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Mo(n.key),n)}}function Ro(e,t,r){return t&&_o(e.prototype,t),r&&_o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mo(e){var t=function(e){if("object"!=ko(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ko(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ko(t)?t:t+""}function Io(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var No=Ro(function e(){throw Io(this,e),new Error("invalid layout name")}),Do=function(e){function t(e){var r,n,o,i;Io(this,t),n=this,i=[No],o=jo(o=t),r=function(e,t){if(t&&("object"==ko(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(n,Eo()?Reflect.construct(o,i||[],jo(n).constructor):o.apply(n,i));for(var a=0,l=Object.entries(e);a<l.length;a++){var s=Co(l[a],2),c=s[0],u=s[1];r.subLayouts.set(c,new xo.A(u))}return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&To(e,t)}(t,e),Ro(t)}(Oo.A);function Fo(e){return Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fo(e)}function Lo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function zo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Bo(n.key),n)}}function Bo(e){var t=function(e){if("object"!=Fo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Fo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fo(t)?t:t+""}var $o=function(){function e(t,r,n,o,i,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.left=r,this.top=n,this.width=o,this.height=i,this.data=a,this.children=new Map,this.absoluteCache={dirty:!0}}return t=e,r=[{key:"addChild",value:function(t,r,n,o,i,a){var l=t instanceof e?t:new e(t,r,n,o,i,a);if(!(l instanceof e))throw new TypeError("argument to addChild must be an array or a SceneGraph");if(this.children.has(l.name))throw new Error('child named "'.concat(l.name,'" already exists'));l.parent=this;var s=l.absolute,c=s.left,u=s.right,f=s.top,d=s.bottom;return void 0!==c&&void 0!==u&&void 0!==f&&void 0!==d&&(this.expand(c,u,f,d),this.children.set(l.name,l)),l}},{key:"getSubRecord",value:function(e){return this.children.get(e)}},{key:"expand",value:function(e,t,r,n){var o=this.absolute,i=o.left,a=o.right,l=o.top,s=o.bottom;if(void 0!==i&&e<i){var c=i-e;this.width+=c,this.left-=c}if(void 0!==a&&t>a&&(this.width+=t-a),void 0!==l&&r<l){var u=l-r;this.height+=u,this.top-=u}void 0!==s&&n>s&&(this.height+=n-s),this.parent&&this.parent.expand(e,t,r,n),this.absoluteCache.dirty=!0}},{key:"bottom",get:function(){return this.top+this.height}},{key:"right",get:function(){return this.left+this.width}},{key:"walkParents",value:function(e){this.parent&&(e(this.parent),this.parent.walkParents(e))}},{key:"walkChildren",value:function(e){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Lo(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Lo(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(this.children.values());try{for(r.s();!(t=r.n()).done;){var n=t.value;e(n),n.walkChildren(e)}}catch(e){r.e(e)}finally{r.f()}}},{key:"absolute",get:function(){if(this.absoluteCache.dirty){var e=0,t=0;this.walkParents(function(r){e+=r.left,t+=r.top}),this.absoluteCache={dirty:!1,left:this.left+e,right:this.right+e,top:this.top+t,bottom:this.bottom+t,width:this.width,height:this.height}}return this.absoluteCache}},{key:"move",value:function(e,t){this.left+=e,this.top+=t,this.absoluteCache.dirty=!0,this.walkChildren(function(e){e.absoluteCache.dirty=!0});var r=this.absolute,n=r.left,o=r.right,i=r.top,a=r.bottom;void 0!==n&&void 0!==o&&void 0!==i&&void 0!==a&&this.expand(n,o,i,a)}}],r&&zo(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}(),Go=o(92975),Ho=o(98412),Vo=o(70641);function Wo(e){return Wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wo(e)}function Uo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function qo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Uo(Object(r),!0).forEach(function(t){Xo(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uo(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Xo(e,t,r){return(t=function(e){var t=function(e){if("object"!=Wo(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Wo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wo(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ko=qo(qo(qo({mobx:le,"mobx-state-tree":_,react:l,"react/jsx-runtime":O,"react-dom":Yn,"react-dom/client":Zn,"mobx-react":T,"@mui/x-data-grid":qo({useGridApiContext:Un.h,useGridApiRef:qn.b,useGridRootProps:Xn.A},ro(oo)),"@mui/material/utils":r,"@material-ui/core/utils":r,"tss-react/mui":{makeStyles:R.n9},"@material-ui/core":qo(qo({},ro(io)),{},{useTheme:F.A,alpha:z.X4,makeStyles:function(e){var t=(0,R.n9)()(e);return function(){return t().classes}}}),"@mui/material":qo(qo({},ro(io)),{},{alpha:z.X4,useTheme:F.A,createTheme:Gr.A})},ro(io,"@mui/material/")),ro(io,"@material-ui/core/")),{},{"@mui/material/styles":qo(qo({},t),{},{makeStyles:function(e){var t=(0,R.n9)()(e);return function(){return t().classes}}}),"@material-ui/core/styles":qo(qo({},t),{},{makeStyles:function(e){var t=(0,R.n9)()(e);return function(){return t().classes}}}),"@material-ui/lab/ToggleButton":io.ToggleButton,"@material-ui/lab/ToggleButtonGroup":io.ToggleButtonGroup,"@material-ui/lab/Autocomplete":io.Autocomplete,"@material-ui/lab/Alert":io.Alert,"@material-ui/lab":{Alert:io.Alert,Autocomplete:io.Autocomplete,ToggleButton:io.ToggleButton,ToggleButtonGroup:io.ToggleButtonGroup},"@jbrowse/core/Plugin":we.A,"@jbrowse/core/pluggableElementTypes/renderers/RendererType":yo,"@jbrowse/core/configuration":s,"@jbrowse/core/util/types/mst":fe,"@jbrowse/core/ui":c,"@jbrowse/core/ui/theme":vo,"@jbrowse/core/util":u,"@jbrowse/core/util/color":wo,"@jbrowse/core/util/layouts":n,"@jbrowse/core/util/tracks":Vo,"@jbrowse/core/util/Base1DViewModel":go.A,"@jbrowse/core/util/io":So,"@jbrowse/core/util/mst-reflection":Go,"@jbrowse/core/util/rxjs":Ho,"@jbrowse/core/pluggableElementTypes":Ce,"@jbrowse/core/pluggableElementTypes/ViewType":uo.A,"@jbrowse/core/pluggableElementTypes/AdapterType":lo.A,"@jbrowse/core/pluggableElementTypes/DisplayType":so.A,"@jbrowse/core/pluggableElementTypes/TrackType":co.A,"@jbrowse/core/pluggableElementTypes/WidgetType":Pe.A,"@jbrowse/core/pluggableElementTypes/models":fo,"@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType":bo,"@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType":ho.A,"@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType":po,"@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType":mo,"@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail":no,"@jbrowse/core/data_adapters/BaseAdapter":Ee}),Yo=Object.keys(Ko),Jo=Yo.filter(function(e){return!ao.includes(e)});if(Jo.length>0)throw new Error("The following modules are in the modules libs, but not the re-exports list: ".concat(Jo.join(", ")));var Zo=ao.filter(function(e){return!Yo.includes(e)});if(Zo.length)throw new Error("The following modules are in the re-exports list, but not the modules libs: ".concat(Zo.join(", ")));const Qo=Ko;var ei=o(33052),ti=o(45999),ri=o(53359),ni=o(80285),oi=o(95944);function ii(e){return ii="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ii(e)}function ai(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return li(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(li(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,li(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,li(f,"constructor",c),li(c,"constructor",s),s.displayName="GeneratorFunction",li(c,o,"GeneratorFunction"),li(f),li(f,o,"Generator"),li(f,n,function(){return this}),li(f,"toString",function(){return"[object Generator]"}),(ai=function(){return{w:i,m:d}})()}function li(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}li=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){li(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},li(e,t,r,n)}function si(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ci(e){return function(e){if(Array.isArray(e))return hi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pi(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ui(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function fi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ui(Object(r),!0).forEach(function(t){vi(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ui(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function di(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=pi(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function pi(e,t){if(e){if("string"==typeof e)return hi(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hi(e,t):void 0}}function hi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function mi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gi(n.key),n)}}function bi(e,t,r){return t&&yi(e.prototype,t),r&&yi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vi(e,t,r){return(t=gi(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gi(e){var t=function(e){if("object"!=ii(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ii(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ii(t)?t:t+""}var wi=function(){return bi(function e(t,r){mi(this,e),vi(this,"registeredTypes",{}),this.typeName=t,this.baseClass=r},[{key:"add",value:function(e,t){this.registeredTypes[e]=t}},{key:"has",value:function(e){return e in this.registeredTypes}},{key:"get",value:function(e){if(!this.has(e))throw new Error("".concat(this.typeName," '").concat(e,"' not found, perhaps its plugin is not loaded or its plugin has not added it."));return this.registeredTypes[e]}},{key:"all",value:function(){return Object.values(this.registeredTypes)}}])}(),Si=function(){return bi(function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];mi(this,e),vi(this,"plugins",[]),vi(this,"jexl",(0,oi.A)()),vi(this,"pluginMetadata",{}),vi(this,"runtimePluginDefinitions",[]),vi(this,"elementCreationSchedule",new $r("renderer","adapter","text search adapter","display","track","connection","view","widget","rpc method","internet account","add track workflow")),vi(this,"rendererTypes",new wi("RendererType",yo.default)),vi(this,"adapterTypes",new wi("AdapterType",lo.A)),vi(this,"textSearchAdapterTypes",new wi("TextSearchAdapterType",ni.A)),vi(this,"trackTypes",new wi("TrackType",co.A)),vi(this,"displayTypes",new wi("DisplayType",so.A)),vi(this,"connectionTypes",new wi("ConnectionType",ti.A)),vi(this,"viewTypes",new wi("ViewType",uo.A)),vi(this,"widgetTypes",new wi("WidgetType",Pe.A)),vi(this,"rpcMethods",new wi("RpcMethodType",Te.A)),vi(this,"addTrackWidgets",new wi("AddTrackWorkflow",ei.A)),vi(this,"internetAccountTypes",new wi("InternetAccountType",ri.A)),vi(this,"configured",!1),vi(this,"extensionPoints",new Map),vi(this,"jbrequireCache",new Map),vi(this,"lib",Qo),vi(this,"load",function(e){return t.jbrequireCache.has(e)||t.jbrequireCache.set(e,e(t)),t.jbrequireCache.get(e)}),vi(this,"jbrequire",function(e){if("string"==typeof e){var r=t.lib[e];if(!r)throw new TypeError("No jbrequire re-export defined for package '".concat(e,"'. If this package must be shared between plugins, add it to ReExports.js. If it does not need to be shared, just import it normally."));return r}if("function"==typeof e)return t.load(e);if(e.default)return console.warn("initiated jbrequire on a {default:Function}"),t.jbrequire(e.default);throw new TypeError("lib passed to jbrequire must be either a string or a function")}),this.addPlugin({plugin:new Ir,metadata:{isCore:!0}});var n,o=di(r);try{for(o.s();!(n=o.n()).done;){var i=n.value;this.addPlugin(i)}}catch(e){o.e(e)}finally{o.f()}},[{key:"pluginConfigurationNamespacedSchemas",value:function(){var e,t={},r=di(this.plugins);try{for(r.s();!(e=r.n()).done;){var n=e.value;n.configurationSchema&&(t[n.name]=n.configurationSchema)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"pluginConfigurationUnnamespacedSchemas",value:function(){var e,t={},r=di(this.plugins);try{for(r.s();!(e=r.n()).done;){var n=e.value;n.configurationSchemaUnnamespaced&&(t=fi(fi({},t),n.configurationSchemaUnnamespaced))}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"pluginConfigurationRootSchemas",value:function(){var e,t={},r=di(this.plugins);try{for(r.s();!(e=r.n()).done;){var n=e.value;n.rootConfigurationSchema&&(t=fi(fi({},t),n.rootConfigurationSchema(this)))}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"addPlugin",value:function(e){if(this.configured)throw new Error("JBrowse already configured, cannot add plugins");var t,r,n=(t="install"in e&&"configure"in e?[e,{}]:[e.plugin,e.metadata],r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||pi(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1],a=void 0===i?{}:i;if(this.plugins.includes(o))throw new Error("plugin already installed");return this.pluginMetadata[o.name]=a,"definition"in e&&this.runtimePluginDefinitions.push(e.definition),o.install(this),this.plugins.push(o),this}},{key:"getPlugin",value:function(e){return this.plugins.find(function(t){return t.name===e})}},{key:"hasPlugin",value:function(e){return void 0!==this.getPlugin(e)}},{key:"createPluggableElements",value:function(){return this.elementCreationSchedule&&(this.elementCreationSchedule.run(),this.elementCreationSchedule=void 0),this}},{key:"setRootModel",value:function(e){return this.rootModel=e,this}},{key:"configure",value:function(){if(this.configured)throw new Error("already configured");var e,t=di(this.plugins);try{for(t.s();!(e=t.n()).done;)e.value.configure(this)}catch(e){t.e(e)}finally{t.f()}return this.configured=!0,this}},{key:"getElementTypeRecord",value:function(e){switch(e){case"adapter":return this.adapterTypes;case"text search adapter":return this.textSearchAdapterTypes;case"connection":return this.connectionTypes;case"widget":return this.widgetTypes;case"renderer":return this.rendererTypes;case"display":return this.displayTypes;case"track":return this.trackTypes;case"view":return this.viewTypes;case"rpc method":return this.rpcMethods;case"internet account":return this.internetAccountTypes;case"add track workflow":return this.addTrackWidgets;default:throw new Error("invalid element type '".concat(e,"'"))}}},{key:"addElementType",value:function(e,t){var r,n=this;if("function"!=typeof t)throw new Error("must provide a callback function that returns the new type object");var o=this.getElementTypeRecord(e);return null===(r=this.elementCreationSchedule)||void 0===r||r.add(e,function(){var r=t(n);if(!r.name)throw new Error("cannot add a ".concat(e," with no name"));o.has(r.name)?console.warn("".concat(e," ").concat(r.name," already registered, cannot register it again")):o.add(r.name,n.evaluateExtensionPoint("Core-extendPluggableElement",r))}),this}},{key:"getElementType",value:function(e,t){return this.getElementTypeRecord(e).get(t)}},{key:"getElementTypesInGroup",value:function(e){return this.getElementTypeRecord(e).all()}},{key:"getViewElements",value:function(){return this.getElementTypesInGroup("view")}},{key:"getTrackElements",value:function(){return this.getElementTypesInGroup("track")}},{key:"getConnectionElements",value:function(){return this.getElementTypesInGroup("connection")}},{key:"getAddTrackWorkflowElements",value:function(){return this.getElementTypesInGroup("add track workflow")}},{key:"getRpcElements",value:function(){return this.getElementTypesInGroup("rpc method")}},{key:"getDisplayElements",value:function(){return this.getElementTypesInGroup("display")}},{key:"getAdapterElements",value:function(){return this.getElementTypesInGroup("adapter")}},{key:"pluggableMstType",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.types.maybe(_.types.null),n=this.getElementTypeRecord(e).all().map(function(e){return e[t]}).filter(function(e){return(0,_.isType)(e)&&(0,_.isModelType)(e)});return 0===n.length&&"undefined"==typeof jest?(console.warn("No pluggable types found matching ('".concat(e,"','").concat(t,"')")),r):_.types.union.apply(_.types,ci(n))}},{key:"pluggableConfigSchemaType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"configSchema",r=this.getElementTypeRecord(e).all().map(function(e){return e[t]}).filter(function(e){return(0,s.isBareConfigurationSchemaType)(e)});return 0===r.length&&r.push((0,s.ConfigurationSchema)("Null",{})),_.types.union.apply(_.types,ci(r))}},{key:"getRendererType",value:function(e){return this.rendererTypes.get(e)}},{key:"getRendererTypes",value:function(){return this.rendererTypes.all()}},{key:"getAdapterType",value:function(e){return this.adapterTypes.get(e)}},{key:"getTextSearchAdapterType",value:function(e){return this.textSearchAdapterTypes.get(e)}},{key:"getTrackType",value:function(e){return this.trackTypes.get(e)}},{key:"getDisplayType",value:function(e){return this.displayTypes.get(e)}},{key:"getViewType",value:function(e){return this.viewTypes.get(e)}},{key:"getAddTrackWorkflow",value:function(e){return this.addTrackWidgets.get(e)}},{key:"getWidgetType",value:function(e){return this.widgetTypes.get(e)}},{key:"getConnectionType",value:function(e){return this.connectionTypes.get(e)}},{key:"getRpcMethodType",value:function(e){return this.rpcMethods.get(e)}},{key:"getInternetAccountType",value:function(e){return this.internetAccountTypes.get(e)}},{key:"addRendererType",value:function(e){return this.addElementType("renderer",e)}},{key:"addAdapterType",value:function(e){return this.addElementType("adapter",e)}},{key:"addTextSearchAdapterType",value:function(e){return this.addElementType("text search adapter",e)}},{key:"addTrackType",value:function(e){var t=this;return this.addElementType("track",function(){var r,n=e(t),o=di(t.getElementTypesInGroup("display"));try{for(o.s();!(r=o.n()).done;){var i=r.value;i.trackType!==n.name||n.displayTypes.includes(i)||n.addDisplayType(i)}}catch(e){o.e(e)}finally{o.f()}return n})}},{key:"addDisplayType",value:function(e){return this.addElementType("display",e)}},{key:"addViewType",value:function(e){var t=this;return this.addElementType("view",function(){var r,n=e(t),o=di(t.getElementTypesInGroup("display"));try{for(o.s();!(r=o.n()).done;){var i=r.value;i.viewType!==n.name&&i.viewType!==n.extendedName||n.displayTypes.includes(i)||n.addDisplayType(i)}}catch(e){o.e(e)}finally{o.f()}return n})}},{key:"addWidgetType",value:function(e){return this.addElementType("widget",e)}},{key:"addConnectionType",value:function(e){return this.addElementType("connection",e)}},{key:"addRpcMethod",value:function(e){return this.addElementType("rpc method",e)}},{key:"addInternetAccountType",value:function(e){return this.addElementType("internet account",e)}},{key:"addAddTrackWorkflowType",value:function(e){return this.addElementType("add track workflow",e)}},{key:"addToExtensionPoint",value:function(e,t){var r=this.extensionPoints.get(e);r||(r=[],this.extensionPoints.set(e,r)),r.push(t)}},{key:"evaluateExtensionPoint",value:function(e,t,r){var n=this.extensionPoints.get(e),o=t;if(n){var i,a=di(n);try{for(a.s();!(i=a.n()).done;){var l=i.value;try{o=l(o,r)}catch(e){console.error(e)}}}catch(e){a.e(e)}finally{a.f()}}return o}},{key:"evaluateAsyncExtensionPoint",value:(e=ai().m(function e(t,r,n){var o,i,a,l,s,c,u;return ai().w(function(e){for(;;)switch(e.n){case 0:if(o=this.extensionPoints.get(t),i=r,!o){e.n=10;break}a=di(o),e.p=1,a.s();case 2:if((l=a.n()).done){e.n=7;break}return s=l.value,e.p=3,e.n=4,s(i,n);case 4:i=e.v,e.n=6;break;case 5:e.p=5,c=e.v,console.error(c);case 6:e.n=2;break;case 7:e.n=9;break;case 8:e.p=8,u=e.v,a.e(u);case 9:return e.p=9,a.f(),e.f(9);case 10:return e.a(2,i)}},e,this,[[3,5],[1,8,9,10]])}),t=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){si(i,n,o,a,l,"next",e)}function l(e){si(i,n,o,a,l,"throw",e)}a(void 0)})},function(e,r,n){return t.apply(this,arguments)})}]);var e,t}(),Ai=o(47149),Oi=o(35806),xi=o(25348),ki=o(78755);function Ci(e){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ci(e)}var Pi=["stopToken","statusCallback"];function Ei(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function ji(e){return function(e){if(Array.isArray(e))return Ri(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ti(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||_i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _i(e,t){if(e){if("string"==typeof e)return Ri(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ri(e,t):void 0}}function Ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Mi(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Ii(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ii(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ii(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Ii(f,"constructor",c),Ii(c,"constructor",s),s.displayName="GeneratorFunction",Ii(c,o,"GeneratorFunction"),Ii(f),Ii(f,o,"Generator"),Ii(f,n,function(){return this}),Ii(f,"toString",function(){return"[object Generator]"}),(Mi=function(){return{w:i,m:d}})()}function Ii(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ii=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ii(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ii(e,t,r,n)}function Ni(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Di(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ni(Object(r),!0).forEach(function(t){Fi(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ni(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Fi(e,t,r){return(t=function(e){var t=function(e){if("object"!=Ci(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ci(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ci(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Li(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function zi(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Li(i,n,o,a,l,"next",e)}function l(e){Li(i,n,o,a,l,"throw",e)}a(void 0)})}}var Bi=new RegExp("[0-9A-Za-z!#$%&+./:;?@^_|~-][0-9A-Za-z!#$%&*+./:;=?@^_|~-]*"),$i=["rgb(153, 102, 0)","rgb(102, 102, 0)","rgb(153, 153, 30)","rgb(204, 0, 0)","rgb(255, 0, 0)","rgb(255, 0, 204)","rgb(165, 132, 132)","rgb(204, 122, 0)","rgb(178, 142, 0)","rgb(153, 153, 0)","rgb(122, 153, 0)","rgb(0, 165, 0)","rgb(53, 128, 0)","rgb(0, 0, 204)","rgb(96, 145, 242)","rgb(107, 142, 178)","rgb(0, 165, 165)","rgb(122, 153, 153)","rgb(153, 0, 204)","rgb(204, 51, 255)","rgb(173, 130, 216)","rgb(102, 102, 102)","rgb(145, 145, 145)","rgb(142, 142, 142)","rgb(142, 142, 107)","rgb(96, 163, 48)"];function Gi(e,t,r,n){return Hi.apply(this,arguments)}function Hi(){return(Hi=zi(Mi().m(function e(t,r,n,o){var i,a,l;return Mi().w(function(e){for(;;)switch(e.n){case 0:return i=n.sessionId,e.n=1,(0,u.when)(function(){return!(!t.regions||!t.refNameAliases)},{name:"when assembly ready"});case 1:return e.n=2,t.rpcManager.call(i||"assemblyRpc","CoreGetRefNames",Di({adapterConfig:r,stopToken:o},n),{timeout:1e6});case 2:if(a=e.v,t.refNameAliases){e.n=3;break}throw new Error("error loading assembly ".concat(t.name,"'s refNameAliases"));case 3:return l=Object.fromEntries(a.map(function(e){return Vi(e),[t.getCanonicalRefName(e),e]})),e.a(2,{forwardMap:l,reverseMap:Object.fromEntries(Object.entries(l).map(function(e){var t=Ti(e,2),r=t[0];return[t[1],r]}))})}},e)}))).apply(this,arguments)}function Vi(e){if(!Bi.test(e))throw new Error('Encountered invalid refName: "'.concat(e,'"'))}function Wi(e){return Ui.apply(this,arguments)}function Ui(){return(Ui=zi(Mi().m(function e(t){var r,n,o,i,a,l;return Mi().w(function(e){for(;;)switch(e.n){case 0:return r=t.config,n=t.pluginManager,o=t.stopToken,i=n.getAdapterType(r.type),e.n=1,i.getAdapterClass();case 1:return a=e.v,l=new a(r,void 0,n),e.a(2,l.getRefNameAliases({stopToken:o}))}},e)}))).apply(this,arguments)}function qi(e){return Xi.apply(this,arguments)}function Xi(){return(Xi=zi(Mi().m(function e(t){var r,n,o,i,a;return Mi().w(function(e){for(;;)switch(e.n){case 0:return r=t.config,n=t.pluginManager,o=n.getAdapterType(r.type),e.n=1,o.getAdapterClass();case 1:return i=e.v,a=new i(r,void 0,n),e.a(2,a.getData())}},e)}))).apply(this,arguments)}function Ki(e){return Yi.apply(this,arguments)}function Yi(){return(Yi=zi(Mi().m(function e(t){var r,n,o,i,a,l;return Mi().w(function(e){for(;;)switch(e.n){case 0:return r=t.config,n=t.pluginManager,o=t.stopToken,i=n.getAdapterType(r.type),e.n=1,i.getAdapterClass();case 1:return a=e.v,l=new a(r,void 0,n),e.a(2,l.getRegions({stopToken:o}))}},e)}))).apply(this,arguments)}function Ji(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Zi(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Zi(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Zi(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Zi(f,"constructor",c),Zi(c,"constructor",s),s.displayName="GeneratorFunction",Zi(c,o,"GeneratorFunction"),Zi(f),Zi(f,o,"Generator"),Zi(f,n,function(){return this}),Zi(f,"toString",function(){return"[object Generator]"}),(Ji=function(){return{w:i,m:d}})()}function Zi(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Zi=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Zi(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Zi(e,t,r,n)}function Qi(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ea(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Qi(i,n,o,a,l,"next",e)}function l(e){Qi(i,n,o,a,l,"throw",e)}a(void 0)})}}function ta(e){return function(e){if(Array.isArray(e))return oa(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||na(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ra(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=na(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function na(e,t){if(e){if("string"==typeof e)return oa(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oa(e,t):void 0}}function oa(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const ia=function(e,t){return _.types.model({assemblies:_.types.array((r=e,n=t,o=new Oi.A({cache:new ki.A({maxSize:1e3}),fill:function(e,t,r){return zi(Mi().m(function t(){var n,o,i;return Mi().w(function(t){for(;;)if(0===t.n)return n=e.adapterConf,o=e.self,i=e.options,t.a(2,Gi(o,n,Di(Di({},i),{},{statusCallback:r})))},t)}))()}}),_.types.model({configuration:_.types.safeReference(r)}).volatile(function(){return{error:void 0,loadingP:void 0,volatileRegions:void 0,refNameAliases:void 0,cytobands:void 0}}).views(function(e){return{getConf:function(t){return e.configuration?(0,s.getConf)(e,t):void 0},get lowerCaseRefNameAliases(){return e.refNameAliases?Object.fromEntries(Object.entries(e.refNameAliases).map(function(e){var t=Ti(e,2),r=t[0],n=t[1];return[r.toLowerCase(),n]})):void 0}}}).views(function(e){return{get initialized(){return e.load(),!!e.refNameAliases},get name(){return e.getConf("name")||""},get regions(){return e.load(),e.volatileRegions},get aliases(){return e.getConf("aliases")||[]},get displayName(){return e.getConf("displayName")||e.getConf("name")||""},hasName:function(e){return this.allAliases.includes(e)},get allAliases(){return[this.name].concat(ji(this.aliases))},get allRefNames(){return e.refNameAliases?Object.keys(e.refNameAliases):void 0},get lowerCaseRefNames(){return e.lowerCaseRefNameAliases?Object.keys(e.lowerCaseRefNameAliases):void 0},get allRefNamesWithLowerCase(){return this.allRefNames&&this.lowerCaseRefNames?ji(new Set([].concat(ji(this.allRefNames),ji(this.lowerCaseRefNames)))):void 0},get rpcManager(){return(0,_.getParent)(e,2).rpcManager},get refNameColors(){var t=e.getConf("refNameColors")||[];return 0===t.length?$i:t}}}).views(function(e){return{get refNames(){var t;return null===(t=e.regions)||void 0===t?void 0:t.map(function(e){return e.refName})}}}).views(function(e){return{getCanonicalRefName:function(t){if(!e.refNameAliases||!e.lowerCaseRefNameAliases)throw new Error("aliases not loaded, we expect them to be loaded before getCanonicalRefName can be called");return e.refNameAliases[t]||e.lowerCaseRefNameAliases[t]},getRefNameColor:function(t){if(e.refNames){var r=e.refNames.indexOf(t);return-1===r?void 0:e.refNameColors[r%e.refNameColors.length]}},isValidRefName:function(t){if(!e.refNameAliases)throw new Error("isValidRefName cannot be called yet, the assembly has not finished loading");return!!this.getCanonicalRefName(t)}}}).actions(function(e){return{setLoaded:function(e){var t=e.regions,r=e.refNameAliases,n=e.cytobands;this.setRegions(t),this.setRefNameAliases(r),this.setCytobands(n)},setError:function(t){e.error=t},setRegions:function(t){e.volatileRegions=t},setRefNameAliases:function(t){e.refNameAliases=t},setCytobands:function(t){e.cytobands=t},setLoadingP:function(t){e.loadingP=t},load:function(){var t=this;return e.loadingP||(e.loadingP=this.loadPre().catch(function(e){t.setLoadingP(void 0),t.setError(e)})),e.loadingP},loadPre:function(){var t=this;return zi(Mi().m(function r(){var o,i,a,l,s,c,u,f,d,p,h,m,y,b,v,g,w,S,A,O,x,k,C,P,E,j,T,_,R,M;return Mi().w(function(r){for(;;)switch(r.n){case 0:return a=e.configuration,l=null==a||null===(o=a.refNameAliases)||void 0===o?void 0:o.adapter,s=null==a||null===(i=a.cytobands)||void 0===i?void 0:i.adapter,c=null==a?void 0:a.sequence.adapter,u=e.name,r.n=1,Ki({config:c,pluginManager:n});case 1:f=r.v,d=Ei(f);try{for(d.s();!(p=d.n()).done;)Vi(p.value.refName)}catch(e){d.e(e)}finally{d.f()}return h={},r.n=2,Wi({config:l,pluginManager:n});case 2:m=r.v,y=Ei(m);try{for(y.s();!(b=y.n()).done;){v=b.value,g=v.refName,w=v.aliases,S=v.override,A=Ei(w);try{for(A.s();!(O=A.n()).done;)Vi(x=O.value),h[x]=g}catch(e){A.e(e)}finally{A.f()}S&&(h[g]=g)}}catch(e){y.e(e)}finally{y.f()}k=Ei(f);try{for(k.s();!(C=k.n()).done;)E=C.value,h[P=E.refName]||(h[P]=E.refName)}catch(e){k.e(e)}finally{k.f()}return j=t,T=h,_=f.map(function(e){return Di(Di({},e),{},{refName:h[e.refName]||e.refName,assemblyName:u})}),r.n=3,qi({config:s,pluginManager:n});case 3:R=r.v,M={refNameAliases:T,regions:_,cytobands:R},j.setLoaded.call(j,M);case 4:return r.a(2)}},r)}))()}}}).views(function(e){return{getAdapterMapEntry:function(t,r){r.stopToken;var n=r.statusCallback,i=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(r,Pi);if(!r.sessionId)throw new Error("sessionId is required");return o.get((0,xi.L)(t),{adapterConf:t,self:e,options:i},void 0,n)},getRefNameMapForAdapter:function(e,t){var r=this;return zi(Mi().m(function n(){var o;return Mi().w(function(n){for(;;)switch(n.n){case 0:if(t.sessionId){n.n=1;break}throw new Error("sessionId is required");case 1:return n.n=2,r.getAdapterMapEntry(e,t);case 2:return o=n.v,n.a(2,o.forwardMap)}},n)}))()},getReverseRefNameMapForAdapter:function(e,t){var r=this;return zi(Mi().m(function n(){var o;return Mi().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,r.getAdapterMapEntry(e,t);case 1:return o=n.v,n.a(2,o.reverseMap)}},n)}))()},afterCreate:function(){(0,_.addDisposer)(e,(0,le.autorun)(function(){e.allRefNamesWithLowerCase}))}}})))}).views(function(e){return{get assemblyNameMap(){var t,r={},n=ra(e.assemblies);try{for(n.s();!(t=n.n()).done;){var o,i=t.value,a=ra(i.allAliases);try{for(a.s();!(o=a.n()).done;)r[o.value]=i}catch(e){a.e(e)}finally{a.f()}}}catch(e){n.e(e)}finally{n.f()}return r}}}).views(function(e){return{get:function(t){return e.assemblyNameMap[t]},get assemblyNamesList(){return this.assemblyList.map(function(e){return e.name})},get assemblyList(){var t=(0,_.getParent)(e),r=t.jbrowse.assemblies,n=t.session,o=void 0===n?{}:n,i=o.sessionAssemblies,a=void 0===i?[]:i,l=o.temporaryAssemblies,s=void 0===l?[]:l;return[].concat(ta(r),ta(a),ta(s))},get rpcManager(){return(0,_.getParent)(e).rpcManager}}}).views(function(e){return{waitForAssembly:function(t){return ea(Ji().m(function r(){var n;return Ji().w(function(r){for(;;)switch(r.n){case 0:if(t){r.n=1;break}throw new Error("no assembly name supplied to waitForAssembly");case 1:if(n=e.get(t)){r.n=5;break}return r.p=2,r.n=3,(0,u.when)(function(){return Boolean(e.get(t))},{timeout:1e3});case 3:n=e.get(t),r.n=5;break;case 4:r.p=4,r.v;case 5:if(n){r.n=6;break}return r.a(2,void 0);case 6:return r.n=7,n.load();case 7:return r.n=8,(0,u.when)(function(){return!(!n.regions||!n.refNameAliases)||!!n.error});case 8:if(!n.error){r.n=9;break}throw n.error;case 9:return r.a(2,n)}},r,null,[[2,4]])}))()},getRefNameMapForAdapter:function(e,t,r){var n=this;return ea(Ji().m(function o(){var i;return Ji().w(function(o){for(;;)switch(o.n){case 0:if(!t){o.n=2;break}return o.n=1,n.waitForAssembly(t);case 1:return i=o.v,o.a(2,null==i?void 0:i.getRefNameMapForAdapter(e,r));case 2:return o.a(2,{})}},o)}))()},getReverseRefNameMapForAdapter:function(e,t,r){var n=this;return ea(Ji().m(function o(){var i;return Ji().w(function(o){for(;;)switch(o.n){case 0:if(!t){o.n=2;break}return o.n=1,n.waitForAssembly(t);case 1:return i=o.v,o.a(2,null==i?void 0:i.getReverseRefNameMapForAdapter(e,r));case 2:return o.a(2,{})}},o)}))()},isValidRefName:function(t,r){var n=e.get(r);if(n)return n.isValidRefName(t);throw new Error("Failed to look up refName:".concat(t," on assemblyName:").concat(r," (assembly does not exist)"))}}}).actions(function(e){return{afterAttach:function(){var t=this;(0,_.addDisposer)(e,(0,le.reaction)(function(){return e.assemblyList},function(r){var n,o=ra(e.assemblies);try{for(o.s();!(n=o.n()).done;){var i=n.value;i.configuration||t.removeAssembly(i)}}catch(e){o.e(e)}finally{o.f()}var a,l=ra(r);try{var c=function(){var r=a.value,n=(0,s.readConfObject)(r,"name");e.assemblies.some(function(e){return e.name===n})||t.addAssembly(r)};for(l.s();!(a=l.n()).done;)c()}catch(e){l.e(e)}finally{l.f()}},{fireImmediately:!0,name:"assemblyManagerAfterAttach"}))},removeAssembly:function(t){e.assemblies.remove(t)},addAssembly:function(t){e.assemblies.push({configuration:t})}}});var r,n,o},aa=function(e){return(0,s.ConfigurationSchema)("BaseAssembly",{aliases:{type:"stringArray",defaultValue:[],description:"Other possible names for the assembly"},sequence:e.getTrackType("ReferenceSequenceTrack").configSchema,refNameColors:{type:"stringArray",defaultValue:[],description:"Define custom colors for each reference sequence. Will cycle through this list if there are not enough colors for every sequence."},refNameAliases:(0,s.ConfigurationSchema)("RefNameAliases",{adapter:e.pluggableConfigSchemaType("adapter")},{preProcessSnapshot:function(e){return e.adapter?e:{adapter:{type:"RefNameAliasAdapter"}}}}),cytobands:(0,s.ConfigurationSchema)("Cytoband",{adapter:e.pluggableConfigSchemaType("adapter")},{preProcessSnapshot:function(e){return e.adapter?e:{adapter:{type:"CytobandAdapter"}}}}),displayName:{type:"string",defaultValue:"",description:'A human readable display name for the assembly e.g. "Homo sapiens (hg38)" while the assembly name may just be "hg38"'}},{explicitIdentifier:"name"})};function la(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function sa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?la(Object(r),!0).forEach(function(t){ua(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):la(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ca(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ua(e,t,r){return(t=ga(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fa(e){return fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fa(e)}function da(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return pa(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(pa(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,pa(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,pa(f,"constructor",c),pa(c,"constructor",s),s.displayName="GeneratorFunction",pa(c,o,"GeneratorFunction"),pa(f),pa(f,o,"Generator"),pa(f,n,function(){return this}),pa(f,"toString",function(){return"[object Generator]"}),(da=function(){return{w:i,m:d}})()}function pa(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}pa=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){pa(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},pa(e,t,r,n)}function ha(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ma(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ha(i,n,o,a,l,"next",e)}function l(e){ha(i,n,o,a,l,"throw",e)}a(void 0)})}}function ya(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ba(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ga(n.key),n)}}function va(e,t,r){return t&&ba(e.prototype,t),r&&ba(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ga(e){var t=function(e){if("object"!=fa(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=fa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fa(t)?t:t+""}function wa(e){return!("function"==typeof e||e instanceof Error)}var Sa=function(){return va(function e(t){ya(this,e),this.driver=t},[{key:"getWorker",value:(e=ma(da().m(function e(){var t=this;return da().w(function(e){for(;;)if(0===e.n)return this.workerP||(this.workerP=this.driver.makeWorker().catch(function(e){throw t.workerP=void 0,e})),e.a(2,this.workerP)},e,this)})),function(){return e.apply(this,arguments)})}]);var e}(),Aa=function(){return va(function e(t){ya(this,e),ua(this,"lastWorkerAssignment",-1),ua(this,"workerAssignments",new Map),ua(this,"maxPingTime",3e4),ua(this,"workerCheckFrequency",5e3),this.config=t.config},[{key:"filterArgs",value:function(e,t){var r=this;if(Array.isArray(e))return e.filter(function(e){return wa(e)}).map(function(e){return r.filterArgs(e,t)});if("object"===fa(e)&&null!==e){if((0,_.isStateTreeNode)(e)&&!(0,_.isAlive)(e))throw new Error("dead state tree node passed to RPC call");return e instanceof File?e:Object.fromEntries(Object.entries(e).filter(function(e){return wa(e[1])}).map(function(e){var n,o,i=(o=2,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(n,o)||function(e,t){if(e){if("string"==typeof e)return ca(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ca(e,t):void 0}}(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],l=i[1];return[a,r.filterArgs(l,t)]}))}return e}},{key:"remoteAbort",value:(r=ma(da().m(function e(t,r,n){var o;return da().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getWorker(t);case 1:return o=e.v,e.n=2,o.call(r,{stopTokenId:n},{timeout:1e6,rpcDriverClassName:this.name});case 2:return e.a(2)}},e,this)})),function(e,t,n){return r.apply(this,arguments)})},{key:"createWorkerPool",value:function(){for(var e,t,r=(t=(e="undefined"!=typeof window)&&"hardwareConcurrency"in window.navigator,e&&t?window.navigator.hardwareConcurrency:1),n=(0,s.readConfObject)(this.config,"workerCount")||(0,u.clamp)(1,Math.max(1,r-1),5),o=[],i=0;i<n;i++)o.push(new Sa(this));return o}},{key:"getWorkerPool",value:function(){if(!this.workerPool){var e=this.createWorkerPool();return this.workerPool=e,e}return this.workerPool}},{key:"getWorker",value:(t=ma(da().m(function e(t){var r,n,o;return da().w(function(e){for(;;)if(0===e.n)return r=this.getWorkerPool(),void 0===(n=this.workerAssignments.get(t))&&(o=(this.lastWorkerAssignment+1)%r.length,this.workerAssignments.set(t,o),this.lastWorkerAssignment=o,n=o),e.a(2,r[n].getWorker())},e,this)})),function(e){return t.apply(this,arguments)})},{key:"call",value:(e=ma(da().m(function e(t,r,n,o){var i,a,l,s,c,u,f,d=arguments;return da().w(function(e){for(;;)switch(e.n){case 0:if(i=d.length>4&&void 0!==d[4]?d[4]:{},r){e.n=1;break}throw new TypeError("sessionId is required");case 1:return e.n=2,this.getWorker(r);case 2:if(a=e.v,l=t.evaluateExtensionPoint("Core-extendWorker",a),s=t.getRpcMethodType(n)){e.n=3;break}throw new Error("unknown RPC method ".concat(n));case 3:return e.n=4,s.serializeArguments(o,this.name);case 4:return c=e.v,u=this.filterArgs(c,r),e.n=5,l.call(n,u,sa({timeout:3e5,statusCallback:o.statusCallback,rpcDriverClassName:this.name},i));case 5:return f=e.v,e.a(2,s.deserializeReturn(f,o,this.name))}},e,this)})),function(t,r,n,o){return e.apply(this,arguments)})}]);var e,t,r}();function Oa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oa=function(){return!!e})()}function xa(e){return xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xa(e)}function ka(e,t){return ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ka(e,t)}function Ca(e){return Ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ca(e)}function Pa(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Ea(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ea(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ea(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Ea(f,"constructor",c),Ea(c,"constructor",s),s.displayName="GeneratorFunction",Ea(c,o,"GeneratorFunction"),Ea(f),Ea(f,o,"Generator"),Ea(f,n,function(){return this}),Ea(f,"toString",function(){return"[object Generator]"}),(Pa=function(){return{w:i,m:d}})()}function Ea(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ea=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ea(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ea(e,t,r,n)}function ja(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ta(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ja(i,n,o,a,l,"next",e)}function l(e){ja(i,n,o,a,l,"throw",e)}a(void 0)})}}function _a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ra(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ia(n.key),n)}}function Ma(e,t,r){return t&&Ra(e.prototype,t),r&&Ra(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ia(e){var t=function(e){if("object"!=Ca(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ca(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ca(t)?t:t+""}var Na=function(){return Ma(function e(){_a(this,e)},[{key:"destroy",value:function(){}},{key:"call",value:(e=Ta(Pa().m(function e(t,r){return Pa().w(function(e){for(;;)if(0===e.n)return e.a(2,void 0)},e)})),function(t,r){return e.apply(this,arguments)})}]);var e}(),Da=function(e){function t(e){var r,n,o,i;return _a(this,t),function(e,t,r){(t=Ia(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((n=this,i=[e],o=xa(o=t),r=function(e,t){if(t&&("object"==Ca(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(n,Oa()?Reflect.construct(o,i||[],xa(n).constructor):o.apply(n,i))),"name","MainThreadRpcDriver"),r.makeWorker=Ta(Pa().m(function e(){return Pa().w(function(e){for(;;)if(0===e.n)return e.a(2,new Na)},e)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ka(e,t)}(t,e),Ma(t,[{key:"call",value:(r=Ta(Pa().m(function e(t,r,n,o){var i,a,l;return Pa().w(function(e){for(;;)switch(e.n){case 0:if(r){e.n=1;break}throw new TypeError("sessionId is required");case 1:if(i=t.getRpcMethodType(n)){e.n=2;break}throw new Error("unknown RPC method ".concat(n));case 2:return e.n=3,i.serializeArguments(o,this.name);case 3:return a=e.v,e.n=4,i.execute(a,this.name);case 4:return l=e.v,e.a(2,i.deserializeReturn(l,o,this.name))}},e,this)})),function(e,t,n,o){return r.apply(this,arguments)})}]);var r}(Aa);class Fa{constructor(){this.events=Object.create(null)}on(e,t){var r=this.events[e];return r||(r=[],this.events[e]=r),r.push(t),this}off(e,t){var r=this.events[e];if(r){var n=r.indexOf(t);-1!==n&&r.splice(n,1)}return this}emit(e,t){var r=this.events[e];if(r)for(var n=0;n<r.length;n++)r[n](t);return this}}function La(e,t=[]){if(function(e){try{return e instanceof ArrayBuffer||e instanceof ImageBitmap||e instanceof OffscreenCanvas||e instanceof MessagePort}catch(e){return!1}}(e))t.push(e);else if(n=e,Object(n)===n&&!("containsNoTransferables"in e))for(var r in e)La(e[r],t);var n;return t}var za=o(69655);const Ba=class extends Fa{constructor({workers:e}){super(),this.idx=0,this.calls={},this.timeouts={},this.errors={},this.workers=[...e],this.handler=this.handler.bind(this),this.catch=this.catch.bind(this),this.init()}init(){this.workers.forEach(this.listen,this)}listen(e){e.addEventListener("message",this.handler),e.addEventListener("error",this.catch)}handler(e){var{uid:t,error:r,method:n,eventName:o,data:i,libRpc:a}=e.data;a&&(r?this.reject(t,r):n?this.resolve(t,i):o&&this.emit(o,i))}catch({message:e,lineno:t,filename:r,libRpc:n}){n&&this.emit("error",{message:e,lineno:t,filename:r})}reject(e,t){this.errors[e]&&(this.errors[e]((0,za.deserializeError)(t)),this.clear(e))}resolve(e,t){this.calls[e]&&(this.calls[e](t),this.clear(e))}clear(e){clearTimeout(this.timeouts[e]),delete this.timeouts[e],delete this.calls[e],delete this.errors[e]}call(e,t,{timeout:r=2e3}={}){var n=Math.floor(1e10*(1+Math.random())).toString(16),o=La(t);return new Promise((i,a)=>{this.timeouts[n]=setTimeout(()=>this.reject(n,new Error(`Timeout exceeded for RPC method "${e}"`)),r),this.calls[n]=i,this.errors[n]=a,this.workers[this.idx].postMessage({method:e,uid:n,data:t,libRpc:!0},o),this.idx=++this.idx%this.workers.length})}};var $a=o(22144);function Ga(e){return Ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ga(e)}function Ha(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Va(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Va(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Va(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Va(f,"constructor",c),Va(c,"constructor",s),s.displayName="GeneratorFunction",Va(c,o,"GeneratorFunction"),Va(f),Va(f,o,"Generator"),Va(f,n,function(){return this}),Va(f,"toString",function(){return"[object Generator]"}),(Ha=function(){return{w:i,m:d}})()}function Va(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Va=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Va(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Va(e,t,r,n)}function Wa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ua(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wa(Object(r),!0).forEach(function(t){qa(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wa(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function qa(e,t,r){return(t=Qa(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xa(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ka(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Xa(i,n,o,a,l,"next",e)}function l(e){Xa(i,n,o,a,l,"throw",e)}a(void 0)})}}function Ya(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ja(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qa(n.key),n)}}function Za(e,t,r){return t&&Ja(e.prototype,t),r&&Ja(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qa(e){var t=function(e){if("object"!=Ga(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ga(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ga(t)?t:t+""}function el(e,t,r){return t=ol(t),function(e,t){if(t&&("object"==Ga(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tl()?Reflect.construct(t,r||[],ol(e).constructor):t.apply(e,r))}function tl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tl=function(){return!!e})()}function rl(e,t,r,n){var o=nl(ol(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function nl(){return nl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ol(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},nl.apply(null,arguments)}function ol(e){return ol=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ol(e)}function il(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&al(e,t)}function al(e,t){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},al(e,t)}var ll=function(e){function t(){return Ya(this,t),el(this,t,arguments)}return il(t,e),Za(t,[{key:"destroy",value:function(){this.workers[0].terminate()}},{key:"call",value:(r=Ka(Ha().m(function e(r,n,o){var i,a,l,s,c;return Ha().w(function(e){for(;;)switch(e.n){case 0:return i=o.statusCallback,a=o.rpcDriverClassName,l="message-".concat((0,$a.Ak)()),s=function(e){null==i||i(e)},this.on(l,s),e.n=1,rl(t,"call",this,3)([r,Ua(Ua({},n),{},{channel:l,rpcDriverClassName:a}),o]);case 1:return c=e.v,this.off(l,s),e.a(2,c)}},e,this)})),function(e,t,n){return r.apply(this,arguments)})}]);var r}(Ba),sl=function(e){function t(e,r){var n;return Ya(this,t),qa(n=el(this,t,[e]),"name","WebWorkerRpcDriver"),n.workerBootConfiguration=r,n.makeWorkerInstance=e.makeWorkerInstance,n}return il(t,e),Za(t,[{key:"makeWorker",value:(r=Ka(Ha().m(function e(){var t,r,n=this;return Ha().w(function(e){for(;;)if(0===e.n)return t=this.makeWorkerInstance(),r=new ll({workers:[t]}),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&console.log("console logging the webworker handle avoids the track going into an infinite loading state, this is a hacky workaround for safari",t),e.a(2,new Promise(function(e,t){var o=function(i){switch(i.data.message){case"ready":e(r),r.workers[0].removeEventListener("message",o);break;case"readyForConfig":r.workers[0].postMessage({message:"config",config:n.workerBootConfiguration});break;case"error":t((0,za.deserializeError)(i.data.error))}};r.workers[0].addEventListener("message",o)}))},e,this)})),function(){return r.apply(this,arguments)})}]);var r}(Aa);const cl=(0,s.ConfigurationSchema)("BaseRpcDriver",{workerCount:{type:"number",description:"The number of workers to use. If 0 (the default) JBrowse will decide how many workers to use.",defaultValue:0}},{explicitlyTyped:!0}),ul=(0,s.ConfigurationSchema)("MainThreadRpcDriver",{},{baseConfiguration:cl,explicitlyTyped:!0}),fl=(0,s.ConfigurationSchema)("WebWorkerRpcDriver",{},{baseConfiguration:cl,explicitlyTyped:!0}),dl=(0,s.ConfigurationSchema)("RpcOptions",{defaultDriver:{type:"string",description:"the RPC driver to use for tracks and tasks that are not configured to use a specific RPC backend",defaultValue:"MainThreadRpcDriver"},drivers:_.types.optional(_.types.map(_.types.union(ul,fl)),{MainThreadRpcDriver:{type:"MainThreadRpcDriver"},WebWorkerRpcDriver:{type:"WebWorkerRpcDriver"}})},{actions:function(e){return{addDriverConfig:function(t,r){e.drivers.set(t,r)}}}});function pl(e){return pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pl(e)}function hl(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return ml(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(ml(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ml(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,ml(f,"constructor",c),ml(c,"constructor",s),s.displayName="GeneratorFunction",ml(c,o,"GeneratorFunction"),ml(f),ml(f,o,"Generator"),ml(f,n,function(){return this}),ml(f,"toString",function(){return"[object Generator]"}),(hl=function(){return{w:i,m:d}})()}function ml(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ml=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){ml(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},ml(e,t,r,n)}function yl(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function bl(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){yl(i,n,o,a,l,"next",e)}function l(e){yl(i,n,o,a,l,"throw",e)}a(void 0)})}}function vl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function gl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vl(Object(r),!0).forEach(function(t){Sl(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vl(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function wl(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Al(n.key),n)}}function Sl(e,t,r){return(t=Al(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Al(e){var t=function(e){if("object"!=pl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=pl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pl(t)?t:t+""}var Ol=function(){return e=function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pluginManager=t,this.mainConfiguration=r,this.backendConfigurations=n,this.driverObjects=new Map},t=[{key:"getDriver",value:function(e){var t=this.driverObjects.get(e);if(t)return t;var r=this.mainConfiguration.drivers.get("WebWorkerRpcDriver");if("MainThreadRpcDriver"===e){var n=this.backendConfigurations.MainThreadRpcDriver;if(!n)throw new Error('requested RPC driver "'.concat(e,'" is missing config'));var o=new Da(gl(gl({},n),{},{config:r}));return this.driverObjects.set(e,o),o}if("WebWorkerRpcDriver"===e){var i=this.backendConfigurations.WebWorkerRpcDriver;if(!i)throw new Error('requested RPC driver "'.concat(e,'" is missing config'));var a=new sl(gl(gl({},i),{},{config:r}),{plugins:this.pluginManager.runtimePluginDefinitions,windowHref:window.location.href});return this.driverObjects.set(e,a),a}throw new Error('requested RPC driver "'.concat(e,'" is not installed'))}},{key:"getDriverForCall",value:(n=bl(hl().m(function e(t,r,n){var o;return hl().w(function(e){for(;;)if(0===e.n)return o=n.rpcDriverName||(0,s.readConfObject)(this.mainConfiguration,"defaultDriver"),e.a(2,this.getDriver(o))},e,this)})),function(e,t,r){return n.apply(this,arguments)})},{key:"call",value:(r=bl(hl().m(function e(t,r,n){var o,i,a=arguments;return hl().w(function(e){for(;;)switch(e.n){case 0:if(o=a.length>3&&void 0!==a[3]?a[3]:{},t){e.n=1;break}throw new Error("sessionId is required");case 1:return e.n=2,this.getDriverForCall(t,r,n);case 2:return i=e.v,e.a(2,i.call(this.pluginManager,t,r,n,o))}},e,this)})),function(e,t,n){return r.apply(this,arguments)})}],t&&wl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,n}();Sl(Ol,"configSchema",dl);const xl=(0,s.ConfigurationSchema)("OAuthInternetAccount",{tokenType:{description:"a custom name for a token to include in the header",type:"string",defaultValue:"Bearer"},authEndpoint:{description:"the authorization code endpoint of the internet account",type:"string",defaultValue:""},tokenEndpoint:{description:"the token endpoint of the internet account",type:"string",defaultValue:""},needsPKCE:{description:"boolean to indicate if the endpoint needs a PKCE code",type:"boolean",defaultValue:!1},clientId:{description:"id for the OAuth application",type:"string",defaultValue:""},scopes:{description:"optional scopes for the authorization call",type:"string",defaultValue:""},state:{description:"optional state for the authorization call",type:"string",defaultValue:""},responseType:{description:"the type of response from the authorization endpoint. can be 'token' or 'code'",type:"string",defaultValue:"code"}},{baseConfiguration:fo.BaseInternetAccountConfig,explicitlyTyped:!0}),kl=(0,s.ConfigurationSchema)("DropboxOAuthInternetAccount",{authEndpoint:{description:"the authorization code endpoint of the internet account",type:"string",defaultValue:"https://www.dropbox.com/oauth2/authorize"},tokenEndpoint:{description:"the token endpoint of the internet account",type:"string",defaultValue:"https://api.dropbox.com/oauth2/token"},needsPKCE:{description:"boolean to indicate if the endpoint needs a PKCE code",type:"boolean",defaultValue:!0},domains:{description:"array of valid domains the url can contain to use this account",type:"stringArray",defaultValue:["addtodropbox.com","db.tt","dropbox.com","dropboxapi.com","dropboxbusiness.com","dropbox.tech","getdropbox.com"]}},{baseConfiguration:xl,explicitlyTyped:!0});function Cl(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Pl(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Pl(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Pl(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Pl(f,"constructor",c),Pl(c,"constructor",s),s.displayName="GeneratorFunction",Pl(c,o,"GeneratorFunction"),Pl(f),Pl(f,o,"Generator"),Pl(f,n,function(){return this}),Pl(f,"toString",function(){return"[object Generator]"}),(Cl=function(){return{w:i,m:d}})()}function Pl(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Pl=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Pl(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Pl(e,t,r,n)}function El(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function jl(e){return e.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function Tl(e){return _l.apply(this,arguments)}function _l(){var e;return e=Cl().m(function e(t){var r,n;return Cl().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Promise.resolve().then(o.t.bind(o,72110,23)).then(function(e){return e.default});case 1:return r=e.v,e.n=2,Promise.resolve().then(o.t.bind(o,72201,23));case 2:return n=e.v,e.a(2,jl(n.stringify(r(t))))}},e)}),_l=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){El(i,n,o,a,l,"next",e)}function l(e){El(i,n,o,a,l,"throw",e)}a(void 0)})},_l.apply(this,arguments)}function Rl(e,t){try{var r,n=JSON.parse(e);return"invalid_grant"===n.error&&t(),null!==(r=null==n?void 0:n.error_description)&&void 0!==r?r:e}catch(e){}return e}function Ml(e,t){return e.refresh_token&&t(e.refresh_token),e.access_token}function Il(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Nl(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Nl(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Nl(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Nl(f,"constructor",c),Nl(c,"constructor",s),s.displayName="GeneratorFunction",Nl(c,o,"GeneratorFunction"),Nl(f),Nl(f,o,"Generator"),Nl(f,n,function(){return this}),Nl(f,"toString",function(){return"[object Generator]"}),(Il=function(){return{w:i,m:d}})()}function Nl(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Nl=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Nl(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Nl(e,t,r,n)}function Dl(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Fl(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Dl(i,n,o,a,l,"next",e)}function l(e){Dl(i,n,o,a,l,"throw",e)}a(void 0)})}}function Ll(e){return zl.apply(this,arguments)}function zl(){return zl=Fl(Il().m(function e(t){var r,n,o,i,a,l,s;return Il().w(function(e){for(;;)switch(e.n){case 0:if(r=t.response,n=t.reason,o=t.statusText,i="HTTP ".concat(r.status),a=n,null==o){e.n=1;break}l=o,e.n=3;break;case 1:return e.n=2,Bl(r);case 2:l=e.v;case 3:return s=l,e.a(2,[i,a,s].filter(function(e){return!!e}).join(" - "))}},e)})),zl.apply(this,arguments)}function Bl(e){return $l.apply(this,arguments)}function $l(){return($l=Fl(Il().m(function e(t){return Il().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,t.text();case 1:return e.a(2,e.v);case 2:return e.p=2,e.v,e.a(2,t.statusText)}},e,null,[[0,2]])}))).apply(this,arguments)}function Gl(e){return Gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gl(e)}function Hl(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Vl(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Vl(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Vl(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Vl(f,"constructor",c),Vl(c,"constructor",s),s.displayName="GeneratorFunction",Vl(c,o,"GeneratorFunction"),Vl(f),Vl(f,o,"Generator"),Vl(f,n,function(){return this}),Vl(f,"toString",function(){return"[object Generator]"}),(Hl=function(){return{w:i,m:d}})()}function Vl(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Vl=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Vl(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Vl(e,t,r,n)}function Wl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ul(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wl(Object(r),!0).forEach(function(t){ql(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wl(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ql(e,t,r){return(t=function(e){var t=function(e){if("object"!=Gl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Gl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gl(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xl(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Kl(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Xl(i,n,o,a,l,"next",e)}function l(e){Xl(i,n,o,a,l,"throw",e)}a(void 0)})}}const Yl=function(e){return fo.InternetAccount.named("OAuthInternetAccount").props({type:_.types.literal("OAuthInternetAccount"),configuration:(0,s.ConfigurationReference)(e)}).views(function(){var e=void 0;return{get codeVerifierPKCE(){if(!e){var t=new Uint8Array(32);globalThis.crypto.getRandomValues(t),e=jl(function(e){for(var t=[],r=0,n=e.length;r<n;r++)t.push(String.fromCharCode(e[r]));return btoa(t.join(""))}(t))}return e}}}).views(function(e){return{get authEndpoint(){return(0,s.getConf)(e,"authEndpoint")},get tokenEndpoint(){return(0,s.getConf)(e,"tokenEndpoint")},get needsPKCE(){return(0,s.getConf)(e,"needsPKCE")},get clientId(){return(0,s.getConf)(e,"clientId")},get scopes(){return(0,s.getConf)(e,"scopes")},state:function(){return(0,s.getConf)(e,"state")},get responseType(){return(0,s.getConf)(e,"responseType")},get refreshTokenKey(){return"".concat(e.internetAccountId,"-refreshToken")}}}).actions(function(e){return{storeRefreshToken:function(t){localStorage.setItem(e.refreshTokenKey,t)},removeRefreshToken:function(){localStorage.removeItem(e.refreshTokenKey)},retrieveRefreshToken:function(){return localStorage.getItem(e.refreshTokenKey)},exchangeAuthorizationForAccessToken:function(t,r){var n=this;return Kl(Hl().m(function o(){var i,a,l,s,c;return Hl().w(function(o){for(;;)switch(o.n){case 0:return i=new URLSearchParams(Object.entries(Ul({code:t,grant_type:"authorization_code",client_id:e.clientId,redirect_uri:r},e.needsPKCE?{code_verifier:e.codeVerifierPKCE}:{}))),o.n=1,fetch(e.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:i.toString()});case 1:if((a=o.v).ok){o.n=3;break}return s=Error,o.n=2,Ll({response:a,reason:"Failed to obtain token"});case 2:throw c=o.v,new s(c);case 3:return o.n=4,a.json();case 4:return l=o.v,o.a(2,Ml(l,function(e){n.storeRefreshToken(e)}))}},o)}))()},exchangeRefreshForAccessToken:function(t){var r=this;return Kl(Hl().m(function n(){var o,i,a,l,s;return Hl().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,fetch(e.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(Object.entries({grant_type:"refresh_token",refresh_token:t,client_id:e.clientId})).toString()});case 1:if((o=n.v).ok){n.n=4;break}return e.removeToken(),n.n=2,o.text();case 2:return i=n.v,l=Error,n.n=3,Ll({response:o,statusText:Rl(i,function(){r.removeRefreshToken()})});case 3:throw s=n.v,new l(s);case 4:return n.n=5,o.json();case 5:return a=n.v,n.a(2,Ml(a,function(e){r.storeRefreshToken(e)}))}},n)}))()}}}).actions(function(e){var t,r=void 0;return{addMessageChannel:function(e,r){var n=this;t=function(t){n.finishOAuthWindow(t,e,r)},window.addEventListener("message",t)},deleteMessageChannel:function(){window.removeEventListener("message",t)},finishOAuthWindow:function(t,r,n){var o=this;return Kl(Hl().m(function i(){var a,l,s,c,u,f,d,p,h;return Hl().w(function(i){for(;;)switch(i.n){case 0:if(t.data.name==="JBrowseAuthWindow-".concat(e.internetAccountId)){i.n=1;break}return o.deleteMessageChannel(),i.a(2);case 1:if(a=t.data.redirectUri,l=a.replace("#","?"),s=new URL(l),c=s.search,!(u=new URLSearchParams(c)).has("access_token")){i.n=3;break}if(f=u.get("access_token")){i.n=2;break}return n(new Error("Error with token endpoint")),i.a(2);case 2:return e.storeToken(f),r(f),i.a(2);case 3:if(!u.has("code")){i.n=7;break}if(d=u.get("code")){i.n=4;break}return n(new Error("Error with authorization endpoint")),i.a(2);case 4:return i.p=4,i.n=5,e.exchangeAuthorizationForAccessToken(d,s.origin+s.pathname);case 5:return p=i.v,e.storeToken(p),r(p),i.a(2);case 6:return i.p=6,(h=i.v)instanceof Error?n(h):n(new Error(String(h))),i.a(2);case 7:if(!a.includes("access_denied")){i.n=8;break}return n(new Error("OAuth flow was cancelled")),i.a(2);case 8:if(!a.includes("error")){i.n=9;break}return n(new Error("OAuth flow error: ".concat(c))),i.a(2);case 9:o.deleteMessageChannel();case 10:return i.a(2)}},i,null,[[4,6]])}))()},useEndpointForAuthorization:function(t,r){var n=this;return Kl(Hl().m(function o(){var i,a,l,s,c,f,d,p,h;return Hl().w(function(o){for(;;)switch(o.n){case 0:if(i=u.isElectron?"http://localhost/auth":window.location.origin+window.location.pathname,a={client_id:e.clientId,redirect_uri:i,response_type:e.responseType,token_access_type:"offline"},e.state()&&(a.state=e.state()),e.scopes&&(a.scope=e.scopes),!e.needsPKCE){o.n=2;break}return o.n=1,Tl(e.codeVerifierPKCE);case 1:a.code_challenge=o.v,a.code_challenge_method="S256";case 2:if(l=new URLSearchParams(Object.entries(a)),(s=new URL(e.authEndpoint)).search=l.toString(),c="JBrowseAuthWindow-".concat(e.internetAccountId),!u.isElectron){o.n=4;break}return f=window.require("electron"),d=f.ipcRenderer,o.n=3,d.invoke("openAuthWindow",{internetAccountId:e.internetAccountId,data:a,url:s.toString()});case 3:p=o.v,h=new MessageEvent("message",{data:{name:c,redirectUri:p}}),n.finishOAuthWindow(h,t,r),o.n=5;break;case 4:window.open(s,c,"width=500,height=600,left=0,top=0");case 5:return o.a(2)}},o)}))()},getTokenFromUser:function(t,r){var n=this;return Kl(Hl().m(function o(){var i,a,l,s;return Hl().w(function(o){for(;;)switch(o.n){case 0:if(i=e.retrieveRefreshToken(),a=!0,!i){o.n=4;break}return o.p=1,o.n=2,e.exchangeRefreshForAccessToken(i);case 2:l=o.v,t(l),a=!1,o.n=4;break;case 3:o.p=3,s=o.v,console.error(s),e.removeRefreshToken();case 4:a&&(n.addMessageChannel(t,r),n.useEndpointForAuthorization(t,r));case 5:return o.a(2)}},o,null,[[1,3]])}))()},validateToken:function(t,n){return Kl(Hl().m(function o(){var i,a,l,s,c,u,f;return Hl().w(function(o){for(;;)switch(o.n){case 0:return i=e.addAuthHeaderToInit({method:"HEAD"},t),o.n=1,fetch(n.uri,i);case 1:if((a=o.v).ok){o.n=7;break}if(e.removeToken(),!(l=e.retrieveRefreshToken())){o.n=5;break}return o.p=2,r||(r=e.exchangeRefreshForAccessToken(l)),o.n=3,r;case 3:return s=o.v,r=void 0,o.a(2,s);case 4:o.p=4,c=o.v,console.error("Token could not be refreshed",c);case 5:return u=Error,o.n=6,Ll({response:a,reason:"Error validating token"});case 6:throw f=o.v,new u(f);case 7:return o.a(2,t)}},o,null,[[2,4]])}))()}}}).actions(function(e){var t=e.getFetcher;return{getFetcher:function(r){var n=t(r);return function(){var t=Kl(Hl().m(function t(o,i){var a,l,s;return Hl().w(function(t){for(;;)switch(t.n){case 0:if(!r){t.n=2;break}return a=e,t.n=1,e.getToken(r);case 1:return l=t.v,s=r,t.n=2,a.validateToken.call(a,l,s);case 2:return t.a(2,n(o,i))}},t)}));return function(e,r){return t.apply(this,arguments)}}()}}})};var Jl=o(61845),Zl=o(14041);function Ql(e){return Zl.createElement(Jl.A,e,Zl.createElement("path",{d:"M3 6.2L8 9.39L13 6.2L8 3L3 6.2M13 6.2L18 9.39L23 6.2L18 3L13 6.2M3 12.55L8 15.74L13 12.55L8 9.35L3 12.55M18 9.35L13 12.55L18 15.74L23 12.55L18 9.35M8.03 16.8L13.04 20L18.04 16.8L13.04 13.61L8.03 16.8Z"}))}function es(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return ts(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(ts(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ts(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,ts(f,"constructor",c),ts(c,"constructor",s),s.displayName="GeneratorFunction",ts(c,o,"GeneratorFunction"),ts(f),ts(f,o,"Generator"),ts(f,n,function(){return this}),ts(f,"toString",function(){return"[object Generator]"}),(es=function(){return{w:i,m:d}})()}function ts(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ts=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){ts(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},ts(e,t,r,n)}function rs(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}var ns={shared_link_not_found:"The shared link wasn't found.",shared_link_access_denied:"The caller is not allowed to access this shared link.",unsupported_link_type:"This type of link is not supported; use files/export instead.",shared_link_is_directory:"Directories cannot be retrieved by this endpoint."};function os(e,t){return is.apply(this,arguments)}function is(){var e;return e=es().m(function e(t,r){var n,o,i,a,l;return es().w(function(e){for(;;)switch(e.n){case 0:return n="",e.p=1,a=JSON,e.n=2,t.text();case 2:l=e.v,o=a.parse.call(a,l),i=o.error[".tag"],n=ns[i]||i,e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,Ll({response:t,reason:r,statusText:n}))}},e,null,[[1,3]])}),is=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){rs(i,n,o,a,l,"next",e)}function l(e){rs(i,n,o,a,l,"throw",e)}a(void 0)})},is.apply(this,arguments)}var as=o(14041);function ls(e){return ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ls(e)}function ss(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return cs(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(cs(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,cs(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,cs(f,"constructor",c),cs(c,"constructor",s),s.displayName="GeneratorFunction",cs(c,o,"GeneratorFunction"),cs(f),cs(f,o,"Generator"),cs(f,n,function(){return this}),cs(f,"toString",function(){return"[object Generator]"}),(ss=function(){return{w:i,m:d}})()}function cs(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}cs=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){cs(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},cs(e,t,r,n)}function us(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function fs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?us(Object(r),!0).forEach(function(t){ds(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):us(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ds(e,t,r){return(t=function(e){var t=function(e){if("object"!=ls(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ls(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ls(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ps(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function hs(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ps(i,n,o,a,l,"next",e)}function l(e){ps(i,n,o,a,l,"throw",e)}a(void 0)})}}const ms=function(e){return Yl(xl).named("DropboxOAuthInternetAccount").props({type:_.types.literal("DropboxOAuthInternetAccount"),configuration:(0,s.ConfigurationReference)(e)}).views(function(){return{get toggleContents(){return as.createElement(Ql,null)},get selectorLabel(){return"Enter Dropbox share link"}}}).actions(function(e){return{getFetcher:function(t){return function(){var r=hs(ss().m(function r(n,o){var i,a,l,s,c;return ss().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,e.getToken(t);case 1:return i=r.v,(a=e.addAuthHeaderToInit(fs(fs({},o),{},{method:"POST"}),i)).headers.append("Dropbox-API-Arg",JSON.stringify({url:n})),r.n=2,fetch("https://content.dropboxapi.com/2/sharing/get_shared_link_file",a);case 2:if((l=r.v).ok){r.n=4;break}return s=Error,r.n=3,os(l);case 3:throw c=r.v,new s(c);case 4:return r.a(2,l)}},r)}));return function(e,t){return r.apply(this,arguments)}}()},validateToken:function(t,r){var n=this;return hs(ss().m(function o(){var i,a,l,s,c;return ss().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,fetch("https://api.dropboxapi.com/2/sharing/get_shared_link_metadata",{method:"POST",headers:{Authorization:"Bearer ".concat(t),"Content-Type":"application/json"},body:JSON.stringify({url:r.uri})});case 1:if((i=o.v).ok){o.n=5;break}if(!(a=e.retrieveRefreshToken())){o.n=3;break}return e.removeRefreshToken(),o.n=2,e.exchangeRefreshForAccessToken(a);case 2:return l=o.v,o.a(2,n.validateToken(l,r));case 3:return s=Error,o.n=4,os(i,"Token could not be validated");case 4:throw c=o.v,new s(c);case 5:return o.a(2,t)}},o)}))()}}})},ys=(0,s.ConfigurationSchema)("ExternalTokenInternetAccount",{validateWithHEAD:{description:"validate the token with a HEAD request before using it",type:"boolean",defaultValue:!0}},{baseConfiguration:fo.BaseInternetAccountConfig,explicitlyTyped:!0});var bs=o(68805),vs=o(95305),gs=o(97469),ws=o(98819),Ss=o(14041);function As(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Os=function(e){var t,r,n=e.internetAccountId,o=e.handleClose,i=(t=(0,a.useState)(""),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return As(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?As(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=i[0],s=i[1];return Ss.createElement(c.Dialog,{open:!0,maxWidth:"xl","data-testid":"externalToken-form",onClose:function(){o()},title:"Enter token for ".concat(n)},Ss.createElement(bs.A,{style:{display:"flex",flexDirection:"column"}},Ss.createElement(vs.A,{required:!0,label:"Enter Token",variant:"outlined",onChange:function(e){s(e.target.value)},margin:"dense",slotProps:{htmlInput:{"data-testid":"entry-externalToken"}}})),Ss.createElement(gs.A,null,Ss.createElement(ws.A,{variant:"contained",color:"primary",type:"submit",disabled:!l,onClick:function(){l&&o(l)}},"Add"),Ss.createElement(ws.A,{variant:"contained",color:"secondary",onClick:function(){o()}},"Cancel")))};function xs(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return ks(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(ks(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,ks(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,ks(f,"constructor",c),ks(c,"constructor",s),s.displayName="GeneratorFunction",ks(c,o,"GeneratorFunction"),ks(f),ks(f,o,"Generator"),ks(f,n,function(){return this}),ks(f,"toString",function(){return"[object Generator]"}),(xs=function(){return{w:i,m:d}})()}function ks(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ks=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){ks(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},ks(e,t,r,n)}function Cs(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}const Ps=function(e){return fo.InternetAccount.named("ExternalTokenInternetAccount").props({type:_.types.literal("ExternalTokenInternetAccount"),configuration:(0,s.ConfigurationReference)(e)}).views(function(e){return{get validateWithHEAD(){return(0,s.getConf)(e,"validateWithHEAD")}}}).actions(function(e){return{getTokenFromUser:function(t,r){(0,_.getRoot)(e).session.queueDialog(function(n){return[Os,{internetAccountId:e.internetAccountId,handleClose:function(e){e?t(e):r(new Error("user cancelled entry")),n()}}]})},validateToken:function(t,r){return(n=xs().m(function n(){var o,i,a;return xs().w(function(n){for(;;)switch(n.n){case 0:if(e.validateWithHEAD){n.n=1;break}return n.a(2,t);case 1:return o=e.addAuthHeaderToInit({method:"HEAD"},t),n.n=2,fetch(r.uri,o);case 2:if((i=n.v).ok){n.n=7;break}return n.p=3,n.n=4,i.text();case 4:a=n.v,n.n=6;break;case 5:n.p=5,n.v,a="";case 6:throw new Error("Token could not be validated — ".concat(i.status," ").concat(a?" (".concat(a,")"):""));case 7:return n.a(2,t)}},n,null,[[3,5]])}),function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){Cs(i,r,o,a,l,"next",e)}function l(e){Cs(i,r,o,a,l,"throw",e)}a(void 0)})})();var n}}})},Es=(0,s.ConfigurationSchema)("GoogleDriveOAuthInternetAccount",{authEndpoint:{description:"the authorization code endpoint of the internet account",type:"string",defaultValue:"https://accounts.google.com/o/oauth2/v2/auth"},scopes:{description:"optional scopes for the authorization call",type:"string",defaultValue:"https://www.googleapis.com/auth/drive.readonly"},domains:{description:"array of valid domains the url can contain to use this account",type:"stringArray",defaultValue:['drive.google.com"']},responseType:{description:"the type of response from the authorization endpoint",type:"string",defaultValue:"token"}},{baseConfiguration:xl,explicitlyTyped:!0});function js(e){return js="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},js(e)}function Ts(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return _s(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(_s(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_s(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,_s(f,"constructor",c),_s(c,"constructor",s),s.displayName="GeneratorFunction",_s(c,o,"GeneratorFunction"),_s(f),_s(f,o,"Generator"),_s(f,n,function(){return this}),_s(f,"toString",function(){return"[object Generator]"}),(Ts=function(){return{w:i,m:d}})()}function _s(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}_s=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){_s(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},_s(e,t,r,n)}function Rs(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ms(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Rs(i,n,o,a,l,"next",e)}function l(e){Rs(i,n,o,a,l,"throw",e)}a(void 0)})}}function Is(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ns(n.key),n)}}function Ns(e){var t=function(e){if("object"!=js(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=js(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==js(t)?t:t+""}function Ds(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ds=function(){return!!e})()}function Fs(e,t,r,n){var o=Ls(zs(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Ls(){return Ls="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=zs(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Ls.apply(null,arguments)}function zs(e){return zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zs(e)}function Bs(e,t){return Bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bs(e,t)}var $s=function(e){function t(e,r){var n,o,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=this,i=t,a=[e,r],i=zs(i),n=function(e,t){if(t&&("object"==js(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(o,Ds()?Reflect.construct(i,a||[],zs(o).constructor):i.apply(o,a))).statsPromise=n.fetch(e,{metadataOnly:!0}).then(function(e){return e.json()}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bs(e,t)}(t,e),r=t,n=[{key:"fetch",value:(i=Ms(Ts().m(function e(r,n){return Ts().w(function(e){for(;;)if(0===e.n)return e.a(2,Fs(t,"fetch",this,3)([r,n]))},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"stat",value:(o=Ms(Ts().m(function e(){return Ts().w(function(e){for(;;)if(0===e.n)return e.a(2,this.statsPromise)},e,this)})),function(){return o.apply(this,arguments)})}],n&&Is(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(So.RemoteFileWithRangeCache),Gs=o(14041);function Hs(e){return Gs.createElement(Jl.A,e,Gs.createElement("path",{d:"M7.71,3.5L1.15,15L4.58,21L11.13,9.5M9.73,15L6.3,21H19.42L22.85,15M22.28,14L15.42,2H8.58L8.57,2L15.43,14H22.28Z"}))}function Vs(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Ws(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ws(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ws(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Ws(f,"constructor",c),Ws(c,"constructor",s),s.displayName="GeneratorFunction",Ws(c,o,"GeneratorFunction"),Ws(f),Ws(f,o,"Generator"),Ws(f,n,function(){return this}),Ws(f,"toString",function(){return"[object Generator]"}),(Vs=function(){return{w:i,m:d}})()}function Ws(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ws=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ws(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ws(e,t,r,n)}function Us(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function qs(e,t){return Xs.apply(this,arguments)}function Xs(){var e;return e=Vs().m(function e(t,r){var n,o,i,a;return Vs().w(function(e){for(;;)switch(e.n){case 0:return n="",e.p=1,i=JSON,e.n=2,t.text();case 2:a=e.v,o=i.parse.call(i,a),n=o.error.message,e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,Ll({response:t,reason:r,statusText:n}))}},e,null,[[1,3]])}),Xs=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Us(i,n,o,a,l,"next",e)}function l(e){Us(i,n,o,a,l,"throw",e)}a(void 0)})},Xs.apply(this,arguments)}var Ks=o(14041);function Ys(e){return Ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ys(e)}function Js(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Zs(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Zs(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Zs(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Zs(f,"constructor",c),Zs(c,"constructor",s),s.displayName="GeneratorFunction",Zs(c,o,"GeneratorFunction"),Zs(f),Zs(f,o,"Generator"),Zs(f,n,function(){return this}),Zs(f,"toString",function(){return"[object Generator]"}),(Js=function(){return{w:i,m:d}})()}function Zs(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Zs=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Zs(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Zs(e,t,r,n)}function Qs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ec(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qs(Object(r),!0).forEach(function(t){tc(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qs(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function tc(e,t,r){return(t=function(e){var t=function(e){if("object"!=Ys(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ys(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ys(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rc(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function nc(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){rc(i,n,o,a,l,"next",e)}function l(e){rc(i,n,o,a,l,"throw",e)}a(void 0)})}}function oc(e){var t=/[-\w]{25,}/.exec(e);return"https://www.googleapis.com/drive/v3/files/".concat(t)}function ic(e){return Yl(xl).named("GoogleDriveOAuthInternetAccount").props({type:_.types.literal("GoogleDriveOAuthInternetAccount"),configuration:(0,s.ConfigurationReference)(e)}).views(function(){return{get toggleContents(){return Ks.createElement(Hs,null)},get selectorLabel(){return"Enter Google Drive share link"}}}).actions(function(e){return{getFetcher:function(t){return function(){var r=nc(Js().m(function r(n,o){var i,a,l,s,c,u;return Js().w(function(r){for(;;)switch(r.n){case 0:return i=new URL(oc(String(n))),a=new URLSearchParams,null!=o&&o.metadataOnly?a.append("fields","size"):a.append("alt","media"),i.search=a.toString(),r.n=1,e.getToken(t);case 1:return l=r.v,r.n=2,fetch(i,e.addAuthHeaderToInit(ec(ec({},o),{},{method:"GET",credentials:"same-origin"}),l));case 2:if((s=r.v).ok){r.n=4;break}return c=Error,r.n=3,qs(s);case 3:throw u=r.v,new c(u);case 4:return r.a(2,s)}},r)}));return function(e,t){return r.apply(this,arguments)}}()},openLocation:function(e){return new $s(e.uri,{fetch:this.getFetcher(e)})},validateToken:function(e,t){return nc(Js().m(function r(){var n,o,i;return Js().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,fetch(oc(t.uri),{headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/x-www-form-urlencoded"}});case 1:if((n=r.v).ok){r.n=3;break}return o=Error,r.n=2,qs(n,"Token could not be validated");case 2:throw i=r.v,new o(i);case 3:return r.a(2,e)}},r)}))()}}})}const ac=(0,s.ConfigurationSchema)("HTTPBasicInternetAccount",{tokenType:{description:"a custom name for a token to include in the header",type:"string",defaultValue:"Basic"},validateWithHEAD:{description:"validate the token with a HEAD request before using it",type:"boolean",defaultValue:!0}},{baseConfiguration:fo.BaseInternetAccountConfig,explicitlyTyped:!0});var lc=o(14041);function sc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return cc(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cc(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function uc(e){var t=e.internetAccountId,r=e.handleClose,n=sc((0,a.useState)(""),2),o=n[0],i=n[1],l=sc((0,a.useState)(""),2),s=l[0],u=l[1];return lc.createElement(c.Dialog,{open:!0,maxWidth:"xl","data-testid":"login-httpbasic",title:"Log in for ".concat(t),onClose:function(){r()}},lc.createElement("form",{onSubmit:function(e){o&&s?r(btoa("".concat(o,":").concat(s))):r(),e.preventDefault()}},lc.createElement(bs.A,{style:{display:"flex",flexDirection:"column"}},lc.createElement(vs.A,{required:!0,label:"Username",variant:"outlined",onChange:function(e){i(e.target.value)},margin:"dense",slotProps:{htmlInput:{"data-testid":"login-httpbasic-username"}}}),lc.createElement(vs.A,{required:!0,label:"Password",type:"password",autoComplete:"current-password",variant:"outlined",onChange:function(e){u(e.target.value)},margin:"dense",slotProps:{htmlInput:{"data-testid":"login-httpbasic-password"}}})),lc.createElement(gs.A,null,lc.createElement(ws.A,{variant:"contained",color:"primary",type:"submit"},"Submit"),lc.createElement(ws.A,{variant:"contained",color:"secondary",type:"submit",onClick:function(){r()}},"Cancel"))))}function fc(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return dc(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(dc(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,dc(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,dc(f,"constructor",c),dc(c,"constructor",s),s.displayName="GeneratorFunction",dc(c,o,"GeneratorFunction"),dc(f),dc(f,o,"Generator"),dc(f,n,function(){return this}),dc(f,"toString",function(){return"[object Generator]"}),(fc=function(){return{w:i,m:d}})()}function dc(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}dc=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){dc(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},dc(e,t,r,n)}function pc(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}const hc=function(e){return fo.InternetAccount.named("HTTPBasicInternetAccount").props({type:_.types.literal("HTTPBasicInternetAccount"),configuration:(0,s.ConfigurationReference)(e)}).views(function(e){return{get validateWithHEAD(){return(0,s.getConf)(e,"validateWithHEAD")}}}).actions(function(e){return{getTokenFromUser:function(t,r){(0,_.getRoot)(e).session.queueDialog(function(n){return[uc,{internetAccountId:e.internetAccountId,handleClose:function(e){e?t(e):r(new Error("User cancelled entry")),n()}}]})},validateToken:function(t,r){return(n=fc().m(function n(){var o,i,a,l;return fc().w(function(n){for(;;)switch(n.n){case 0:if(e.validateWithHEAD){n.n=1;break}return n.a(2,t);case 1:return o=e.addAuthHeaderToInit({method:"HEAD"},t),n.n=2,fetch(r.uri,o);case 2:if((i=n.v).ok){n.n=4;break}return a=Error,n.n=3,Ll({response:i,reason:"Error validating token"});case 3:throw l=n.v,new a(l);case 4:return n.a(2,t)}},n)}),function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){pc(i,r,o,a,l,"next",e)}function l(e){pc(i,r,o,a,l,"throw",e)}a(void 0)})})();var n}}})};function mc(e){return mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mc(e)}function yc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sc(n.key),n)}}function bc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(bc=function(){return!!e})()}function vc(e){return vc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vc(e)}function gc(e,t){return gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gc(e,t)}function wc(e,t,r){return(t=Sc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sc(e){var t=function(e){if("object"!=mc(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mc(t)?t:t+""}var Ac=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return wc((r=this,n=t,o=[].concat(a),n=vc(n),e=function(e,t){if(t&&("object"==mc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,bc()?Reflect.construct(n,o||[],vc(r).constructor):n.apply(r,o))),"name","AuthenticationPlugin"),wc(e,"exports",{OAuthConfigSchema:xl,OAuthInternetAccountModelFactory:Yl,ExternalTokenConfigSchema:ys,ExternalTokenInternetAccountModelFactory:Ps,HTTPBasicConfigSchema:ac,HTTPBasicInternetAccountModelFactory:hc,DropboxOAuthConfigSchema:kl,DropboxOAuthInternetAccountModelFactory:ms,GoogleDriveOAuthConfigSchema:Es,GoogleDriveOAuthInternetAccountModelFactory:ic}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gc(e,t)}(t,e),r=t,(n=[{key:"install",value:function(e){e.addInternetAccountType(function(){return new ri.A({name:"OAuthInternetAccount",configSchema:xl,stateModel:Yl(xl)})}),e.addInternetAccountType(function(){return new ri.A({name:"ExternalTokenInternetAccount",configSchema:ys,stateModel:Ps(ys)})}),e.addInternetAccountType(function(){return new ri.A({name:"HTTPBasicInternetAccount",configSchema:ac,stateModel:hc(ac)})}),e.addInternetAccountType(function(){return new ri.A({name:"DropboxOAuthInternetAccount",configSchema:kl,stateModel:ms(kl)})}),e.addInternetAccountType(function(){return new ri.A({name:"GoogleDriveOAuthInternetAccount",configSchema:Es,stateModel:ic(Es)})})}}])&&yc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we.A);const Oc=(0,Tn.A)((0,A.jsx)("path",{d:"M13 2.05v3.03c3.39.49 6 3.39 6 6.92 0 .9-.18 1.75-.48 2.54l2.6 1.53c.56-1.24.88-2.62.88-4.07 0-5.18-3.95-9.45-9-9.95M12 19c-3.87 0-7-3.13-7-7 0-3.53 2.61-6.43 6-6.92V2.05c-5.06.5-9 4.76-9 9.95 0 5.52 4.47 10 9.99 10 3.31 0 6.24-1.61 8.06-4.09l-2.6-1.53C16.17 17.98 14.21 19 12 19"}),"DataUsage");var xc=o(78179);const kc=(0,Tn.A)((0,A.jsx)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z"}),"FolderOpen");var Cc=o(68776),Pc=o(45060);function Ec(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return jc(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jc(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Tc(e,t,r,n,o){var i=Math.abs(e-r);if(!(i>n)){i===n&&o.push([t,e]);var a=Math.sqrt(n*n-i*i);o.push([t-a,e],[t+a,e])}}function _c(e,t,r,n,o){var i=Math.abs(e-t);if(!(i>n)){i===n&&o.push([e,r]);var a=Math.sqrt(n*n-i*i);o.push([e,r-a],[e,r+a])}}function Rc(e,t){var r=Math.sqrt(e*e+t*t);if(0===r)return[0,0];var n=function(e,t){var r=(Math.atan(t/e)+2*Math.PI)%(2*Math.PI);return e<0&&(t<=0?r+=Math.PI:r-=Math.PI),r}(e,t);return[r,n]}var Mc=2*Math.PI;function Ic(e){return Ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ic(e)}function Nc(e,t){if(e){if("string"==typeof e)return Dc(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dc(e,t):void 0}}function Dc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Fc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Lc(n.key),n)}}function Lc(e){var t=function(e){if("object"!=Ic(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ic(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ic(t)?t:t+""}var zc=function(){return e=function e(t,r,n,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.region=r,this.offsetRadians=n,this.radianWidth=o;var i=t.bpPerRadian;this.key="regions"in r?JSON.stringify(r.regions):(0,u.assembleLocString)(r),this.bpPerRadian=i,this.flipped=!1,this.startRadians=n,this.endRadians=r.widthBp/this.bpPerRadian+n,Object.freeze(this)},(t=[{key:"bpToXY",value:function(e,t){var r=(this.region.elided?this.region.widthBp/2:this.flipped?this.region.end-e:e-this.region.start)/this.bpPerRadian+this.offsetRadians;return(0,u.polarToCartesian)(t,r)}},{key:"toJSON",value:function(){return Object.fromEntries(Object.entries(this))}}])&&Fc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Bc(e,t){var r,n,o,i,a,l,s=(a=e.visibleSection.theta,l=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(a,l)||Nc(a,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=s[0],u=s[1];return r=t.offsetRadians+e.offsetRadians,o=c,i=u-c,!((n=t.radianWidth)<=0||i<=0)&&(n+1e-4>=Mc||i+1e-4>=Mc||(r=(r%Mc+Mc)%Mc+Mc)<(o=(o%Mc+Mc)%Mc+Mc)+i&&r+n>o||r<(o-=Mc)+i&&r+n>o||r<(o+=Mc+Mc)+i&&r+n>o)}function $c(e){return $c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$c(e)}function Gc(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Hc(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Hc(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Hc(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Hc(f,"constructor",c),Hc(c,"constructor",s),s.displayName="GeneratorFunction",Hc(c,o,"GeneratorFunction"),Hc(f),Hc(f,o,"Generator"),Hc(f,n,function(){return this}),Hc(f,"toString",function(){return"[object Generator]"}),(Gc=function(){return{w:i,m:d}})()}function Hc(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Hc=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Hc(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Hc(e,t,r,n)}function Vc(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Wc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Uc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wc(Object(r),!0).forEach(function(t){qc(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wc(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function qc(e,t,r){return(t=function(e){var t=function(e){if("object"!=$c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=$c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xc(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Kc(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function Kc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Yc=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,96232))});const Jc=function(e){return _.types.compose("CircularView",fo.BaseViewModel,_.types.model({type:_.types.literal("CircularView"),offsetRadians:-Math.PI/2,bpPerPx:200,tracks:_.types.array(e.pluggableMstType("track","stateModel")),hideVerticalResizeHandle:!1,hideTrackSelectorButton:!1,lockedFitToWindow:!0,disableImportForm:!1,height:_.types.optional(_.types.number,400),displayedRegions:_.types.optional(_.types.frozen(),[]),scrollX:0,scrollY:0,minimumRadiusPx:25,spacingPx:10,paddingPx:80,lockedPaddingPx:100,minVisibleWidth:6,minimumBlockWidth:20,trackSelectorType:"hierarchical"})).volatile(function(){return{volatileWidth:void 0,error:void 0}}).views(function(e){return{get width(){if(void 0===e.volatileWidth)throw new Error("wait for view to be initialized first before accessing width");return e.volatileWidth},get visibleSection(){var t=e.scrollX,r=e.scrollY;return function(e,t,r){var n=Ec(e,4),o=n[0],i=n[1],a=n[2],l=n[3],s=Ec(t,2),c=s[0],u=s[1];if(i-=c,a-=u,l-=u,(o-=c)<0&&i>0&&a<0&&l>0){for(var f=[[o,a],[i,a],[o,l],[i,l]],d=Number.NEGATIVE_INFINITY,p=0,h=f;p<h.length;p++){var m=Ec(h[p],2),y=m[0],b=m[1],v=Math.sqrt(y*y+b*b);v>d&&(d=v)}return{rho:[0,Math.min(r,d)],theta:[0,2*Math.PI]}}var g=[[o,a],[i,a],[o,l],[i,l]];_c(o,0,0,r,g),_c(i,0,0,r,g),Tc(a,0,0,r,g),Tc(l,0,0,r,g),-o<r&&g.push([o,0]),i<r&&g.push([i,0]),-a<r&&g.push([0,a]),l<r&&g.push([0,l]);for(var w=o>=0?-1:1,S=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,O=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY,k=0,C=g;k<C.length;k++){var P=Ec(C[k],2),E=P[0],j=P[1];if(E>=o&&E<=i&&j>=a&&j<=l){var T=Ec(Rc(E*w,j*w),2),_=T[0],R=T[1];_<=r+.001&&(R<O&&_>1e-4&&(O=R),R>x&&_>1e-4&&(x=R),_<S&&(S=_),_>A&&(A=_))}}return-1===w&&(O+=Math.PI,x+=Math.PI),O>2*Math.PI&&x>2*Math.PI&&(O-=2*Math.PI,x-=2*Math.PI),{rho:[S,Math.min(r,A)],theta:[O,x]}}([t,t+e.width,r,r+e.height],this.centerXY,this.radiusPx)},get circumferencePx(){var t,r=0,n=Xc(this.elidedRegions);try{for(n.s();!(t=n.n()).done;)r+=t.value.widthBp}catch(e){n.e(e)}finally{n.f()}return r/e.bpPerPx+e.spacingPx*this.elidedRegions.length},get radiusPx(){return this.circumferencePx/(2*Math.PI)},get bpPerRadian(){return e.bpPerPx*this.radiusPx},get pxPerRadian(){return this.radiusPx},get centerXY(){return[this.radiusPx+e.paddingPx,this.radiusPx+e.paddingPx]},get totalBp(){var t,r=0,n=Xc(e.displayedRegions);try{for(n.s();!(t=n.n()).done;){var o=t.value;r+=o.end-o.start}}catch(e){n.e(e)}finally{n.f()}return r},get maximumRadiusPx(){return e.lockedFitToWindow?Math.min(e.width,e.height)/2-e.lockedPaddingPx:1e6},get maxBpPerPx(){var t=2*Math.PI*e.minimumRadiusPx;return this.totalBp/t},get minBpPerPx(){var e=2*Math.PI*this.maximumRadiusPx;return(0,u.clamp)(this.totalBp/e,1e-10,this.maxBpPerPx)},get atMaxBpPerPx(){return e.bpPerPx>=this.maxBpPerPx},get atMinBpPerPx(){return e.bpPerPx<=this.minBpPerPx},get tooSmallToLock(){return this.minBpPerPx<=1e-10},get figureDimensions(){return[2*this.radiusPx+2*e.paddingPx,2*this.radiusPx+2*e.paddingPx]},get figureWidth(){return this.figureDimensions[0]},get figureHeight(){return this.figureDimensions[1]},get elidedRegions(){var t,r=[],n=Xc(e.displayedRegions);try{for(n.s();!(t=n.n()).done;){var o=t.value,i=o.end-o.start;if(i/e.bpPerPx<e.minVisibleWidth){var a=r.at(-1);null!=a&&a.elided?(a.regions.push(Uc({},o)),a.widthBp+=i):r.push({elided:!0,widthBp:i,regions:[Uc({},o)]})}else r.push(Uc(Uc({},o),{},{widthBp:i,elided:!1}))}}catch(e){n.e(e)}finally{n.f()}for(var l=0;l<r.length;l+=1){var s=r[l];s.elided&&1===s.regions.length&&(r[l]=Uc(Uc(Uc({},s),s.regions[0]),{},{elided:!1}))}return r},get assemblyNames(){var t,r=[],n=Xc(e.displayedRegions);try{for(n.s();!(t=n.n()).done;){var o=t.value;r.includes(o.assemblyName)||r.push(o.assemblyName)}}catch(e){n.e(e)}finally{n.f()}return r},get initialized(){var t=(0,u.getSession)(e).assemblyManager;return void 0!==e.volatileWidth&&this.assemblyNames.every(function(e){var r;return null===(r=t.get(e))||void 0===r?void 0:r.initialized})}}}).views(function(e){return{get staticSlices(){return function(e){var t,r=[],n=0,o=e.bpPerRadian,i=e.spacingPx,a=e.pxPerRadian,l=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Nc(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(e.elidedRegions);try{for(l.s();!(t=l.n()).done;){var s=t.value,c=s.widthBp/o+i/a;r.push(new zc(e,s,n,c)),n+=c}}catch(e){l.e(e)}finally{l.f()}return r}(e)}}}).views(function(e){return{get visibleStaticSlices(){return e.staticSlices.filter(function(t){return Bc(e,t)})}}}).actions(function(t){return{setWidth:function(e){return t.volatileWidth=Math.max(e,100),t.volatileWidth},setHeight:function(e){return t.height=Math.max(e,40),t.height},resizeHeight:function(e){var r=t.height,n=this.setHeight(t.height+e);return this.setModelViewWhenAdjust(!t.tooSmallToLock),n-r},resizeWidth:function(e){var r=t.width,n=this.setWidth(t.width+e);return this.setModelViewWhenAdjust(!t.tooSmallToLock),n-r},rotateClockwiseButton:function(){this.rotateClockwise(Math.PI/6)},rotateCounterClockwiseButton:function(){this.rotateCounterClockwise(Math.PI/6)},rotateClockwise:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.17;t.offsetRadians+=e},rotateCounterClockwise:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.17;t.offsetRadians-=e},zoomInButton:function(){this.setBpPerPx(t.bpPerPx/1.4)},zoomOutButton:function(){this.setBpPerPx(1.4*t.bpPerPx)},setBpPerPx:function(e){t.bpPerPx=(0,u.clamp)(e,t.minBpPerPx,t.maxBpPerPx)},setModelViewWhenAdjust:function(e){t.lockedFitToWindow&&e&&this.setBpPerPx(t.minBpPerPx)},setDisplayedRegions:function(e){var r=0===t.displayedRegions.length;t.displayedRegions=(0,_.cast)(e),r?this.setBpPerPx(t.minBpPerPx):this.setBpPerPx(t.bpPerPx)},activateTrackSelector:function(){if("hierarchical"===t.trackSelectorType){var e=(0,u.getSession)(t);if((0,u.isSessionModelWithWidgets)(e)){var r=e.addWidget("HierarchicalTrackSelectorWidget","hierarchicalTrackSelector",{view:t});return e.showWidget(r),r}}throw new Error("invalid track selector type ".concat(t.trackSelectorType))},toggleTrack:function(e){return!this.hideTrack(e)&&(this.showTrack(e),!0)},setError:function(e){t.error=e},showTrack:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.pluggableConfigSchemaType("track"),i=(0,_.resolveIdentifier)(o,(0,_.getRoot)(t),r),a=e.getTrackType(i.type);if(!a)throw new Error("unknown track type ".concat(i.type));var l=e.getViewType(t.type),s=new Set(l.displayTypes.map(function(e){return e.name})),c=i.displays.find(function(e){return s.has(e.type)}),u=a.stateModel.create(Uc(Uc({},n),{},{type:i.type,configuration:i,displays:[{type:c.type,configuration:c}]}));t.tracks.push(u)},addTrackConf:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.type,i=(0,s.readConfObject)(r,"name"),a=e.getTrackType(o);if(!a)throw new Error("unknown track type ".concat(o));var l=e.getViewType(t.type),c=new Set(l.displayTypes.map(function(e){return e.name})),u=r.displays.find(function(e){return c.has(e.type)});t.tracks.push(a.stateModel.create(Uc(Uc({},n),{},{name:i,type:o,configuration:r,displays:[{type:u.type,configuration:u}]})))},hideTrack:function(r){var n=e.pluggableConfigSchemaType("track"),o=(0,_.resolveIdentifier)(n,(0,_.getRoot)(t),r),i=t.tracks.filter(function(e){return e.configuration===o});return(0,le.transaction)(function(){var e,r=Xc(i);try{for(r.s();!(e=r.n()).done;){var n=e.value;t.tracks.remove(n)}}catch(e){r.e(e)}finally{r.f()}}),i.length},toggleFitToWindowLock:function(){return t.lockedFitToWindow=!t.lockedFitToWindow,this.setModelViewWhenAdjust(t.atMinBpPerPx),t.lockedFitToWindow},exportSvg:function(){var e,r=arguments;return(e=Gc().m(function e(){var n,i,a,l,s;return Gc().w(function(e){for(;;)switch(e.n){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},e.n=1,Promise.resolve().then(o.bind(o,90025));case 1:return i=e.v,a=i.renderToSvg,e.n=2,a(t,n);case 2:l=e.v,s=new Blob([l],{type:"image/svg+xml"}),(0,Pc.saveAs)(s,n.filename||"image.svg");case 3:return e.a(2)}},e)}),function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Vc(i,n,o,a,l,"next",e)}function l(e){Vc(i,n,o,a,l,"throw",e)}a(void 0)})})()}}}).views(function(e){return{menuItems:function(){return[{label:"Return to import form",onClick:function(){e.setDisplayedRegions([])},icon:kc},{label:"Export SVG",icon:Cc.A,onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Yc,{model:e,handleClose:t}]})}},{label:"Open track selector",onClick:e.activateTrackSelector,icon:xc.xU}]}}})};function Zc(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Qc(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Qc(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Qc(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Qc(f,"constructor",c),Qc(c,"constructor",s),s.displayName="GeneratorFunction",Qc(c,o,"GeneratorFunction"),Qc(f),Qc(f,o,"Generator"),Qc(f,n,function(){return this}),Qc(f,"toString",function(){return"[object Generator]"}),(Zc=function(){return{w:i,m:d}})()}function Qc(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Qc=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Qc(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Qc(e,t,r,n)}function eu(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return tu(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tu(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function tu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ru(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}var nu=o(14041),ou=(0,T.observer)(function(e){var t=e.model,r=t.renderProps.radius,n=t.error;return nu.createElement("g",null,nu.createElement("defs",null,nu.createElement("pattern",{id:"diagonalHatch",width:"10",height:"10",patternTransform:"rotate(45 0 0)",patternUnits:"userSpaceOnUse"},nu.createElement("line",{x1:"0",y1:"0",x2:"0",y2:"10",style:{stroke:"rgba(255,0,0,0.5)",strokeWidth:10}}))),nu.createElement("circle",{cx:"0",cy:"0",r,fill:"#ffb4b4"}),nu.createElement("circle",{cx:"0",cy:"0",r,fill:"url(#diagonalHatch)"}),nu.createElement("text",{x:"0",y:"0",transform:"rotate(90 0 0)",dominantBaseline:"middle",textAnchor:"middle"},String(n)))});const iu=ou;var au=o(14041);function lu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var su=(0,R.n9)()(function(e){var t=e.palette,r=t.primary,n=t.secondary,o=t.tertiary,i=t.quaternary;return{path:{strokeDasharray:187,strokeDashoffset:50,animation:"$dash ".concat(1.4,"s ease-in-out infinite, $colors ").concat(5.6,"s ease-in-out infinite")},"@keyframes colors":{"0%":{stroke:r.light},"25%":{stroke:n.light},"50%":{stroke:o.light},"75%":{stroke:i.light},"100%":{stroke:r.light}},"@keyframes dash":{"0%":{strokeDashoffset:2},"50%":{strokeDashoffset:.5,transform:"rotate(135deg)"},"100%":{strokeDashoffset:2,transform:"rotate(720deg)"}}}});const cu=(0,T.observer)(function(e){var t,r,n=e.model.renderProps.radius,o=su().classes,i=(t=(0,a.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return lu(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lu(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=i[0],s=i[1];return(0,a.useEffect)(function(){var e=setTimeout(function(){s(!0)},400);return function(){clearTimeout(e)}}),l?au.createElement("g",null,au.createElement("defs",null,au.createElement("pattern",{id:"diagonalHatch",width:"10",height:"10",patternTransform:"rotate(45 0 0)",patternUnits:"userSpaceOnUse"},au.createElement("line",{x1:"0",y1:"0",x2:"0",y2:"10",style:{stroke:"rgba(255,255,255,0.5)",strokeWidth:10}}))),au.createElement("circle",{cx:"0",cy:"0",r:n,fill:"#f1f1f1"}),au.createElement("circle",{cx:"0",cy:"0",r:n,fill:"url(#diagonalHatch)"}),au.createElement("text",{x:"0",y:"0",transform:"rotate(90 0 0)",dominantBaseline:"middle",textAnchor:"middle"},"Loading…"),au.createElement("circle",{className:o.path,fill:"none",strokeWidth:"4",strokeLinecap:"round",cx:"0",cy:"0",r:"60"})):null});var uu=o(14041);const fu=(0,T.observer)(function(e){var t=e.display;return t.error?uu.createElement(iu,{model:t}):t.filled?t.reactElement:uu.createElement(cu,{model:t})});var du=(0,s.ConfigurationSchema)("BaseChordDisplay",{onChordClick:{type:"boolean",description:"callback that should be run when a chord in the track is clicked",defaultValue:!1,contextVariable:["feature","track","pluginManager"]}},{explicitIdentifier:"displayId"});function pu(e){return pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pu(e)}var hu=["html"];function mu(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return yu(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(yu(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,yu(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,yu(f,"constructor",c),yu(c,"constructor",s),s.displayName="GeneratorFunction",yu(c,o,"GeneratorFunction"),yu(f),yu(f,o,"Generator"),yu(f,n,function(){return this}),yu(f,"toString",function(){return"[object Generator]"}),(mu=function(){return{w:i,m:d}})()}function yu(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}yu=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){yu(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},yu(e,t,r,n)}function bu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function vu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bu(Object(r),!0).forEach(function(t){gu(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bu(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function gu(e,t,r){return(t=function(e){var t=function(e){if("object"!=pu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=pu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pu(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wu(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Su(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Au(e){var t=(0,u.getContainingView)(e),r=e.rendererType;return{rendererType:r,rpcManager:(0,u.getSession)(t).rpcManager,renderProps:e.renderProps(),renderArgs:{assemblyName:t.displayedRegions[0].assemblyName,adapterConfig:structuredClone(e.adapterConfig),rendererType:r.name,regions:structuredClone(t.displayedRegions),blockDefinitions:e.blockDefinitions,sessionId:(0,Vo.getRpcSessionId)(e),timeout:1e6}}}function Ou(e,t){return xu.apply(this,arguments)}function xu(){var e;return e=mu().m(function e(t,r){var n,o,i,a,l,s,c,u,f,d;return mu().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}throw new Error("cannot render with no props");case 1:if(o=t.rendererType,i=t.rpcManager,a=t.cannotBeRenderedReason,l=t.renderArgs,s=t.renderProps,c=t.exportSVG,!a){e.n=2;break}return e.a(2,{message:a});case 2:if(s.radius&&null!==(n=l.regions)&&void 0!==n&&n.length){e.n=3;break}return e.a(2,{message:"Skipping render"});case 3:return e.n=4,o.renderInClient(i,vu(vu(vu({},l),s),{},{exportSVG:c,stopToken:r}));case 4:return u=e.v,f=u.html,d=wu(u,hu),e.a(2,{html:f,data:d,reactElement:d.reactElement,renderingComponent:o.ReactComponent})}},e)}),xu=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Su(i,n,o,a,l,"next",e)}function l(e){Su(i,n,o,a,l,"throw",e)}a(void 0)})},xu.apply(this,arguments)}var ku=o(14041);function Cu(e){return Cu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cu(e)}function Pu(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Eu(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Eu(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Eu(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Eu(f,"constructor",c),Eu(c,"constructor",s),s.displayName="GeneratorFunction",Eu(c,o,"GeneratorFunction"),Eu(f),Eu(f,o,"Generator"),Eu(f,n,function(){return this}),Eu(f,"toString",function(){return"[object Generator]"}),(Pu=function(){return{w:i,m:d}})()}function Eu(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Eu=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Eu(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Eu(e,t,r,n)}function ju(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Tu(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ju(i,n,o,a,l,"next",e)}function l(e){ju(i,n,o,a,l,"throw",e)}a(void 0)})}}function _u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ru(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_u(Object(r),!0).forEach(function(t){Mu(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Mu(e,t,r){return(t=function(e){var t=function(e){if("object"!=Cu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Cu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cu(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Iu(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Nu(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nu(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function Nu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Du=_.types.compose("BaseChordDisplay",fo.BaseDisplay,_.types.model({bezierRadiusRatio:.1,assemblyName:_.types.maybe(_.types.string),configuration:(0,s.ConfigurationReference)(du)})).volatile(function(){return{filled:!1,reactElement:void 0,data:void 0,html:void 0,message:"",renderingComponent:void 0,refNameMap:void 0}}).actions(function(e){var t=(0,u.getEnv)(e).pluginManager,r=e;return{onChordClick:function(n){(0,s.getConf)(e,"onChordClick",{feature:n,track:r,pluginManager:t})}}}).views(function(e){return{get blockDefinitions(){var t=(0,u.getContainingView)(e).staticSlices;if(!e.refNameMap)return t;var r,n=structuredClone(t),o=Iu(n);try{for(o.s();!(r=o.n()).done;){var i,a=r.value,l=Iu(a.region.elided?a.region.regions:[a.region]);try{for(l.s();!(i=l.n()).done;){var s=i.value,c=e.refNameMap[s.refName];c&&s.refName!==c&&(s.refName=c)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){o.e(e)}finally{o.f()}return n},renderProps:function(){var t=(0,u.getContainingView)(e);return Ru(Ru({},(0,Vo.getParentRenderProps)(e)),{},{rpcDriverName:e.rpcDriverName,bezierRadius:t.radiusPx*e.bezierRadiusRatio,radius:t.radiusPx,blockDefinitions:this.blockDefinitions,onChordClick:e.onChordClick})},get rendererType(){return(0,u.getEnv)(e).pluginManager.getRendererType(e.rendererTypeName)},get selectedFeatureId(){if((0,_.isAlive)(e)){var t=(0,u.getSession)(e).selection;return(0,u.isFeature)(t)?t.id():void 0}}}}).actions(function(e){return{renderStarted:function(){e.filled=!1,e.message="",e.reactElement=void 0,e.data=void 0,e.html=void 0,e.error=void 0,e.renderingComponent=void 0},renderSuccess:function(t){var r=t.message,n=t.data,o=t.reactElement,i=t.html,a=t.renderingComponent;r?(e.filled=!1,e.message=r,e.reactElement=void 0,e.data=void 0,e.html=void 0,e.error=void 0,e.renderingComponent=void 0):(e.filled=!0,e.message="",e.reactElement=o,e.data=n,e.html=i,e.error=void 0,e.renderingComponent=a)},renderError:function(t){console.error(t),e.filled=!1,e.message="",e.reactElement=void 0,e.html=void 0,e.data=void 0,e.error=t,e.renderingComponent=void 0},setRefNameMap:function(t){e.refNameMap=t}}}).actions(function(e){return{afterAttach:function(){(0,u.makeAbortableReaction)(e,Au,Ou,{name:"".concat(e.type," ").concat(e.id," rendering"),fireImmediately:!0},e.renderStarted,e.renderSuccess,e.renderError),(0,u.makeAbortableReaction)(e,function(){return{assemblyNames:(0,Vo.getTrackAssemblyNames)(e.parentTrack),adapter:(0,s.getConf)((0,_.getParent)(e,2),"adapter"),assemblyManager:(0,u.getSession)(e).assemblyManager}},function(){var t=Tu(Pu().m(function t(r,n){return Pu().w(function(t){for(;;)if(0===t.n)return t.a(2,r?r.assemblyManager.getRefNameMapForAdapter(r.adapter,r.assemblyNames[0],{stopToken:n,sessionId:(0,Vo.getRpcSessionId)(e)}):void 0)},t)}));return function(e,r){return t.apply(this,arguments)}}(),{name:"".concat(e.type," ").concat(e.id," getting refNames"),fireImmediately:!0},function(){},function(t){t&&e.setRefNameMap(t)},function(t){console.error(t),e.setError(t)})}}}).views(function(e){return{renderSvg:function(t){return Tu(Pu().m(function r(){var n,o;return Pu().w(function(r){for(;;)switch(r.n){case 0:return n=Au(e),r.n=1,Ou(Ru(Ru({},n),{},{exportSVG:t,theme:t.theme||n.renderProps.theme}));case 1:return o=r.v,r.a(2,ku.createElement(u.ReactRendering,{rendering:o}))}},r)}))()}}});function Fu(e){return Fu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fu(e)}function Lu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Gu(n.key),n)}}function zu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zu=function(){return!!e})()}function Bu(e){return Bu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bu(e)}function $u(e,t){return $u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$u(e,t)}function Gu(e){var t=function(e){if("object"!=Fu(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Fu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fu(t)?t:t+""}var Hu=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Gu(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=Bu(n),e=function(e,t){if(t&&("object"==Fu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,zu()?Reflect.construct(n,o||[],Bu(r).constructor):n.apply(r,o))),"name","CircularViewPlugin"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$u(e,t)}(t,e),r=t,n=[{key:"install",value:function(e){!function(e){e.addViewType(function(){return new uo.A({ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,65876))}),stateModel:Jc(e),name:"CircularView",displayName:"Circular view"})})}(e),function(e){e.addToExtensionPoint("LaunchView-CircularView",function(){var e,t=(e=Zc().m(function e(t){var r,n,o,i,a,l,s,c,u,f;return Zc().w(function(e){for(;;)switch(e.n){case 0:return r=t.session,n=t.assembly,o=t.tracks,i=void 0===o?[]:o,a=r.assemblyManager,l=r.addView("CircularView",{}),e.n=1,(0,le.when)(function(){return l.initialized});case 1:if(n){e.n=2;break}throw new Error("No assembly provided when launching circular genome view");case 2:return e.n=3,a.waitForAssembly(n);case 3:if(s=e.v){e.n=4;break}throw new Error('Assembly "'.concat(n,'" not found when launching circular genome view'));case 4:l.setDisplayedRegions(s.regions||[]),c=eu(i);try{for(c.s();!(u=c.n()).done;)f=u.value,l.showTrack(f)}catch(e){c.e(e)}finally{c.f()}case 5:return e.a(2)}},e)}),function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ru(i,n,o,a,l,"next",e)}function l(e){ru(i,n,o,a,l,"throw",e)}a(void 0)})});return function(e){return t.apply(this,arguments)}}())}(e)}},{key:"configure",value:function(e){(0,u.isAbstractMenuManager)(e.rootModel)&&e.rootModel.appendToSubMenu(["Add"],{label:"Circular view",icon:Oc,onClick:function(e){e.addView("CircularView",{})}})}}],n&&Lu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we.A),Vu=o(88965);const Wu=_.types.model("AddConnectionModel",{id:fe.ElementId,type:_.types.literal("AddConnectionWidget")});var Uu=(0,s.ConfigurationSchema)("AddConnectionWidget",{}),qu=o(52743),Xu=o.n(qu);function Ku(e){return Ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ku(e)}function Yu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ju(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yu(Object(r),!0).forEach(function(t){Zu(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yu(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Zu(e,t,r){return(t=function(e){var t=function(e){if("object"!=Ku(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ku(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{return new URL(e),!0}catch(t){return e.startsWith("/")}}function ef(e){return _.types.model("AddTrackModel",{id:fe.ElementId,type:_.types.literal("AddTrackWidget"),view:_.types.safeReference(e.pluggableMstType("view","stateModel"))}).volatile(function(){return{trackSource:"fromFile",trackData:void 0,indexTrackData:void 0,altAssemblyName:"",altTrackName:"",altTrackType:"",adapterHint:"",textIndexTrack:!0,textIndexingConf:void 0,mixinData:{}}}).actions(function(e){return{setMixinData:function(t){e.mixinData=t},setAdapterHint:function(t){e.adapterHint=t},setTrackSource:function(t){e.trackSource=t},setTextIndexingConf:function(t){e.textIndexingConf=t},setTextIndexTrack:function(t){e.textIndexTrack=t},setTrackData:function(t){e.trackData=t},setIndexTrackData:function(t){e.indexTrackData=t},setAssembly:function(t){e.altAssemblyName=t},setTrackName:function(t){e.altTrackName=t},setTrackType:function(t){e.altTrackType=t},clearData:function(){e.trackSource="",e.altTrackName="",e.altTrackType="",e.altAssemblyName="",e.adapterHint="",e.indexTrackData=void 0,e.trackData=void 0,e.textIndexingConf=void 0,e.textIndexTrack=!0}}}).views(function(e){return{get trackAdapter(){var t=e.trackData,r=e.indexTrackData,n=e.adapterHint;return t?(0,Vo.guessAdapter)(t,r,n,e):void 0},get trackName(){return e.altTrackName||(e.trackData?(0,Vo.getFileName)(e.trackData):"")},get isFtp(){var t,r,n=e.trackData,o=e.indexTrackData;return!!(null!=o&&null!==(t=o.uri)&&void 0!==t&&t.startsWith("ftp://")||null!=n&&null!==(r=n.uri)&&void 0!==r&&r.startsWith("ftp://"))},get isRelativeTrackUrl(){var t,r=null===(t=e.trackData)||void 0===t?void 0:t.uri;return!!r&&!Qu(r)},get isRelativeIndexUrl(){var t,r=null===(t=e.indexTrackData)||void 0===t?void 0:t.uri;return!!r&&!Qu(r)},get isRelativeUrl(){return this.isRelativeIndexUrl||this.isRelativeTrackUrl},get trackHttp(){var t;return null===(t=e.trackData)||void 0===t||null===(t=t.uri)||void 0===t?void 0:t.startsWith("http://")},get indexHttp(){var t;return null===(t=e.indexTrackData)||void 0===t||null===(t=t.uri)||void 0===t?void 0:t.startsWith("http://")},get wrongProtocol(){return"https:"===window.location.protocol&&(this.trackHttp||this.indexHttp)},get unsupported(){var e;return(null===(e=this.trackAdapter)||void 0===e?void 0:e.type)===Vo.UNSUPPORTED},get assembly(){var t;return e.altAssemblyName||(null===(t=e.view.assemblyNames)||void 0===t?void 0:t[0])},get trackAdapterType(){var e;return null===(e=this.trackAdapter)||void 0===e?void 0:e.type},get trackType(){return e.altTrackType||(this.trackAdapterType?(0,Vo.guessTrackType)(this.trackAdapterType,e):"")}}}).views(function(e){return{getTrackConfig:function(t){var r=(0,u.getSession)(e),n=r.assemblyManager.get(e.assembly);return n&&e.trackAdapter&&"UNKNOWN"!==e.trackAdapter.type?Xu()({trackId:["".concat(e.trackName.toLowerCase().replaceAll(" ","_"),"-").concat(t),r.adminMode?"":"-sessionTrack"].join(""),type:e.trackType,name:e.trackName,assemblyNames:[e.assembly],adapter:Ju(Ju({},e.trackAdapter),{},{sequenceAdapter:(0,s.getConf)(n,["sequence","adapter"])})},e.mixinData):void 0},get warningMessage(){return e.isFtp?"Warning: JBrowse cannot access files using the ftp protocol":e.isRelativeUrl?"Warning: one or more of your files do not provide the protocol e.g.\n https://, please provide an absolute URL unless you are sure a\n relative URL is intended.":e.wrongProtocol?"Warning: You entered a http:// resources but we cannot access HTTP\n resources from JBrowse when it is running on https. Please use an\n https URL for your track, or access the JBrowse app from the http\n protocol":""}}})}var tf=(0,s.ConfigurationSchema)("AddTrackWidget",{});const rf=(0,s.ConfigurationSchema)("HierarchicalTrackSelectorWidget",{});var nf=o(19779);function of(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function af(e,t,r){return e.filter(function(e){return t.map(function(t){return r(t,e)}).filter(function(e){return!!e}).length>5})}function lf(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return sf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sf(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function sf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function cf(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e[0]===t[0])return!0;var r=new Set(e);return t.some(function(e){return r.has(e)})}function uf(e,t,r){var n=(0,s.readConfObject)(t,"category")||[],o=e.toLowerCase();return(0,Vo.getTrackName)(t,r).toLowerCase().includes(o)||!!n.filter(function(e){return e.toLowerCase().includes(o)}).length}function ff(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!1,i=lf(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.children.length?ff(a.children,t,n+1)&&n>0&&t.push(a.id):o=!0}}catch(e){i.e(e)}finally{i.f()}return o}function df(e,t){var r,n=lf(e);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.children.length&&t.push(o.id)}}catch(e){n.e(e)}finally{n.f()}}function pf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||mf(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hf(e){return function(e){if(Array.isArray(e))return yf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||mf(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mf(e,t){if(e){if("string"==typeof e)return yf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yf(e,t):void 0}}function yf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var bf=["category","adapter","description"];function vf(){return _.types.model("FacetedModel",{filterText:_.types.optional(_.types.string,""),showSparse:_.types.optional(_.types.boolean,function(){return(0,u.localStorageGetBoolean)("facet-showSparse",!1)}),showFilters:_.types.optional(_.types.boolean,function(){return(0,u.localStorageGetBoolean)("facet-showFilters",!0)}),showOptions:_.types.optional(_.types.boolean,function(){return(0,u.localStorageGetBoolean)("facet-showTableOptions",!1)}),panelWidth:_.types.optional(_.types.number,function(){return(0,u.localStorageGetNumber)("facet-panelWidth",400)})}).volatile(function(){return{visible:{},useShoppingCart:!1,filters:le.observable.map()}}).actions(function(e){return{setFilter:function(t,r){e.filters.set(t,r)},setPanelWidth:function(t){return e.panelWidth=t,e.panelWidth},setUseShoppingCart:function(t){e.useShoppingCart=t},setFilterText:function(t){e.filterText=t},setShowSparse:function(t){e.showSparse=t},setShowOptions:function(t){e.showOptions=t},setShowFilters:function(t){e.showFilters=t}}}).views(function(e){return{get allTrackConfigurations(){return(0,_.getParent)(e).allTrackConfigurations}}}).views(function(e){return{get rows(){var t=(0,u.getSession)(e),r=e.allTrackConfigurations,n=e.filterText;return r.filter(function(e){return uf(n,e,t)}).map(function(e){var r,n;return{id:e.trackId,conf:e,name:(0,Vo.getTrackName)(e,t),category:null===(r=(0,s.readConfObject)(e,"category"))||void 0===r?void 0:r.join(", "),adapter:null===(n=(0,s.readConfObject)(e,"adapter"))||void 0===n?void 0:n.type,description:(0,s.readConfObject)(e,"description"),metadata:(0,s.readConfObject)(e,"metadata")}})}}}).views(function(e){return{get filteredNonMetadataKeys(){return e.showSparse?bf:af(bf,e.rows,function(e,t){return e[t]})},get metadataKeys(){return hf(new Set(e.rows.flatMap(function(e){return t=e.metadata,Object.entries(t).map(function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return of(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?of(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0];return"string"==typeof n[1]?o:""}).filter(function(e){return!!e});var t})))},get filteredMetadataKeys(){return e.showSparse?this.metadataKeys:af(this.metadataKeys,e.rows,function(e,t){return e.metadata[t]})},get fields(){return["name"].concat(hf(this.filteredNonMetadataKeys),hf(this.filteredMetadataKeys.map(function(e){return"metadata.".concat(e)})))},get filteredRows(){var t=hf(e.filters.entries()).filter(function(e){return e[1].length>0}).map(function(e){var t=pf(e,2),r=t[0],n=t[1];return[r,new Set(n)]});return e.rows.filter(function(e){return t.every(function(t){var r=pf(t,2),n=r[0];return r[1].has((0,nf.a)(n,e))})})}}}).actions(function(e){return{setVisible:function(t){e.visible=t},afterAttach:function(){var t=this;(0,_.addDisposer)(e,(0,le.autorun)(function(){t.setVisible(Object.fromEntries(e.fields.map(function(e){return[e,!0]})))}))}}})}function gf(e,t){if(e){if("string"==typeof e)return wf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wf(e,t):void 0}}function wf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Sf(e){var t=e.model,r=e.trackConfs,n=e.extra,o=e.noCategories,i=e.menuItems,a={children:[]},l=t.collapsed,c=t.filterText,f=t.activeSortTrackNames,d=t.activeSortCategories,p=t.view;if(!p)return[];var h,m,y,b,v,g=(0,u.getSession)(t),w=p.tracks,S=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=gf(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}((m=r.filter(function(e){return uf(c,e,g)}),y=f,b=d,v=m.map(function(e){var t,r,n;return[e,(0,s.readConfObject)(e,"name"),(null===(t=(0,s.readConfObject)(e,"category"))||void 0===t?void 0:t[0])||"",(null===(r=(0,s.readConfObject)(e,"category"))||void 0===r?void 0:r[1])||"",(null===(n=(0,s.readConfObject)(e,"category"))||void 0===n?void 0:n[2])||""]}),y&&v.sort(function(e,t){return e[1].localeCompare(t[1])}),b&&v.sort(function(e,t){return e[2]!==t[2]?e[2].localeCompare(t[2]):e[3]!==t[3]?e[3].localeCompare(t[3]):e[4]!==t[4]?e[4].localeCompare(t[4]):0}),v.map(function(e){return e[0]})));try{var A=function(){var e=h.value,t=function(e){return function(e){if(Array.isArray(e))return wf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gf(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,s.readConfObject)(e,"category")||[]);e.trackId.endsWith("sessionTrack")&&t.unshift(" Session tracks");var r=a;if(!o)for(var c=function(){var e=t[u],o=r.children.find(function(t){return t.name===e}),a=[n,t.slice(0,u+1).join(",")].filter(function(e){return!!e}).join("-");if(o)r=o;else{var s={children:[],name:e,id:a,isOpenByDefault:!l.get(a),menuItems:i,type:"category"};r.children.push(s),r=s}},u=0;u<t.length;u++)c();var f=r.children.findIndex(function(e){return e.children.length}),d=-1===f?r.children.length:f;r.children.splice(d,0,{id:[n,e.trackId].filter(function(e){return!!e}).join(","),trackId:e.trackId,name:(0,Vo.getTrackName)(e,g),conf:e,checked:w.some(function(t){return t.configuration===e}),children:[],type:"track"})};for(S.s();!(h=S.n()).done;)A()}catch(e){S.e(e)}finally{S.f()}return a.children}function Af(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=xf(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function Of(e){return function(e){if(Array.isArray(e))return kf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xf(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xf(e,t){if(e){if("string"==typeof e)return kf(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kf(e,t):void 0}}function kf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Cf(){return"undefined"!=typeof window?[window.location.pathname,new URLSearchParams(window.location.search).get("config")].filter(function(e){return!!e}).join("-"):"empty"}function Pf(e){return["recentlyUsedTracks",Cf(),e.join(",")].filter(function(e){return!!e}).join("-")}function Ef(){return"favoriteTracks-".concat(Cf(),"}")}function jf(e,t){return["collapsedCategories",Cf(),e.join(","),t].join("-")}function Tf(e,t){var r=(0,u.localStorageGetItem)(e);return null!=r&&r?JSON.parse(r):t}function _f(e,t){null!=t&&(0,u.localStorageSetItem)(e,JSON.stringify(t))}function Rf(e){return _.types.model("HierarchicalTrackSelectorWidget",{id:fe.ElementId,type:_.types.literal("HierarchicalTrackSelectorWidget"),view:_.types.safeReference(e.pluggableMstType("view","stateModel")),faceted:_.types.optional(vf(),{})}).volatile(function(){return{favorites:Tf(Ef(),[]),recentlyUsed:[],selection:[],sortTrackNames:Tf("sortTrackNames",void 0),sortCategories:Tf("sortCategories",void 0),collapsed:le.observable.map(),filterText:"",recentlyUsedCounter:0,favoritesCounter:0}}).views(function(e){return{get shownTrackIds(){var t;return new Set(null===(t=e.view)||void 0===t||null===(t=t.tracks)||void 0===t?void 0:t.map(function(e){return e.configuration.trackId}))},get selectionSet(){return new Set(e.selection)},get favoritesSet(){return new Set(e.favorites)},get recentlyUsedSet(){return new Set(e.recentlyUsed)},get assemblyNames(){var t;return(null===(t=e.view)||void 0===t?void 0:t.assemblyNames)||[]}}}).actions(function(e){return{setSortTrackNames:function(t){e.sortTrackNames=t},setSortCategories:function(t){e.sortCategories=t},setSelection:function(t){e.selection=t},addToSelection:function(t){e.selection=(0,u.dedupe)([].concat(Of(e.selection),Of(t)),function(e){return e.trackId})},removeFromSelection:function(t){var r=new Set(t);e.selection=e.selection.filter(function(e){return!r.has(e)})},clearSelection:function(){e.selection=[]},addToFavorites:function(t){e.favoritesCounter+=1,e.favorites=[].concat(Of(e.favorites),[t])},removeFromFavorites:function(t){e.favorites=e.favorites.filter(function(e){return e!==t})},clearFavorites:function(){e.favorites=[]},setRecentlyUsedCounter:function(t){e.recentlyUsedCounter=t},setRecentlyUsed:function(t){e.recentlyUsed=t},setFavorites:function(t){e.favorites=t},setFavoritesCounter:function(t){e.favoritesCounter=t},addToRecentlyUsed:function(t){e.recentlyUsed.includes(t)||(e.recentlyUsedCounter=Math.min(e.recentlyUsedCounter+1,10),e.recentlyUsed=e.recentlyUsed.length>=10?[].concat(Of(e.recentlyUsed.slice(1)),[t]):[].concat(Of(e.recentlyUsed),[t]))},clearRecentlyUsed:function(){e.recentlyUsed=[]},setView:function(t){e.view=t},toggleCategory:function(t){e.collapsed.set(t,!e.collapsed.get(t))},setCategoryCollapsed:function(t,r){e.collapsed.set(t,r)},expandAllCategories:function(){e.collapsed.clear()},setCollapsedCategories:function(t){e.collapsed.replace(t)},clearFilterText:function(){e.filterText=""},setFilterText:function(t){e.filterText=t}}}).views(function(t){return{isSelected:function(e){return t.selectionSet.has(e)},isFavorite:function(e){return t.favoritesSet.has(e)},isRecentlyUsed:function(e){return t.recentlyUsedSet.has(e)},getRefSeqTrackConf:function(r){var n=(0,u.getSession)(t).assemblyManager.get(r),o=null==n?void 0:n.configuration.sequence,i=e.getViewType(t.view.type);if(o){var a,l=Af(o.displays);try{var s,c=function(){var e=a.value;if(i.displayTypes.some(function(t){return t.name===e.type}))return{v:o}};for(l.s();!(a=l.n()).done;)if(s=c())return s.v}catch(e){l.e(e)}finally{l.f()}}}}}).views(function(e){return{get activeSortTrackNames(){var t;return null!==(t=e.sortTrackNames)&&void 0!==t?t:(0,s.getConf)((0,u.getSession)(e),["hierarchical","sort","trackNames"])},get activeSortCategories(){var t;return null!==(t=e.sortCategories)&&void 0!==t?t:(0,s.getConf)((0,u.getSession)(e),["hierarchical","sort","categories"])},get configAndSessionTrackConfigurations(){return[].concat(Of(e.assemblyNames.map(function(t){return e.getRefSeqTrackConf(t)})),Of(function(e,t){var r=(0,u.getSession)(t).assemblyManager,n=(0,u.getEnv)(t).pluginManager,o=t.view;if(!o)return[];var i=t.assemblyNames.map(function(e){return r.get(e)}).filter(u.notEmpty);return e.filter(function(e){var t=(0,s.readConfObject)(e,"assemblyNames"),n=null==t?void 0:t.map(function(e){return r.get(e)}).filter(u.notEmpty);return o.trackSelectorAnyOverlap?cf(n,i):function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=new Set(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);return e.every(function(e){return t.has(e)})}(n,i)}).filter(function(e){return cf(n.getViewType(o.type).displayTypes.map(function(e){return e.name}),e.displays.map(function(e){return e.type}))})}((0,u.getSession)(e).tracks,e))).filter(u.notEmpty)},get allTrackConfigurations(){var t=(0,u.getSession)(e).connectionInstances,r=void 0===t?[]:t;return[].concat(Of(this.configAndSessionTrackConfigurations),Of(r.flatMap(function(e){return e.tracks})))},get allTrackConfigurationTrackIdSet(){return new Map(this.allTrackConfigurations.map(function(e){return[e.trackId,e]}))}}}).views(function(e){return{get favoriteTracks(){return e.favorites.filter(function(t){return e.allTrackConfigurationTrackIdSet.has(t)}).map(function(t){return e.allTrackConfigurationTrackIdSet.get(t)})},get recentlyUsedTracks(){return e.recentlyUsed.filter(function(t){return e.allTrackConfigurationTrackIdSet.has(t)}).map(function(t){return e.allTrackConfigurationTrackIdSet.get(t)})}}}).views(function(e){return{get allTracks(){var t=(0,u.getSession)(e).connectionInstances,r=void 0===t?[]:t;return[{group:"Tracks",tracks:e.configAndSessionTrackConfigurations,noCategories:!1,menuItems:[]}].concat(Of(r.flatMap(function(e){return{group:(0,s.getConf)(e,"name"),tracks:e.tracks,noCategories:!1,menuItems:[]}})))}}}).views(function(e){return{get hierarchy(){return{name:"Root",id:"Root",isOpenByDefault:!0,type:"category",children:e.allTracks.map(function(t){return{name:t.group,id:t.group,type:"category",isOpenByDefault:!e.collapsed.get(t.group),menuItems:t.menuItems,children:Sf({model:e,trackConfs:t.tracks,extra:t.group,noCategories:t.noCategories})}})}}}}).actions(function(e){return{collapseSubCategories:function(){var t=[];ff(e.hierarchy.children,t);for(var r=0,n=t;r<n.length;r++){var o=n[r];e.setCategoryCollapsed(o,!0)}},collapseTopLevelCategories:function(){var t,r=[],n=Af(e.hierarchy.children);try{for(n.s();!(t=n.n()).done;){var o=t.value;o.children.length&&df(o.children,r)}}catch(e){n.e(e)}finally{n.f()}for(var i=0,a=r;i<a.length;i++){var l=a[i];e.setCategoryCollapsed(l,!0)}}}}).views(function(e){return{get hasAnySubcategories(){return e.allTracks.some(function(e){return e.tracks.some(function(e){var t;return(null===(t=(0,s.readConfObject)(e,"category"))||void 0===t?void 0:t.length)>1})})}}}).actions(function(e){return{afterAttach:function(){(0,_.addDisposer)(e,(0,le.autorun)(function(){var t=e.assemblyNames,r=e.view;if(e.setRecentlyUsed(Tf(Pf(t),[])),r){var n=Tf(jf(t,r.type),void 0),o=["hierarchical","defaultCollapsed"],i=(0,u.getSession)(e);if(n)e.setCollapsedCategories(n);else{e.expandAllCategories(),(0,s.getConf)(i,[].concat(o,["topLevelCategories"]))&&e.collapseTopLevelCategories(),(0,s.getConf)(i,[].concat(o,["subCategories"]))&&e.collapseSubCategories();var a,l=Af((0,s.getConf)(i,[].concat(o,["categoryNames"])));try{for(l.s();!(a=l.n()).done;){var c=a.value;e.setCategoryCollapsed("Tracks-".concat(c),!0)}}catch(e){l.e(e)}finally{l.f()}}}})),(0,_.addDisposer)(e,(0,le.autorun)(function(){var t=e.sortTrackNames,r=e.sortCategories,n=e.favorites,o=e.recentlyUsed,i=e.assemblyNames,a=e.collapsed,l=e.view;_f(Pf(i),o),_f(Ef(),n),_f("sortTrackNames",t),_f("sortCategories",r),l&&_f(jf(i,l.type),a)}))}}})}function Mf(e){return _.types.model("PluginStoreModel",{id:fe.ElementId,type:_.types.literal("PluginStoreWidget"),filterText:"",view:_.types.safeReference(e.pluggableMstType("view","stateModel"))}).actions(function(e){return{clearFilterText:function(){e.filterText=""},setFilterText:function(t){e.filterText=t}}})}var If=(0,s.ConfigurationSchema)("PluginStoreWidget",{});function Nf(e){return Nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nf(e)}function Df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ff(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Df(Object(r),!0).forEach(function(t){Lf(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Df(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Lf(e,t,r){return(t=function(e){var t=function(e){if("object"!=Nf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Nf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zf=(0,s.ConfigurationSchema)("UCSCTrackHubConnection",{hubTxtLocation:{type:"fileLocation",defaultValue:{uri:"http://mysite.com/path/to/hub.txt",locationType:"UriLocation"},description:"location of the hub file (usually called hub.txt)"},assemblyNames:{type:"stringArray",defaultValue:[],description:"optional list of genomes to import from this track hub, if empty all genomes will be imported"}},{baseConfiguration:fo.baseConnectionConfig,preProcessSnapshot:function(e){return e.uri?Ff(Ff({},e),{},{hubTxtLocation:{uri:e.uri,baseUri:e.baseUri}}):e}});function Bf(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return $f(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):($f(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,$f(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,$f(f,"constructor",c),$f(c,"constructor",s),s.displayName="GeneratorFunction",$f(c,o,"GeneratorFunction"),$f(f),$f(f,o,"Generator"),$f(f,n,function(){return this}),$f(f,"toString",function(){return"[object Generator]"}),(Bf=function(){return{w:i,m:d}})()}function $f(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}$f=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){$f(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},$f(e,t,r,n)}function Gf(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Hf(e){return _.types.compose("UCSCTrackHubConnection",(0,fo.BaseConnectionModelFactory)(e),_.types.model({configuration:(0,s.ConfigurationReference)(zf),type:_.types.literal("UCSCTrackHubConnection")})).actions(function(e){return{connect:function(){return(t=Bf().m(function t(){return Bf().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then(o.bind(o,70960));case 1:(0,t.v.doConnect)(e);case 2:return t.a(2)}},t)}),function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(e){Gf(i,n,o,a,l,"next",e)}function l(e){Gf(i,n,o,a,l,"throw",e)}a(void 0)})})();var t}}})}function Vf(e){return Vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vf(e)}function Wf(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Yf(n.key),n)}}function Uf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Uf=function(){return!!e})()}function qf(e){return qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qf(e)}function Xf(e,t){return Xf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xf(e,t)}function Kf(e,t,r){return(t=Yf(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yf(e){var t=function(e){if("object"!=Vf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Vf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vf(t)?t:t+""}var Jf=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,59760))}),Zf=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return Kf((r=this,n=t,o=[].concat(a),n=qf(n),e=function(e,t){if(t&&("object"==Vf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Uf()?Reflect.construct(n,o||[],qf(r).constructor):n.apply(r,o))),"name","DataManagementPlugin"),Kf(e,"exports",{AssemblyManager:Jf}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xf(e,t)}(t,e),r=t,(n=[{key:"install",value:function(e){!function(e){e.addConnectionType(function(){return new Ce.ConnectionType({name:"UCSCTrackHubConnection",configSchema:zf,stateModel:Hf(e),displayName:"UCSC Track Hub",description:"A track or assembly hub in the Track Hub format",url:"https://genome.ucsc.edu/goldenPath/help/hgTrackHubHelp.html#Intro"})})}(e),function(e){e.addWidgetType(function(){return new Ce.WidgetType({name:"AddTrackWidget",heading:"Add a track",configSchema:tf,stateModel:ef(e),ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,41157))})})})}(e),function(e){e.addWidgetType(function(){return new Ce.WidgetType({name:"HierarchicalTrackSelectorWidget",heading:"Available tracks",configSchema:rf,stateModel:Rf(e),ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,20673))})})})}(e),function(e){e.addWidgetType(function(){return new Ce.WidgetType({name:"AddConnectionWidget",heading:"Add a connection",configSchema:Uu,stateModel:Wu,ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,74448))})})})}(e),function(e){e.addWidgetType(function(){return new Ce.WidgetType({name:"PluginStoreWidget",heading:"Plugin store",configSchema:If,stateModel:Mf(e),ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,28973))})})})}(e)}},{key:"configure",value:function(e){}}])&&Wf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we.A);function Qf(e){return Qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qf(e)}function ed(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function td(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ed(Object(r),!0).forEach(function(t){rd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ed(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function rd(e,t,r){return(t=function(e){var t=function(e){if("object"!=Qf(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Qf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const nd=(0,s.ConfigurationSchema)("BgzipFastaAdapter",{fastaLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/seq.fa.gz",locationType:"UriLocation"}},faiLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/seq.fa.gz.fai",locationType:"UriLocation"}},metadataLocation:{description:"Optional metadata file",type:"fileLocation",defaultValue:{uri:"/path/to/fa.metadata.yaml",locationType:"UriLocation"}},gziLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/seq.fa.gz.gzi",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?td(td({},e),{},{fastaLocation:{uri:e.uri,baseUri:e.baseUri},faiLocation:{uri:"".concat(e.uri,".fai"),baseUri:e.baseUri},gziLocation:{uri:"".concat(e.uri,".gzi"),baseUri:e.baseUri}}):e}});function od(e){return od="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},od(e)}function id(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ad(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?id(Object(r),!0).forEach(function(t){ld(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):id(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ld(e,t,r){return(t=function(e){var t=function(e){if("object"!=od(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=od(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==od(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const sd=(0,s.ConfigurationSchema)("ChromSizesAdapter",{chromSizesLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/species.chrom.sizes",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?ad(ad({},e),{},{chromSizesLocation:{uri:e.uri,baseUri:e.baseUri}}):e}});var cd=o(14041);function ud(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||fd(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fd(e,t){if(e){if("string"==typeof e)return dd(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dd(e,t):void 0}}function dd(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function pd(e){for(var t,r,n=e.codonTable,o=e.seq,i=e.frame,l=e.width,s=e.bpPerPx,c=e.colorByCDS,f=e.region,d=e.seqStart,p=e.height,h=e.y,m=e.reverse,y=void 0!==m&&m,b=(Math.abs(i)-1-d%3+3)%3,v=(0,F.A)(),g=o.length-b,w=g-g%3,S=o.slice(b,b+w),A=[],O=0;O<S.length;O+=3){var x=S.slice(O,O+3),k=y?(0,u.revcom)(x):x,C=n[k]||"";A.push({letter:C,codon:k.toUpperCase()})}var P=1/s*3,E=1/s>=12,j=b/s-(f.start-d)/s,T="dark"===v.palette.mode?"dark":"main",_=c?null===(t=v.palette.framesCDS.at(i))||void 0===t?void 0:t[T]:null===(r=v.palette.frames.at(i))||void 0===r?void 0:r[T];return cd.createElement(cd.Fragment,null,cd.createElement("rect",{x:0,y:h,width:l,height:p,fill:_}),A.map(function(e,t){var r=f.reversed?l-(t+1)*P-j:P*t+j,n=e.letter,o=e.codon,i=u.defaultStarts.includes(o)?v.palette.startCodon:u.defaultStops.includes(o)?v.palette.stopCodon:void 0;return E||i?cd.createElement(a.Fragment,{key:"".concat(t,"-").concat(n)},cd.createElement("rect",{x:r,y:h,width:E?P:P+.7,height:p,stroke:E?"#555":"none",fill:i||"none"}),E?cd.createElement("text",{x:r+P/2,fontSize:p-2,y:h+p/2,dominantBaseline:"middle",textAnchor:"middle"},n):null):null}))}function hd(e){var t=e.bpPerPx,r=e.region,n=e.feature,o=e.sequenceType,i=e.height,l=e.seq,s=e.y,c=1/t>=12,f=n.get("start"),d=n.get("end"),p=ud((0,u.bpSpanPx)(f,d,r,t),2),h=p[0],m=p[1],y=r.reversed,b=d-f,v=Math.max((m-h)/b,.8),g=(0,F.A)();return cd.createElement(cd.Fragment,null,l.split("").map(function(e,t){var r="dna"===o?g.palette.bases[e.toUpperCase()]:void 0,n="dark"===g.palette.mode,l=y?m-(t+1)*v:h+t*v;return cd.createElement(a.Fragment,{key:"".concat(e,"-").concat(t)},cd.createElement("rect",{x:l,y:s,width:v,height:i,fill:r?n?r.dark:r.main:"#aaa",stroke:c?"#555":"none"}),c?cd.createElement("text",{x:l+v/2,y:s+i/2,dominantBaseline:"middle",textAnchor:"middle",fontSize:i-2,fill:r?g.palette.getContrastText(r.main):"black"},e):null)}))}function md(e){var t,r=e.regions,n=e.width,o=e.colorByCDS,i=e.features,a=void 0===i?new Map:i,l=e.showReverse,s=void 0===l||l,c=e.showForward,f=void 0===c||c,d=e.showTranslation,p=void 0===d||d,h=e.sequenceType,m=void 0===h?"dna":h,y=e.bpPerPx,b=e.rowHeight,v=r[0],g=(0,u.generateCodonTable)(u.defaultCodonTable),w=(t=a.values(),function(e){if(Array.isArray(e))return dd(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||fd(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];if(!w)return null;var S=w.get("seq");if(!S)return null;var A=-b,O=y<=1,x=p&&f?[3,2,1]:[],k=p&&s?[-1,-2,-3]:[],C=ud(v.reversed?[k.toReversed(),x.toReversed()]:[x,k],2),P=C[0],E=C[1];return cd.createElement(cd.Fragment,null,P.map(function(e){return cd.createElement(pd,{key:"translation-".concat(e),width:n,colorByCDS:o,seq:S,y:A+=b,codonTable:g,frame:e,bpPerPx:y,region:v,seqStart:w.get("start"),height:b,reverse:v.reversed})}),f&&O?cd.createElement(hd,{height:b,sequenceType:m,y:A+=b,feature:w,region:v,seq:v.reversed?(0,u.complement)(S):S,bpPerPx:y}):null,s&&O?cd.createElement(hd,{height:b,sequenceType:m,y:A+=b,feature:w,region:v,seq:v.reversed?S:(0,u.complement)(S),bpPerPx:y}):null,E.map(function(e){return cd.createElement(pd,{key:"rev-translation-".concat(e),width:n,colorByCDS:o,seq:S,y:A+=b,codonTable:g,frame:e,bpPerPx:y,region:v,seqStart:w.get("start"),height:b,reverse:!v.reversed})}))}function yd(e){var t=e.exportSVG,r=e.width,n=e.totalHeight,o=e.children;return t?o:cd.createElement("svg",{"data-testid":"sequence_track",width:r,height:n,style:{display:"block",width:r,height:n,userSelect:"none"}},o)}const bd=(0,T.observer)(function(e){var t=e.exportSVG,r=e.features,n=e.regions,o=e.colorByCDS,i=e.bpPerPx,a=e.rowHeight,l=e.sequenceHeight,s=e.showForward,c=e.showReverse,u=e.showTranslation,f=n[0],d=Math.ceil((f.end-f.start)/i);return cd.createElement(yd,{exportSVG:t,totalHeight:l,width:d},cd.createElement(md,{width:d,showReverse:c,showForward:s,showTranslation:u,colorByCDS:o,bpPerPx:i,rowHeight:a,features:r,regions:n}))}),vd=(0,s.ConfigurationSchema)("DivSequenceRenderer",{height:{type:"number",description:"height in pixels of each line of sequence",defaultValue:16}},{explicitlyTyped:!0});function gd(e){return gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gd(e)}function wd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Sd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wd(Object(r),!0).forEach(function(t){Cd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wd(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ad(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Pd(n.key),n)}}function Od(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Od=function(){return!!e})()}function xd(e){return xd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xd(e)}function kd(e,t){return kd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kd(e,t)}function Cd(e,t,r){return(t=Pd(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pd(e){var t=function(e){if("object"!=gd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=gd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gd(t)?t:t+""}var Ed=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return Cd((r=this,n=t,o=[].concat(a),n=xd(n),e=function(e,t){if(t&&("object"==gd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Od()?Reflect.construct(n,o||[],xd(r).constructor):n.apply(r,o))),"supportsSVG",!0),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kd(e,t)}(t,e),r=t,(n=[{key:"getExpandedRegion",value:function(e){return Sd(Sd({},e),{},{start:Math.max(e.start-3,0),end:e.end+3})}}])&&Ad(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(mo.default);function jd(e){return jd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jd(e)}function Td(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Td(Object(r),!0).forEach(function(t){Rd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Td(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Rd(e,t,r){return(t=function(e){var t=function(e){if("object"!=jd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=jd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jd(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Md=(0,s.ConfigurationSchema)("IndexedFastaAdapter",{fastaLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/seq.fa",locationType:"UriLocation"}},faiLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/seq.fa.fai",locationType:"UriLocation"}},metadataLocation:{description:"Optional metadata file",type:"fileLocation",defaultValue:{uri:"/path/to/fa.metadata.yaml",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?_d(_d({},e),{},{fastaLocation:{uri:e.uri,baseUri:e.baseUri},faiLocation:{uri:"".concat(e.uri,".fai"),baseUri:e.baseUri}}):e}});var Id=o(59519),Nd=(0,s.ConfigurationSchema)("LinearReferenceSequenceDisplay",{renderer:vd},{explicitIdentifier:"displayId",explicitlyTyped:!0});function Dd(e){return Dd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dd(e)}function Fd(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ld(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function zd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ld(Object(r),!0).forEach(function(t){Bd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ld(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Bd(e,t,r){return(t=function(e){var t=function(e){if("object"!=Dd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Dd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dd(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $d(e){e.addDisplayType(function(){var e,t=(e=Nd,_.types.compose("LinearReferenceSequenceDisplay",Id.Lr,_.types.model({type:_.types.literal("LinearReferenceSequenceDisplay"),configuration:(0,s.ConfigurationReference)(e),showForward:!0,showReverse:!0,showTranslation:!0})).volatile(function(){return{rowHeight:15}}).views(function(e){return{get sequenceType(){return(0,s.getConf)((0,u.getContainingTrack)(e),"sequenceType")},get showForwardActual(){return e.showForward},get showReverseActual(){return"dna"===this.sequenceType&&e.showReverse},get showTranslationActual(){return"dna"===this.sequenceType&&e.showTranslation}}}).views(function(e){return{get sequenceHeight(){var t=e.rowHeight,r=e.showTranslationActual,n=e.showReverseActual,o=e.showForwardActual;return(n&&r?3*t:0)+(o&&r?3*t:0)+(n?t:0)+(o?t:0)}}}).views(function(e){var t=e.renderProps;return{renderProps:function(){var r=e.rpcDriverName,n=e.showForwardActual,o=e.showReverseActual,i=e.showTranslationActual,a=e.rowHeight,l=e.sequenceHeight,s=e.sequenceType;return zd(zd(zd({},t()),(0,Vo.getParentRenderProps)(e)),{},{config:e.configuration.renderer,rpcDriverName:r,showForward:n,showReverse:o,showTranslation:i,sequenceType:s,rowHeight:a,sequenceHeight:l})}}}).views(function(e){return{regionCannotBeRendered:function(){return(0,u.getContainingView)(e).bpPerPx>3?"Zoom in to see sequence":void 0},get rendererTypeName(){return e.configuration.renderer.type}}}).actions(function(e){return{toggleShowForward:function(){e.showForward=!e.showForward},toggleShowReverse:function(){e.showReverse=!e.showReverse},toggleShowTranslation:function(){e.showTranslation=!e.showTranslation},afterAttach:function(){(0,_.addDisposer)(e,(0,le.autorun)(function(){(0,u.getContainingView)(e).bpPerPx>3?e.setHeight(50):e.setHeight(e.sequenceHeight)}))}}}).views(function(e){return{trackMenuItems:function(){return function(e){if(Array.isArray(e))return Fd(e)}(t="dna"===e.sequenceType?[{label:"Show forward",type:"checkbox",checked:e.showForward,onClick:function(){e.toggleShowForward()}},{label:"Show reverse",type:"checkbox",checked:e.showReverse,onClick:function(){e.toggleShowReverse()}},{label:"Show translation",type:"checkbox",checked:e.showTranslation,onClick:function(){e.toggleShowTranslation()}}]:[])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Fd(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fd(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var t}}}));return new Ce.DisplayType({name:"LinearReferenceSequenceDisplay",configSchema:Nd,stateModel:t,displayName:"Reference sequence display",trackType:"ReferenceSequenceTrack",viewType:"LinearGenomeView",ReactComponent:Id.GQ})})}function Gd(e){return Gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gd(e)}function Hd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Vd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Hd(Object(r),!0).forEach(function(t){Wd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hd(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Wd(e,t,r){return(t=function(e){var t=function(e){if("object"!=Gd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Gd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gd(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ud(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return qd(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qd(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function qd(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const Xd=(0,s.ConfigurationSchema)("SequenceSearchAdapter",{search:{type:"string",defaultValue:"",description:"Search string or regex to search for"},sequenceAdapter:{type:"frozen",defaultValue:null},searchForward:{type:"boolean",defaultValue:!0},searchReverse:{type:"boolean",defaultValue:!0},caseInsensitive:{type:"boolean",defaultValue:!0}},{explicitlyTyped:!0});function Kd(e){return Kd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kd(e)}function Yd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Jd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(r),!0).forEach(function(t){Zd(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Zd(e,t,r){return(t=function(e){var t=function(e){if("object"!=Kd(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Kd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kd(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Qd=(0,s.ConfigurationSchema)("TwoBitAdapter",{twoBitLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.2bit",locationType:"UriLocation"}},chromSizesLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/default.chrom.sizes",locationType:"UriLocation"},description:"An optional chrom.sizes file can be supplied to speed up loading since parsing the twobit file can take time"}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?Jd(Jd({},e),{},{twoBitLocation:{uri:e.uri,baseUri:e.baseUri}},e.chromSizes?{chromSizesLocation:{uri:e.chromSizes,baseUri:e.baseUri}}:{}):e}});function ep(e){return ep="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ep(e)}function tp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function rp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tp(Object(r),!0).forEach(function(t){np(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tp(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function np(e,t,r){return(t=function(e){var t=function(e){if("object"!=ep(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ep(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ep(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const op=(0,s.ConfigurationSchema)("UnindexedFastaAdapter",{rewriteRefNames:{type:"string",defaultValue:"",contextVariable:["refName"]},fastaLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/seq.fa",locationType:"UriLocation"}},metadataLocation:{description:"Optional metadata file",type:"fileLocation",defaultValue:{uri:"/path/to/fa.metadata.yaml",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?rp(rp({},e),{},{fastaLocation:{uri:e.uri,baseUri:e.baseUri}}):e}});function ip(e){return ip="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ip(e)}function ap(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,up(n.key),n)}}function lp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lp=function(){return!!e})()}function sp(e){return sp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sp(e)}function cp(e,t){return cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cp(e,t)}function up(e){var t=function(e){if("object"!=ip(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ip(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ip(t)?t:t+""}var fp=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=up(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=sp(n),e=function(e,t){if(t&&("object"==ip(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,lp()?Reflect.construct(n,o||[],sp(r).constructor):n.apply(r,o))),"name","SequencePlugin"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cp(e,t)}(t,e),r=t,(n=[{key:"install",value:function(e){!function(e){e.addRendererType(function(){return new Ed({name:"DivSequenceRenderer",ReactComponent:bd,configSchema:vd,pluginManager:e})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"TwoBitAdapter",displayName:"TwoBit adapter",configSchema:Qd,adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,19370)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"BgzipFastaAdapter",displayName:"Bgzip-indexed FASTA adapter",configSchema:nd,adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,90269)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"ChromSizesAdapter",displayName:"Chrom sizes adapter",configSchema:sd,adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,50121)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"IndexedFastaAdapter",displayName:"Indexed FASTA adapter",configSchema:Md,adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,65365)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"UnindexedFastaAdapter",displayName:"Unindexed FASTA adapter",configSchema:op,adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,27233)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"SequenceSearchAdapter",displayName:"Sequence search adapter",adapterMetadata:{hiddenFromGUI:!0},configSchema:Xd,getAdapterClass:function(){return Promise.resolve().then(o.bind(o,97025)).then(function(e){return e.default})}})})}(e),function(e){e.addTrackType(function(){var t=function(e){return(0,s.ConfigurationSchema)("ReferenceSequenceTrack",{adapter:e.pluggableConfigSchemaType("adapter"),displays:_.types.array(e.pluggableConfigSchemaType("display")),name:{type:"string",description:'optional track name, otherwise uses the "Reference sequence (assemblyName)"',defaultValue:""},sequenceType:{type:"string",description:"either dna or pep",defaultValue:"dna"},description:{description:"a description of the track",type:"string",defaultValue:""},metadata:{type:"frozen",description:"anything to add about this track",defaultValue:{}},formatAbout:(0,s.ConfigurationSchema)("FormatAbout",{config:{type:"frozen",description:"formats configuration in about dialog",defaultValue:{},contextVariable:["config"]},hideUris:{type:"boolean",defaultValue:!1}})},{preProcessSnapshot:function(t){var r=JSON.parse(JSON.stringify(t)),n=new Set,o=r.displays,i=void 0===o?[]:o;if("placeholderId"!==r.trackId){var a,l=Ud(i);try{for(l.s();!(a=l.n()).done;){var s=a.value;s&&n.add(s.type)}}catch(e){l.e(e)}finally{l.f()}var c,u=e.getTrackType(r.type),f=Ud((null==u?void 0:u.displayTypes)||[]);try{for(f.s();!(c=f.n()).done;){var d=c.value;n.has(d.name)||i.push({displayId:"".concat(r.trackId,"-").concat(d.name),type:d.name})}}catch(e){f.e(e)}finally{f.f()}}return Vd(Vd({},r),{},{displays:i})},explicitIdentifier:"trackId",explicitlyTyped:!0,actions:function(e){return{addDisplayConf:function(t){var r=t.type;if(!r)throw new Error("unknown display type ".concat(r));var n=e.displays.find(function(e){return e&&e.displayId===t.displayId});if(n)return n;var o=e.displays.push(t);return e.displays[o-1]}}}})}(e);return new co.A({name:"ReferenceSequenceTrack",displayName:"Reference sequence track",configSchema:t,stateModel:(0,fo.createBaseTrackModel)(e,"ReferenceSequenceTrack",t)})})}(e),$d(e),function(e){e.addToExtensionPoint("Core-guessAdapterForLocation",function(e){return function(t,r,n){var o="TwoBitAdapter",i=(0,Vo.getFileName)(t),a={type:o,twoBitLocation:t};return/\.2bit$/i.test(i)&&!n||n===o?a:e(t,r,n)}}),e.addToExtensionPoint("Core-guessTrackTypeForLocation",function(e){return function(t){return"TwoBitAdapter"===t?"ReferenceSequenceTrack":e(t)}}),e.addToExtensionPoint("Core-guessAdapterForLocation",function(e){return function(t,r,n){var o="IndexedFastaAdapter",i=(0,Vo.getFileName)(t),a={type:o,fastaLocation:t,faiLocation:r||(0,Vo.makeIndex)(t,".fai")};return/\.(fa|fasta|fas|fna|mfa)$/i.test(i)&&!n||n===o?a:e(t,r,n)}}),e.addToExtensionPoint("Core-guessTrackTypeForLocation",function(e){return function(t){return"IndexedFastaAdapter"===t?"ReferenceSequenceTrack":e(t)}}),e.addToExtensionPoint("Core-guessAdapterForLocation",function(e){return function(t,r,n){var o="BgzipFastaAdapter",i=(0,Vo.getFileName)(t),a={type:o,faiLocation:(0,Vo.makeIndex)(t,".fai"),gziLocation:(0,Vo.makeIndex)(t,".gzi")};return/\.(fa|fasta|fas|fna|mfa)\.b?gz$/i.test(i)&&!n||n===o?a:e(t,r,n)}}),e.addToExtensionPoint("Core-guessTrackTypeForLocation",function(e){return function(t){return"BgzipFastaAdapter"===t?"ReferenceSequenceTrack":e(t)}})}(e)}}])&&ap(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we.A);function dp(e){return dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dp(e)}function pp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function hp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pp(Object(r),!0).forEach(function(t){mp(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pp(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function mp(e,t,r){return(t=function(e){var t=function(e){if("object"!=dp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=dp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dp(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yp(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return bp(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(bp(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,bp(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,bp(f,"constructor",c),bp(c,"constructor",s),s.displayName="GeneratorFunction",bp(c,o,"GeneratorFunction"),bp(f),bp(f,o,"Generator"),bp(f,n,function(){return this}),bp(f,"toString",function(){return"[object Generator]"}),(yp=function(){return{w:i,m:d}})()}function bp(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}bp=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){bp(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},bp(e,t,r,n)}function vp(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function gp(e){return _.types.compose("LinearVariantDisplay",(0,Id.bN)(e),_.types.model({type:_.types.literal("LinearVariantDisplay"),configuration:(0,s.ConfigurationReference)(e)})).actions(function(e){return{selectFeature:function(t){return(r=yp().m(function r(){var n,o,i,a,l,c,f;return yp().w(function(r){for(;;)switch(r.n){case 0:if(n=(0,u.getSession)(e),!(0,u.isSessionModelWithWidgets)(n)){r.n=2;break}return o=n.rpcManager,i=(0,Vo.getRpcSessionId)(e),a=(0,u.getContainingTrack)(e),l=(0,u.getContainingView)(e),c=(0,s.getConf)(a,"adapter"),r.n=1,o.call(i,"CoreGetMetadata",{adapterConfig:c});case 1:f=r.v,n.showWidget(n.addWidget("VariantFeatureWidget","variantFeature",{featureData:t.toJSON(),view:l,track:a,descriptions:f}));case 2:n.setSelection(t);case 3:return r.a(2)}},r)}),function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){vp(i,n,o,a,l,"next",e)}function l(e){vp(i,n,o,a,l,"throw",e)}a(void 0)})})();var r}}})}var wp=o(18183),Sp=o(10568);const Ap=(0,Tn.A)([(0,A.jsx)("path",{d:"m12 2-5.5 9h11z"},"0"),(0,A.jsx)("circle",{cx:"17.5",cy:"17.5",r:"4.5"},"1"),(0,A.jsx)("path",{d:"M3 13.5h8v8H3z"},"2")],"Category"),Op=(0,Tn.A)((0,A.jsx)("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),xp=(0,Tn.A)((0,A.jsx)("path",{d:"M13 6.99h3L12 3 8 6.99h3v10.02H8L12 21l4-3.99h-3z"}),"Height"),kp=(0,Tn.A)((0,A.jsx)("path",{d:"M18 4v5H6V4zm0-2H6c-1.1 0-2 .9-2 2v5c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 13v5H6v-5zm0-2H6c-1.1 0-2 .9-2 2v5c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2"}),"Splitscreen");var Cp=o(57323),Pp=o(38792),Ep=o.n(Pp);function jp(e){return jp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jp(e)}function Tp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tp(Object(r),!0).forEach(function(t){Rp(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tp(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Rp(e,t,r){return(t=function(e){var t=function(e){if("object"!=jp(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=jp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jp(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ip(e){var t,r=e.sources,n=e.layout,o=void 0===n?r:n,i=e.renderingMode,a=e.sampleInfo,l=[],s=Object.fromEntries(r.map(function(e){return[e.name,e]})),c=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Mp(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mp(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(o);try{for(c.s();!(t=c.n()).done;){var u=t.value;if("phased"===i){var f=null==a?void 0:a[u.name];if(null!=f&&f.isPhased)for(var d=f.maxPloidy,p=0;p<d;p++){var h="".concat(u.name," HP").concat(p);l.push(_p(_p(_p({},s[u.name]),u),{},{label:h,HP:p,id:h}))}}else l.push(_p(_p(_p({},s[u.name]),u),{},{label:u.name,id:u.name}))}}catch(e){c.e(e)}finally{c.f()}return l}function Np(e){return Np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Np(e)}function Dp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Fp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Lp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fp(Object(r),!0).forEach(function(t){zp(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fp(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function zp(e,t,r){return(t=function(e){var t=function(e){if("object"!=Np(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Np(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Np(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Bp=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,71535))}),$p=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,33378))}),Gp=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,23736))}),Hp=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,26017))}),Vp=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,70823))});function Wp(e){return _.types.compose("LinearVariantMatrixDisplay",(0,Id.Gx)(e),_.types.model({type:_.types.literal("LinearVariantMatrixDisplay"),layout:_.types.optional(_.types.frozen(),[]),configuration:(0,s.ConfigurationReference)(e),minorAlleleFrequencyFilter:_.types.optional(_.types.number,0),showSidebarLabelsSetting:!0,renderingMode:_.types.optional(_.types.string,"alleleCount"),rowHeightSetting:_.types.optional(_.types.number,8),autoHeight:!0,lengthCutoffFilter:Number.MAX_SAFE_INTEGER,jexlFilters:_.types.maybe(_.types.array(_.types.string)),referenceDrawingMode:"skip"})).volatile(function(){return{sourcesLoadingStopToken:void 0,simplifiedFeaturesStopToken:void 0,featureUnderMouseVolatile:void 0,sourcesVolatile:void 0,featuresVolatile:void 0,hasPhased:!1,sampleInfo:void 0,hoveredGenotype:void 0}}).actions(function(e){return{setJexlFilters:function(t){e.jexlFilters=(0,_.cast)(t)},setRowHeight:function(t){e.rowHeightSetting=t},setHoveredGenotype:function(t){e.hoveredGenotype=t},setFeatures:function(t){e.featuresVolatile=t},setLayout:function(t){e.layout=t},clearLayout:function(){e.layout=[]},setSourcesLoading:function(t){e.sourcesLoadingStopToken&&(0,Sp.CF)(e.sourcesLoadingStopToken),e.sourcesLoadingStopToken=t},setSimplifiedFeaturesLoading:function(t){e.simplifiedFeaturesStopToken&&(0,Sp.CF)(e.simplifiedFeaturesStopToken),e.simplifiedFeaturesStopToken=t},setSources:function(t){Ep()(t,e.sourcesVolatile)||(e.sourcesVolatile=t)},setMafFilter:function(t){e.minorAlleleFrequencyFilter=t},setShowSidebarLabels:function(t){e.showSidebarLabelsSetting=t},setPhasedMode:function(t){e.renderingMode=t},setAutoHeight:function(t){e.autoHeight=t},setHasPhased:function(t){e.hasPhased=t},setSampleInfo:function(t){Ep()(t,e.sampleInfo)||(e.sampleInfo=t)},setReferenceDrawingMode:function(t){e.referenceDrawingMode=t}}}).views(function(e){return{get activeFilters(){var t;return null!==(t=e.jexlFilters)&&void 0!==t?t:(0,s.getConf)(e,"jexlFilters").map(function(e){return"jexl:".concat(e)})},get preSources(){return e.layout.length?e.layout:e.sourcesVolatile},get sourcesWithoutLayout(){return e.sourcesVolatile?Ip({sources:e.sourcesVolatile,renderingMode:e.renderingMode,sampleInfo:e.sampleInfo}):void 0},get sources(){var t=e.layout.length?e.layout:e.sourcesVolatile;return t?Ip({sources:t,renderingMode:e.renderingMode,sampleInfo:e.sampleInfo}):void 0}}}).views(function(e){var t=e.trackMenuItems,r=e.renderProps;return{get sourceMap(){return e.sources?Object.fromEntries(e.sources.map(function(e){return[e.name,e]})):void 0},get rowHeight(){var t=e.sources,r=e.autoHeight,n=e.rowHeightSetting,o=e.height;return r?o/((null==t?void 0:t.length)||1):n},adapterProps:function(){return Lp(Lp({},r()),{},{rpcDriverName:e.rpcDriverName,displayModel:e,config:e.rendererConfig})},trackMenuItems:function(){return[].concat(function(e){if(Array.isArray(e))return Dp(e)}(r=t())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Dp(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dp(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[{label:"Show sidebar labels",icon:Cp.A,type:"checkbox",checked:e.showSidebarLabelsSetting,onClick:function(){e.setShowSidebarLabels(!e.showSidebarLabelsSetting)}},{label:"Row height",icon:xp,subMenu:[{label:"Manually set row height",disabled:e.autoHeight,onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Vp,{model:e,handleClose:t}]})}},{label:"Auto-adjust to display height",type:"checkbox",checked:e.autoHeight,onClick:function(){e.setAutoHeight(!e.autoHeight)}}]},{label:"Rendering mode",icon:kp,subMenu:[{label:"Allele count",type:"radio",checked:"alleleCount"===e.renderingMode,onClick:function(){e.setPhasedMode("alleleCount")}},{label:"Phased".concat(e.hasPhased?"":" (disabled, no phased variants found)"),disabled:!e.hasPhased,checked:"phased"===e.renderingMode,type:"radio",onClick:function(){e.setPhasedMode("phased")}}]},{label:"Reference mode",type:"subMenu",subMenu:[{label:"Fill background grey, skip reference allele mouseovers (helps with large overlapping SVs)",type:"radio",checked:"skip"===e.referenceDrawingMode,onClick:function(){e.setReferenceDrawingMode("skip")}},{label:"Don't fill background grey, only draw actual reference alleles as grey",type:"radio",checked:"draw"===e.referenceDrawingMode,onClick:function(){e.setReferenceDrawingMode("draw")}}]},{label:"Filter by",icon:Op,subMenu:[{label:"Minor allele frequency",onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[$p,{model:e,handleClose:t}]})}},{label:"Edit filters",onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Gp,{model:e,handleClose:t}]})}}]},{label:"Cluster by genotype",icon:Ap,onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Hp,{model:e,handleClose:t}]})}},{label:"Edit group colors/arrangement...",onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Bp,{model:e,handleClose:t}]})}}]);var r}}}).views(function(e){return{get canDisplayLabels(){return e.rowHeight>=8&&e.showSidebarLabelsSetting},get totalHeight(){var t;return e.rowHeight*((null===(t=e.sources)||void 0===t?void 0:t.length)||1)},get featuresReady(){return!!e.featuresVolatile}}}).views(function(e){return{renderProps:function(){var t=e.adapterProps();return Lp(Lp({},t),{},{notReady:t.notReady||!e.sources||!e.featuresReady,height:e.height,totalHeight:e.totalHeight,renderingMode:e.renderingMode,minorAlleleFrequencyFilter:e.minorAlleleFrequencyFilter,lengthCutoffFilter:e.lengthCutoffFilter,rowHeight:e.rowHeight,sources:e.sources,scrollTop:e.scrollTop,referenceDrawingMode:e.referenceDrawingMode,filters:new wp.A({filters:e.activeFilters})})}}})}function Up(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return qp(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(qp(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,qp(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,qp(f,"constructor",c),qp(c,"constructor",s),s.displayName="GeneratorFunction",qp(c,o,"GeneratorFunction"),qp(f),qp(f,o,"Generator"),qp(f,n,function(){return this}),qp(f,"toString",function(){return"[object Generator]"}),(Up=function(){return{w:i,m:d}})()}function qp(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}qp=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){qp(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},qp(e,t,r,n)}function Xp(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Kp(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Xp(i,n,o,a,l,"next",e)}function l(e){Xp(i,n,o,a,l,"throw",e)}a(void 0)})}}const Yp=function(e){return _.types.compose("MultiLinearVariantDisplay",Wp(e),_.types.model({type:_.types.literal("MultiLinearVariantDisplay"),rowHeightSetting:_.types.optional(_.types.number,11),minorAlleleFrequencyFilter:_.types.optional(_.types.number,0)})).views(function(){return{get rendererTypeName(){return"MultiVariantRenderer"}}}).actions(function(e){var t=e.renderSvg;return{afterAttach:function(){Kp(Up().m(function t(){var r,n,i,a,l;return Up().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,Promise.resolve().then(o.bind(o,74437));case 1:return r=t.v,n=r.getMultiVariantSourcesAutorun,t.n=2,Promise.resolve().then(o.bind(o,65238));case 2:i=t.v,a=i.getMultiVariantFeaturesAutorun,n(e),a(e),t.n=4;break;case 3:t.p=3,l=t.v,(0,_.isAlive)(e)&&(console.error(l),(0,u.getSession)(e).notifyError("".concat(l),l));case 4:return t.a(2)}},t,null,[[0,3]])}))()},renderSvg:function(r){return Kp(Up().m(function n(){var i,a;return Up().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,Promise.resolve().then(o.bind(o,32751));case 1:return i=n.v,a=i.renderSvg,n.a(2,a(e,r,t))}},n)}))()}}})};var Jp=o(9121),Zp=o(49315),Qp=o(20808),eh=o(14041);function th(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rh(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rh(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var nh=(0,T.observer)(function(e){var t=e.model,r=t.lineZoneHeight,n=(0,a.useRef)(null),o=th((0,a.useState)(),2),i=o[0],l=o[1],s=th((0,a.useState)(),2),c=s[0],u=s[1];return eh.createElement("div",{ref:n,onMouseMove:function(e){var t,r=null===(t=n.current)||void 0===t?void 0:t.getBoundingClientRect(),o=(null==r?void 0:r.top)||0,i=(null==r?void 0:r.left)||0;l(e.clientY-o),u(e.clientX-i)},onMouseLeave:function(){l(void 0),u(void 0)}},eh.createElement("div",{style:{position:"relative"}},eh.createElement(Jp.A,{model:t}),eh.createElement("div",{style:{position:"absolute",top:r}},eh.createElement(Qp.A,{model:t}),eh.createElement(Id.GQ,e))),c&&i&&i>r?eh.createElement(Zp.A,{mouseX:c,mouseY:i,model:t}):null)});const oh=nh,ih=(0,s.ConfigurationSchema)("LinearVariantMatrixRenderer",{},{explicitlyTyped:!0});function ah(e){return ah="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ah(e)}function lh(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return sh(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(sh(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,sh(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,sh(f,"constructor",c),sh(c,"constructor",s),s.displayName="GeneratorFunction",sh(c,o,"GeneratorFunction"),sh(f),sh(f,o,"Generator"),sh(f,n,function(){return this}),sh(f,"toString",function(){return"[object Generator]"}),(lh=function(){return{w:i,m:d}})()}function sh(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}sh=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){sh(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},sh(e,t,r,n)}function ch(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function uh(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){ch(i,n,o,a,l,"next",e)}function l(e){ch(i,n,o,a,l,"throw",e)}a(void 0)})}}function fh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function dh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fh(Object(r),!0).forEach(function(t){ph(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fh(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ph(e,t,r){return(t=function(e){var t=function(e){if("object"!=ah(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ah(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ah(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hh(e){return _.types.compose("LinearVariantMatrixDisplay",Wp(e),_.types.model({type:_.types.literal("LinearVariantMatrixDisplay"),rowHeightSetting:_.types.optional(_.types.number,1),lineZoneHeight:20})).views(function(e){return{get nrow(){var t;return(null===(t=e.sources)||void 0===t?void 0:t.length)||1},get blockType(){return"dynamicBlocks"},get totalHeight(){return e.autoHeight?e.height-e.lineZoneHeight:this.nrow*e.rowHeightSetting},get rowHeight(){return e.autoHeight?e.totalHeight/this.nrow:e.rowHeightSetting},get featuresReady(){return!!e.featuresVolatile}}}).views(function(e){return{renderProps:function(){var t=e.adapterProps();return dh(dh({},t),{},{notReady:t.notReady||!e.sources||!e.featuresReady,renderingMode:e.renderingMode,minorAlleleFrequencyFilter:e.minorAlleleFrequencyFilter,lengthCutoffFilter:e.lengthCutoffFilter,height:e.totalHeight,sources:e.sources})},get canDisplayLabels(){return e.rowHeight>8&&e.showSidebarLabelsSetting}}}).actions(function(e){return{setLineZoneHeight:function(t){return e.lineZoneHeight=(0,u.clamp)(t,10,1e3),e.lineZoneHeight}}}).actions(function(e){var t=e.renderSvg;return{setLineZoneHeight:function(t){return e.lineZoneHeight=(0,u.clamp)(t,10,1e3),e.lineZoneHeight},afterAttach:function(){uh(lh().m(function t(){var r,n,i,a,l;return lh().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,Promise.resolve().then(o.bind(o,74437));case 1:return r=t.v,n=r.getMultiVariantSourcesAutorun,t.n=2,Promise.resolve().then(o.bind(o,65238));case 2:i=t.v,a=i.getMultiVariantFeaturesAutorun,n(e),a(e),t.n=4;break;case 3:t.p=3,l=t.v,(0,_.isAlive)(e)&&(console.error(l),(0,u.getSession)(e).notifyError("".concat(l),l));case 4:return t.a(2)}},t,null,[[0,3]])}))()},renderSvg:function(r){return uh(lh().m(function n(){var i,a;return lh().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,Promise.resolve().then(o.bind(o,36094));case 1:return i=n.v,a=i.renderSvg,n.a(2,a(e,r,t))}},n)}))()}}})}var mh=["mafs"];function yh(e){return yh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yh(e)}function bh(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return vh(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(vh(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,vh(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,vh(f,"constructor",c),vh(c,"constructor",s),s.displayName="GeneratorFunction",vh(c,o,"GeneratorFunction"),vh(f),vh(f,o,"Generator"),vh(f,n,function(){return this}),vh(f,"toString",function(){return"[object Generator]"}),(bh=function(){return{w:i,m:d}})()}function vh(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}vh=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){vh(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},vh(e,t,r,n)}function gh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function wh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gh(Object(r),!0).forEach(function(t){jh(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gh(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Sh(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ah(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Oh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Th(n.key),n)}}function xh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xh=function(){return!!e})()}function kh(e,t,r,n){var o=Ch(Ph(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Ch(){return Ch="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ph(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Ch.apply(null,arguments)}function Ph(e){return Ph=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ph(e)}function Eh(e,t){return Eh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Eh(e,t)}function jh(e,t,r){return(t=Th(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Th(e){var t=function(e){if("object"!=yh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=yh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yh(t)?t:t+""}var _h=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return jh((r=this,n=t,o=[].concat(a),n=Ph(n),e=function(e,t){if(t&&("object"==yh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,xh()?Reflect.construct(n,o||[],Ph(r).constructor):n.apply(r,o))),"supportsSVG",!0),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eh(e,t)}(t,e),r=t,n=[{key:"render",value:(i=bh().m(function e(r){var n,i,a,l,s,c,f,d,p,h,m,y,b,v,g;return bh().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getFeatures(r);case 1:return n=e.v,i=r.height,a=r.sources,l=r.regions,s=r.bpPerPx,c=l[0],f=c.end,d=c.start,p=(f-d)/s,e.n=2,Promise.resolve().then(o.bind(o,48150));case 2:return h=e.v,m=h.makeImageData,e.n=3,(0,u.renderToAbstractCanvas)(p,i,r,function(e){return m({ctx:e,canvasWidth:p,canvasHeight:i,renderArgs:wh(wh({},r),{},{features:n,sources:a})})});case 3:return y=e.v,b=y.mafs,v=Sh(y,mh),e.n=4,kh(t,"render",this,3)([wh(wh(wh({},r),v),{},{features:n,height:i,width:p})]);case 4:return g=e.v,e.a(2,wh(wh(wh({},g),v),{},{features:new Map,simplifiedFeatures:b.map(function(e){var t=e.feature;return new u.SimpleFeature({id:t.id(),data:{start:t.get("start"),end:t.get("end"),refName:t.get("refName")}})}),height:i,width:p}))}},e,this)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){Ah(o,r,n,a,l,"next",e)}function l(e){Ah(o,r,n,a,l,"throw",e)}a(void 0)})},function(e){return a.apply(this,arguments)})}],n&&Oh(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(po.default),Rh=o(14041);const Mh=(0,T.observer)(function(e){var t=e.arr,r=e.width,n=e.height,o=e.displayModel,i=(0,a.useRef)(null);return Rh.createElement("div",{ref:i,onMouseMove:function(e){o.setHoveredGenotype(function(e,a){var l,s,c;if(i.current){var u=i.current.getBoundingClientRect(),f=e-u.left,d=a-u.top,p=t.length,h=(null===(l=t[0])||void 0===l?void 0:l.length)||0,m=null===(s=o.sources[Math.floor(d/n*h)])||void 0===s?void 0:s.name,y=null===(c=t[Math.floor(f/r*p)])||void 0===c?void 0:c[Math.floor(d/n*h)];return y&&m?{name:m,genotype:y}:void 0}}(e.clientX,e.clientY))},onMouseLeave:function(){o.setHoveredGenotype(void 0)},onMouseOut:function(){o.setHoveredGenotype(void 0)},style:{overflow:"visible",position:"relative",height:n}},Rh.createElement(c.PrerenderedCanvas,e))});function Ih(e){return Ih="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ih(e)}function Nh(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Dh(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Dh(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Dh(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Dh(f,"constructor",c),Dh(c,"constructor",s),s.displayName="GeneratorFunction",Dh(c,o,"GeneratorFunction"),Dh(f),Dh(f,o,"Generator"),Dh(f,n,function(){return this}),Dh(f,"toString",function(){return"[object Generator]"}),(Nh=function(){return{w:i,m:d}})()}function Dh(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Dh=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Dh(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Dh(e,t,r,n)}function Fh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Lh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fh(Object(r),!0).forEach(function(t){Uh(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fh(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function zh(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Bh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qh(n.key),n)}}function $h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($h=function(){return!!e})()}function Gh(e,t,r,n){var o=Hh(Vh(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Hh(){return Hh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Vh(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Hh.apply(null,arguments)}function Vh(e){return Vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vh(e)}function Wh(e,t){return Wh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wh(e,t)}function Uh(e,t,r){return(t=qh(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qh(e){var t=function(e){if("object"!=Ih(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ih(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ih(t)?t:t+""}var Xh=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return Uh((r=this,n=t,o=[].concat(a),n=Vh(n),e=function(e,t){if(t&&("object"==Ih(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,$h()?Reflect.construct(n,o||[],Vh(r).constructor):n.apply(r,o))),"supportsSVG",!0),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wh(e,t)}(t,e),r=t,n=[{key:"render",value:(i=Nh().m(function e(r){var n,i,a,l,s,c,f,d,p,h,m;return Nh().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getFeatures(r);case 1:return n=e.v,i=r.height,a=r.referenceDrawingMode,l=r.regions,s=r.bpPerPx,c=l[0],f=(c.end-c.start)/s,e.n=2,Promise.resolve().then(o.bind(o,3035));case 2:return d=e.v,p=d.makeImageData,e.n=3,(0,u.renderToAbstractCanvas)(f,i,r,function(e){return"skip"===a&&(e.fillStyle="#ccc",e.fillRect(0,0,f,i)),p(e,Lh(Lh({},r),{},{features:n}))});case 3:return h=e.v,e.n=4,Gh(t,"render",this,3)([Lh(Lh(Lh({},r),h),{},{features:n,height:i,width:f})]);case 4:return m=e.v,e.a(2,Lh(Lh(Lh({},m),h),{},{features:new Map,height:i,width:f,containsNoTransferables:!0}))}},e,this)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){zh(o,r,n,a,l,"next",e)}function l(e){zh(o,r,n,a,l,"throw",e)}a(void 0)})},function(e){return a.apply(this,arguments)})}],n&&Bh(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(mo.default),Kh=o(77756),Yh=o.n(Kh);function Jh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Zh=o(11409),Qh=o(14041);function em(e){return em="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},em(e)}var tm=["minX","minY","maxX","maxY","genotype","featureId"];function rm(){return rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rm.apply(null,arguments)}function nm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function om(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nm(Object(r),!0).forEach(function(t){im(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nm(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function im(e,t,r){return(t=function(e){var t=function(e){if("object"!=em(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=em(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==em(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const am=(0,T.observer)(function(e){var t=e.featureGenotypeMap,r=e.totalHeight,n=e.scrollTop,o=e.rbush,i=e.displayModel,l=(0,a.useRef)(null),s=(0,a.useMemo)(function(){return(new(Yh())).fromJSON(o)},[o]);function f(e,r){var n=0,o=0;if(l.current){var a=l.current.getBoundingClientRect();n=e-a.left,o=r-a.top-((null==i?void 0:i.scrollTop)||0)}var c=s.search({minX:n,maxX:n+1,minY:o,maxY:o+1});if(c.length){var f=function(e,t){var r,n,o=1/0,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Jh(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jh(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(e);try{for(i.s();!(n=i.n()).done;){var a=n.value,l=t(a);l<o&&(o=l,r=a)}}catch(e){i.e(e)}finally{i.f()}return r}(c,function(e){return e.maxX-e.minX}),d=(f.minX,f.minY,f.maxX,f.maxY,f.genotype),p=f.featureId,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(f,tm),m=t[p];if(m){var y=m.ref,b=m.alt,v=m.name,g=m.description,w=m.length,S=(0,Zh.Fm)(d,y,b);return om(om({},h),{},{genotype:d,alleles:S,featureName:v,description:b.length>=3?"multiple ALT alleles":g,length:(0,u.getBpDisplayStr)(w)})}}}return Qh.createElement("div",{ref:l,onMouseMove:function(e){var t;return null===(t=i.setHoveredGenotype)||void 0===t?void 0:t.call(i,f(e.clientX,e.clientY))},onMouseLeave:function(){var e;null===(e=i.setHoveredGenotype)||void 0===e||e.call(i,void 0)},onMouseOut:function(){var e;null===(e=i.setHoveredGenotype)||void 0===e||e.call(i,void 0)},style:{overflow:"visible",position:"relative",height:r}},Qh.createElement(c.PrerenderedCanvas,rm({},e,{style:{position:"absolute",left:0,top:n}})))}),lm=(0,s.ConfigurationSchema)("MultiVariantRenderer",{},{explicitlyTyped:!0}),sm=(0,s.ConfigurationSchema)("SplitVcfTabixAdapter",{vcfGzLocationMap:{type:"frozen",defaultValue:{}},indexLocationMap:{type:"frozen",defaultValue:{}},indexType:{type:"string",defaultValue:"TBI"},samplesTsvLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/samples.tsv",description:'tsv with header like "name\tpopulation\tetc" where the first column is required, and corresponds to the sample names in the VCF files',locationType:"UriLocation"}}},{explicitlyTyped:!0});var cm=o(49554),um=o(14041);function fm(){return fm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fm.apply(null,arguments)}function dm(e){return function(e){if(Array.isArray(e))return mm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||hm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||hm(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hm(e,t){if(e){if("string"==typeof e)return mm(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mm(e,t):void 0}}function mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ym(e,t){var r=e.region.elided?0:e.region.start,n=e.region.elided?0:e.region.end;return(e.flipped?n-t:t-r)/e.bpPerRadian+e.startRadians}const bm=(0,T.observer)(function(e){var t,r,n,o,i=e.feature,l=e.blocksForRefs,c=e.radius,f=e.config,d=e.bezierRadius,p=e.selected,h=e.onClick,m=pm((0,a.useState)(!1),2),y=m[0],b=m[1],v=l[i.get("refName")];if(!v)return null;i.get("INFO")?r=pm(i.get("INFO").SVTYPE||[],1)[0]:i.get("mate")&&(r="mate");var g=null===(t=i.get("ALT"))||void 0===t?void 0:t[0],w=g&&(0,cm.h)(g),S=i.get("start");if(w){var A=w.MatePosition.split(":");n=+A[1],o=l[A[0]]}else if("<TRA>"===g){var O,x,k=null===(O=i.get("INFO"))||void 0===O||null===(O=O.CHR2)||void 0===O?void 0:O[0],C=null===(x=i.get("INFO"))||void 0===x||null===(x=x.END)||void 0===x?void 0:x[0];n=Number.parseInt(C,10),o=l[k]}else if("mate"===r){var P=i.get("mate"),E=P.refName;n=P.start,o=l[E]}else o=v,n=i.get("end");if(o){var j=ym(v,S),T=ym(o,n),_=(0,u.polarToCartesian)(c,j),R=(0,u.polarToCartesian)(c,T),M=(0,u.polarToCartesian)(d,(T+j)/2),I=p?(0,s.readConfObject)(f,"strokeColorSelected",{feature:i}):(0,s.readConfObject)(f,"strokeColor",{feature:i}),N=(0,s.readConfObject)(f,"strokeColorHover",{feature:i});return um.createElement("path",fm({"data-testid":"chord-".concat(i.id()),cursor:"crosshair",fill:"none",d:["M"].concat(dm(_),["Q"],dm(M),dm(R)).join(" ")},(0,u.getStrokeProps)(y?N:I),{strokeWidth:y?3:1,onClick:function(e){h(i,v.region,o.region,e)},onMouseOver:function(){p||b(!0)},onMouseOut:function(){p||b(!1)}}))}return null});var vm=o(14041);function gm(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=wm(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function wm(e,t){if(e){if("string"==typeof e)return Sm(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sm(e,t):void 0}}function Sm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const Am=(0,T.observer)(function(e){var t,r=e.features,n=e.config,o=e.blockDefinitions,i=e.radius,l=e.bezierRadius,s=e.displayModel,c=e.onChordClick,u=(s||{}).selectedFeatureId,f=(0,a.useMemo)(function(){var e,t={},r=gm(o);try{for(r.s();!(e=r.n()).done;){var n,i=e.value,a=gm(i.region.elided?i.region.regions:[i.region]);try{for(a.s();!(n=a.n()).done;)t[n.value.refName]=i}catch(e){a.e(e)}finally{a.f()}}}catch(e){r.e(e)}finally{r.f()}return t},[o]);return vm.createElement("g",{"data-testid":"structuralVariantChordRenderer"},(t=r.values(),function(e){if(Array.isArray(e))return Sm(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||wm(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=e.id(),r=String(u)===String(t);return vm.createElement(bm,{key:t,feature:e,config:n,radius:i,bezierRadius:l,blocksForRefs:f,selected:r,onClick:c})}))}),Om=(0,s.ConfigurationSchema)("StructuralVariantChordRenderer",{strokeColor:{type:"color",description:"the line color of each arc",defaultValue:"rgba(255,133,0,0.32)",contextVariable:["feature"]},strokeColorSelected:{type:"color",description:"the line color of an arc that has been selected",defaultValue:"black",contextVariable:["feature"]},strokeColorHover:{type:"color",description:"the line color of an arc that is being hovered over with the mouse",defaultValue:"#555",contextVariable:["feature"]}},{explicitlyTyped:!0});var xm=(0,s.ConfigurationSchema)("VariantFeatureWidget",{});function km(e){var t=ge(e);return _.types.compose(t,_.types.model("VariantFeatureWidget",{type:_.types.literal("VariantFeatureWidget"),descriptions:_.types.frozen()}))}function Cm(e){return Cm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cm(e)}function Pm(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Em(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Em(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Em(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Em(f,"constructor",c),Em(c,"constructor",s),s.displayName="GeneratorFunction",Em(c,o,"GeneratorFunction"),Em(f),Em(f,o,"Generator"),Em(f,n,function(){return this}),Em(f,"toString",function(){return"[object Generator]"}),(Pm=function(){return{w:i,m:d}})()}function Em(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Em=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Em(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Em(e,t,r,n)}function jm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Tm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jm(Object(r),!0).forEach(function(t){_m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jm(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _m(e,t,r){return(t=Nm(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rm(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Mm(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Rm(i,n,o,a,l,"next",e)}function l(e){Rm(i,n,o,a,l,"throw",e)}a(void 0)})}}function Im(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Nm(n.key),n)}}function Nm(e){var t=function(e){if("object"!=Cm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Cm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cm(t)?t:t+""}function Dm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dm=function(){return!!e})()}function Fm(e,t,r,n){var o=Lm(zm(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Lm(){return Lm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=zm(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Lm.apply(null,arguments)}function zm(e){return zm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zm(e)}function Bm(e,t){return Bm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bm(e,t)}var $m=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=zm(r=t),function(e,t){if(t&&("object"==Cm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Dm()?Reflect.construct(r,n||[],zm(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bm(e,t)}(t,e),r=t,n=[{key:"deserializeArguments",value:(i=Mm(Pm().m(function e(r,n){var o;return Pm().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Fm(t,"deserializeArguments",this,3)([r,n]);case 1:return o=e.v,e.a(2,Tm(Tm({},o),{},{filters:r.filters?new wp.A({filters:r.filters}):void 0}))}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"serializeArguments",value:(o=Mm(Pm().m(function e(r,n){var o,i,a,l,s;return Pm().w(function(e){for(;;)switch(e.n){case 0:if(a=this.pluginManager,l=null===(o=a.rootModel)||void 0===o||null===(o=o.session)||void 0===o?void 0:o.assemblyManager){e.n=1;break}throw new Error("no assembly manager");case 1:return e.n=2,(0,u.renameRegionsIfNeeded)(l,Tm(Tm({},r),{},{filters:null===(i=r.filters)||void 0===i?void 0:i.toJSON().filters}));case 2:return s=e.v,e.a(2,Fm(t,"serializeArguments",this,3)([s,n]))}},e,this)})),function(e,t){return o.apply(this,arguments)})}],n&&Im(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(Te.A);function Gm(e){return function(e){if(Array.isArray(e))return Hm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Hm(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hm(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Vm(e){return Number.parseFloat((100*e).toFixed(1))}function Wm(e,t){for(var r=Math.min(e.length,t.length),n=0,o=0;o<r;o++)n+=(e[o]-t[o])*(e[o]-t[o]);return Math.sqrt(n)}function Um(e,t,r){for(var n=0,o=e.length,i=t.length,a=0;a<o;a++)for(var l=0;l<i;l++)n+=r[e[a]][t[l]];return n/e.length/t.length}function qm(e){for(var t=e.data,r=e.distance,n=void 0===r?Wm:r,o=e.linkage,i=void 0===o?Um:o,a=e.onProgress,l=e.stopToken,s=performance.now(),c=[],u=0;u<t.length;u++){performance.now()-s>400&&((0,Sp.SW)(l),s=performance.now()),a&&a("Making distance matrix: ".concat(Vm(u/(t.length-1)),"%"));for(var f=[],d=0;d<t.length;d++)f.push(n(t[u],t[d]));c.push(f)}var p=t.map(function(e,t){return{height:0,indexes:[Number(t)]}}),h=[];s=performance.now();for(var m=0;m<t.length&&(performance.now()-s>400&&((0,Sp.SW)(l),s=performance.now()),a&&a("Clustering: ".concat(Vm((m+1)/t.length),"%")),h.push(p.map(function(e){return e.indexes})),!(m>=t.length-1));m++){for(var y=1/0,b=0,v=0,g=0;g<p.length;g++)for(var w=g+1;w<p.length;w++){var S=i(p[g].indexes,p[w].indexes,c);S<y&&(y=S,b=g,v=w)}var A={indexes:[].concat(Gm(p[b].indexes),Gm(p[v].indexes)),height:y,children:[p[b],p[v]]};p.splice(Math.max(b,v),1),p.splice(Math.min(b,v),1),p.push(A)}return h=[[]].concat(Gm(h.reverse())),{clusters:p[0],distances:c,order:p[0].indexes,clustersGivenK:h}}var Xm=o(46944);function Km(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Ym(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ym(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ym(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Ym(f,"constructor",c),Ym(c,"constructor",s),s.displayName="GeneratorFunction",Ym(c,o,"GeneratorFunction"),Ym(f),Ym(f,o,"Generator"),Ym(f,n,function(){return this}),Ym(f,"toString",function(){return"[object Generator]"}),(Km=function(){return{w:i,m:d}})()}function Ym(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ym=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ym(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ym(e,t,r,n)}function Jm(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Zm(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zm(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function Zm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Qm(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ey(e){return ty.apply(this,arguments)}function ty(){var e;return e=Km().m(function e(t){var r,n,o,i,a,l,s,c,f,d,p,h,m,y,b,v,g,w,S,A,O,x,k,C,P,E;return Km().w(function(e){for(;;)switch(e.n){case 0:return r=t.pluginManager,n=t.args,o=n.sources,i=n.minorAlleleFrequencyFilter,a=n.regions,l=n.adapterConfig,s=n.sessionId,c=n.lengthCutoffFilter,f=n.stopToken,e.n=1,(0,je.cK)(r,s,l);case 1:return d=e.v,p=d.dataAdapter,h=new Set,x=Xm.Cg,k=i,C=c,P=f,e.n=2,(0,wt._)(p.getFeaturesInMultipleRegions(a,n).pipe((0,St.$)()));case 2:E=e.v,m=x({minorAlleleFrequencyFilter:k,lengthCutoffFilter:C,stopToken:P,features:E}),y=Jm(m);try{for(y.s();!(b=y.n()).done;)for(v=b.value.alleleCounts,g=0,w=Object.keys(v);g<w.length;g++)S=w[g],h.add(S)}catch(e){y.e(e)}finally{y.f()}return A={},O={},(0,u.forEachWithStopTokenCheck)(m,f,function(e){var t,r=e.feature.get("genotypes"),n=Jm(o);try{for(n.s();!(t=n.n()).done;){var i=t.value.name;A[i]||(A[i]=[]);var a=r[i],l=void 0;O[a]?l=O[a]:(l=a.split(/[/|]/),O[a]=l);var s,c,u=0,f=0,d=Jm(l);try{for(d.s();!(s=d.n()).done;){var p=s.value;"."===p?f++:"0"!==p&&u++}}catch(e){d.e(e)}finally{d.f()}c=f===l.length?-1:0===u?0:u===l.length?2:1,A[i].push(c)}}catch(e){n.e(e)}finally{n.f()}}),e.a(2,A)}},e)}),ty=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Qm(i,n,o,a,l,"next",e)}function l(e){Qm(i,n,o,a,l,"throw",e)}a(void 0)})},ty.apply(this,arguments)}function ry(e){return ry="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ry(e)}function ny(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return oy(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(oy(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,oy(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,oy(f,"constructor",c),oy(c,"constructor",s),s.displayName="GeneratorFunction",oy(c,o,"GeneratorFunction"),oy(f),oy(f,o,"Generator"),oy(f,n,function(){return this}),oy(f,"toString",function(){return"[object Generator]"}),(ny=function(){return{w:i,m:d}})()}function oy(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}oy=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){oy(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},oy(e,t,r,n)}function iy(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function ay(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uy(n.key),n)}}function ly(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ly=function(){return!!e})()}function sy(e){return sy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sy(e)}function cy(e,t){return cy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cy(e,t)}function uy(e){var t=function(e){if("object"!=ry(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ry(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ry(t)?t:t+""}var fy=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=uy(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=sy(n),e=function(e,t){if(t&&("object"==ry(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,ly()?Reflect.construct(n,o||[],sy(r).constructor):n.apply(r,o))),"name","MultiVariantClusterGenotypeMatrix"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cy(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=ny().m(function e(t,r){var n,o;return ny().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.deserializeArguments(t,r);case 1:return n=e.v,e.n=2,ey({pluginManager:this.pluginManager,args:n});case 2:return o=e.v,e.a(2,qm({data:Object.values(o),stopToken:n.stopToken,onProgress:function(e){n.statusCallback(e)}}))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){iy(i,r,n,a,l,"next",e)}function l(e){iy(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&ay(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function dy(e){return dy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dy(e)}function py(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return hy(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(hy(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,hy(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,hy(f,"constructor",c),hy(c,"constructor",s),s.displayName="GeneratorFunction",hy(c,o,"GeneratorFunction"),hy(f),hy(f,o,"Generator"),hy(f,n,function(){return this}),hy(f,"toString",function(){return"[object Generator]"}),(py=function(){return{w:i,m:d}})()}function hy(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}hy=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){hy(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},hy(e,t,r,n)}function my(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function yy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wy(n.key),n)}}function by(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(by=function(){return!!e})()}function vy(e){return vy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},vy(e)}function gy(e,t){return gy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gy(e,t)}function wy(e){var t=function(e){if("object"!=dy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=dy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dy(t)?t:t+""}var Sy=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=wy(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=vy(n),e=function(e,t){if(t&&("object"==dy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,by()?Reflect.construct(n,o||[],vy(r).constructor):n.apply(r,o))),"name","MultiVariantGetGenotypeMatrix"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gy(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=py().m(function e(t,r){var n,o,i,a;return py().w(function(e){for(;;)switch(e.n){case 0:return n=ey,o=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return i=e.v,a={pluginManager:o,args:i},e.a(2,n(a))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){my(i,r,n,a,l,"next",e)}function l(e){my(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&yy(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function Ay(e){return Ay="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ay(e)}function Oy(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return xy(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(xy(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,xy(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,xy(f,"constructor",c),xy(c,"constructor",s),s.displayName="GeneratorFunction",xy(c,o,"GeneratorFunction"),xy(f),xy(f,o,"Generator"),xy(f,n,function(){return this}),xy(f,"toString",function(){return"[object Generator]"}),(Oy=function(){return{w:i,m:d}})()}function xy(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}xy=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){xy(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},xy(e,t,r,n)}function ky(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Cy(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Cy(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Py(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ey(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ry(n.key),n)}}function jy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jy=function(){return!!e})()}function Ty(e){return Ty=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ty(e)}function _y(e,t){return _y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_y(e,t)}function Ry(e){var t=function(e){if("object"!=Ay(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ay(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ay(t)?t:t+""}var My=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Ry(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=Ty(n),e=function(e,t){if(t&&("object"==Ay(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,jy()?Reflect.construct(n,o||[],Ty(r).constructor):n.apply(r,o))),"name","MultiVariantGetSimplifiedFeatures"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_y(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=Oy().m(function e(t,r){var n,o,i,a,l,s,c,f,d,p,h,m,y,b,v,g,w;return Oy().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.deserializeArguments(t,r);case 1:return n=e.v,o=n.lengthCutoffFilter,i=n.minorAlleleFrequencyFilter,a=n.regions,l=n.adapterConfig,s=n.stopToken,c=n.sessionId,e.n=2,(0,je.cK)(this.pluginManager,c,l);case 2:return f=e.v,d=f.dataAdapter,y=Xm.Cg,b=i,v=o,g=s,e.n=3,(0,wt._)(d.getFeaturesInMultipleRegions(a,n).pipe((0,St.$)()));case 3:return w=e.v,p=y({minorAlleleFrequencyFilter:b,lengthCutoffFilter:v,stopToken:g,features:w}),h={},m=!1,(0,u.forEachWithStopTokenCheck)(p,s,function(e){for(var t=e.feature.get("genotypes"),r=0,n=Object.entries(t);r<n.length;r++){var o,i,a=ky(n[r],2),l=a[0],s=a[1],c=s.includes("|");m||(m=c),h[l]={maxPloidy:Math.max((null===(o=h[l])||void 0===o?void 0:o.maxPloidy)||0,s.split("|").length),isPhased:(null===(i=h[l])||void 0===i?void 0:i.isPhased)||c}}}),e.a(2,{hasPhased:m,sampleInfo:h,features:p.map(function(e){var t=e.feature;return{id:t.id(),data:{start:t.get("start"),end:t.get("end"),refName:t.get("refName"),name:t.get("name")}}})})}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){Py(i,r,n,a,l,"next",e)}function l(e){Py(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&Ey(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function Iy(e){return Iy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Iy(e)}function Ny(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Dy(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Dy(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Dy(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Dy(f,"constructor",c),Dy(c,"constructor",s),s.displayName="GeneratorFunction",Dy(c,o,"GeneratorFunction"),Dy(f),Dy(f,o,"Generator"),Dy(f,n,function(){return this}),Dy(f,"toString",function(){return"[object Generator]"}),(Ny=function(){return{w:i,m:d}})()}function Dy(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Dy=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Dy(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Dy(e,t,r,n)}function Fy(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ly(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Gy(n.key),n)}}function zy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zy=function(){return!!e})()}function By(e){return By=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},By(e)}function $y(e,t){return $y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$y(e,t)}function Gy(e){var t=function(e){if("object"!=Iy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Iy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Iy(t)?t:t+""}var Hy=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Gy(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=By(n),e=function(e,t){if(t&&("object"==Iy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,zy()?Reflect.construct(n,o||[],By(r).constructor):n.apply(r,o))),"name","MultiVariantGetSources"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$y(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=Ny().m(function e(t,r){var n,o,i,a,l,s,c;return Ny().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.regions,a=o.adapterConfig,l=o.sessionId,e.n=2,(0,je.cK)(n,l,a);case 2:return s=e.v,c=s.dataAdapter,e.a(2,c.getSources(i,o))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){Fy(i,r,n,a,l,"next",e)}function l(e){Fy(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&Ly(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function Vy(e){return Vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vy(e)}function Wy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Uy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wy(Object(r),!0).forEach(function(t){qy(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wy(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function qy(e,t,r){return(t=function(e){var t=function(e){if("object"!=Vy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Vy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vy(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Xy=(0,s.ConfigurationSchema)("VcfAdapter",{vcfLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.vcf",locationType:"UriLocation"}},samplesTsvLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/samples.tsv",description:"tsv with header like name\tpopulation\tetc. where the first column is required, and is the sample names",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?Uy(Uy({},e),{},{vcfLocation:{uri:e.uri,baseUri:e.baseUri}}):e}});function Ky(e){return Ky="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ky(e)}function Yy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Jy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yy(Object(r),!0).forEach(function(t){Zy(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yy(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Zy(e,t,r){return(t=function(e){var t=function(e){if("object"!=Ky(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ky(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ky(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Qy=(0,s.ConfigurationSchema)("VcfTabixAdapter",{vcfGzLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.vcf.gz",locationType:"UriLocation"}},index:(0,s.ConfigurationSchema)("VcfIndex",{indexType:{model:_.types.enumeration("IndexType",["TBI","CSI"]),type:"stringEnum",defaultValue:"TBI"},location:{type:"fileLocation",defaultValue:{uri:"/path/to/my.vcf.gz.tbi",locationType:"UriLocation"}}}),samplesTsvLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/samples.tsv",description:"tsv with header like name\tpopulation\tetc. where the first column is required, and is the sample names",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?Jy(Jy({},e),{},{vcfGzLocation:{uri:e.uri,baseUri:e.baseUri},index:{location:{uri:"".concat(e.uri,".tbi"),baseUri:e.baseUri}}}):e}});function eb(e){return eb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eb(e)}function tb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ib(n.key),n)}}function rb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rb=function(){return!!e})()}function nb(e){return nb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nb(e)}function ob(e,t){return ob=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ob(e,t)}function ib(e){var t=function(e){if("object"!=eb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=eb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eb(t)?t:t+""}o(35545);var ab=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=ib(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=nb(n),e=function(e,t){if(t&&("object"==eb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,rb()?Reflect.construct(n,o||[],nb(r).constructor):n.apply(r,o))),"name","VariantsPlugin"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ob(e,t)}(t,e),r=t,(n=[{key:"install",value:function(e){var t;!function(e){e.addAdapterType(function(){return new lo.A({name:"VcfAdapter",displayName:"VCF adapter",configSchema:Xy,getAdapterClass:function(){return Promise.resolve().then(o.bind(o,93539)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"VcfTabixAdapter",displayName:"VCF tabix adapter",configSchema:Qy,getAdapterClass:function(){return Promise.resolve().then(o.bind(o,16802)).then(function(e){return e.default})}})})}(e),function(e){e.addAdapterType(function(){return new lo.A({name:"SplitVcfTabixAdapter",displayName:"VCF tabix adapter (split across multiple files)",configSchema:sm,getAdapterClass:function(){return Promise.resolve().then(o.bind(o,73784)).then(function(e){return e.default})}})})}(e),function(e){e.addWidgetType(function(){return new Pe.A({name:"VariantFeatureWidget",heading:"Feature details",configSchema:xm,stateModel:km(e),ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,82927))})})})}(e),(t=e).addTrackType(function(){var e,r=(e=t,(0,s.ConfigurationSchema)("VariantTrack",{},{baseConfiguration:(0,Ce.createBaseTrackConfig)(e)}));return new co.A({name:"VariantTrack",displayName:"Variant track",configSchema:r,stateModel:(0,fo.createBaseTrackModel)(t,"VariantTrack",r)})}),function(e){e.addToExtensionPoint("Core-guessAdapterForLocation",function(e){return function(t,r,n){var o=(0,Vo.getFileName)(t),i=r&&(0,Vo.getFileName)(r);return(0,u.testAdapter)(o,/\.vcf\.b?gz$/i,n,"VcfTabixAdapter")?{type:"VcfTabixAdapter",vcfGzLocation:t,index:{location:r||(0,Vo.makeIndex)(t,".tbi"),indexType:(0,Vo.makeIndexType)(i,"CSI","TBI")}}:(0,u.testAdapter)(o,/\.vcf(\.gz)?$/i,n,"VcfAdapter")?{type:"VcfAdapter",vcfLocation:t}:e(t,r,n)}}),e.addToExtensionPoint("Core-guessTrackTypeForLocation",function(e){return function(t){return["VcfTabixAdapter","VcfAdapter"].includes(t)?"VariantTrack":e(t)}})}(e),function(e){e.addDisplayType(function(){var t=function(e){return(0,s.ConfigurationSchema)("LinearVariantDisplay",{},{baseConfiguration:(0,Id.lw)(e),explicitlyTyped:!0})}(e);return new so.A({name:"LinearVariantDisplay",displayName:"Variant display",configSchema:t,stateModel:gp(t),trackType:"VariantTrack",viewType:"LinearGenomeView",ReactComponent:Id.GQ})})}(e),function(e){e.addDisplayType(function(){var t=function(e){return(0,s.ConfigurationSchema)("LinearVariantMatrixDisplay",{renderer:ih,height:{type:"number",defaultValue:250}},{baseConfiguration:(0,Id.lw)(e),explicitlyTyped:!0})}(e);return new so.A({name:"LinearVariantMatrixDisplay",displayName:"Multi-sample variant display (matrix)",configSchema:t,stateModel:hh(t),trackType:"VariantTrack",viewType:"LinearGenomeView",ReactComponent:oh})})}(e),function(e){e.addDisplayType(function(){var t=function(e){var t=e.getRendererType("MultiVariantRenderer").configSchema;return(0,s.ConfigurationSchema)("MultiLinearVariantDisplay",{defaultRendering:{type:"stringEnum",model:_.types.enumeration("Rendering",["multivariant"]),defaultValue:"multivariant"},renderers:(0,s.ConfigurationSchema)("RenderersConfiguration",{MultiVariantRenderer:t}),height:{type:"number",defaultValue:200}},{baseConfiguration:(0,s.ConfigurationSchema)("SharedVariantDisplay",{autoscale:{type:"stringEnum",defaultValue:"local",model:_.types.enumeration("Autoscale type",["global","local","globalsd","localsd","zscore"]),description:"global/local using their min/max values or w/ standard deviations (globalsd/localsd)"},minimalTicks:{type:"boolean",defaultValue:!1,description:"use the minimal amount of ticks"},minScore:{type:"number",defaultValue:Number.MIN_VALUE,description:"minimum value for the y-scale"},maxScore:{type:"number",description:"maximum value for the y-scale",defaultValue:Number.MAX_VALUE},numStdDev:{type:"number",description:"number of standard deviations to use for autoscale types globalsd or localsd",defaultValue:3},scaleType:{type:"stringEnum",model:_.types.enumeration("Scale type",["linear","log"]),description:"The type of scale to use",defaultValue:"linear"},inverted:{type:"boolean",description:"draw upside down",defaultValue:!1}},{baseConfiguration:Id.Ki,explicitlyTyped:!0}),explicitlyTyped:!0})}(e);return new so.A({name:"MultiLinearVariantDisplay",displayName:"Multi-sample variant display (regular)",configSchema:t,stateModel:Yp(t),trackType:"VariantTrack",viewType:"LinearGenomeView",ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,41928))})})})}(e),function(e){e.addRendererType(function(){return new Xh({name:"MultiVariantRenderer",ReactComponent:am,configSchema:lm,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new _h({name:"LinearVariantMatrixRenderer",displayName:"Linear variant matrix renderer",ReactComponent:Mh,configSchema:ih,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new ho.A({name:"StructuralVariantChordRenderer",displayName:"SV chord renderer",ReactComponent:Am,configSchema:Om,pluginManager:e})})}(e),function(e){e.addDisplayType(function(){var t=function(e){return(0,s.ConfigurationSchema)("ChordVariantDisplay",{renderer:_.types.optional(e.pluggableConfigSchemaType("renderer"),{type:"StructuralVariantChordRenderer"})},{baseConfiguration:du,explicitlyTyped:!0})}(e),r=function(e){return _.types.compose("ChordVariantDisplay",Du,_.types.model({type:_.types.literal("ChordVariantDisplay"),configuration:(0,s.ConfigurationReference)(e)})).views(function(e){return{get rendererTypeName(){return e.configuration.renderer.type},renderProps:function(){var t=(0,u.getContainingView)(e);return hp(hp({},(0,Vo.getParentRenderProps)(e)),{},{rpcDriverName:e.rpcDriverName,displayModel:e,bezierRadius:t.radiusPx*e.bezierRadiusRatio,radius:t.radiusPx,blockDefinitions:e.blockDefinitions,config:e.configuration.renderer,onChordClick:function(t){e.onChordClick(t)}})}}})}(t);return new so.A({name:"ChordVariantDisplay",displayName:"Chord variant display",configSchema:t,stateModel:r,trackType:"VariantTrack",viewType:"CircularView",ReactComponent:fu})})}(e),e.addRpcMethod(function(){return new Hy(e)}),e.addRpcMethod(function(){return new Sy(e)}),e.addRpcMethod(function(){return new fy(e)}),e.addRpcMethod(function(){return new My(e)})}}])&&tb(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we.A);function lb(e){return lb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lb(e)}function sb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sb(Object(r),!0).forEach(function(t){ub(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sb(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ub(e,t,r){return(t=function(e){var t=function(e){if("object"!=lb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=lb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lb(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const fb=(0,s.ConfigurationSchema)("BigWigAdapter",{bigWigLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bw",locationType:"UriLocation"}},source:{type:"string",defaultValue:"",description:"Used for multiwiggle"},resolutionMultiplier:{type:"number",defaultValue:1,description:"Initial resolution multiplier"}},{explicitlyTyped:!0,preProcessSnapshot:function(e){return e.uri?cb(cb({},e),{},{bigWigLocation:{uri:e.uri,baseUri:e.baseUri}}):e}});function db(e){return db="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},db(e)}function pb(e){return function(e){if(Array.isArray(e))return hb(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return hb(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hb(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function mb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function yb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mb(Object(r),!0).forEach(function(t){bb(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mb(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function bb(e,t,r){return(t=function(e){var t=function(e){if("object"!=db(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=db(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==db(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var vb=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,67046))});var gb=["reducedFeatures"];function wb(e){return wb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wb(e)}function Sb(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Ab(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ab(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ab(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Ab(f,"constructor",c),Ab(c,"constructor",s),s.displayName="GeneratorFunction",Ab(c,o,"GeneratorFunction"),Ab(f),Ab(f,o,"Generator"),Ab(f,n,function(){return this}),Ab(f,"toString",function(){return"[object Generator]"}),(Sb=function(){return{w:i,m:d}})()}function Ab(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ab=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ab(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ab(e,t,r,n)}function Ob(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ob(Object(r),!0).forEach(function(t){Mb(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ob(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function kb(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Cb(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Pb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ib(n.key),n)}}function Eb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Eb=function(){return!!e})()}function jb(e,t,r,n){var o=Tb(_b(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof o?function(e){return o.apply(r,e)}:o}function Tb(){return Tb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=_b(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Tb.apply(null,arguments)}function _b(e){return _b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_b(e)}function Rb(e,t){return Rb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rb(e,t)}function Mb(e,t,r){return(t=Ib(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ib(e){var t=function(e){if("object"!=wb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=wb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wb(t)?t:t+""}var Nb=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return Mb((r=this,n=t,o=[].concat(a),n=_b(n),e=function(e,t){if(t&&("object"==wb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Eb()?Reflect.construct(n,o||[],_b(r).constructor):n.apply(r,o))),"supportsSVG",!0),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rb(e,t)}(t,e),r=t,n=[{key:"render",value:(o=Sb().m(function e(r){var n,o,i,a,l,s,c,f,d,p,h,m,y,b=this;return Sb().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getFeatures(r);case 1:return n=e.v,o=r.inverted,i=r.height,a=r.regions,l=r.bpPerPx,s=r.statusCallback,c=void 0===s?function(){}:s,f=a[0],d=(f.end-f.start)/l,e.n=2,(0,u.updateStatus)("Rendering plot",c,function(){return(0,u.renderToAbstractCanvas)(d,i,r,function(e){return b.draw(e,xb(xb({},r),{},{features:n,inverted:o}))})});case 2:return p=e.v,h=p.reducedFeatures,m=kb(p,gb),e.n=3,jb(t,"render",this,3)([xb(xb(xb({},r),m),{},{features:n,height:i,width:d})]);case 3:return y=e.v,e.a(2,xb(xb(xb({},y),m),{},{features:h?new Map(h.map(function(e){return[e.id(),e]})):y.features,height:i,width:d,containsNoTransferables:!0}))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){Cb(i,r,n,a,l,"next",e)}function l(e){Cb(i,r,n,a,l,"throw",e)}a(void 0)})},function(e){return i.apply(this,arguments)})}],n&&Pb(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}(mo.default);function Db(e){return Db="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Db(e)}function Fb(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Lb(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Lb(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Lb(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Lb(f,"constructor",c),Lb(c,"constructor",s),s.displayName="GeneratorFunction",Lb(c,o,"GeneratorFunction"),Lb(f),Lb(f,o,"Generator"),Lb(f,n,function(){return this}),Lb(f,"toString",function(){return"[object Generator]"}),(Fb=function(){return{w:i,m:d}})()}function Lb(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Lb=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Lb(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Lb(e,t,r,n)}function zb(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Bb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$b(n.key),n)}}function $b(e){var t=function(e){if("object"!=Db(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Db(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Db(t)?t:t+""}function Gb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gb=function(){return!!e})()}function Hb(e){return Hb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hb(e)}function Vb(e,t){return Vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vb(e,t)}var Wb=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=Hb(r=t),function(e,t){if(t&&("object"==Db(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gb()?Reflect.construct(r,n||[],Hb(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vb(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=Fb().m(function e(t,r){var n,i;return Fb().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Promise.resolve().then(o.bind(o,60360));case 1:return n=e.v,i=n.drawDensity,e.a(2,i(t,r))}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){zb(o,r,n,a,l,"next",e)}function l(e){zb(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&Bb(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);const Ub=(0,s.ConfigurationSchema)("WiggleRenderer",{color:{type:"color",description:"the color of track, overrides posColor and negColor",defaultValue:"#f0f",contextVariable:["feature"]},posColor:{type:"color",description:"the color to use when the score is positive",defaultValue:"blue",contextVariable:["feature"]},negColor:{type:"color",description:"the color to use when the score is negative",defaultValue:"red",contextVariable:["feature"]},clipColor:{type:"color",description:"the color of the clipping marker",defaultValue:"red"},bicolorPivot:{type:"stringEnum",model:_.types.enumeration("Scale type",["numeric","mean","z_score","none"]),description:"type of bicolor pivot",defaultValue:"numeric"},bicolorPivotValue:{type:"number",defaultValue:0,description:"value to use for bicolor pivot"}},{explicitlyTyped:!0}),qb=(0,s.ConfigurationSchema)("DensityRenderer",{},{baseConfiguration:Ub,explicitlyTyped:!0});var Xb=o(14041);function Kb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const Yb=(0,T.observer)(function(e){var t=e.regions,r=e.features,n=e.bpPerPx,o=e.width,i=e.height,l=e.onMouseLeave,s=e.onMouseMove,u=e.onFeatureClick,f=t[0],d=(0,a.useRef)(null);function p(e){var t=0;d.current&&(t=d.current.getBoundingClientRect().left);var i,a,l=e-t,s=f.reversed?o-l:l,c=f.start+n*s,u=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Kb(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kb(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(r.values());try{for(u.s();!(a=u.n()).done;){var p=a.value;if(c<=p.get("end")+n&&c>=p.get("start")){i=p;break}}}catch(e){u.e(e)}finally{u.f()}return i}return Xb.createElement("div",{ref:d,"data-testid":"wiggle-rendering-test",onMouseMove:function(e){var t;return null==s?void 0:s(e,null===(t=p(e.clientX))||void 0===t?void 0:t.id())},onClick:function(e){var t;return null==u?void 0:u(e,null===(t=p(e.clientX))||void 0===t?void 0:t.id())},onMouseLeave:function(e){return null==l?void 0:l(e)},style:{overflow:"visible",position:"relative",height:i}},Xb.createElement(c.PrerenderedCanvas,e))}),Jb=(0,s.ConfigurationSchema)("LinePlotRenderer",{displayCrossHatches:{type:"boolean",description:"choose to draw cross hatches (sideways lines)",defaultValue:!1}},{baseConfiguration:Ub,explicitlyTyped:!0});var Zb=o(12546);function Qb(e){return Qb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qb(e)}function ev(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return tv(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(tv(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,tv(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,tv(f,"constructor",c),tv(c,"constructor",s),s.displayName="GeneratorFunction",tv(c,o,"GeneratorFunction"),tv(f),tv(f,o,"Generator"),tv(f,n,function(){return this}),tv(f,"toString",function(){return"[object Generator]"}),(ev=function(){return{w:i,m:d}})()}function tv(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}tv=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){tv(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},tv(e,t,r,n)}function rv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rv(Object(r),!0).forEach(function(t){ov(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ov(e,t,r){return(t=lv(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iv(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function av(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lv(n.key),n)}}function lv(e){var t=function(e){if("object"!=Qb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Qb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qb(t)?t:t+""}function sv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sv=function(){return!!e})()}function cv(e){return cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cv(e)}function uv(e,t){return uv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uv(e,t)}var fv=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=cv(r=t),function(e,t){if(t&&("object"==Qb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sv()?Reflect.construct(r,n||[],cv(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uv(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=ev().m(function e(t,r){var n,i,a,l;return ev().w(function(e){for(;;)switch(e.n){case 0:return n=r.config,i=(0,s.readConfObject)(n,"color"),e.n=1,Promise.resolve().then(o.bind(o,60852));case 1:return a=e.v,l=a.drawLine,e.a(2,l(t,nv(nv({},r),{},{offset:Zb.YSCALEBAR_LABEL_OFFSET,colorCallback:"#f0f"===i?function(){return"grey"}:function(e){return(0,s.readConfObject)(n,"color",{feature:e})}})))}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){iv(o,r,n,a,l,"next",e)}function l(e){iv(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&av(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);function dv(){return(0,s.ConfigurationSchema)("SharedWiggleDisplay",{autoscale:{type:"stringEnum",defaultValue:"local",model:_.types.enumeration("Autoscale type",["global","local","globalsd","localsd","zscore"]),description:"global/local using their min/max values or w/ standard deviations (globalsd/localsd)"},minimalTicks:{type:"boolean",defaultValue:!1,description:"use the minimal amount of ticks"},minScore:{type:"number",defaultValue:Number.MIN_VALUE,description:"minimum value for the y-scale"},maxScore:{type:"number",description:"maximum value for the y-scale",defaultValue:Number.MAX_VALUE},numStdDev:{type:"number",description:"number of standard deviations to use for autoscale types globalsd or localsd",defaultValue:3},scaleType:{type:"stringEnum",model:_.types.enumeration("Scale type",["linear","log"]),description:"The type of scale to use",defaultValue:"linear"},inverted:{type:"boolean",description:"draw upside down",defaultValue:!1}},{baseConfiguration:Id.Ki,explicitlyTyped:!0})}const pv=(0,Tn.A)((0,A.jsx)("path",{d:"M10 20h4V4h-4zm-6 0h4v-8H4zM16 9v11h4V9z"}),"Equalizer"),hv=(0,Tn.A)((0,A.jsx)("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10c1.38 0 2.5-1.12 2.5-2.5 0-.61-.23-1.2-.64-1.67-.08-.1-.13-.21-.13-.33 0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9m5.5 11c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m-3-4c-.83 0-1.5-.67-1.5-1.5S13.67 6 14.5 6s1.5.67 1.5 1.5S15.33 9 14.5 9M5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S7.33 13 6.5 13 5 12.33 5 11.5m6-4c0 .83-.67 1.5-1.5 1.5S8 8.33 8 7.5 8.67 6 9.5 6s1.5.67 1.5 1.5"}),"Palette");var mv=o(95725);function yv(e){return yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yv(e)}function bv(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return vv(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(vv(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,vv(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,vv(f,"constructor",c),vv(c,"constructor",s),s.displayName="GeneratorFunction",vv(c,o,"GeneratorFunction"),vv(f),vv(f,o,"Generator"),vv(f,n,function(){return this}),vv(f,"toString",function(){return"[object Generator]"}),(bv=function(){return{w:i,m:d}})()}function vv(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}vv=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){vv(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},vv(e,t,r,n)}function gv(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function wv(e){return function(e){if(Array.isArray(e))return Av(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Sv(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sv(e,t){if(e){if("string"==typeof e)return Av(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Av(e,t):void 0}}function Av(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ov(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ov(Object(r),!0).forEach(function(t){kv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ov(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function kv(e,t,r){return(t=function(e){var t=function(e){if("object"!=yv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=yv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Cv=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,12460))});function Pv(e){return _.types.compose(Id.Lr,_.types.model({selectedRendering:_.types.optional(_.types.string,""),resolution:_.types.optional(_.types.number,1),fill:_.types.maybe(_.types.boolean),minSize:_.types.maybe(_.types.number),color:_.types.maybe(_.types.string),posColor:_.types.maybe(_.types.string),negColor:_.types.maybe(_.types.string),summaryScoreMode:_.types.maybe(_.types.string),rendererTypeNameState:_.types.maybe(_.types.string),scale:_.types.maybe(_.types.string),autoscale:_.types.maybe(_.types.string),displayCrossHatches:_.types.maybe(_.types.boolean),constraints:_.types.optional(_.types.model({max:_.types.maybe(_.types.number),min:_.types.maybe(_.types.number)}),{}),configuration:(0,s.ConfigurationReference)(e)})).volatile(function(){return{message:void 0,stats:void 0,statsFetchInProgress:void 0}}).actions(function(e){return{updateQuantitativeStats:function(t){var r=t.currStatsBpPerPx,n=t.scoreMin,o=t.scoreMax,i=1e-6;(!e.stats||Math.abs(e.stats.scoreMax-o)>i||Math.abs(e.stats.scoreMin-n)>i)&&(e.stats={currStatsBpPerPx:r,scoreMin:n,scoreMax:o})},setColor:function(t){e.color=t},setPosColor:function(t){e.posColor=t},setNegColor:function(t){e.negColor=t},setStatsLoading:function(t){e.statsFetchInProgress&&(0,Sp.CF)(e.statsFetchInProgress),e.statsFetchInProgress=t},selectFeature:function(t){var r=(0,u.getSession)(e);(0,u.isSelectionContainer)(r)&&r.setSelection(t)},setResolution:function(t){e.resolution=t},setFill:function(t){0===t?(e.fill=!0,e.minSize=0):1===t?(e.fill=!1,e.minSize=1):2===t&&(e.fill=!1,e.minSize=2)},toggleLogScale:function(){e.scale="log"===e.scale?"linear":"log"},setScaleType:function(t){e.scale=t},setSummaryScoreMode:function(t){e.summaryScoreMode=t},setAutoscale:function(t){e.autoscale=t},setMaxScore:function(t){e.constraints.max=t},setRendererType:function(t){e.rendererTypeNameState=t},setMinScore:function(t){e.constraints.min=t},toggleCrossHatches:function(){e.displayCrossHatches=!e.displayCrossHatches},setCrossHatches:function(t){e.displayCrossHatches=t}}}).views(function(e){return{get adapterTypeName(){return e.adapterConfig.type},get rendererTypeNameSimple(){var t;return null!==(t=e.rendererTypeNameState)&&void 0!==t?t:(0,s.getConf)(e,"defaultRendering")},get filters(){},get scaleType(){var t;return null!==(t=e.scale)&&void 0!==t?t:(0,s.getConf)(e,"scaleType")},get maxScore(){var t;return null!==(t=e.constraints.max)&&void 0!==t?t:(0,s.getConf)(e,"maxScore")},get minScore(){var t;return null!==(t=e.constraints.min)&&void 0!==t?t:(0,s.getConf)(e,"minScore")}}}).views(function(e){return{get adapterCapabilities(){var t=e.adapterTypeName;return(0,u.getEnv)(e).pluginManager.getAdapterType(t).adapterCapabilities},get rendererConfig(){var t=e.color,r=e.displayCrossHatches,n=e.fill,o=e.minSize,i=e.negColor,a=e.posColor,l=e.summaryScoreMode,c=e.scaleType,f=e.rendererTypeName,d=(0,s.getConf)(e,["renderers",f])||{};return e.rendererType.configSchema.create(xv(xv(xv(xv(xv(xv(xv(xv(xv({},d),c?{scaleType:c}:{}),void 0!==n?{filled:n}:{}),void 0!==r?{displayCrossHatches:r}:{}),void 0!==l?{summaryScoreMode:l}:{}),void 0!==t?{color:t}:{}),void 0!==i?{negColor:i}:{}),void 0!==a?{posColor:a}:{}),void 0!==o?{minSize:o}:{}),(0,u.getEnv)(e))},get autoscaleType(){var t;return null!==(t=e.autoscale)&&void 0!==t?t:(0,s.getConf)(e,"autoscale")}}}).views(function(e){var t=[0,0];return{get domain(){var r=e.stats,n=e.scaleType,o=e.minScore,i=e.maxScore;if(r){var a=(0,Zb.getNiceDomain)({domain:[r.scoreMin,r.scoreMax],bounds:[o,i],scaleType:n});return"log"===n&&a[1]===Number.MIN_VALUE?[0,Number.MIN_VALUE]:(JSON.stringify(t)!==JSON.stringify(a)&&(t=a),t)}}}}).views(function(e){return{get filled(){var t;return null!==(t=e.fill)&&void 0!==t?t:(0,s.readConfObject)(e.rendererConfig,"filled")},get summaryScoreModeSetting(){var t;return null!==(t=e.summaryScoreMode)&&void 0!==t?t:(0,s.readConfObject)(e.rendererConfig,"summaryScoreMode")},get scaleOpts(){return{domain:e.domain,stats:e.stats,autoscaleType:e.autoscaleType,scaleType:e.scaleType,inverted:(0,s.getConf)(e,"inverted")}},get canHaveFill(){return"XYPlotRenderer"===e.rendererTypeName},get displayCrossHatchesSetting(){var t;return null!==(t=e.displayCrossHatches)&&void 0!==t?t:(0,s.readConfObject)(e.rendererConfig,"displayCrossHatches")},get hasResolution(){return e.adapterCapabilities.includes("hasResolution")},get hasGlobalStats(){return e.adapterCapabilities.includes("hasGlobalStats")}}}).views(function(e){return{scoreTrackMenuItems:function(){return[].concat(wv(e.hasResolution?[{label:"Resolution",subMenu:[{label:"Finer resolution",onClick:function(){e.setResolution(5*e.resolution)}},{label:"Coarser resolution",onClick:function(){e.setResolution(e.resolution/5)}}]},{label:"Summary score mode",subMenu:["min","max","avg","whiskers"].map(function(t){return{label:t,type:"radio",checked:e.summaryScoreModeSetting===t,onClick:function(){e.setSummaryScoreMode(t)}}})}]:[]),[{label:"log"===e.scaleType?"Set linear scale":"Set log scale",onClick:function(){e.toggleLogScale()}},{label:"Autoscale type",subMenu:[["local","Local"]].concat(wv(e.hasGlobalStats?[["global","Global"],["globalsd","Global ± 3σ"]]:[]),[["localsd","Local ± 3σ"]]).map(function(t){var r,n,o=(n=2,function(e){if(Array.isArray(e))return e}(r=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(r,n)||Sv(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0];return{label:o[1],type:"radio",checked:e.autoscaleType===i,onClick:function(){e.setAutoscale(i)}}})},{label:"Set min/max score",onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Cv,{model:e,handleClose:t}]})}}])}}}).actions(function(e){var t=e.reload;return{reload:function(){return(r=bv().m(function r(){return bv().w(function(r){for(;;)switch(r.n){case 0:e.setError(),t();case 1:return r.a(2)}},r)}),function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){gv(i,n,o,a,l,"next",e)}function l(e){gv(i,n,o,a,l,"throw",e)}a(void 0)})})();var r}}})}function Ev(e){return Ev="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ev(e)}function jv(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Tv(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Tv(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Tv(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Tv(f,"constructor",c),Tv(c,"constructor",s),s.displayName="GeneratorFunction",Tv(c,o,"GeneratorFunction"),Tv(f),Tv(f,o,"Generator"),Tv(f,n,function(){return this}),Tv(f,"toString",function(){return"[object Generator]"}),(jv=function(){return{w:i,m:d}})()}function Tv(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Tv=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Tv(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Tv(e,t,r,n)}function _v(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Rv(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){_v(i,n,o,a,l,"next",e)}function l(e){_v(i,n,o,a,l,"throw",e)}a(void 0)})}}function Mv(e){return function(e){if(Array.isArray(e))return Iv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Iv(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Iv(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Iv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Nv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Dv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nv(Object(r),!0).forEach(function(t){Fv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Fv(e,t,r){return(t=function(e){var t=function(e){if("object"!=Ev(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ev(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ev(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Lv=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,50577))}),zv=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,66111))}),Bv=new Map([["xyplot","XYPlotRenderer"],["density","DensityRenderer"],["line","LinePlotRenderer"]]);const $v=function(e,t){return _.types.compose("LinearWiggleDisplay",Pv(t),_.types.model({type:_.types.literal("LinearWiggleDisplay"),invertedSetting:_.types.maybe(_.types.boolean)})).actions(function(e){return{setInverted:function(t){e.invertedSetting=t}}}).views(function(e){return{get TooltipComponent(){return Lv},get rendererTypeName(){var t=e.rendererTypeNameSimple,r=Bv.get(t);if(!r)throw new Error("unknown renderer ".concat(t));return r},get quantitativeStatsRelevantToCurrentZoom(){var t,r=(0,u.getContainingView)(e);return(null===(t=e.stats)||void 0===t?void 0:t.currStatsBpPerPx)===r.bpPerPx},get graphType(){return"XYPlotRenderer"===e.rendererTypeName||"LinePlotRenderer"===e.rendererTypeName},get inverted(){var t;return null!==(t=e.invertedSetting)&&void 0!==t?t:(0,s.getConf)(e,"inverted")}}}).views(function(e){var t=e.renderProps;return{adapterProps:function(){var r=t(),n=e.filters,o=e.resolution,i=e.scaleOpts;return Dv(Dv({},r),{},{rpcDriverName:e.rpcDriverName,displayModel:e,config:e.rendererConfig,displayCrossHatches:e.displayCrossHatchesSetting,scaleOpts:i,resolution:o,filters:n})},get ticks(){var t=e.inverted,r=e.scaleType,n=e.domain,o=e.height,i=(0,s.getConf)(e,"minimalTicks");if(n){var a=(0,mv.axisPropsFromTickScale)((0,Zb.getScale)({scaleType:r,domain:n,range:[o-Zb.YSCALEBAR_LABEL_OFFSET,Zb.YSCALEBAR_LABEL_OFFSET],inverted:t}),4);return o<100||i?Dv(Dv({},a),{},{values:n}):a}}}}).views(function(e){return{renderProps:function(){var t=e.inverted,r=e.ticks,n=e.height,o=e.adapterProps();return Dv(Dv({},e.adapterProps()),{},{notReady:o.notReady||!e.stats,height:n,ticks:r,inverted:t})},get fillSetting(){return e.filled?0:1===e.minSize?1:2},get quantitativeStatsReady(){return(0,u.getContainingView)(e).initialized&&e.statsReadyAndRegionNotTooLarge&&!e.error}}}).views(function(e){var t=e.trackMenuItems,r=(0,s.getConf)(e,"defaultRendering");return{trackMenuItems:function(){return[].concat(Mv(t()),[{label:"Score",icon:pv,subMenu:e.scoreTrackMenuItems()}],Mv(e.graphType?[{label:"Inverted",type:"checkbox",checked:e.inverted,onClick:function(){e.setInverted(!e.inverted)}}]:[]),Mv(e.canHaveFill?[{label:"Fill mode",subMenu:["filled","no fill","no fill w/ emphasis"].map(function(t,r){return{label:t,type:"radio",checked:e.fillSetting===r,onClick:function(){e.setFill(r)}}})}]:[]),Mv(r?[{label:"Renderer type",subMenu:["xyplot","density","line"].map(function(t){return{label:t,type:"radio",checked:e.rendererTypeNameSimple===t,onClick:function(){e.setRendererType(t)}}})}]:[]),[{label:"Color",icon:hv,onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[zv,{model:e,handleClose:t}]})}}],Mv(e.graphType?[{type:"checkbox",icon:Cp.A,label:"Show cross hatches",checked:e.displayCrossHatchesSetting,onClick:function(){e.toggleCrossHatches()}}]:[]))}}}).actions(function(e){var t=e.renderSvg;return{afterAttach:function(){Rv(jv().m(function t(){return jv().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.resolve().then(o.bind(o,70084));case 1:(0,t.v.getQuantitativeStatsAutorun)(e);case 2:return t.a(2)}},t)}))()},renderSvg:function(r){return Rv(jv().m(function n(){var i,a;return jv().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,Promise.resolve().then(o.bind(o,44887));case 1:return i=n.v,a=i.renderSvg,n.a(2,a(e,r,t))}},n)}))()}}})};o(50577);var Gv=o(6666);const Hv=(0,s.ConfigurationSchema)("MultiDensityRenderer",{},{baseConfiguration:Ub,explicitlyTyped:!0});var Vv=o(14041);function Wv(e){return Wv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wv(e)}var Uv=["refName","start","end","source"];function qv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Xv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qv(Object(r),!0).forEach(function(t){Kv(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qv(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Kv(e,t,r){return(t=function(e){var t=function(e){if("object"!=Wv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Wv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Wv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yv(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Jv(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jv(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function Jv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Zv=(0,T.observer)(function(e){var t=e.regions,r=e.features,n=e.bpPerPx,o=e.width,i=e.height,l=e.sources,s=e.onMouseLeave,f=void 0===s?function(){}:s,d=e.onMouseMove,p=void 0===d?function(){}:d,h=e.onFeatureClick,m=void 0===h?function(){}:h,y=e.displayModel,b=t[0],v=(0,a.useRef)(null),g=(y||{}).isMultiRow;function w(e,t){if(v.current){var a=v.current.getBoundingClientRect(),s=e-a.left,c=t-a.top,f=l[Math.floor(c/i*l.length)];if(f){var d,p=b.reversed?o-s:s,h=b.start+n*p;if(g){var m,y=Yv(r.values());try{for(y.s();!(m=y.n()).done;){var w=m.value;if(w.get("source")===f.name&&h<=w.get("end")+n&&h>=w.get("start")){d=w;break}}}catch(e){y.e(e)}finally{y.f()}}else{var S,A=[],O=Yv(r.values());try{for(O.s();!(S=O.n()).done;){var x=S.value;h<=x.get("end")+n&&h>=x.get("start")&&A.push(x)}}catch(e){O.e(e)}finally{O.f()}if(A.length){var k=Math.floor(h);d=new u.SimpleFeature(Xv(Xv({uniqueId:"mouseoverfeat",sources:Object.fromEntries(A.map(function(e){return e.toJSON()}).map(function(e){return e.refName,e.start,e.end,[e.source,function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Uv)]}))},b),{},{start:k,end:k+1}))}}return d}}}return Vv.createElement("div",{ref:v,onMouseMove:function(e){var t=w(e.clientX,e.clientY);p(e,t)},onClick:function(e){var t=w(e.clientX,e.clientY);m(e,t)},onMouseLeave:function(e){f(e)},style:{overflow:"visible",position:"relative",height:i}},Vv.createElement(c.PrerenderedCanvas,e))});const Qv=Zv;function eg(e){return eg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eg(e)}function tg(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return rg(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(rg(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,rg(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,rg(f,"constructor",c),rg(c,"constructor",s),s.displayName="GeneratorFunction",rg(c,o,"GeneratorFunction"),rg(f),rg(f,o,"Generator"),rg(f,n,function(){return this}),rg(f,"toString",function(){return"[object Generator]"}),(tg=function(){return{w:i,m:d}})()}function rg(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}rg=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){rg(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},rg(e,t,r,n)}function ng(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function og(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ng(Object(r),!0).forEach(function(t){ig(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ng(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ig(e,t,r){return(t=sg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ag(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function lg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,sg(n.key),n)}}function sg(e){var t=function(e){if("object"!=eg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=eg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eg(t)?t:t+""}function cg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cg=function(){return!!e})()}function ug(e){return ug=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ug(e)}function fg(e,t){return fg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fg(e,t)}var dg=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=ug(r=t),function(e,t){if(t&&("object"==eg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cg()?Reflect.construct(r,n||[],ug(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fg(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=tg().m(function e(t,r){var n,i,a,l,s,c,f,d;return tg().w(function(e){for(;;)switch(e.n){case 0:return n=r.stopToken,i=r.sources,a=r.features,l=(0,u.groupBy)(a.values(),function(e){return e.get("source")}),s=r.height/i.length,c=[],e.n=1,Promise.resolve().then(o.bind(o,60360));case 1:return f=e.v,d=f.drawDensity,t.save(),(0,u.forEachWithStopTokenCheck)(i,n,function(e){var n=l[e.name]||[],o=d(t,og(og({},r),{},{features:n,height:s})).reducedFeatures;t.translate(0,s),c=c.concat(o)}),t.restore(),e.a(2,{reducedFeatures:c})}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){ag(o,r,n,a,l,"next",e)}function l(e){ag(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&lg(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);function pg(e){return pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pg(e)}function hg(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return mg(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(mg(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,mg(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,mg(f,"constructor",c),mg(c,"constructor",s),s.displayName="GeneratorFunction",mg(c,o,"GeneratorFunction"),mg(f),mg(f,o,"Generator"),mg(f,n,function(){return this}),mg(f,"toString",function(){return"[object Generator]"}),(hg=function(){return{w:i,m:d}})()}function mg(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}mg=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){mg(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},mg(e,t,r,n)}function yg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function bg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yg(Object(r),!0).forEach(function(t){vg(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yg(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function vg(e,t,r){return(t=Sg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gg(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function wg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sg(n.key),n)}}function Sg(e){var t=function(e){if("object"!=pg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=pg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pg(t)?t:t+""}function Ag(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ag=function(){return!!e})()}function Og(e){return Og=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Og(e)}function xg(e,t){return xg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xg(e,t)}var kg=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=Og(r=t),function(e,t){if(t&&("object"==pg(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ag()?Reflect.construct(r,n||[],Og(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xg(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=hg().m(function e(t,r){var n,i,a,l,s,c,f;return hg().w(function(e){for(;;)switch(e.n){case 0:return n=r.stopToken,i=r.sources,a=r.features,l=(0,u.groupBy)(a.values(),function(e){return e.get("source")}),e.n=1,Promise.resolve().then(o.bind(o,60852));case 1:return s=e.v,c=s.drawLine,f=[],(0,u.forEachWithStopTokenCheck)(i,n,function(e){var n=c(t,bg(bg({},r),{},{features:l[e.name]||[],colorCallback:function(){return e.color||"blue"}})).reducedFeatures;f=f.concat(n)}),e.a(2,{reducedFeatures:f})}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){gg(o,r,n,a,l,"next",e)}function l(e){gg(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&wg(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);const Cg=(0,s.ConfigurationSchema)("MultiLineRenderer",{displayCrossHatches:{type:"boolean",description:"choose to draw cross hatches (sideways lines)",defaultValue:!1},summaryScoreMode:{type:"stringEnum",model:_.types.enumeration("Score type",["max","min","avg","whiskers"]),description:"choose whether to use max/min/average or whiskers which combines all three into the same rendering",defaultValue:"avg"}},{baseConfiguration:Ub,explicitlyTyped:!0});var Pg=o(21199);function Eg(e){return Eg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eg(e)}function jg(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Tg(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Tg(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Tg(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Tg(f,"constructor",c),Tg(c,"constructor",s),s.displayName="GeneratorFunction",Tg(c,o,"GeneratorFunction"),Tg(f),Tg(f,o,"Generator"),Tg(f,n,function(){return this}),Tg(f,"toString",function(){return"[object Generator]"}),(jg=function(){return{w:i,m:d}})()}function Tg(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Tg=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Tg(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Tg(e,t,r,n)}function _g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||Ng(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rg(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Mg(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){Rg(i,n,o,a,l,"next",e)}function l(e){Rg(i,n,o,a,l,"throw",e)}a(void 0)})}}function Ig(e){return function(e){if(Array.isArray(e))return Dg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ng(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ng(e,t){if(e){if("string"==typeof e)return Dg(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dg(e,t):void 0}}function Dg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Fg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Lg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fg(Object(r),!0).forEach(function(t){zg(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fg(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function zg(e,t,r){return(t=function(e){var t=function(e){if("object"!=Eg(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Eg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Eg(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Bg=function(){return"#000000".replaceAll("0",function(){return(~~(16*Math.random())).toString(16)})},$g=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,24516))}),Gg=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,38799))}),Hg=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,47627))}),Vg=new Map([["xyplot","MultiXYPlotRenderer"],["multirowxy","MultiRowXYPlotRenderer"],["multirowdensity","MultiDensityRenderer"],["multiline","MultiLineRenderer"],["multirowline","MultiRowLineRenderer"]]);const Wg=function(e,t){return _.types.compose("MultiLinearWiggleDisplay",Pv(t),_.types.model({type:_.types.literal("MultiLinearWiggleDisplay"),layout:_.types.optional(_.types.frozen(),[]),showSidebar:!0})).volatile(function(){return{sourcesLoadingStopToken:void 0,featureUnderMouseVolatile:void 0,sourcesVolatile:void 0}}).actions(function(e){return{setShowSidebar:function(t){e.showSidebar=t},setSourcesLoading:function(t){e.sourcesLoadingStopToken&&(0,Sp.CF)(e.sourcesLoadingStopToken),e.sourcesLoadingStopToken=t},setLayout:function(t){e.layout=t},clearLayout:function(){e.layout=[]},setSources:function(t){Ep()(t,e.sourcesVolatile)||(e.sourcesVolatile=t)},setFeatureUnderMouse:function(t){e.featureUnderMouseVolatile=t}}}).views(function(e){return{get featureUnderMouse(){return e.featureUnderMouseVolatile},get TooltipComponent(){return $g},get rendererTypeName(){var t=e.rendererTypeNameSimple,r=Vg.get(t);if(!r)throw new Error("unknown renderer ".concat(t));return r}}}).views(function(e){return{get graphType(){return"MultiXYPlotRenderer"===e.rendererTypeName||"MultiRowXYPlotRenderer"===e.rendererTypeName||"MultiLineRenderer"===e.rendererTypeName||"MultiRowLineRenderer"===e.rendererTypeName},get needsFullHeightScalebar(){return"MultiXYPlotRenderer"===e.rendererTypeName||"MultiLineRenderer"===e.rendererTypeName},get isMultiRow(){return"MultiRowXYPlotRenderer"===e.rendererTypeName||"MultiRowLineRenderer"===e.rendererTypeName||"MultiDensityRenderer"===e.rendererTypeName},get needsCustomLegend(){return"MultiDensityRenderer"===e.rendererTypeName},get canHaveFill(){return"MultiXYPlotRenderer"===e.rendererTypeName||"MultiRowXYPlotRenderer"===e.rendererTypeName},get renderColorBoxes(){return!("MultiRowLineRenderer"===e.rendererTypeName||"MultiRowXYPlotRenderer"===e.rendererTypeName)},get prefersOffset(){return this.isMultiRow},get sourcesWithoutLayout(){var t,r=this,n=Object.fromEntries((null===(t=e.sourcesVolatile)||void 0===t?void 0:t.map(function(e){return[e.name,e]}))||[]),o=e.sourcesVolatile;return null==o?void 0:o.map(function(e){return Lg(Lg({},n[e.name]),e)}).map(function(e,t){return Lg(Lg({},e),{},{color:e.color||(r.isMultiRow?"blue":Pg.set1[t]||Bg())})})},get sources(){var t,r=this,n=Object.fromEntries((null===(t=e.sourcesVolatile)||void 0===t?void 0:t.map(function(e){return[e.name,e]}))||[]),o=e.layout.length?e.layout:e.sourcesVolatile;return null==o?void 0:o.map(function(e){return Lg(Lg({},n[e.name]),e)}).map(function(e,t){return Lg(Lg({},e),{},{color:e.color||(r.isMultiRow?"blue":Pg.set1[t]||Bg())})})},get quantitativeStatsReady(){return(0,u.getContainingView)(e).initialized&&e.statsReadyAndRegionNotTooLarge&&!e.error}}}).views(function(e){return{get rowHeight(){var t=e.sources,r=e.height;return e.isMultiRow?r/((null==t?void 0:t.length)||1):r},get rowHeightTooSmallForScalebar(){return this.rowHeight<70},get useMinimalTicks(){return(0,s.getConf)(e,"minimalTicks")||this.rowHeightTooSmallForScalebar}}}).views(function(e){var t=e.renderProps;return{adapterProps:function(){return Lg(Lg({},t()),{},{displayModel:e,config:e.rendererConfig,filters:e.filters,resolution:e.resolution,rpcDriverName:e.rpcDriverName,sources:e.sources})},get ticks(){var t=e.scaleType,r=e.domain,n=e.isMultiRow,o=e.rowHeight,i=e.useMinimalTicks;if(r){var a=n?0:Zb.YSCALEBAR_LABEL_OFFSET,l=(0,mv.axisPropsFromTickScale)((0,Zb.getScale)({scaleType:t,domain:r,range:[o-a,a],inverted:(0,s.getConf)(e,"inverted")}),4);return i?Lg(Lg({},l),{},{values:r}):l}},get colors(){return["red","blue","green","orange","purple","cyan","pink","darkblue","darkred","pink"]},get quantitativeStatsRelevantToCurrentZoom(){var t,r=(0,u.getContainingView)(e);return(null===(t=e.stats)||void 0===t?void 0:t.currStatsBpPerPx)===r.bpPerPx}}}).views(function(e){return{get legendFontSize(){return Math.min(e.rowHeight,12)},get canDisplayLegendLabels(){return e.rowHeight>11},get labelWidth(){var t,r=this;return(0,u.max)((null===(t=e.sources)||void 0===t?void 0:t.map(function(e){return(0,u.measureText)(e.name,r.legendFontSize)}).map(function(e){return r.canDisplayLegendLabels?e:20}))||[])},renderProps:function(){var t=e.adapterProps();return Lg(Lg({},t),{},{notReady:t.notReady||!e.sources||!e.stats,displayModel:e,rpcDriverName:e.rpcDriverName,displayCrossHatches:e.displayCrossHatches,height:e.height,ticks:e.ticks,stats:e.stats,scaleOpts:e.scaleOpts,onMouseMove:function(t,r){e.setFeatureUnderMouse(r)},onMouseLeave:function(){e.setFeatureUnderMouse(void 0)}})},get hasResolution(){return e.adapterCapabilities.includes("hasResolution")},get hasGlobalStats(){return e.adapterCapabilities.includes("hasGlobalStats")},get fillSetting(){return e.filled?0:1===e.minSize?1:2}}}).views(function(e){var t=e.trackMenuItems,r=(0,s.getConf)(e,"defaultRendering");return{trackMenuItems:function(){return[].concat(Ig(t()),[{label:"Score",subMenu:e.scoreTrackMenuItems()}],Ig(e.canHaveFill?[{label:"Fill mode",subMenu:["filled","no fill","no fill w/ emphasis"].map(function(t,r){return{label:t,type:"radio",checked:e.fillSetting===r,onClick:function(){e.setFill(r)}}})}]:[]),Ig(r?[{label:"Renderer type",subMenu:["xyplot","multirowxy","multirowdensity","multiline","multirowline"].map(function(t){return{label:t,type:"radio",checked:e.rendererTypeNameSimple===t,onClick:function(){e.setRendererType(t)}}})}]:[]),Ig(e.graphType?[{type:"checkbox",label:"Draw cross hatches",checked:e.displayCrossHatchesSetting,onClick:function(){e.toggleCrossHatches()}}]:[]),[{label:"Cluster by score",onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Hg,{model:e,handleClose:t}]})}},{label:"Show sidebar",type:"checkbox",checked:e.showSidebar,onClick:function(){e.setShowSidebar(!e.showSidebar)}},{label:"Edit colors/arrangement...",onClick:function(){(0,u.getSession)(e).queueDialog(function(t){return[Gg,{model:e,handleClose:t}]})}}])}}}).actions(function(e){var t=e.renderSvg;return{afterAttach:function(){Mg(jg().m(function t(){var r,n,i,a;return jg().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,Promise.all([Promise.resolve().then(o.bind(o,62238)),Promise.resolve().then(o.bind(o,70084))]);case 1:r=t.v,n=_g(r,2),i=n[0].getMultiWiggleSourcesAutorun,(0,n[1].getQuantitativeStatsAutorun)(e),i(e),t.n=3;break;case 2:t.p=2,a=t.v,(0,_.isAlive)(e)&&(console.error(a),(0,u.getSession)(e).notifyError("".concat(a),a));case 3:return t.a(2)}},t,null,[[0,2]])}))()},renderSvg:function(r){return Mg(jg().m(function n(){var i,a;return jg().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,Promise.resolve().then(o.bind(o,10916));case 1:return i=n.v,a=i.renderSvg,n.a(2,a(e,r,t))}},n)}))()}}})};function Ug(e){return Ug="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ug(e)}function qg(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Xg(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Xg(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Xg(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Xg(f,"constructor",c),Xg(c,"constructor",s),s.displayName="GeneratorFunction",Xg(c,o,"GeneratorFunction"),Xg(f),Xg(f,o,"Generator"),Xg(f,n,function(){return this}),Xg(f,"toString",function(){return"[object Generator]"}),(qg=function(){return{w:i,m:d}})()}function Xg(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Xg=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Xg(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Xg(e,t,r,n)}function Kg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Yg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kg(Object(r),!0).forEach(function(t){Jg(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kg(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Jg(e,t,r){return(t=ew(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zg(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Qg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ew(n.key),n)}}function ew(e){var t=function(e){if("object"!=Ug(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ug(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ug(t)?t:t+""}function tw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tw=function(){return!!e})()}function rw(e){return rw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rw(e)}function nw(e,t){return nw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nw(e,t)}var ow=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=rw(r=t),function(e,t){if(t&&("object"==Ug(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tw()?Reflect.construct(r,n||[],rw(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nw(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=qg().m(function e(t,r){var n,i,a,l,s,c,f,d,p,h,m,y;return qg().w(function(e){for(;;)switch(e.n){case 0:return n=r.stopToken,i=r.bpPerPx,a=r.sources,l=r.regions,s=r.features,c=l[0],f=(0,u.groupBy)(s.values(),function(e){return e.get("source")}),d=r.height/a.length,p=(c.end-c.start)/i,e.n=1,Promise.resolve().then(o.bind(o,60852));case 1:return h=e.v,m=h.drawLine,y=[],t.save(),(0,u.forEachWithStopTokenCheck)(a,n,function(e){var n=m(t,Yg(Yg({},r),{},{features:f[e.name]||[],height:d,colorCallback:function(){return e.color||"blue"}})).reducedFeatures;t.strokeStyle="rgba(200,200,200,0.8)",t.beginPath(),t.moveTo(0,d),t.lineTo(p,d),t.stroke(),t.translate(0,d),y=y.concat(n)}),t.restore(),e.a(2,{reducedFeatures:y})}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){Zg(o,r,n,a,l,"next",e)}function l(e){Zg(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&Qg(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);const iw=(0,s.ConfigurationSchema)("MultiRowLineRenderer",{displayCrossHatches:{type:"boolean",description:"choose to draw cross hatches (sideways lines)",defaultValue:!1},summaryScoreMode:{type:"stringEnum",model:_.types.enumeration("Score type",["max","min","avg","whiskers"]),description:"choose whether to use max/min/average or whiskers which combines all three into the same rendering",defaultValue:"avg"}},{baseConfiguration:Ub,explicitlyTyped:!0});function aw(e){return aw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aw(e)}function lw(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return sw(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(sw(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,sw(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,sw(f,"constructor",c),sw(c,"constructor",s),s.displayName="GeneratorFunction",sw(c,o,"GeneratorFunction"),sw(f),sw(f,o,"Generator"),sw(f,n,function(){return this}),sw(f,"toString",function(){return"[object Generator]"}),(lw=function(){return{w:i,m:d}})()}function sw(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}sw=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){sw(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},sw(e,t,r,n)}function cw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function uw(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cw(Object(r),!0).forEach(function(t){fw(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cw(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function fw(e,t,r){return(t=hw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dw(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function pw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hw(n.key),n)}}function hw(e){var t=function(e){if("object"!=aw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=aw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==aw(t)?t:t+""}function mw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mw=function(){return!!e})()}function yw(e){return yw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yw(e)}function bw(e,t){return bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bw(e,t)}var vw=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=yw(r=t),function(e,t){if(t&&("object"==aw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,mw()?Reflect.construct(r,n||[],yw(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bw(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=lw().m(function e(t,r){var n,i,a,l,s,c,f,d,p,h,m,y;return lw().w(function(e){for(;;)switch(e.n){case 0:return n=r.stopToken,i=r.bpPerPx,a=r.sources,l=r.regions,s=r.features,c=l[0],f=(0,u.groupBy)(s.values(),function(e){return e.get("source")}),d=r.height/a.length,p=(c.end-c.start)/i,e.n=1,Promise.resolve().then(o.bind(o,83237));case 1:return h=e.v,m=h.drawXY,y=[],t.save(),(0,u.forEachWithStopTokenCheck)(a,n,function(e){var n=m(t,uw(uw({},r),{},{features:f[e.name]||[],height:d,colorCallback:function(){return e.color||"blue"}})).reducedFeatures;t.strokeStyle="rgba(200,200,200,0.8)",t.beginPath(),t.moveTo(0,d),t.lineTo(p,d),t.stroke(),t.translate(0,d),y=y.concat(n)}),t.restore(),e.a(2,{reducedFeatures:y})}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){dw(o,r,n,a,l,"next",e)}function l(e){dw(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&pw(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);const gw=(0,s.ConfigurationSchema)("MultiRowXYPlotRenderer",{filled:{type:"boolean",defaultValue:!0},displayCrossHatches:{type:"boolean",description:"choose to draw cross hatches (sideways lines)",defaultValue:!1},summaryScoreMode:{type:"stringEnum",model:_.types.enumeration("Score type",["max","min","avg","whiskers"]),description:"choose whether to use max/min/average or whiskers which combines all three into the same rendering",defaultValue:"whiskers"},minSize:{type:"number",defaultValue:.7}},{baseConfiguration:Ub,explicitlyTyped:!0}),ww=(0,s.ConfigurationSchema)("MultiWiggleAdapter",{subadapters:{type:"frozen",defaultValue:[],description:"array of subadapter JSON objects"},bigWigs:{type:"frozen",description:"array of bigwig filenames, alternative to the subadapters slot",defaultValue:[]}},{explicitlyTyped:!0});function Sw(e){return Sw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sw(e)}function Aw(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Ow(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Ow(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Ow(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Ow(f,"constructor",c),Ow(c,"constructor",s),s.displayName="GeneratorFunction",Ow(c,o,"GeneratorFunction"),Ow(f),Ow(f,o,"Generator"),Ow(f,n,function(){return this}),Ow(f,"toString",function(){return"[object Generator]"}),(Aw=function(){return{w:i,m:d}})()}function Ow(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ow=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Ow(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Ow(e,t,r,n)}function xw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function kw(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xw(Object(r),!0).forEach(function(t){Cw(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xw(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Cw(e,t,r){return(t=jw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pw(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Ew(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jw(n.key),n)}}function jw(e){var t=function(e){if("object"!=Sw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Sw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sw(t)?t:t+""}function Tw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tw=function(){return!!e})()}function _w(e){return _w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_w(e)}function Rw(e,t){return Rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rw(e,t)}var Mw=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=_w(r=t),function(e,t){if(t&&("object"==Sw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Tw()?Reflect.construct(r,n||[],_w(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rw(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=Aw().m(function e(t,r){var n,i,a,l,s,c,f;return Aw().w(function(e){for(;;)switch(e.n){case 0:return n=r.stopToken,i=r.sources,a=r.features,l=(0,u.groupBy)(a.values(),function(e){return e.get("source")}),e.n=1,Promise.resolve().then(o.bind(o,83237));case 1:return s=e.v,c=s.drawXY,f=[],(0,u.forEachWithStopTokenCheck)(i,n,function(e){var n=l[e.name]||[],o=c(t,kw(kw({},r),{},{features:n,offset:Zb.YSCALEBAR_LABEL_OFFSET,colorCallback:function(){return e.color||"blue"}})).reducedFeatures;f=f.concat(o)}),e.a(2,{reducedFeatures:f})}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){Pw(o,r,n,a,l,"next",e)}function l(e){Pw(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&Ew(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);const Iw=(0,s.ConfigurationSchema)("MultiXYPlotRenderer",{filled:{type:"boolean",defaultValue:!0},displayCrossHatches:{type:"boolean",description:"choose to draw cross hatches (sideways lines)",defaultValue:!1},summaryScoreMode:{type:"stringEnum",model:_.types.enumeration("Score type",["max","min","avg","whiskers"]),description:"choose whether to use max/min/average or whiskers which combines all three into the same rendering",defaultValue:"avg"},minSize:{type:"number",defaultValue:.7}},{baseConfiguration:Ub,explicitlyTyped:!0});function Nw(e){return Nw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nw(e)}function Dw(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return Fw(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(Fw(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Fw(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,Fw(f,"constructor",c),Fw(c,"constructor",s),s.displayName="GeneratorFunction",Fw(c,o,"GeneratorFunction"),Fw(f),Fw(f,o,"Generator"),Fw(f,n,function(){return this}),Fw(f,"toString",function(){return"[object Generator]"}),(Dw=function(){return{w:i,m:d}})()}function Fw(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Fw=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){Fw(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},Fw(e,t,r,n)}function Lw(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function zw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Hw(n.key),n)}}function Bw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Bw=function(){return!!e})()}function $w(e){return $w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$w(e)}function Gw(e,t){return Gw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Gw(e,t)}function Hw(e){var t=function(e){if("object"!=Nw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Nw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nw(t)?t:t+""}var Vw=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Hw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=$w(n),e=function(e,t){if(t&&("object"==Nw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Bw()?Reflect.construct(n,o||[],$w(r).constructor):n.apply(r,o))),"name","MultiWiggleGetSources"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gw(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=Dw().m(function e(t,r){var n,o,i,a,l,s,c;return Dw().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.regions,a=o.adapterConfig,l=o.sessionId,e.n=2,(0,je.cK)(n,l,a);case 2:return s=e.v,c=s.dataAdapter,e.a(2,c.getSources(i,o))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){Lw(i,r,n,a,l,"next",e)}function l(e){Lw(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&zw(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function Ww(e){return Ww="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ww(e)}function Uw(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return qw(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(qw(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,qw(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,qw(f,"constructor",c),qw(c,"constructor",s),s.displayName="GeneratorFunction",qw(c,o,"GeneratorFunction"),qw(f),qw(f,o,"Generator"),qw(f,n,function(){return this}),qw(f,"toString",function(){return"[object Generator]"}),(Uw=function(){return{w:i,m:d}})()}function qw(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}qw=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){qw(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},qw(e,t,r,n)}function Xw(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function Kw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qw(n.key),n)}}function Yw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yw=function(){return!!e})()}function Jw(e){return Jw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jw(e)}function Zw(e,t){return Zw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zw(e,t)}function Qw(e){var t=function(e){if("object"!=Ww(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ww(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ww(t)?t:t+""}var eS=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=Qw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=Jw(n),e=function(e,t){if(t&&("object"==Ww(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,Yw()?Reflect.construct(n,o||[],Jw(r).constructor):n.apply(r,o))),"name","WiggleGetMultiRegionQuantitativeStats"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zw(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=Uw().m(function e(t,r){var n,o,i,a,l,s,c;return Uw().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.regions,a=o.adapterConfig,l=o.sessionId,e.n=2,(0,je.cK)(n,l,a);case 2:return s=e.v,c=s.dataAdapter,e.a(2,c.getMultiRegionQuantitativeStats(i,o))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){Xw(i,r,n,a,l,"next",e)}function l(e){Xw(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&Kw(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function tS(e){return tS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tS(e)}function rS(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return nS(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(nS(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,nS(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,nS(f,"constructor",c),nS(c,"constructor",s),s.displayName="GeneratorFunction",nS(c,o,"GeneratorFunction"),nS(f),nS(f,o,"Generator"),nS(f,n,function(){return this}),nS(f,"toString",function(){return"[object Generator]"}),(rS=function(){return{w:i,m:d}})()}function nS(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}nS=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){nS(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},nS(e,t,r,n)}function oS(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function iS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cS(n.key),n)}}function aS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aS=function(){return!!e})()}function lS(e){return lS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lS(e)}function sS(e,t){return sS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sS(e,t)}function cS(e){var t=function(e){if("object"!=tS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=tS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tS(t)?t:t+""}var uS=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=cS(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=lS(n),e=function(e,t){if(t&&("object"==tS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,aS()?Reflect.construct(n,o||[],lS(r).constructor):n.apply(r,o))),"name","WiggleGetGlobalQuantitativeStats"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sS(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=rS().m(function e(t,r){var n,o,i,a,l,s;return rS().w(function(e){for(;;)switch(e.n){case 0:return n=this.pluginManager,e.n=1,this.deserializeArguments(t,r);case 1:return o=e.v,i=o.adapterConfig,a=o.sessionId,e.n=2,(0,je.cK)(n,a,i);case 2:return l=e.v,s=l.dataAdapter,e.a(2,s.getGlobalStats(o))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){oS(i,r,n,a,l,"next",e)}function l(e){oS(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&iS(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function fS(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return dS(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(dS(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,dS(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,dS(f,"constructor",c),dS(c,"constructor",s),s.displayName="GeneratorFunction",dS(c,o,"GeneratorFunction"),dS(f),dS(f,o,"Generator"),dS(f,n,function(){return this}),dS(f,"toString",function(){return"[object Generator]"}),(fS=function(){return{w:i,m:d}})()}function dS(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}dS=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){dS(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},dS(e,t,r,n)}function pS(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return hS(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hS(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function hS(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function mS(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function yS(e){return bS.apply(this,arguments)}function bS(){var e;return e=fS().m(function e(t){var r,n,o,i,a,l,s,c,f,d,p,h,m,y,b,v,g,w,S,A,O,x,k,C,P,E,j,T,_;return fS().w(function(e){for(;;)switch(e.n){case 0:return r=t.pluginManager,n=t.args,o=n.sources,i=n.regions,a=n.adapterConfig,l=n.sessionId,s=n.bpPerPx,e.n=1,(0,je.cK)(r,l,a);case 1:return c=e.v,f=c.dataAdapter,d=i[0],p=d.end-d.start,h=Math.floor(p/s),e.n=2,(0,wt._)(f.getFeatures(d,n).pipe((0,St.$)()));case 2:m=e.v,y=(0,u.groupBy)(m,function(e){return e.get("source")}),b={},v=pS(o);try{for(v.s();!(g=v.n()).done;){w=g.value,S=w.name,A=y[S]||[],O=new Array(h).fill(0),x=pS(A);try{for(x.s();!(k=x.n()).done;)for(C=k.value,P=C.get("start"),E=C.get("end"),j=C.get("score"),T=P;T<E;T+=s)(_=Math.floor((T-d.start)/s))>=0&&_<h&&(O[_]||(O[_]=j))}catch(e){x.e(e)}finally{x.f()}b[S]=O}}catch(e){v.e(e)}finally{v.f()}return e.a(2,b)}},e)}),bS=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){mS(i,n,o,a,l,"next",e)}function l(e){mS(i,n,o,a,l,"throw",e)}a(void 0)})},bS.apply(this,arguments)}function vS(e){return vS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vS(e)}function gS(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return wS(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(wS(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,wS(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,wS(f,"constructor",c),wS(c,"constructor",s),s.displayName="GeneratorFunction",wS(c,o,"GeneratorFunction"),wS(f),wS(f,o,"Generator"),wS(f,n,function(){return this}),wS(f,"toString",function(){return"[object Generator]"}),(gS=function(){return{w:i,m:d}})()}function wS(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}wS=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){wS(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},wS(e,t,r,n)}function SS(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function AS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,CS(n.key),n)}}function OS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(OS=function(){return!!e})()}function xS(e){return xS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xS(e)}function kS(e,t){return kS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kS(e,t)}function CS(e){var t=function(e){if("object"!=vS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=vS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vS(t)?t:t+""}var PS=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=CS(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=xS(n),e=function(e,t){if(t&&("object"==vS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,OS()?Reflect.construct(n,o||[],xS(r).constructor):n.apply(r,o))),"name","MultiWiggleGetScoreMatrix"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kS(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=gS().m(function e(t,r){var n;return gS().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.deserializeArguments(t,r);case 1:return n=e.v,e.a(2,yS({args:n,pluginManager:this.pluginManager}))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){SS(i,r,n,a,l,"next",e)}function l(e){SS(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&AS(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function ES(e){return ES="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ES(e)}function jS(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return TS(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(TS(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,TS(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,TS(f,"constructor",c),TS(c,"constructor",s),s.displayName="GeneratorFunction",TS(c,o,"GeneratorFunction"),TS(f),TS(f,o,"Generator"),TS(f,n,function(){return this}),TS(f,"toString",function(){return"[object Generator]"}),(jS=function(){return{w:i,m:d}})()}function TS(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}TS=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){TS(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},TS(e,t,r,n)}function _S(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function RS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,DS(n.key),n)}}function MS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(MS=function(){return!!e})()}function IS(e){return IS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},IS(e)}function NS(e,t){return NS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},NS(e,t)}function DS(e){var t=function(e){if("object"!=ES(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ES(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ES(t)?t:t+""}var FS=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return function(e,t,r){(t=DS(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}((r=this,n=t,o=[].concat(a),n=IS(n),e=function(e,t){if(t&&("object"==ES(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,MS()?Reflect.construct(n,o||[],IS(r).constructor):n.apply(r,o))),"name","MultiWiggleClusterScoreMatrix"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&NS(e,t)}(t,e),r=t,n=[{key:"execute",value:(o=jS().m(function e(t,r){var n,o;return jS().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.deserializeArguments(t,r);case 1:return n=e.v,e.n=2,yS({pluginManager:this.pluginManager,args:n});case 2:return o=e.v,e.a(2,qm({data:Object.values(o),stopToken:n.stopToken,onProgress:function(e){var t;null===(t=n.statusCallback)||void 0===t||t.call(n,e)}}))}},e,this)}),i=function(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function a(e){_S(i,r,n,a,l,"next",e)}function l(e){_S(i,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return i.apply(this,arguments)})}],n&&RS(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o,i}($m);function LS(e){return LS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},LS(e)}function zS(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return BS(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(BS(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,BS(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,BS(f,"constructor",c),BS(c,"constructor",s),s.displayName="GeneratorFunction",BS(c,o,"GeneratorFunction"),BS(f),BS(f,o,"Generator"),BS(f,n,function(){return this}),BS(f,"toString",function(){return"[object Generator]"}),(zS=function(){return{w:i,m:d}})()}function BS(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}BS=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){BS(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},BS(e,t,r,n)}function $S(e){return function(e){if(Array.isArray(e))return GS(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return GS(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GS(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GS(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function HS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function VS(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?HS(Object(r),!0).forEach(function(t){WS(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HS(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function WS(e,t,r){return(t=XS(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function US(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function qS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,XS(n.key),n)}}function XS(e){var t=function(e){if("object"!=LS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=LS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==LS(t)?t:t+""}function KS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(KS=function(){return!!e})()}function YS(e){return YS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},YS(e)}function JS(e,t){return JS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},JS(e,t)}var ZS=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=YS(r=t),function(e,t){if(t&&("object"==LS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,KS()?Reflect.construct(r,n||[],YS(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&JS(e,t)}(t,e),r=t,n=[{key:"draw",value:(i=zS().m(function e(t,r){var n,i,a,l,c,u,f,d,p;return zS().w(function(e){for(;;)switch(e.n){case 0:return n=r.inverted,i=r.stopToken,a=r.features,l=r.config,e.n=1,Promise.resolve().then(o.bind(o,83237));case 1:return c=e.v,u=c.drawXY,f=(0,s.readConfObject)(l,"bicolorPivotValue"),d=(0,s.readConfObject)(l,"negColor"),p=(0,s.readConfObject)(l,"posColor"),e.a(2,u(t,VS(VS({},r),{},{colorCallback:l.color.isCallback?function(e,t){return(0,s.readConfObject)(l,"color",{feature:e})}:function(e,t){return t<f?d:p},offset:Zb.YSCALEBAR_LABEL_OFFSET,features:$S(a.values()),inverted:n,stopToken:i})))}},e)}),a=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=i.apply(e,t);function a(e){US(o,r,n,a,l,"next",e)}function l(e){US(o,r,n,a,l,"throw",e)}a(void 0)})},function(e,t){return a.apply(this,arguments)})}],n&&qS(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i,a}(Nb);const QS=(0,s.ConfigurationSchema)("XYPlotRenderer",{filled:{type:"boolean",defaultValue:!0},displayCrossHatches:{type:"boolean",description:"choose to draw cross hatches (sideways lines)",defaultValue:!1},summaryScoreMode:{type:"stringEnum",model:_.types.enumeration("Score type",["max","min","avg","whiskers"]),description:"choose whether to use max/min/average or whiskers which combines all three into the same rendering",defaultValue:"whiskers"},minSize:{type:"number",defaultValue:.7}},{baseConfiguration:Ub,explicitlyTyped:!0});function eA(e){return eA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eA(e)}function tA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,aA(n.key),n)}}function rA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rA=function(){return!!e})()}function nA(e){return nA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nA(e)}function oA(e,t){return oA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oA(e,t)}function iA(e,t,r){return(t=aA(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aA(e){var t=function(e){if("object"!=eA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=eA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eA(t)?t:t+""}var lA=function(e){function t(){var e,r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return iA((r=this,n=t,o=[].concat(a),n=nA(n),e=function(e,t){if(t&&("object"==eA(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,rA()?Reflect.construct(n,o||[],nA(r).constructor):n.apply(r,o))),"name","WigglePlugin"),iA(e,"exports",{LinearWiggleDisplayReactComponent:Gv.default,XYPlotRendererReactComponent:Yb,XYPlotRenderer:ZS,WiggleBaseRenderer:Nb,linearWiggleDisplayModelFactory:$v,xyPlotRendererConfigSchema:QS,utils:Zb}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oA(e,t)}(t,e),r=t,n=[{key:"install",value:function(e){e.addAdapterType(function(){return new lo.A({name:"MultiWiggleAdapter",displayName:"Multi-wiggle adapter",configSchema:ww,adapterCapabilities:["hasResolution","hasLocalStats","hasGlobalStats"],adapterMetadata:{hiddenFromGUI:!0},getAdapterClass:function(){return Promise.resolve().then(o.bind(o,35409)).then(function(e){return e.default})}})}),e.addAdapterType(function(){return new lo.A({name:"BigWigAdapter",displayName:"BigWig adapter",configSchema:fb,adapterCapabilities:["hasResolution","hasLocalStats","hasGlobalStats"],getAdapterClass:function(){return Promise.resolve().then(o.bind(o,38859)).then(function(e){return e.default})}})}),function(e){e.addTrackType(function(){var t=function(e){return(0,s.ConfigurationSchema)("QuantitativeTrack",{},{baseConfiguration:(0,fo.createBaseTrackConfig)(e)})}(e);return new co.A({name:"QuantitativeTrack",displayName:"Quantitative track",configSchema:t,stateModel:(0,fo.createBaseTrackModel)(e,"QuantitativeTrack",t)})})}(e),function(e){e.addTrackType(function(){var t=function(e){return(0,s.ConfigurationSchema)("MultiQuantitativeTrack",{},{baseConfiguration:(0,fo.createBaseTrackConfig)(e)})}(e);return new co.A({name:"MultiQuantitativeTrack",displayName:"Multi-quantitative track",configSchema:t,stateModel:(0,fo.createBaseTrackModel)(e,"MultiQuantitativeTrack",t)})})}(e),function(e){e.addDisplayType(function(){var t=function(e){var t=e.getRendererType("XYPlotRenderer").configSchema,r=e.getRendererType("DensityRenderer").configSchema,n=e.getRendererType("LinePlotRenderer").configSchema;return(0,s.ConfigurationSchema)("LinearWiggleDisplay",{defaultRendering:{type:"stringEnum",model:_.types.enumeration("Rendering",["density","xyplot","line"]),defaultValue:"xyplot"},renderers:(0,s.ConfigurationSchema)("RenderersConfiguration",{DensityRenderer:r,XYPlotRenderer:t,LinePlotRenderer:n})},{baseConfiguration:dv(),explicitlyTyped:!0})}(e),r=$v(0,t);return new so.A({name:"LinearWiggleDisplay",displayName:"Wiggle display",configSchema:t,stateModel:r,trackType:"QuantitativeTrack",viewType:"LinearGenomeView",ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,6666))})})})}(e),function(e){e.addDisplayType(function(){var t=function(e){var t=e.getRendererType("MultiXYPlotRenderer").configSchema,r=e.getRendererType("MultiDensityRenderer").configSchema,n=e.getRendererType("MultiRowXYPlotRenderer").configSchema,o=e.getRendererType("MultiLineRenderer").configSchema,i=e.getRendererType("MultiRowLineRenderer").configSchema;return(0,s.ConfigurationSchema)("MultiLinearWiggleDisplay",{defaultRendering:{type:"stringEnum",model:_.types.enumeration("Rendering",["multirowxy","xyplot","multirowdensity","multiline","multirowline"]),defaultValue:"multirowxy"},renderers:(0,s.ConfigurationSchema)("RenderersConfiguration",{MultiXYPlotRenderer:t,MultiDensityRenderer:r,MultiRowXYPlotRenderer:n,MultiLineRenderer:o,MultiRowLineRenderer:i}),height:{type:"number",defaultValue:200}},{baseConfiguration:dv(),explicitlyTyped:!0})}(e);return new so.A({name:"MultiLinearWiggleDisplay",displayName:"Multi-wiggle display",configSchema:t,stateModel:Wg(0,t),trackType:"MultiQuantitativeTrack",viewType:"LinearGenomeView",ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,1585))})})})}(e),function(e){e.addRendererType(function(){return new fv({name:"LinePlotRenderer",ReactComponent:Yb,configSchema:Jb,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new ZS({name:"XYPlotRenderer",ReactComponent:Yb,configSchema:QS,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new Wb({name:"DensityRenderer",ReactComponent:Yb,configSchema:qb,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new Mw({name:"MultiXYPlotRenderer",ReactComponent:Qv,configSchema:Iw,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new vw({name:"MultiRowXYPlotRenderer",ReactComponent:Qv,configSchema:gw,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new dg({name:"MultiDensityRenderer",ReactComponent:Qv,configSchema:Hv,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new kg({name:"MultiLineRenderer",ReactComponent:Qv,configSchema:Cg,pluginManager:e})})}(e),function(e){e.addRendererType(function(){return new ow({name:"MultiRowLineRenderer",ReactComponent:Qv,configSchema:iw,pluginManager:e})})}(e),function(e){e.addAddTrackWorkflowType(function(){return new Ce.AddTrackWorkflowType({name:"Multi-wiggle track",ReactComponent:(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,16149))}),stateModel:_.types.model({})})})}(e),function(e){e.addToExtensionPoint("TrackSelector-multiTrackMenuItems",function(e,t){var r=t.session;return[].concat(pb(e),pb((0,u.isSessionWithAddTracks)(r)?[{label:"Create multi-wiggle track",onClick:function(e){var t=e.selection;(0,u.getSession)(e).queueDialog(function(r){return[vb,{tracks:t,onClose:function(t,n){t&&n&&function(e){var t=e.model,r=e.arg,n=t.selection,o=n.map(function(e){return(0,s.readConfObject)(e,"name")}),i=n.map(function(e){return(0,s.readConfObject)(e,"adapter")}).map(function(e,t){return yb(yb({},e),{},{source:o[t]})}),a=+Date.now(),l="multitrack-".concat(a,"-sessionTrack"),c=(0,u.getSession)(t);(0,u.isSessionWithAddTracks)(c)&&(c.addTrackConf({type:"MultiQuantitativeTrack",trackId:l,name:r.name,assemblyNames:pb(new Set(n.flatMap(function(e){return(0,s.readConfObject)(e,"assemblyNames")}))),adapter:{type:"MultiWiggleAdapter",subadapters:i}}),t.view.showTrack(l))}({model:e,arg:n}),r()}}]})}}]:[]))})}(e),function(e){e.addToExtensionPoint("Core-guessAdapterForLocation",function(e){return function(t,r,n){var o=(0,Vo.getFileName)(t);return(0,u.testAdapter)(o,/\.(bw|bigwig)$/i,n,"BigWigAdapter")?{type:"BigWigAdapter",bigWigLocation:t}:e(t,r,n)}}),e.addToExtensionPoint("Core-guessTrackTypeForLocation",function(e){return function(t){return"BigWigAdapter"===t?"QuantitativeTrack":e(t)}})}(e),e.addRpcMethod(function(){return new uS(e)}),e.addRpcMethod(function(){return new eS(e)}),e.addRpcMethod(function(){return new Vw(e)}),e.addRpcMethod(function(){return new PS(e)}),e.addRpcMethod(function(){return new FS(e)})}}],n&&tA(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we.A);const sA=[Ac,Vu.A,Zf,Hu,fp,ab,lA];function cA(e,t){return _.types.model("Configuration",{configuration:(0,s.ConfigurationSchema)("Root",{rpc:Ol.configSchema,highResolutionScaling:{type:"number",defaultValue:2},formatDetails:(0,s.ConfigurationSchema)("FormatDetails",{feature:{type:"frozen",description:"adds extra fields to the feature details",defaultValue:{},contextVariable:["feature"]},subfeatures:{type:"frozen",description:"adds extra fields to the subfeatures of a feature",defaultValue:{},contextVariable:["feature"]},depth:{type:"number",defaultValue:2,description:"depth to iterate the formatDetails->subfeatures callback on subfeatures (used for example to only apply the callback to the first layer of subfeatures)"},maxDepth:{type:"number",defaultValue:1e4,description:"hide subfeatures greater than a certain depth"}}),formatAbout:(0,s.ConfigurationSchema)("FormatAbout",{config:{type:"frozen",description:"formats configuration object in about dialog",defaultValue:{},contextVariable:["config"]},hideUris:{type:"boolean",defaultValue:!1}}),hierarchical:(0,s.ConfigurationSchema)("hierarchical",{sort:(0,s.ConfigurationSchema)("hierarchicalSort",{trackNames:{type:"boolean",defaultValue:!1},categories:{type:"boolean",defaultValue:!1}}),defaultCollapsed:(0,s.ConfigurationSchema)("defaultCollapsed",{categoryNames:{type:"stringArray",defaultValue:[]},topLevelCategories:{type:"boolean",defaultValue:!1},subCategories:{type:"boolean",defaultValue:!1}})}),theme:{type:"frozen",defaultValue:{}}}),assembly:t,tracks:_.types.array(e.pluggableConfigSchemaType("track")),internetAccounts:_.types.array(e.pluggableConfigSchemaType("internet account")),connections:_.types.array(e.pluggableConfigSchemaType("connection")),aggregateTextSearchAdapters:_.types.array(e.pluggableConfigSchemaType("text search adapter")),plugins:_.types.frozen()}).views(function(e){return{get assemblies(){return[e.assembly]},get assemblyName(){return(0,s.readConfObject)(e.assembly,"name")},get rpcManager(){return(0,_.getParent)(e).rpcManager}}})}var uA=o(9765),fA=o(14041),dA=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,66201))}),pA=o(40295);function hA(e){return hA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hA(e)}function mA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function yA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mA(Object(r),!0).forEach(function(t){bA(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mA(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function bA(e,t,r){return(t=function(e){var t=function(e){if("object"!=hA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=hA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hA(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var gA=128,wA=o(72501);function SA(e,t){if(e){if("string"==typeof e)return AA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?AA(e,t):void 0}}function AA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function OA(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||xA(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xA(e,t){if(e){if("string"==typeof e)return kA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kA(e,t):void 0}}function kA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function CA(e){return _.types.model("ReferenceManagementSessionMixin",{}).views(function(e){return{getReferring:function(t){var r=[];return(0,_.walk)((0,_.getParent)(e),function(e){if((0,_.isModelType)((0,_.getType)(e)))for(var n=(0,_.getMembers)(e),o=0,i=Object.entries(n.properties);o<i.length;o++){var a=OA(i[o],2),l=a[0],s=a[1];(0,_.isReferenceType)(s)&&e[l]===t&&r.push({node:e,key:l})}}),r}}}).actions(function(e){return{removeReferring:function(t,r,n,o){var i,a=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=xA(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(t);try{var l=function(){var t=i.value.node,a=!1;try{var l="open track(s)",s=(0,u.getContainingView)(t);n.push(function(){s.hideTrack(r.trackId)}),a=!0,o[l]||(o[l]=0),o[l]+=1}catch(e){}if((0,u.isSessionModelWithWidgets)(e)&&e.widgets.has(t.id)){var c="configuration editor widget(s)";(0,u.isSessionModelWithWidgets)(e)&&n.push(function(){e.hideWidget(t)}),a=!0,o[c]||(o[c]=0),o[c]+=1}if(!a)throw new Error("Error when closing this connection, the following node is still referring to a track configuration: ".concat(JSON.stringify((0,_.getSnapshot)(t))))};for(a.s();!(i=a.n()).done;)l()}catch(e){a.e(e)}finally{a.f()}}}})}const PA=(0,Tn.A)((0,A.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info");function EA(e){return EA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},EA(e)}function jA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function TA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jA(Object(r),!0).forEach(function(t){_A(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jA(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _A(e,t,r){return(t=function(e){var t=function(e){if("object"!=EA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=EA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==EA(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var RA=(0,a.lazy)(function(){return Promise.resolve().then(o.bind(o,79625))});function MA(e){return _.types.compose("ReactCircularGenomeViewSession",(0,pA.DH)(e),function(e){var t=e.pluggableMstType("widget","stateModel");return _.types.model({drawerPosition:_.types.optional(_.types.string,function(){return(0,u.localStorageGetItem)("drawerPosition")||"right"}),drawerWidth:_.types.optional(_.types.refinement(_.types.integer,function(e){return e>=gA}),384),widgets:_.types.map(t),activeWidgets:_.types.map(_.types.safeReference(t)),minimized:_.types.optional(_.types.boolean,!1)}).views(function(e){return{get visibleWidget(){if((0,_.isAlive)(e))return(t=e.activeWidgets.values(),function(e){if(Array.isArray(e))return vA(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return vA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vA(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[e.activeWidgets.size-1];var t}}}).actions(function(t){return{setDrawerPosition:function(e){t.drawerPosition=e,localStorage.setItem("drawerPosition",e)},updateDrawerWidth:function(e){if(e===t.drawerWidth)return t.drawerWidth;var r=e;return r<gA&&(r=gA),t.drawerWidth=r,r},resizeDrawer:function(e){"left"===t.drawerPosition&&(e*=-1);var r=t.drawerWidth;return r-this.updateDrawerWidth(r-e)},addWidget:function(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!e.getElementType("widget",r))throw new Error("unknown widget type ".concat(r));var a=yA(yA({},o),{},{id:n,type:r,configuration:i||{type:r}});return t.widgets.set(n,a),t.widgets.get(n)},showWidget:function(e){t.activeWidgets.has(e.id)&&t.activeWidgets.delete(e.id),t.activeWidgets.set(e.id,e),t.minimized=!1},hasWidget:function(e){return t.activeWidgets.has(e.id)},hideWidget:function(e){t.activeWidgets.delete(e.id)},minimizeWidgetDrawer:function(){t.minimized=!0},showWidgetDrawer:function(){t.minimized=!1},hideAllWidgets:function(){t.activeWidgets.clear()},editConfiguration:function(e){if(!(0,s.isConfigurationModel)(e))throw new Error("must pass a configuration model to editConfiguration");var t=this.addWidget("ConfigurationEditorWidget","configEditor",{target:e});this.showWidget(t)},afterAttach:function(){(0,_.addDisposer)(t,(0,le.autorun)(function(){(0,u.localStorageSetItem)("drawerPosition",t.drawerPosition)}))}}})}(e),(0,wA.F)(e),_.types.model("DialogQueueSessionMixin",{}).volatile(function(){return{queueOfDialogs:[]}}).views(function(e){return{get DialogComponent(){var t;return null===(t=e.queueOfDialogs[0])||void 0===t?void 0:t[0]},get DialogProps(){var t;return null===(t=e.queueOfDialogs[0])||void 0===t?void 0:t[1]}}}).actions(function(e){return{removeActiveDialog:function(){e.queueOfDialogs=e.queueOfDialogs.slice(1)},queueDialog:function(t){var r,n,o=this,i=(r=t(function(){o.removeActiveDialog()}),n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(r,n)||SA(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],l=i[1];e.queueOfDialogs=[].concat(function(e){return function(e){if(Array.isArray(e))return AA(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||SA(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.queueOfDialogs),[[a,l]])}}}),function(e){return _.types.compose("TracksManagerSessionMixin",(0,pA.DH)(e),CA()).views(function(e){return{get tracks(){return e.jbrowse.tracks}}}).actions(function(e){return{addTrackConf:function(t){return e.jbrowse.addTrackConf(t)},deleteTrackConf:function(t){var r=[],n=e.getReferring(t);e.removeReferring(n,t,r,{});for(var o=0,i=r;o<i.length;o++)(0,i[o])();if(e.adminMode)return e.jbrowse.deleteTrackConf(t)}}})}(e),CA(),_.types.model({}).volatile(function(){return{snackbarMessages:le.observable.array()}}).views(function(e){return{get snackbarMessageSet(){return new Map(e.snackbarMessages.map(function(e){return[e.message,e]}))}}}).actions(function(e){return{notify:function(e,t,r){var n=this;this.pushSnackbarMessage(e,t,r),"info"!==t&&"success"!==t||setTimeout(function(){n.removeSnackbarMessage(e)},5e3)},notifyError:function(t,r,n){this.notify(t,"error",{name:fA.createElement(uA.A,null),onClick:function(){e.queueDialog(function(e){return[dA,{onClose:e,error:r,extra:n}]})}})},pushSnackbarMessage:function(t,r,n){!n&&e.snackbarMessageSet.has(t)||e.snackbarMessages.push({message:t,level:r,action:n})},popSnackbarMessage:function(){return e.snackbarMessages.pop()},removeSnackbarMessage:function(t){var r=e.snackbarMessageSet.get(t);void 0!==r&&e.snackbarMessages.remove(r)}}})).props({view:e.getViewType("CircularView").stateModel}).volatile(function(){return{task:void 0}}).views(function(e){return{get version(){return(0,_.getParent)(e).version},get assemblies(){return[(0,_.getParent)(e).config.assembly]},get assemblyNames(){return[(0,_.getParent)(e).config.assemblyName]},get connections(){return(0,_.getParent)(e).config.connections},get assemblyManager(){return(0,_.getParent)(e).assemblyManager},get views(){return[e.view]},renderProps:function(){return{theme:(0,s.getConf)(e,"theme"),highResolutionScaling:(0,s.getConf)(e,"highResolutionScaling")}}}}).actions(function(t){return{addView:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.getElementType("view",r))throw new Error("unknown view type ".concat(r));return t.view=TA(TA({},n),{},{type:r}),t.view},removeView:function(){}}}).views(function(e){return{getTrackActionMenuItems:function(t){return[{label:"About track",onClick:function(){e.queueDialog(function(e){return[RA,{config:t,handleClose:e}]})},icon:PA}]}}})}var IA="3.6.2";function NA(e){return function(e){if(Array.isArray(e))return FA(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||DA(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DA(e,t){if(e){if("string"==typeof e)return FA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?FA(e,t):void 0}}function FA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function LA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){throw new Error("no makeWorkerInstance supplied")},r=new Si([].concat(NA(sA),NA(e)).map(function(e){return new e}));r.createPluggableElements();var n=MA(r),o=aa(r),i=ia(o,r);return{model:_.types.model("ReactCircularGenomeView",{config:cA(r,o),session:n,assemblyManager:_.types.optional(i,{}),internetAccounts:_.types.array(r.pluggableMstType("internet account","stateModel"))}).volatile(function(e){return{error:void 0,adminMode:!1,version:IA,rpcManager:new Ol(r,e.config.configuration.rpc,{WebWorkerRpcDriver:{makeWorkerInstance:t},MainThreadRpcDriver:{}}),textSearchManager:new Ai.A(r)}}).actions(function(e){return{setSession:function(t){e.session=(0,_.cast)(t)},renameCurrentSession:function(t){var r=JSON.parse(JSON.stringify((0,_.getSnapshot)(e.session)));r.name=t,this.setSession(r)},setError:function(t){e.error=t},addInternetAccount:function(t){e.internetAccounts.push(t)},findAppropriateInternetAccount:function(t){var r=t.internetAccountId;if(r){var n=e.internetAccounts.find(function(e){return e.internetAccountId===r});if(n)return n}var o,i=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=DA(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(e.internetAccounts);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(a.handlesLocation(t))return a}}catch(e){i.e(e)}finally{i.f()}return null}}}).views(function(e){return{get jbrowse(){return e.config},get pluginManager(){return r}}}),pluginManager:r}}function zA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function BA(e){var t=e.assembly,r=e.tracks,n=e.internetAccounts,o=e.configuration,i=e.aggregateTextSearchAdapters,a=e.plugins,l=e.makeWorkerInstance,s=e.onChange,c=LA(a||[],l),u=c.model,f=c.pluginManager,d=e.defaultSession;d||(d={name:"this session",view:{id:"circularView",type:"CircularView"}});var p,h={config:{configuration:o,assembly:t,tracks:r,internetAccounts:n,aggregateTextSearchAdapters:i,defaultSession:d},session:d},m=u.create(h,{pluginManager:f}),y=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return zA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zA(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(m.config.internetAccounts);try{for(y.s();!(p=y.n()).done;){var b=p.value;if(!f.getInternetAccountType(b.type))throw new Error("unknown internet account type ".concat(b.type));m.addInternetAccount({type:b.type,configuration:b})}}catch(e){y.e(e)}finally{y.f()}return f.setRootModel(m),f.configure(),(0,le.autorun)(function(e){var r,n=m.session,o=m.assemblyManager;if(n.view.initialized){var i=null===(r=o.get(null==t?void 0:t.name))||void 0===r?void 0:r.regions;i&&(n.view.setDisplayedRegions(i),e.dispose())}}),s&&(0,_.onPatch)(m,s),m}var $A=o(99938),GA=o.n($A);function HA(e){return HA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},HA(e)}function VA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function WA(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return UA(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(UA(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,UA(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,UA(f,"constructor",c),UA(c,"constructor",s),s.displayName="GeneratorFunction",UA(c,o,"GeneratorFunction"),UA(f),UA(f,o,"Generator"),UA(f,n,function(){return this}),UA(f,"toString",function(){return"[object Generator]"}),(WA=function(){return{w:i,m:d}})()}function UA(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}UA=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){UA(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},UA(e,t,r,n)}function qA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,XA(n.key),n)}}function XA(e){var t=function(e){if("object"!=HA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=HA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==HA(t)?t:t+""}function KA(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function YA(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){KA(i,n,o,a,l,"next",e)}function l(e){KA(i,n,o,a,l,"throw",e)}a(void 0)})}}function JA(e){return(void 0!==e.umdUrl||void 0!==e.url||void 0!==e.umdLoc)&&void 0!==e.name}function ZA(e){return void 0!==e.esmUrl||void 0!==e.esmLoc}function QA(e){return new Promise(function(t,r){GA()(e,function(e,n){e?r(e):t(n.src)})})}function eO(e){return tO.apply(this,arguments)}function tO(){return(tO=YA(WA().m(function e(t){return WA().w(function(e){for(;;)switch(e.n){case 0:if(oO()){e.n=1;break}return e.a(2,QA(t));case 1:if(!globalThis.importScripts){e.n=3;break}return e.n=2,globalThis.importScripts(t);case 2:case 4:return e.a(2);case 3:throw new Error("cannot figure out how to load external JS scripts in this environment")}},e)}))).apply(this,arguments)}function rO(e){return void 0!==e.cjsUrl}function nO(e){return JA(e)?"UMD plugin ".concat(e.name):ZA(e)?"ESM plugin ".concat(e.esmUrl||e.esmLoc.uri):rO(e)?"CJS plugin ".concat(e.cjsUrl):"unknown plugin"}function oO(){return Boolean("WorkerGlobalScope"in globalThis)}var iO=function(){return e=function e(){var t,r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=[],(r=XA(r="definitions"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.fetchESM=null==i?void 0:i.fetchESM,this.fetchCJS=null==i?void 0:i.fetchCJS,this.definitions=JSON.parse(JSON.stringify(o))},t=[{key:"loadCJSPlugin",value:(a=YA(WA().m(function e(t,r){var n;return WA().w(function(e){for(;;)switch(e.n){case 0:if("http:"===(n=new URL(t.cjsUrl,r)).protocol||"https:"===n.protocol){e.n=1;break}throw new Error('Cannot load plugins using protocol "'.concat(n.protocol,'"'));case 1:if(this.fetchCJS){e.n=2;break}throw new Error("No fetchCJS callback provided");case 2:return e.a(2,this.fetchCJS(n.href))}},e,this)})),function(e,t){return a.apply(this,arguments)})},{key:"loadESMPlugin",value:(i=YA(WA().m(function e(t,r){var n,o;return WA().w(function(e){for(;;)switch(e.n){case 0:if("http:"===(n="esmUrl"in t?new URL(t.esmUrl,r):new URL(t.esmLoc.uri,t.esmLoc.baseUri)).protocol||"https:"===n.protocol){e.n=1;break}throw new Error('cannot load plugins using protocol "'.concat(n.protocol,'"'));case 1:if(this.fetchESM){e.n=2;break}throw new Error("No ESM fetcher installed");case 2:return e.n=3,this.fetchESM(n.href);case 3:if(o=e.v){e.n=4;break}throw new Error("Could not load ESM plugin: ".concat(n));case 4:return e.a(2,o)}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"loadUMDPlugin",value:(o=YA(WA().m(function e(t,r){var n,o,i,a;return WA().w(function(e){for(;;)switch(e.n){case 0:if("http:"===(n="url"in t?new URL(t.url,r):"umdUrl"in t?new URL(t.umdUrl,r):new URL(t.umdLoc.uri,t.umdLoc.baseUri)).protocol||"https:"===n.protocol){e.n=1;break}throw new Error('cannot load plugins using protocol "'.concat(n.protocol,'"'));case 1:if(o=t.name,i="JBrowsePlugin".concat(o),"undefined"!=typeof jest){e.n=3;break}return e.n=2,eO(n.href);case 2:e.n=4;break;case 3:globalThis[i]={default:we.A};case 4:if(a=globalThis[i]){e.n=5;break}throw new Error("Failed to load UMD bundle for ".concat(o,", ").concat(i," is undefined"));case 5:return e.a(2,a)}},e)})),function(e,t){return o.apply(this,arguments)})},{key:"loadPlugin",value:(n=YA(WA().m(function e(t,r){var n;return WA().w(function(e){for(;;)switch(e.n){case 0:if(!u.isElectron||!rO(t)){e.n=2;break}return e.n=1,this.loadCJSPlugin(t,r);case 1:case 3:case 5:n=e.v,e.n=8;break;case 2:if(!ZA(t)){e.n=4;break}return e.n=3,this.loadESMPlugin(t,r);case 4:if(!JA(t)){e.n=6;break}return e.n=5,this.loadUMDPlugin(t,r);case 6:if(u.isElectron||!rO(t)){e.n=7;break}throw new Error("CommonJS plugin found, but not in a NodeJS environment: ".concat(JSON.stringify(t)));case 7:throw new Error("Could not determine plugin type: ".concat(JSON.stringify(t)));case 8:if(n.default){e.n=9;break}throw new Error("".concat(nO(t)," does not have a default export, cannot load"));case 9:return e.a(2,n.default)}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"installGlobalReExports",value:function(e){return e.JBrowseExports=Object.fromEntries(Object.entries(Qo).map(function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return VA(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?VA(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return[n[0],n[1]]})),this}},{key:"load",value:(r=YA(WA().m(function e(t){var r=this;return WA().w(function(e){for(;;)if(0===e.n)return e.a(2,Promise.all(this.definitions.map(function(){var e=YA(WA().m(function e(n){var o,i;return WA().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,r.loadPlugin(n,t);case 1:return o=e.v,i=n,e.a(2,{plugin:o,definition:i})}},e)}));return function(t){return e.apply(this,arguments)}}())))},e,this)})),function(e){return r.apply(this,arguments)})}],t&&qA(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,n,o,i,a}();function aO(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof l?n:l,c=Object.create(s.prototype);return lO(c,"_invoke",function(r,n,o){var i,l,s,c=0,u=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return i=t,l=0,s=e,d.n=r,a}};function p(r,n){for(l=r,s=n,t=0;!f&&c&&!o&&t<u.length;t++){var o,i=u[t],p=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=r<2&&p<i[1])?(l=0,d.v=n,d.n=i[1]):p<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,l=0))}if(o||r>1)return a;throw f=!0,n}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&p(u,h),l=u,s=h;(t=l<2?e:s)||!f;){i||(l?l<3?(l>1&&(d.n=-1),p(l,s)):d.n=s:d.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(lO(t={},n,function(){return this}),t),f=c.prototype=l.prototype=Object.create(u);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,lO(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=c,lO(f,"constructor",c),lO(c,"constructor",s),s.displayName="GeneratorFunction",lO(c,o,"GeneratorFunction"),lO(f),lO(f,o,"Generator"),lO(f,n,function(){return this}),lO(f,"toString",function(){return"[object Generator]"}),(aO=function(){return{w:i,m:d}})()}function lO(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}lO=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var i=function(t,r){lO(e,t,function(e){return this._invoke(t,r,e)})};i("next",0),i("throw",1),i("return",2)}},lO(e,t,r,n)}function sO(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function cO(e,t){return uO.apply(this,arguments)}function uO(){var e;return e=aO().m(function e(t,r){var n;return aO().w(function(e){for(;;)if(0===e.n)return(n=new iO(t,r)).installGlobalReExports(window),e.a(2,n.load(null==r?void 0:r.baseUrl))},e)}),uO=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){sO(i,n,o,a,l,"next",e)}function l(e){sO(i,n,o,a,l,"throw",e)}a(void 0)})},uO.apply(this,arguments)}})(),i})());
229
229
  //# sourceMappingURL=react-circular-genome-view.umd.production.min.js.map