"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[7547],{77547:(n,s,i)=>{i.r(s),i.d(s,{default:()=>C});var e=i(32761),o=i(68446),r=i(59773),a=i(49823),t=i(74893),l=i(69500);const c=(0,t.A)((0,l.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning");var h=i(29499),d=i(99123),u=i(58507),g=i(5401);function x({onConfirm:n,onCancel:s,reason:i}){return(0,l.jsxs)(a.Dialog,{open:!0,maxWidth:"xl",title:"Warning",onClose:s,children:[(0,l.jsxs)(h.A,{children:[(0,l.jsx)(c,{fontSize:"large"}),(0,l.jsxs)(d.A,{children:["This link contains a cross origin config that has the following unknown plugins:",(0,l.jsx)("ul",{children:i.map((n=>(0,l.jsx)("li",{children:(0,r.lc)(n)},JSON.stringify(n))))}),"Please ensure you trust the source of this link."]})]}),(0,l.jsxs)(u.A,{children:[(0,l.jsx)(g.A,{color:"primary",variant:"contained",onClick:()=>{n()},children:"Yes, I trust it"}),(0,l.jsx)(g.A,{color:"secondary",variant:"contained",onClick:()=>{s()},children:"Cancel"})]})]})}function j({onConfirm:n,onCancel:s,reason:i}){return(0,l.jsxs)(a.Dialog,{open:!0,maxWidth:"xl",title:"Warning",onClose:s,children:[(0,l.jsxs)(h.A,{children:[(0,l.jsx)(c,{fontSize:"large"}),(0,l.jsxs)(d.A,{children:["This link contains a session that has the following unknown plugins:",(0,l.jsx)("ul",{children:i.map((n=>(0,l.jsx)("li",{children:(0,r.lc)(n)},JSON.stringify(n))))}),"Please ensure you trust the source of this session."]})]}),(0,l.jsxs)(u.A,{children:[(0,l.jsx)(g.A,{color:"primary",variant:"contained",onClick:()=>{n()},children:"Yes, I trust it"}),(0,l.jsx)(g.A,{variant:"contained",color:"secondary",onClick:()=>{s()},children:"Cancel"})]})]})}var f=i(55252);const C=(0,o.observer)((function({sessionTriaged:n,loader:s}){return"session"===n.origin?(0,l.jsx)(j,{onConfirm:async()=>{const i=JSON.parse(JSON.stringify(n.snap));await s.setSessionSnapshot({...i,id:(0,e.Ak)()},!0),s.setSessionTriaged(void 0)},onCancel:()=>{s.setBlankSession(!0),s.setSessionTriaged(void 0)},reason:n.reason}):(0,l.jsx)(x,{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,f.A)(),s.setSessionTriaged(void 0)},reason:n.reason})}))}}]);
//# sourceMappingURL=7547.cfd04b16.chunk.js.map