"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[3459],{43459:(n,s,i)=>{i.r(s),i.d(s,{default:()=>m});var e=i(32761),o=i(68446),r=i(67758),a=i(7552),t=i(59773),l=i(67112),c=i(69092),h=i(76218),d=i(28194),u=i(30698),g=i(69500);function p(n){const s=(0,r.c)(23),{onConfirm:i,onCancel:e,reason:o}=n,[t,p]=(0,a.useState)(!1);let y,j,x,m,C,w,v,k,S,A;return s[0]===Symbol.for("react.memo_cache_sentinel")?(y={width:800},s[0]=y):y=s[0],s[1]!==o?(j=o.map(f),s[1]=o,s[2]=j):j=s[2],s[3]!==j?(x=(0,g.jsx)("ul",{children:j}),s[3]=j,s[4]=x):x=s[4],s[5]!==t?(m=(0,g.jsx)(c.A,{onClick:()=>{p(!t)},children:"Why am I seeing this?"}),C=t?(0,g.jsx)("div",{children:"Config files can load arbitrary javascript files via plugins. For security purposes, we display this message when a cross-origin config is detected to be loading plugins that are not in our plugin store"}):null,s[5]=t,s[6]=m,s[7]=C):(m=s[6],C=s[7]),s[8]!==x||s[9]!==m||s[10]!==C?(w=(0,g.jsx)(h.A,{children:(0,g.jsxs)(d.A,{severity:"warning",style:y,children:["This link contains a cross origin config that has the following unknown plugins:",x,"Please ensure you trust the source of this link."," ",m,C]})}),s[8]=x,s[9]=m,s[10]=C,s[11]=w):w=s[11],s[12]!==i?(v=(0,g.jsx)(c.A,{color:"primary",variant:"contained",onClick:()=>{i()},children:"Yes, I trust it"}),s[12]=i,s[13]=v):v=s[13],s[14]!==e?(k=(0,g.jsx)(c.A,{color:"secondary",variant:"contained",onClick:()=>{e()},children:"Cancel"}),s[14]=e,s[15]=k):k=s[15],s[16]!==v||s[17]!==k?(S=(0,g.jsxs)(u.A,{children:[v,k]}),s[16]=v,s[17]=k,s[18]=S):S=s[18],s[19]!==e||s[20]!==w||s[21]!==S?(A=(0,g.jsxs)(l.Dialog,{open:!0,maxWidth:"xl",title:"Warning",onClose:e,children:[w,S]}),s[19]=e,s[20]=w,s[21]=S,s[22]=A):A=s[22],A}function f(n){return(0,g.jsxs)("li",{children:[(0,t.lc)(n)," - (",(0,t.Hm)(n),")"]},JSON.stringify(n))}function y(n){const s=(0,r.c)(23),{onConfirm:i,onCancel:e,reason:o}=n,[t,p]=(0,a.useState)(!1);let f,y,x,m,C,w,v,k,S,A;return s[0]===Symbol.for("react.memo_cache_sentinel")?(f={width:800},s[0]=f):f=s[0],s[1]!==o?(y=o.map(j),s[1]=o,s[2]=y):y=s[2],s[3]!==y?(x=(0,g.jsx)("ul",{children:y}),s[3]=y,s[4]=x):x=s[4],s[5]!==t?(m=(0,g.jsx)(c.A,{onClick:()=>{p(!t)},children:"Why am I seeing this?"}),C=t?(0,g.jsx)("div",{children:"Sessions can load arbitrary javascript files via session plugins. For security purposes, we display this message when sessions contain plugins that are not from our plugin store"}):null,s[5]=t,s[6]=m,s[7]=C):(m=s[6],C=s[7]),s[8]!==x||s[9]!==m||s[10]!==C?(w=(0,g.jsx)(h.A,{children:(0,g.jsxs)(d.A,{severity:"warning",style:f,children:["This link contains a session that has the following unknown plugins:",x,"Please ensure you trust the source of this session.",m,C]})}),s[8]=x,s[9]=m,s[10]=C,s[11]=w):w=s[11],s[12]!==i?(v=(0,g.jsx)(c.A,{color:"primary",variant:"contained",onClick:()=>{i()},children:"Yes, I trust it"}),s[12]=i,s[13]=v):v=s[13],s[14]!==e?(k=(0,g.jsx)(c.A,{variant:"contained",color:"secondary",onClick:()=>{e()},children:"Cancel"}),s[14]=e,s[15]=k):k=s[15],s[16]!==v||s[17]!==k?(S=(0,g.jsxs)(u.A,{children:[v,k]}),s[16]=v,s[17]=k,s[18]=S):S=s[18],s[19]!==e||s[20]!==w||s[21]!==S?(A=(0,g.jsxs)(l.Dialog,{open:!0,maxWidth:"xl",title:"Warning",onClose:e,children:[w,S]}),s[19]=e,s[20]=w,s[21]=S,s[22]=A):A=s[22],A}function j(n){return(0,g.jsxs)("li",{children:[(0,t.lc)(n)," - (",(0,t.Hm)(n),")"]},JSON.stringify(n))}var x=i(55252);const m=(0,o.observer)(function({sessionTriaged:n,loader:s}){return"session"===n.origin?(0,g.jsx)(y,{onConfirm:async()=>{const i=JSON.parse(JSON.stringify(n.snap));await s.loadSession({...i,id:(0,e.Ak)()},!0),s.setSessionTriaged(void 0)},onCancel:()=>{s.setBlankSession(!0),s.setSessionTriaged(void 0)},reason:n.reason}):(0,g.jsx)(p,{onConfirm:async()=>{const i=JSON.parse(JSON.stringify(n.snap));await s.fetchPlugins(i),s.setConfigSnapshot({...i,id:(0,e.Ak)()}),s.setSessionTriaged(void 0)},onCancel:async()=>{await(0,x.A)(),s.setSessionTriaged(void 0)},reason:n.reason})})}}]);
//# sourceMappingURL=3459.2f3c4197.chunk.js.map