PageSourceSearch

https://zelesia.com/assets/McpConsent-BPlIQCmN.js

js zelesia.com collected 2026-10-02 01:51:19 UTC 1,899 bytes, 1 lines download raw bytes

1import{u as N,I as b,r as u,j as n,J as v,K as k}from"./index-CqyEMInp.js";import{T as a}from"./Trans-C0FGybb2.js";function E({workerBase:x}){const{t:s}=N(),{session:g,loading:h,signInWithGoogle:j,signInWithPassword:C,signUpWithPassword:y,signInWithEmail:w}=b(),e=new URLSearchParams(window.location.search),c=e.get("txn")??"",r=e.get("client_id")??"",t=e.get("client_name")||r,i=e.get("redirect_host")||s("mcpConsent.unknownHost"),[l,m]=u.useState(!1),[p,d]=u.useState(null);if(h)return n.jsx("p",{className:"empty",children:s("mcpConsent.loading")});if(!g)return n.jsxs("div",{className:"stack",style:{gap:12},children:[n.jsx("p",{className:"muted",style:{textAlign:"center"},children:n.jsx(a,{i18nKey:"mcpConsent.signInFirst",values:{tool:t},components:{b:n.jsx("strong",{})}})}),n.jsx(v,{onGoogle:j,onPassword:C,onSignUp:y,onMagicLink:w})]});async function f(){m(!0),d(null);try{const o=await k(r,c),I=`${x}/callback?txn=${encodeURIComponent(c)}&assertion=${encodeURIComponent(o)}&shown_name=${encodeURIComponent(t)}&shown_host=${encodeURIComponent(i)}`;window.location.assign(I)}catch(o){d(o instanceof Error?o.message:s("mcpConsent.error")),m(!1)}}return n.jsxs("div",{className:"stack",style:{maxWidth:460,margin:"40px auto",textAlign:"center",gap:14},children:[n.jsx("h2",{children:s("mcpConsent.title",{tool:t})}),n.jsx("p",{className:"muted",children:n.jsx(a,{i18nKey:"mcpConsent.readOnly",values:{tool:t},components:{b:n.jsx("strong",{})}})}),n.jsx("p",{className:"muted",style:{fontSize:13},children:n.jsx(a,{i18nKey:"mcpConsent.deliveredTo",values:{host:i},components:{b:n.jsx("strong",{})}})}),p&&n.jsx("p",{className:"err",role:"alert",children:p}),n.jsx("button",{type:"button",className:"act primary",onClick:f,disabled:l||!c,children:s(l?"mcpConsent.connecting":"mcpConsent.connect")}),n.jsx("p",{className:"muted",children:s("mcpConsent.revokeHint")})]})}export{E as McpConsent};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.