view x/static/js/8984.1a816123.chunk.js @ 125:49f3d3878413 draft

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

"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8984],{28055:(e,t,n)=>{n.d(t,{A:()=>m});var r=n(7552),a=n(75785),l=n(503),i=n.n(l),s=n(87731),c=n(49823);const o=(0,a.n9)()((e=>({fieldValue:{wordBreak:"break-word",maxHeight:300,fontSize:12,padding:e.spacing(.5),overflow:"auto"}})));function m({value:e}){const{classes:t}=o(),n=/^https?:\/\//.exec(`${e}`);return r.createElement("div",{className:t.fieldValue},r.isValidElement(e)?e:n?r.createElement(s.A,{href:`${e}`},`${e}`):r.createElement(c.SanitizedHTML,{html:i()(e)?JSON.stringify(e):String(e)}))}},36441:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(7552),a=n(89003);const l=(0,n(75785).n9)()((e=>({fieldDescription:{"&:hover":{background:"dark"===e.palette.mode?"#e65100":"yellow"}},fieldName:{wordBreak:"break-all",minWidth:90,borderBottom:"1px solid #0003",fontSize:12,background:e.palette.action.disabledBackground,marginRight:e.spacing(1),padding:e.spacing(.5)}})));function i({description:e,name:t,width:n,prefix:i=[]}){const{classes:s,cx:c}=l(),o=[...i,t].join(".");return e?r.createElement(a.A,{title:e,placement:"left"},r.createElement("div",{className:c(s.fieldDescription,s.fieldName)},o)):r.createElement("div",{className:s.fieldName,style:{width:n}},o)}},32106:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(7552),a=n(75785),l=n(36441),i=n(28055);const s=(0,a.n9)()({field:{display:"flex",flexWrap:"wrap"}});function c({name:e,value:t,description:n,prefix:a,width:c}){const{classes:o}=s();return null!=t?r.createElement("div",{className:o.field},r.createElement(l.A,{prefix:a,description:n,name:e,width:c}),r.createElement(i.A,{value:t})):null}},68984:(e,t,n)=>{n.r(t),n.d(t,{Attributes:()=>U,BaseAttributes:()=>Y,BaseCard:()=>V,BaseCoreDetails:()=>Q,FeatureDetails:()=>K,default:()=>Z});var r=n(7552),a=n(82725),l=n(63011),i=n(41578),s=n(36715),c=n(63165),o=n(24387),m=n(75785),u=n(68446),d=n(7720),f=n(99546),p=n(49823),E=n(48171),g=n(5401),h=n(61723),b=n(25914);const v=(0,r.lazy)((()=>n.e(7428).then(n.bind(n,27428)))),x=(0,r.lazy)((()=>n.e(8624).then(n.bind(n,38624)))),y=(0,m.n9)()((e=>({formControl:{margin:0},container:{marginTop:e.spacing(4),marginBottom:e.spacing(4)}}))),A=(0,u.observer)((function({model:e,feature:t}){const{classes:n}=y(),[a,l]=(0,r.useState)(!1);return r.createElement("div",{className:n.container},r.createElement(E.A,{className:n.formControl},r.createElement(g.A,{variant:"contained",onClick:()=>{l(!a)}},a?"Hide feature sequence":"Show feature sequence")),r.createElement(h.A,{onClick:()=>{(0,f.getSession)(e).queueDialog((e=>[x,{handleClose:e}]))}},r.createElement(b.A,null)),a?r.createElement(r.Suspense,{fallback:r.createElement(p.LoadingEllipses,null)},r.createElement(v,{key:t.uniqueId,model:e,feature:t})):null)}));var w=n(32106),k=n(503),S=n.n(k),N=n(373);function O(e,t,n){return[(0,N.SX)(`${e||t||""}`),`${n}`].filter((e=>!!e)).join(" - ")}var $=n(85676),j=n(76157),_=n(33371),C=n(32808),T=n(36441);const D=(0,m.n9)()((e=>({margin:{marginBottom:e.spacing(4)},cell:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})));function B({value:e,prefix:t,name:n}){const{classes:a}=D(),[l,i]=(0,r.useState)(!1),c=Object.keys(e[0]).sort(),o=new Set(c),m=Object.entries(e).map((([e,t])=>{const{id:n,...r}=t;return{id:e,identifier:n,...r}}));for(const t of e)for(const e of Object.keys(t))o.add(e);let u;o.has("id")?(o.delete("id"),u=["identifier",...o]):u=[...o];const d=u.map((e=>(0,f.measureGridWidth)(m.map((t=>t[e])))));return o.size<c.length+5?r.createElement("div",{className:a.margin},r.createElement(T.A,{prefix:t,name:n}),r.createElement(_.A,{control:r.createElement(C.A,{checked:l,onChange:e=>{i(e.target.checked)}}),label:r.createElement(s.A,{variant:"body2"},"Show options")}),r.createElement($.z,{autoHeight:!0,disableRowSelectionOnClick:!0,rows:m,rowHeight:20,columnHeaderHeight:35,hideFooter:m.length<25,slots:{toolbar:l?j.O:null},slotProps:{toolbar:{printOptions:{disableToolbarButton:!0}}},columns:u.map(((e,t)=>({field:e,renderCell:e=>{const t=e.value;return r.createElement("div",{className:a.cell},r.createElement(p.SanitizedHTML,{html:(0,f.getStr)(t||"")}))},width:d[t]})))})):null}var F=n(28055);const L=(0,m.n9)()((e=>({field:{display:"flex",flexWrap:"wrap"},fieldSubvalue:{wordBreak:"break-word",maxHeight:300,padding:e.spacing(.5),border:`1px solid ${e.palette.action.selected}`,boxSizing:"border-box",overflow:"auto"}})));function H({name:e,value:t,description:n,prefix:a=[]}){const{classes:l}=L();return 1===t.length?S()(t[0])?r.createElement(U,{attributes:t[0],prefix:[...a,e]}):r.createElement("div",{className:l.field},r.createElement(T.A,{prefix:a,description:n,name:e}),r.createElement(F.A,{value:t[0]})):t.every((e=>S()(e)))?r.createElement(r.Fragment,null,t.map(((t,n)=>r.createElement(U,{key:`${JSON.stringify(t)}-${n}`,attributes:t,prefix:[...a,`${e}-${n}`]})))):r.createElement("div",{className:l.field},r.createElement(T.A,{prefix:a,description:n,name:e}),t.map(((e,t)=>r.createElement("div",{key:`${JSON.stringify(e)}-${t}`,className:l.fieldSubvalue},r.createElement(F.A,{value:e})))))}const q=(0,m.n9)()({field:{display:"flex",flexWrap:"wrap"}});function z({value:e,prefix:t,name:n}){const{classes:a}=q(),{uri:l,baseUri:i=""}=e;let s;try{s=new URL(l,i).href}catch(e){s=l}return r.createElement("div",{className:a.field},r.createElement(T.A,{prefix:t,name:n}),r.createElement(F.A,{value:s}))}function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I.apply(null,arguments)}const P=170,M=["__jbrowsefmt","length","position","subfeatures","uniqueId","exonFrames","parentId","thickStart","thickEnd"];function U(e){const{attributes:t,omit:n=[],omitSingleLevel:a=[],descriptions:l,formatter:i=e=>e,hideUris:s,prefix:c=[]}=e,o=new Set([...n,...M,...a]),{__jbrowsefmt:m,...u}=t,d={...u,...m},p=function(e,t){return Math.ceil((0,f.max)(e.map((e=>(0,f.measureText)([...t,e[0]].join("."),12)))))+10}(Object.entries(d).filter((([e,t])=>void 0!==t&&!o.has(e))),c);return r.createElement(r.Fragment,null,Object.entries(d).filter((([e,t])=>void 0!==t&&!o.has(e))).map((([t,n])=>{const a=function(e,t={}){let n=t;return e.forEach((e=>{S()(n)&&(n=n[e])})),"string"==typeof n?n:S()(n)&&"string"==typeof n.Description?n.Description:void 0}([...c,t],l);if(Array.isArray(n))return n.length>1&&n.every((e=>S()(e)))?r.createElement(B,{key:t,name:t,prefix:c,value:n}):r.createElement(H,{key:t,name:t,value:n,description:a,prefix:c});if(S()(n)){const{omitSingleLevel:a,...i}=e;return(0,f.isUriLocation)(n)?s?null:r.createElement(z,{key:t,name:t,prefix:c,value:n}):r.createElement(U,I({key:t},i,{attributes:n,descriptions:l,prefix:[...c,t]}))}return r.createElement(w.A,{key:t,name:t,value:i(n,t),description:a,prefix:c,width:Math.min(p,P)})})))}function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R.apply(null,arguments)}const J=["name","start","end","strand","refName","description","type"],W=(0,m.n9)()((e=>({expansionPanelDetails:{display:"block",padding:e.spacing(1)},icon:{color:e.palette.tertiary.contrastText||"#fff"}})));function V({children:e,title:t,defaultExpanded:n=!0}){const{classes:a}=W();return r.createElement(l.A,{defaultExpanded:n},r.createElement(i.A,{expandIcon:r.createElement(d.A,{className:a.icon})},r.createElement(s.A,{variant:"button"},t)),r.createElement(c.A,{className:a.expansionPanelDetails},e))}function X(e){const{feature:t}=e,n=t.strand,a={"-1":"-",0:"",1:"+"},l=a[n]?`(${a[n]})`:"",i=(0,f.assembleLocString)(t);return r.createElement(r.Fragment,null,`${i} ${l}`)}function G(e){const{feature:t}=e,n=t,a={...n,...n.__jbrowsefmt},{start:l,end:i}=a,s={...a,length:(0,f.toLocale)(i-l)};return r.createElement(r.Fragment,null,r.createElement(w.A,{name:"Position",value:r.createElement(X,R({},e,{feature:a}))}),Object.entries({description:"Description",name:"Name",length:"Length",type:"Type"}).map((([e,t])=>[t,s[e]])).filter((([,e])=>null!=e)).map((([e,t])=>r.createElement(w.A,{key:e,name:e,value:t}))))}const Q=e=>{const{title:t="Primary data"}=e;return r.createElement(V,R({},e,{title:t}),r.createElement(G,e))},Y=e=>{const{feature:t}=e;return r.createElement(V,R({},e,{title:"Attributes"}),r.createElement(U,R({},e,{attributes:t})))};function K(e){const{omit:t=[],model:n,feature:l,depth:i=0}=e,{maxDepth:c}=n,{mate:m,name:u="",id:d="",type:E="",subfeatures:g,uniqueId:h}=l,b=(0,f.getEnv)(n).pluginManager,v=(0,f.getSession)(n),x=b.evaluateExtensionPoint("Core-extraFeaturePanel",null,{session:v,feature:l,model:n}),y=m;return r.createElement(V,{title:O(u,d,E)},r.createElement(s.A,null,"Core details"),r.createElement(G,e),y?r.createElement(r.Fragment,null,r.createElement(o.A,null),r.createElement(s.A,null,"Mate details"),r.createElement(G,R({},e,{feature:{...y,start:y.start,end:y.end,refName:y.refName,uniqueId:`${h}-mate`}}))):null,r.createElement(o.A,null),r.createElement(s.A,null,"Attributes"),r.createElement(U,R({attributes:l},e,{omit:t,omitSingleLevel:J})),r.createElement(a.tH,{FallbackComponent:e=>r.createElement(p.ErrorMessage,{error:e.error})},r.createElement(A,e)),x?r.createElement(r.Fragment,null,r.createElement(o.A,null),r.createElement(V,{title:x.name},r.createElement(x.Component,e))):null,i<c&&g?.length?r.createElement(V,{title:"Subfeatures",defaultExpanded:i<1},g.map(((e,t)=>r.createElement(K,{key:JSON.stringify(e),feature:{...e,uniqueId:`${h}_${t}`},model:n,depth:i+1})))):null)}const Z=(0,u.observer)((function({model:e}){const{error:t,featureData:n}=e;if(t)return r.createElement(p.ErrorMessage,{error:t});if(!n)return null;const a=JSON.parse(JSON.stringify(n,((e,t)=>void 0===t?null:t)));return l=a,0===Object.keys(l).length?null:r.createElement(K,{model:e,feature:a});var l}))},373:(e,t,n)=>{function r(e,t){return e.map((e=>t.slice(e.start,e.end))).join("")}function a(e){return`${e.start}-${e.end}`}function l(e){return e.filter(((e,t,n)=>!t||a(e)!==a(n[t-1])))}function i(e,t){return e.map((e=>({...e,start:t-e.end,end:t-e.start}))).sort(((e,t)=>e.start-t.start))}function s(e,t){if(!e.length)return[];const n=e.at(0),r=e.at(-1),a=t.findIndex((e=>e.end>=n.start&&e.start<=n.start)),l=t.findIndex((e=>e.end>=r.end&&e.start<=r.end)),i=t[l],s=t[a];return[...[...t.slice(0,a),{start:s.start,end:n.start}].map((e=>({...e,type:"five_prime_UTR"}))),...[{start:r.end,end:i.end},...t.slice(l+1)].map((e=>({...e,type:"three_prime_UTR"})))]}function c(e,t){if(!e.length)return[];const n=e.at(0),r=e.at(-1);return[...[{start:t.start,end:n.start}].map((e=>({...e,type:"five_prime_UTR"}))),...[{start:r.end,end:t.end}].map((e=>({...e,type:"three_prime_UTR"})))]}function o(e){return e.length>20?`${e.slice(0,20)}...`:e}n.d(t,{Qq:()=>l,SX:()=>o,V4:()=>c,YC:()=>i,h8:()=>s,o9:()=>r})}}]);
//# sourceMappingURL=8984.1a816123.chunk.js.map