@mcpjam/inspector 3.27.0 → 3.27.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.
- package/dist/client/assets/{CaniuseCapabilityPage-CXmikV_v.js → CaniuseCapabilityPage-BGCx_CV1.js} +4 -4
- package/dist/client/assets/{CaniuseLoadingScreen-CISUL_K4.js → CaniuseLoadingScreen-CnLJTk-6.js} +2 -2
- package/dist/client/assets/{PosthogUtils-E_cG1Twh.js → PosthogUtils-BnkWsJl1.js} +1 -1
- package/dist/client/assets/{PosthogUtils-DE_PkwDN.js → PosthogUtils-CreNC30F.js} +2 -2
- package/dist/client/assets/{access-link-C0MWhbv8.js → access-link-CiqZlBT_.js} +2 -2
- package/dist/client/assets/{app-bootstrap-DfSpCiag.js → app-bootstrap-Dihy9pBm.js} +328 -328
- package/dist/client/assets/{app-navigation-BQGUR9cb.js → app-navigation-BzZWduTQ.js} +2 -2
- package/dist/client/assets/{bundle-mjs-DKP7sq7T.js → bundle-mjs-C4gHyVze.js} +2 -2
- package/dist/client/assets/{caniuse-bootstrap-D6d1Susz.js → caniuse-bootstrap-DClGA--s.js} +3 -3
- package/dist/client/assets/{chunk-D32TOXHM-D2CUPCH8.js → chunk-D32TOXHM-BM6p8aoA.js} +5 -5
- package/dist/client/assets/{dead-clicks-autocapture-DvbdThCp.js → dead-clicks-autocapture-DMIvXYDI.js} +2 -2
- package/dist/client/assets/{error-reporting-B_hxqtsN.js → error-reporting-BufzMdax.js} +1 -1
- package/dist/client/assets/{error-reporting-CJClTLWK.js → error-reporting-C3V1rL02.js} +2 -2
- package/dist/client/assets/{exception-autocapture-CkcPU7XW.js → exception-autocapture-D42Ql1CZ.js} +2 -2
- package/dist/client/assets/{feature-flags-BUIQpHKT.js → feature-flags-9Kzm95Iy.js} +3 -3
- package/dist/client/assets/{first-run-oauth-return-l9GCZrqg.js → first-run-oauth-return-DBF8M446.js} +2 -2
- package/dist/client/assets/{highlighted-body-KQOG7T2V-uT92T9zL.js → highlighted-body-KQOG7T2V-BDDk3j-o.js} +2 -2
- package/dist/client/assets/{index-ByP2kceG.js → index-CB2B0gyI.js} +3 -3
- package/dist/client/assets/{jszip.min-C5LLiUXa.js → jszip.min-D0H-wysy.js} +2 -2
- package/dist/client/assets/{mcp-init-BIoRq6yl.js → mcp-init-D384t3us.js} +3 -3
- package/dist/client/assets/{mermaid-MCJ5UELQ-BCP5Oj92.js → mermaid-MCJ5UELQ-DXZIWzsB.js} +1 -1
- package/dist/client/assets/{module-Wq_OenZL.js → module-BHBrpZ4U.js} +2 -2
- package/dist/client/assets/{module-D3s7YCoh.js → module-CmXaunIz.js} +1 -1
- package/dist/client/assets/posthog-bundled-extensions-CrY82kI1.js +3 -0
- package/dist/client/assets/{posthog-bundled-extensions-BIjySVP-.js → posthog-bundled-extensions-DUscOFM-.js} +1 -1
- package/dist/client/assets/{posthog-recorder-DTh3r-Ko.js → posthog-recorder-PnXQoK1P.js} +2 -2
- package/dist/client/assets/{preload-helper-BN6vHXe1.js → preload-helper-Dk-R02bM.js} +1 -1
- package/dist/client/assets/{project-route-CjZmQY5n.js → project-route-CwOywjoT.js} +2 -2
- package/dist/client/assets/{react-dom-DtL8G3gn.js → react-dom-s4nupq_N.js} +2 -2
- package/dist/client/assets/{rolldown-runtime-KtSMB9jY.js → rolldown-runtime-Df2-koJ7.js} +1 -1
- package/dist/client/assets/{server-feature-flags-wgvQSqd5.js → server-feature-flags-ByZjY7fi.js} +2 -2
- package/dist/client/assets/{server-feature-flags-BBH-SYjw.js → server-feature-flags-CqB4sk67.js} +1 -1
- package/dist/client/assets/{session-revoked-HpzxsCkX.js → session-revoked-B_iZLaTD.js} +2 -2
- package/dist/client/assets/{surveys-BYfLymeD.js → surveys-B4xlE-Cz.js} +2 -2
- package/dist/client/assets/telemetry-files-620cc3a6060f3829.js +1 -0
- package/dist/client/assets/{trace-timeline-BFtz0cI8.js → trace-timeline-BEzP_FzL.js} +1 -1
- package/dist/client/assets/{trace-timeline-CRxEZYCU.js → trace-timeline-BWWuYM0j.js} +2 -2
- package/dist/client/assets/{web-vitals-C1IvwuFq.js → web-vitals-jdhe8VpD.js} +2 -2
- package/dist/client/index.html +12 -12
- package/dist/server/harness-install-cli.js +3 -3
- package/dist/server/index.js +2 -2
- package/package.json +2 -2
- package/dist/client/assets/posthog-bundled-extensions-CQjB_Dfr.js +0 -3
- package/dist/client/assets/telemetry-files-5758eea65e761de9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as o,M as n,N as r,O as i,Ot as d,W as g,a as E,c as l,d as p,f as b,i as c,l as f,n as P,o as S,p as _,r as u,s as O,t as I,u as T}from"./PosthogUtils-
|
|
1
|
+
import{D as o,M as n,N as r,O as i,Ot as d,W as g,a as E,c as l,d as p,f as b,i as c,l as f,n as P,o as S,p as _,r as u,s as O,t as I,u as T}from"./PosthogUtils-CreNC30F.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"3.27.2"};var s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="80c2e73e-1981-45e0-8680-78bdb347801a",e._sentryDebugIdIdentifier="sentry-dbid-80c2e73e-1981-45e0-8680-78bdb347801a")}catch{}})();export{I as LANDING_ANALYTICS_HOSTS,o as SECRET_SURFACE_ATTRIBUTE,i as SESSION_RECORDING_OPTIONS,d as VITE_PUBLIC_POSTHOG_KEY,P as detectEnvironment,u as detectPlatform,c as dropInjectedScriptException,E as getPageviewCaptureOptions,S as getPostHogApiHost,O as getPostHogKey,l as getPostHogOptions,n as isCredentialBearingPath,r as isErrorCaptureSurface,f as isPostHogBooleanFlagOn,T as isPostHogDisabled,p as options,b as scrubPostHogPersistence,g as scrubSensitiveUrl,_ as standardEventProps};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{o as lt}from"./rolldown-runtime-KtSMB9jY.js";import{D as dt,N as ft,P as pt,S as Ue,_ as gt,a as _t,g as mt,k as yt,o as St,u as xe,v as ht,x as de}from"./project-route-CjZmQY5n.js";import{t as Et}from"./react-dom-DtL8G3gn.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"3.27.0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e4460c99-a564-4e75-a4ab-9af47e6156de",e._sentryDebugIdIdentifier="sentry-dbid-e4460c99-a564-4e75-a4ab-9af47e6156de")}catch{}})();var Ge="phc_dTOPniyUNU2kD8Jx8yHMXSqiZHM8I91uWopTMX6EBE9",ve=e=>{let t;const r=new Set,n=(c,U)=>{const m=typeof c=="function"?c(t):c;if(!Object.is(m,t)){const u=t;t=U??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(a=>a(t,u))}},s=()=>t,l={setState:n,getState:s,getInitialState:()=>_,subscribe:c=>(r.add(c),()=>r.delete(c))},_=t=e(n,s,l);return l},je=(e=>e?ve(e):ve);function re(){try{if(typeof crypto.randomUUID=="function")return crypto.randomUUID()}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`}var fe=lt(Et(),1);function we(e){if(typeof e!="string"||e.trim().length===0)return null;try{const t=new URL(e.trim());return t.protocol!=="http:"&&t.protocol!=="https:"?null:t.origin}catch{return null}}function I(){if(typeof window>"u")return null;const e=window.__MCP_RUNTIME_CONFIG__;return!e||typeof e!="object"?null:e}function M(e){return typeof e=="string"&&e.trim()?e:void 0}function Vr(){return M(I()?.convexUrl)}function qr(){return M(I()?.convexSiteUrl)}function Wr(){return M(I()?.workosClientId)}function Jr(){return M(I()?.workosApiHostname)}function vt(){return M(I()?.sandboxOrigin)}function pe(){return I()?.doNotTrack===!0}function Xr(){return I()?.platformAgentDisabled!==!0}var Zr=we(vt())??we(void 0),Qr="write",Te=null,wt=String(101376);function en(){return Te?`https://discord.com/oauth2/authorize?${new URLSearchParams({client_id:Te,scope:"bot applications.commands",permissions:wt}).toString()}`:null}var $="mcpjam.project-transition.v1",tn=18e5;function H(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.sourceActor=="string"&&/^(guest|workos):.{1,200}$/.test(t.sourceActor)&&typeof t.path=="string"&&_t(t.path)&&typeof t.requestedProjectId=="string"&&St(t.requestedProjectId)&&xe(t.path)===t.requestedProjectId&&typeof t.attempt=="string"&&/^[a-zA-Z0-9-]{1,80}$/.test(t.attempt)&&Number.isFinite(t.storedAt)&&t.storedAt<=Date.now()+1e3&&Date.now()-t.storedAt<18e5}function Tt(e=()=>sessionStorage){let t=null;try{const i=JSON.parse(e().getItem($)??"null");H(i)?t=i:e().removeItem($)}catch{}const r=je(()=>({marker:t}));let n=null;const s=i=>{if(!(i&&r.getState().marker?.attempt!==i)){r.setState({marker:null});try{e().removeItem($)}catch{}}},o=(i,l=re())=>{if(!n||n.path!==i)return;const _=r.getState().marker;if(_?.path===i&&H(_))return;const c={path:i,requestedProjectId:xe(i),attempt:l,storedAt:Date.now(),sourceActor:n.actor};if(H(c)){n=null;try{e().setItem($,JSON.stringify(c))}catch{}r.setState({marker:c})}};return{store:r,clear:s,arm:o,isValid:H,remember(i,l){n={path:i,actor:l}},observeActor(i,l){n&&n.actor!==i&&(i.startsWith("workos:")&&o(l),n=null)}}}var bt=Tt();function It(){return window.location.pathname+window.location.search+window.location.hash}var P="mcpjam.guest-transition.v1",be=`${P}.reloaded`,Ie=`${P}.handled`,ee=15e3,K=6e4;function At(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.guestId!="string"||!t.guestId||t.guestId.length>200||typeof t.attempt!="string"||!/^[a-zA-Z0-9-]{1,80}$/.test(t.attempt)||!Number.isFinite(t.startedAt)||t.startedAt>Date.now()+1e3||Date.now()-t.startedAt>K||!["started","completed","failed"].includes(t.phase)?null:{guestId:t.guestId,attempt:t.attempt,startedAt:t.startedAt,phase:t.phase}}function kt(e){const t=je(()=>({status:"idle",attempt:null})),r=new Map;try{const u=JSON.parse(sessionStorage.getItem(Ie)??"[]");if(Array.isArray(u))for(const a of u)Array.isArray(a)&&typeof a[0]=="string"&&/^[a-zA-Z0-9-]{1,80}$/.test(a[0])&&Number.isFinite(a[1])&&a[1]<=Date.now()+1e3&&Date.now()-a[1]<=K&&r.set(a[0],a[1])}catch{}const n=u=>{for(const[a,A]of r)Date.now()-A>K&&r.delete(a);r.set(u.attempt,u.startedAt);try{sessionStorage.setItem(Ie,JSON.stringify([...r]))}catch{}};let s=null,o=null,i;const l=new Map,_=()=>{clearTimeout(i),o=null,t.setState({status:"idle",attempt:null})},c=()=>{clearTimeout(i),t.setState({status:"failed"})},U=u=>{if(u&&!e.allowAutomaticReload()){c();return}t.setState({status:"waiting"}),clearTimeout(i),i=setTimeout(c,ee);try{e.reload()}catch{c()}},m=u=>{const a=At(u);!a||!s||a.guestId!==s||r.has(a.attempt)||o&&(a.startedAt<o.startedAt||a.startedAt===o.startedAt&&a.attempt!==o.attempt)||o?.attempt===a.attempt&&o.phase!=="started"||(e.beforeTransition?.(a),o=a,clearTimeout(i),t.setState({status:"waiting",attempt:a.attempt}),a.phase==="failed"?(c(),n(a)):a.phase==="completed"?(n(a),U(!0)):i=setTimeout(()=>{c(),n(a)},Math.max(0,ee-(Date.now()-a.startedAt))))};return{store:t,setGuest(u,a=!0){if(u!==s){s=u;const A=t.getState().status!=="idle";clearTimeout(i),o=null,A&&!a?(t.setState({status:"waiting",attempt:null}),i=setTimeout(c,ee)):_()}else!o&&a&&t.getState().status!=="idle"&&_()},getGuest:()=>s,receive:m,begin(u){let a=l.get(u);if(!a){a={message:{guestId:u,attempt:re(),startedAt:Date.now(),phase:"started"},count:0,failed:!1},l.set(u,a);try{e.publish(a.message)}catch{}}a.count++;let A=!1;return ct=>{if(!A&&(A=!0,a.failed||=!ct,!--a.count)){l.delete(u);try{e.publish({...a.message,phase:a.failed?"failed":"completed"})}catch{}}}},revoked(u){return u&&u!==s?!0:s?(t.getState().status!=="idle"||m({guestId:s,attempt:re(),startedAt:Date.now(),phase:"completed"}),!0):!1},retry:()=>U(!1),dispose:_}}var G,h=kt({beforeTransition:e=>bt.arm(It(),e.attempt),publish(e){try{G?.postMessage(e)}catch{}try{localStorage.setItem(P,JSON.stringify(e))}catch{}},reload:()=>{const e=h.getGuest();queueMicrotask(()=>{h.getGuest()===e&&window.location.reload()})},allowAutomaticReload(){try{const e=Number(sessionStorage.getItem(be));return e&&Date.now()-e<K?!1:(sessionStorage.setItem(be,String(Date.now())),!0)}catch{return!1}}});function rn(){try{G=new BroadcastChannel(P),G.onmessage=r=>(0,fe.flushSync)(()=>h.receive(r.data))}catch{}const e=Rt,t=r=>{r.key===P&&e()};return window.addEventListener("storage",t),window.addEventListener("pageshow",e),window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),e(),()=>{G?.close(),G=void 0,window.removeEventListener("storage",t),window.removeEventListener("pageshow",e),window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}}function nn(e){const t=h.getGuest();return e&&e!==t?!0:t?(queueMicrotask(()=>{h.getGuest()===t&&(0,fe.flushSync)(()=>h.revoked(t))}),!0):!1}function Rt(){queueMicrotask(()=>{try{(0,fe.flushSync)(()=>h.receive(JSON.parse(localStorage.getItem(P)??"null")))}catch{}})}var Ot=["timeout","network","upstream_status","bad_json","bad_payload","configuration"];var Ct=["guest_session/exhausted","guest_session/unreachable","guest_session/bad_response","guest_session/http_4xx","guest_session/http_5xx","guest_session/timeout","guest_session/network","guest_session/upstream_status","guest_session/bad_json","guest_session/bad_payload","guest_session/configuration","guest_session/network/SELF_SIGNED_CERT_IN_CHAIN","guest_session/network/UNABLE_TO_GET_ISSUER_CERT_LOCALLY","guest_session/network/UNABLE_TO_VERIFY_LEAF_SIGNATURE","guest_session/network/DEPTH_ZERO_SELF_SIGNED_CERT","guest_session/network/CERT_HAS_EXPIRED","guest_session/network/ERR_TLS_CERT_ALTNAME_INVALID","guest_session/network/ECONNREFUSED","guest_session/network/ECONNRESET","guest_session/network/ENOTFOUND","guest_session/network/EAI_AGAIN","guest_session/network/ETIMEDOUT","guest_session/network/EHOSTUNREACH","guest_session/network/ENETUNREACH","guest_session/network/UND_ERR_CONNECT_TIMEOUT","guest_session/network/UND_ERR_SOCKET"];function Pt(e){return Ct.includes(e)}function sn(e){if(!e)return"guest_session/exhausted";const{httpStatus:t,details:r}=e;if(r){const n=`guest_session/network/${r.networkCode}`;return r.reason==="network"&&Pt(n)?n:`guest_session/${r.reason}`}return t===void 0?"guest_session/unreachable":t<400?"guest_session/bad_response":t<500?"guest_session/http_4xx":"guest_session/http_5xx"}var Nt=/^[A-Z][A-Z0-9_]{1,63}$/;function Lt(e){return typeof e=="string"&&Ot.includes(e)}function Dt(e){if(!e||typeof e!="object")return;const{reason:t,upstreamStatus:r,networkCode:n}=e;if(!Lt(t))return;const s={reason:t};return typeof r=="number"&&Number.isInteger(r)&&r>=100&&r<=599&&(s.upstreamStatus=r),typeof n=="string"&&Nt.test(n)&&(s.networkCode=n),s}var R=class extends Error{status;upstreamFailure;constructor(e,t,r,n){super(e,n===void 0?void 0:{cause:n}),this.name="GuestSessionRequestError",this.status=t,this.upstreamFailure=r}},Fe=class extends R{},C=class extends R{retryAfterMs;reason;constructor(e,t){super("Couldn't start a guest session. Sign in to continue."),this.name="GuestSessionRefusedError",this.retryAfterMs=e,this.reason=t}};function Ut(e){return e instanceof Fe||e instanceof C&&e.reason==="guest_access_disabled"}var Me="mcpjam_guest_session_v1",N="mcpjam_guest_activated",W=3e5,d=null,y=null,S=null,T=null,$e=!1,E=0,ne=new Set,se=6e5,O=null,x=null;function He(){for(const e of ne)e()}function ge(e){x!==null&&(clearTimeout(x),x=null),O=e,e&&(x=setTimeout(()=>{x=null,O===e&&ge(null)},Math.max(0,e.until-Date.now()))),He()}function Be(){return O&&O.until<=Date.now()&&(O=null),O}function J(e){const t=d?.guestId??null,r=d?.token??null;d=e,(t!==(d?.guestId??null)||r!==(e?.token??null))&&He()}function on(e){return ne.add(e),()=>{ne.delete(e)}}function an(e){if(e)try{localStorage.getItem(N)!==e&&localStorage.setItem(N,e)}catch{}}function un(e){if(!e)return!1;try{return localStorage.getItem(N)===e}catch{return!1}}function cn(e){try{localStorage.getItem(N)===e&&localStorage.removeItem(N)}catch{}}function ln(){try{return localStorage.getItem(N)}catch{return null}}function xt(){if(typeof window>"u")return;const e=window.__MCP_GUEST_BOOTSTRAP__;try{delete window.__MCP_GUEST_BOOTSTRAP__}catch{window.__MCP_GUEST_BOOTSTRAP__=void 0}e&&(typeof e.token!="string"||e.token.length===0||typeof e.expiresAt!="number"||typeof e.guestId!="string"||e.guestId.length===0||e.expiresAt-W<=Date.now()||(d={guestId:e.guestId,token:e.token,expiresAt:e.expiresAt}))}xt();function _e(){if($e)return null;try{const e=localStorage.getItem(Me);if(!e)return null;const t=JSON.parse(e);return typeof t.token=="string"&&t.token.length>0?t.token:null}catch{return null}}function Ae(){try{localStorage.removeItem(Me)}catch{}$e=!0}var Gt=1e3;async function jt(e){if(typeof e.json!="function")return;let t;try{const r=await Promise.race([e.json(),new Promise(n=>{t=setTimeout(()=>n(void 0),Gt)})]);return r&&typeof r=="object"?r:void 0}catch{return}finally{t!==void 0&&clearTimeout(t)}}function Ft(e){if(!e)return"";const t=e.networkCode??(e.upstreamStatus!==void 0?String(e.upstreamStatus):void 0);return` (${e.reason}${t?` ${t}`:""})`}function Mt(e){const t=e?Number.parseInt(e,10):NaN;return Number.isFinite(t)&&t>0?t*1e3:se}async function me(e,t){const r={mode:e};t&&(r.legacyToken=t);let n;try{n=await fetch("/api/web/guest-session",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}catch(o){throw new R(o instanceof Error?o.message:"network error",void 0,void 0,o)}if(n.status===204)return t&&Ae(),null;if(n.status===429)throw new C(Mt(n.headers?.get?.("retry-after")),"rate_limited");if(n.status===403&&n.headers?.get?.("x-mcpjam-guest-refusal")==="GUEST_ACCESS_DISABLED")throw new C(se,"guest_access_disabled");if(!n.ok){const o=await jt(n);if(n.status===403&&o?.code==="GUEST_ACCESS_DISABLED")throw new C(se,"guest_access_disabled");const i=Dt(o?.details);throw new(n.status===403&&n.headers?.get?.("x-mcpjam-guest-refusal")==="GUEST_SESSION_REVOKED"?Fe:R)(`guest-session request failed: ${n.status} ${n.statusText}${Ft(i)}`,n.status,i)}let s;try{s=await n.json()}catch(o){throw new R(`guest-session response was not valid JSON: ${o instanceof Error?o.message:String(o)}`,n.status)}if(typeof s?.token!="string"||typeof s?.expiresAt!="number")throw new R("guest-session response missing token or expiresAt",n.status);return t&&Ae(),s}async function $t(){if(d&&d.expiresAt-W>Date.now())return d;if(Be())return null;if(y)return y;const e=_e(),t=E;let r=Promise.resolve(null);return r=(async()=>{try{const n=await me("lookup_or_create",e);return n&&t===E&&J(n),n}catch(n){if(n instanceof C)return ge({until:Date.now()+n.retryAfterMs,reason:n.reason}),null;throw console.error("Failed to create guest session:",n),n}finally{y===r&&(y=null)}})(),y=r,r.catch(()=>{}),y}async function Ht(){try{return await $t()}catch{return null}}async function dn(){return(await Ht())?.token??null}function oe(){return d&&d.expiresAt-W>Date.now()?d:null}async function Bt(){if(d&&d.expiresAt-W>Date.now())return d.token;if(S)return(await S)?.token??null;const e=_e(),t=E;let r=Promise.resolve(null);return r=(async()=>{try{const n=await me("lookup_only",e);return n&&t===E&&J(n),n}finally{S===r&&(S=null)}})(),S=r,(await S)?.token??null}async function fn(){const e=oe();if(e?.guestId)return e.guestId;if(await Bt().catch(r=>{if(Ut(r))return null;throw r})===null)return null;const t=oe()?.guestId;if(!t)throw new Error("guest session cleared during lookup");return t}function Yt(){E+=1,J(null),y=null,S=null,T=null}async function pn(){const e=d?.guestId,t=e?h.begin(e):void 0;let r=!1;try{r=(await fetch("/api/web/guest-session/revoke",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).ok}catch(n){console.error("Failed to revoke guest session:",n)}finally{Yt(),t?.(r)}return r}async function gn(){try{const e=await fetch("/api/web/guest-session/promotion-proof",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}});if(e.status===204||!e.ok)return null;const t=await e.json();return typeof t.token=="string"&&t.token.length>0?t.token:null}catch(e){return console.error("Failed to fetch guest promotion proof:",e),null}}async function Kt(){if(T)return(await T)?.token??null;if(Be())return null;E+=1;const e=E;d=null,y=null,S=null,T=(async()=>{try{const t=await me("lookup_or_create",_e());return t&&e===E&&J(t),t}catch(t){if(t instanceof C)return ge({until:Date.now()+t.retryAfterMs,reason:t.reason}),null;throw console.error("Failed to refresh guest session:",t),t}})(),T.catch(()=>{});try{return(await T)?.token??null}finally{T=null}}async function _n(){try{return await Kt()}catch{return null}}var mn=dt.flatMap(e=>{if(e.secretIn!=="path"||e.scope!=="page")return[];const t=`:${e.secretParam}`;if(!e.pattern.endsWith(t))return[];const r=e.pattern.slice(0,-t.length);return r.includes(":")?[]:[r]});function ke(e){return de(e).replace(/(\/organizations\/)[^/?#]+/g,"$1[redacted]")}var zt=Object.freeze({recording:"off",identity:"id_only",content:"strict"}),yn=Object.freeze({recording:"full",identity:"full",content:"full"});function Sn(e){if(typeof e!="object"||e===null)return!1;const{recording:t,identity:r,content:n}=e;return(t==="full"||t==="masked"||t==="off")&&(r==="full"||r==="id_only")&&(n==="full"||n==="strict")}var Vt="$mcpjam_telemetry_context";var qt=64;function z(e){return[...new Set(e.filter(t=>typeof t=="string"&&t.length>0&&t.length<=qt))].sort().slice(0,8)}function Wt(e){return{v:2,p:z(e.projectIds),o:z(e.organizationIds),r:e.policy.recording,i:e.policy.identity,c:e.policy.content}}function V(e){return`${z(e.projectIds).join(",")}|${z(e.organizationIds).join(",")}`}var Jt=new Set(["class","style","_csstext","rr_width","rr_height","rr_left","rr_top","rr_position","rr_transform","rr_display","rr_scrollleft","rr_scrolltop","rr_open_mode","role","type","dir","lang","rel","tabindex","width","height","colspan","rowspan","disabled","checked","selected","hidden","open","viewbox","xmlns","d","fill","stroke","stroke-width","stroke-linecap","stroke-linejoin","points","cx","cy","r","rx","ry","x","y","x1","x2","y1","y2","transform","opacity","aria-hidden","aria-expanded","aria-selected","aria-checked","aria-disabled","aria-pressed","aria-current","aria-orientation","data-state","data-side","data-align","data-orientation","data-disabled","data-highlighted","data-selected","data-active","data-open","data-slot","data-variant","data-size"]);function Ye(e,t){const r=e.toLowerCase();return Jt.has(r)?r==="style"?lr(t):Ue(t):"***"}function X(e){return e.replace(/\S/g,"*")}var Xt=new Set(["img","picture","video","audio","canvas","iframe","object","embed","image"]),b="[name]",Ke="[redacted]",Zt=new Set(["p","api","web","v1","mcp","about","access-requests","api-keys","appearance","audit-log","bench","billing","budget","byok","callback","capabilities","cases","chat","ci-evals","client-config","clients","commit","compare","compatibility","computer","conformance","create","data-management","discord","edit","embed","environments","eval-server","evals","evaluate","evaluators","events","github","github-checks","home","host-compare","hosts","integrations","iterations","learning","login","members","models","new","oauth","oauth-flow","observability","organizations","plans","playground","plugins","profile","project-settings","prompts","readiness","reconnect","redeem","registry","resources","results","runs","scenarios","score","secrets","security","servers","sessions","settings","shared","sharing","skills","slack","suite","support","swarms","tasks","test","tools","tracing","triggers","usage","user-testing","web-accounts","webmcp","xaa-flow"]),Qt="[host]",Re="host.scrub.invalid",er=["mcpjam.com","caniuse.dev"],tr=new Set(["localhost","127.0.0.1","[::1]","::1"]);function rr(e){const t=e.toLowerCase();if(tr.has(t)||er.some(n=>t===n||t.endsWith(`.${n}`)))return!0;const r=globalThis.location?.hostname;return typeof r=="string"&&r.toLowerCase()===t}var nr=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ze(e){return/^\d+$/.test(e)||nr.test(e)||/^[0-9a-z]{25,40}$/.test(e)&&/\d/.test(e)}function sr(e){return!e||e===b||e===Ke||Zt.has(e)||ze(e)?e:b}var or="[key]",ar=new Set(["code","state","token","t","_token","access_token","id_token","refresh_token","key","api_key","apikey","secret","client_secret","password","sig","signature","auth","authorization","code_verifier","code_challenge","ticket","otp","nonce","jwt"]),ir=new Set(["tab","view","page","limit","cursor","before","after","sort","order","filter","status","plan","interval","surface","flow","mode","step","project","projectId","organizationId","org","session","sessionId","chatSessionId","tabId","sel","compose","host","v","ver","version","ip","compression","_","error","error_description","redirect_uri","resource","code_challenge_method","iss","browser","wire","codec","sharp","installation_id","accessVersion","distinct_id","q","search","privacy","server","run","case","suite","target","persona","iteration","checks","compare","compareTo","insights","replay","importJob","fromCommit","fromEvalServer","cwd","dir","_t"]);function ur(e,t){return ar.has(e.toLowerCase())?`${encodeURIComponent(e)}=${Ke}`:ir.has(e)?`${encodeURIComponent(e)}=${ze(t)?encodeURIComponent(t):b}`:`${or}=${b}`}function F(e){const t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e);if(!t&&!e.startsWith("/"))return ke(e);const r=ke(e);try{const n=new URL(t?r.replace(/^([a-z][a-z0-9+.-]*:\/\/)\[host\]/i,`$1${Re}`):r,"http://scrub.invalid"),s=n.pathname.split("/").map(i=>sr(decodeURIComponent(i))).join("/"),o=[...n.searchParams].map(([i,l])=>ur(i,l)).join("&");return`${t?`${n.protocol}//${n.hostname!==Re&&rr(n.hostname)?n.host:Qt}`:""}${s}${o?`?${o}`:""}`}catch{return b}}function Oe(e){return typeof e!="string"||!/^[a-z][a-z0-9+.-]*:\/\//i.test(e)&&!e.startsWith("/")?b:F(e)}var Ce=/url\(\s*("(?:[^"\\\n]|\\[\s\S])*"|'(?:[^'\\\n]|\\[\s\S])*'|(?:[^"'()\s\\]|\\[\s\S])*)\s*\)|"(?:[^"\\\n]|\\[\s\S])*"|'(?:[^'\\\n]|\\[\s\S])*'/gi,cr=/[/:.]/;function Pe(e){return(e.startsWith('"')||e.startsWith("'")?e.slice(1,-1):e).replace(/\\([\s\S])/g,"$1")}function lr(e){if(!/url\(|["'\\]/i.test(e))return e;const t=e.replace(Ce,(n,s)=>{if(s!==void 0){const i=Oe(Pe(s));return`url(${JSON.stringify(i)})`}const o=Pe(n);return JSON.stringify(cr.test(o)?Oe(o):X(o))}),r=t.replace(Ce,"");return/url\(|["'\\]/i.test(r)?"***":t}function ye(){return dr()}function dr(){return typeof window<"u"&&window.isElectron===!0}function Ve(e=fr()){return e?ht(typeof e=="string"?{pathname:e}:e):!1}function fr(){if(typeof window>"u"||!window.location)return;const{pathname:e,search:t,hash:r}=window.location;return{pathname:e,search:t,hash:r}}function qe(){return!ye()||pe()?"off":"desktop"}function hn(e){return e.surface!=="hosted"||e.sharedLink?"off":e.recording===void 0?"pending":e.recording==="off"?"off":e.recording==="full"?"full":"masked"}var ae="mcpjam.telemetry.replayOffActor",k;function We(){if(k!==void 0)return k;try{k=window.localStorage.getItem(ae)}catch{k=null}return k}function En(e,t){if(e===null)return;const r=We(),n=t?e:r===e?null:r;if(n!==r){k=n;try{n===null?window.localStorage.removeItem(ae):window.localStorage.setItem(ae,n)}catch{}}}function vn(e){const t=We();return t===null?!1:e===void 0||e===t}var Je;function Se(){return Je??(qe()==="off"?"off":"pending")}function wn(e){Je=e}function p(){return ft()!=="full"}var Ne="https://redacted.invalid/",pr=["entryType","initiatorType","method","status","responseStatus","isInitial","startTime","endTime","duration","timeOrigin","timestamp","fetchStart","domainLookupStart","domainLookupEnd","connectStart","secureConnectionStart","connectEnd","requestStart","responseStart","responseEnd","redirectStart","redirectEnd","workerStart","transferSize","encodedBodySize","decodedBodySize","nextHopProtocol","renderBlockingStatus","deliveryType"];function Xe(e){const t=r=>e==="masked"?F(r):de(r);return function(n){const s=n.entryType===void 0&&!n.isInitial;try{const o={};for(const i of pr)n[i]!==void 0&&(o[i]=n[i]);return typeof n.name=="string"&&(o.name=t(n.name)),typeof n.url=="string"&&(o.url=t(n.url)),s&&!o.name&&(o.name=Ne),o}catch{return s?{name:Ne}:null}}}var gr=Xe("full"),_r=Xe("masked"),mr="data-ph-no-capture",Ze=[...Xt].map(e=>e==="image"?"svg image":e).join(", "),yr={maskAllInputs:!0,maskInputOptions:{password:!0},maskTextSelector:"*",maskTextFn:X,blockSelector:Ze,maskAttributeFn:Ye,recordHeaders:!1,recordBody:!1,maskCapturedNetworkRequestFn:gr,compress_events:!1},Qe={maskAllInputs:!0,maskInputOptions:{password:!0},maskTextSelector:"*",maskTextFn:X,blockSelector:Ze,maskAttributeFn:Ye,recordHeaders:!1,recordBody:!1,captureCanvas:{recordCanvas:!1},captureJsonLd:!1,recordCrossOriginIframes:!1,maskCapturedNetworkRequestFn:_r,compress_events:!1};function Sr(e){return e==="masked"?{session_recording:Qe,disable_session_recording:!0,autocapture:!1,capture_dead_clicks:!1,rageclick:!1,capture_exceptions:!1,disable_surveys:!0,enable_heatmaps:!1,capture_performance:!1,enable_recording_console_log:!1,mask_all_text:!0,mask_all_element_attributes:!0}:{session_recording:yr,disable_session_recording:!0,autocapture:!0,capture_dead_clicks:!0,rageclick:!0,capture_exceptions:ye(),disable_surveys:!1,enable_heatmaps:!0,enable_recording_console_log:!1,mask_all_text:!1,mask_all_element_attributes:!1}}var te=null,w=!1,B=null;function Tn(){return B}var j=!1,ie=null;function hr(e){if(j||Se()!=="full"||!Array.isArray(e))return null;if(ie===null)return e;const t=ie,r=e.filter(n=>{const s=n?.timestamp;return typeof s=="number"&&s>=t});return r.length>0?r:null}function bn(e,t){if(B!==e){j=!0;try{B?.stopSessionRecording?.()}finally{j=!1}te=null,w=!1}B=e;try{const r=Se(),n=p()||r==="masked"?"masked":"full";if(n!==te){if(w){j=n==="masked";try{e.stopSessionRecording?.()}finally{j=!1}w=!1}e.set_config?.(Sr(n)),te=n}const s=qe()==="hosted"&&r==="full"&&!p()&&!Ve(t);s&&!w?(ie=Date.now(),e.startSessionRecording?.(),w=!0):!s&&w&&(e.stopSessionRecording?.(),w=!1)}catch{}}var Er=/\[[\w:.-]+(?:="[^"]*")?\]/g,vr=/#[^\s.#[>:]+/g;function wr(e){const t=e.replace(Er,"").replace(vr,""),r=t.search(/[["]/);return r===-1?t:t.slice(0,r)}var Tr=new Set(["class","role","disabled","aria-disabled","data-sentry-component"]);function br(e){const t={...e};typeof e.message=="string"&&(t.message=wr(e.message));const r=e.data;if(r&&typeof r=="object"){const n={...r};typeof r.url=="string"&&(n.url=F(r.url)),typeof r.route=="string"&&(n.route=F(r.route));const s=r.node;if(s&&typeof s=="object"){const o=s.attributes&&typeof s.attributes=="object"?Object.fromEntries(Object.entries(s.attributes).map(([i,l])=>[i,Tr.has(i)?l:"***"])):s.attributes;n.node={...s,attributes:o,...typeof s.textContent=="string"?{textContent:X(s.textContent)}:{}}}t.data=n}return t}function Ir(e){const t=p(),r=t?F:de,n=e?.data,s=n?.payload;if(!n||!s)return e;if(t&&n.tag==="breadcrumb"&&s.category==="console")return null;if(t&&n.tag==="breadcrumb"&&typeof s.category=="string"&&s.category.startsWith("ui."))return{...e,data:{...n,payload:br(s)}};if(n.tag==="breadcrumb"&&s.category==="navigation"){const o=s.data??{};return(typeof o.from!="string"||r(o.from)===o.from)&&(typeof o.to!="string"||r(o.to)===o.to)?e:{...e,data:{...n,payload:{...s,data:{...o,...typeof o.from=="string"?{from:r(o.from)}:{},...typeof o.to=="string"?{to:r(o.to)}:{}}}}}}if(n.tag==="performanceSpan"&&typeof s.description=="string")return r(s.description)===s.description?e:{...e,data:{...n,payload:{...s,description:r(s.description)}}};if(n.tag==="breadcrumb"&&typeof s.message=="string"){const o=Ue(s.message);return o===s.message?e:{...e,data:{...n,payload:{...s,message:o}}}}return e}var Ar=["a[href]","area[href]","iframe","frame[src]","embed[src]","source","track","input[src]","[srcset]","object[data]","table[background]","td[background]","th[background]",'[style*="url(" i]','[style*="image-set(" i]'],In={maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,maskAttributes:["title","placeholder","aria-label","aria-description","alt","action","formaction","poster","href","src","srcset","data","value"],block:[".rr-block",`[${mr}]`,...Ar,`[style*='"']`,`[style*="'"]`,...gt()],networkDetailAllowUrls:[],networkCaptureBodies:!1,beforeAddRecordingEvent:Ir},v=null,L,g,ue=new Set,Y=0,ce=!1,Z=0,Le=!1,et=!1,tt=0;function rt(){const e=Q();return Le&&!e&&(Z+=1),Le=e,e}function D(){if(Y>0){ce=!0;return}et=rt(),tt=Z;for(const e of ue)try{e()}catch{}}function An(){return v}function kn(e){e!==v&&(v=e,L=void 0,g=void 0,D())}function Rn(e,t){if(e!==v)return;const r=e===null?void 0:t;r!==L&&(L=r,D())}function On(){L!==void 0&&(L=void 0,D())}function kr(e){return e!==null&&e===v?L:void 0}function Rr(e=v){return kr(e)==="full"&&Q()}function Cn(){return Z}function Pn(e){return ue.add(e),()=>ue.delete(e)}var f={projectIds:[],organizationIds:[]};function Or(e){const t=V(f),r=!!f.sharedLink;f={sharedLink:e.sharedLink,projectIds:e.projectIds.filter(n=>!!n),organizationIds:e.organizationIds.filter(n=>!!n)},(t!==V(f)||r!==!!f.sharedLink)&&(g=void 0,D())}function Cr(e,t){const r=e&&e===v&&t?{actor:e,context:V(f),content:t}:void 0;r?.actor===g?.actor&&r?.context===g?.context&&r?.content===g?.content||(g=r,D())}function Nn(e,t,r){Y+=1;try{Or(e),Cr(t,r)}finally{Y-=1,Y===0&&(ce||Q()!==et||Z!==tt)&&(ce=!1,D())}}function Q(){return g?.actor===v&&g?.content==="full"&&g.context===V(f)&&typeof window<"u"&&!window.isElectron&&!f.sharedLink&&!Ve()&&f.projectIds.length+f.organizationIds.length>0}function Pr(){const e=Q(),t=Se();return{projectIds:[...f.projectIds],organizationIds:[...f.organizationIds],policy:e?{recording:t==="full"||t==="masked"?t:"off",identity:Rr()?"full":"id_only",content:"full"}:{...zt}}}function nt(e){if(!e)return e;try{const t=Pr(),r={...e.properties??{},[Vt]:Wt(t)};if(e.event==="$snapshot"&&"$snapshot_data"in r){const n=hr(r.$snapshot_data);if(n===null)return null;r.$snapshot_data=n}return{...e,properties:r}}catch{return null}}pt(()=>rt()?"full":"strict");var Nr=/\.[cm]?[jt]sx?$/,Lr=/^(?:[a-z][a-z0-9+.-]*:\/\/|\/)/i;function Dr(e,t){if(typeof e!="string"||!Lr.test(e))return!1;let r;try{r=new URL(e,t)}catch{return!1}return r.origin!==t?!1:!Nr.test(r.pathname)}function Ur(e,t){return e.length===0?!1:e.every(r=>Dr(r,t))}function xr(e,t){return e.length===0?!1:e.every(r=>Ur(r,t))}var st=`${Ge}_tab`,Gr=`ph_${st}`;function jr(){let e="memory";try{const t=`${Gr}_probe`;window.sessionStorage.setItem(t,"1");const r=window.sessionStorage.getItem(t)==="1";window.sessionStorage.removeItem(t),r&&(e="sessionStorage")}catch{}return{persistence:e,persistence_name:st}}function he(){return typeof window<"u"&&window.location?.origin?.startsWith("http")?`${window.location.origin}/tlm`:"/tlm"}function Ee(e){const t=oe()?.guestId,r=e&&Object.keys(e).length>0?e:void 0;return!t&&!r?{}:{bootstrap:{...t?{distinctID:t,isIdentifiedID:!1}:{},...r?{featureFlags:r}:{}}}}var ot={...jr(),advanced_disable_feature_flags:!0,advanced_disable_feature_flags_on_first_load:!0},at=null;function le(e=at){if(e)for(const t of[e.persistence,e.sessionPersistence]){const r=t?.props;if(!(!t||!r)){try{const n=mt(r);if(n===r)continue;for(const s of Object.keys(r))s in n||delete r[s];Object.assign(r,n)}catch{delete r.$initial_person_info}try{t.save?.()}catch{}}}}function it(e){if(e?.event!=="$exception"||typeof window>"u")return e;const t=e.properties?.$exception_list;if(!Array.isArray(t))return e;const r=t.map(n=>{const s=n?.stacktrace?.frames;return Array.isArray(s)?s.map(o=>o?.filename):[]});return xr(r,window.location.origin)?null:e}var Fr=yt,Mr=he()==="/tlm"||pe(),$r={advanced_disable_flags:!0,disable_surveys:!0,disable_external_dependency_loading:!0};function ut(e=typeof window>"u"?void 0:window.location?.hostname){const t=!!e&&Fr.has(e.toLowerCase());return{capture_pageview:t?"history_change":!1,capture_pageleave:t}}var De={api_host:he(),ui_host:"https://us.posthog.com",...Ee(),...ut(),...ot,person_profiles:"always",disable_beacon:!0,before_send:[it,nt,e=>(le(),e)],disable_capture_url_hashes:!0,get capture_dead_clicks(){return!p()},get autocapture(){return!p()},get rageclick(){return!p()},get disable_surveys(){return p()},get enable_heatmaps(){return!p()},get capture_exceptions(){return ye()&&!p()},disable_session_recording:!0,session_recording:Qe,enable_recording_console_log:!1,get mask_all_text(){return p()},get mask_all_element_attributes(){return p()},loaded:e=>{at=e,le(e),e.register({environment:"production",platform:q(),version:"3.27.0",deployment:"self_hosted",source:"client"}),e.setPersonPropertiesForFlags?.({deployment:"self_hosted",platform:q()})}};function Ln(e){if(e===!0)return!0;if(e===!1||e===void 0||e===null)return!1;if(typeof e=="string"){const t=e.trim().toLowerCase();return t==="true"||t==="1"||t==="yes"||t==="on"}return!1}function Hr(e){const t=Ee(e);return"bootstrap"in t?Object.defineProperties({},{...Object.getOwnPropertyDescriptors(De),bootstrap:{value:t.bootstrap,enumerable:!0,configurable:!0,writable:!0}}):De}var Dn=()=>Ge,Un=e=>Mr?{api_host:he(),ui_host:"https://us.posthog.com",...Ee(e),...ut(),...ot,person_profiles:"always",disable_beacon:!0,disable_session_recording:!0,capture_exceptions:!1,...pe()?$r:{},opt_out_capturing_by_default:!0,before_send:[it,nt,t=>(le(),t)],disable_capture_url_hashes:!0,loaded:t=>{t.setPersonPropertiesForFlags?.({deployment:"self_hosted",platform:q()})}}:Hr(e);function q(){if(window?.isElectron){const e=navigator.userAgent.toLowerCase();return e.includes("mac")||e.includes("darwin")?"mac":e.includes("win")?"win":"electron"}return"npm"}function Br(){return"production"}function xn(e){const t=Br();return{location:e,platform:q(),...t!==void 0?{environment:t}:{}}}export{dn as $,bn as A,Sn as B,Pn as C,Jr as Ct,mr as D,je as Dt,In as E,re as Et,En as F,cn as G,lr as H,vn as I,Kt as J,Yt as K,hn as L,Ve as M,ye as N,yr as O,Ge as Ot,qe as P,fn as Q,wn as R,Rn as S,pe as St,Rr as T,Xr as Tt,F as U,Ye as V,ke as W,oe as X,ln as Y,Bt as Z,Pr as _,Zr as _t,ut as a,an as at,kn as b,qr as bt,Un as c,sn as ct,De as d,rn as dt,gn as et,le as f,Rt as ft,An as g,bt as gt,xr as h,It as ht,it as i,un as it,Se as j,Tn as k,Ln as l,Dt as lt,Gr as m,tn as mt,Br as n,Ht as nt,he as o,pn as ot,xn as p,nn as pt,_n as q,q as r,$t as rt,Dn as s,on as st,Fr as t,Be as tt,Mr as u,h as ut,Cn as v,Qr as vt,kr as w,Wr as wt,Nn as x,Vr as xt,On as y,en as yt,zt as z};
|
|
1
|
+
import{o as lt}from"./rolldown-runtime-Df2-koJ7.js";import{D as dt,N as ft,P as pt,S as Ue,_ as gt,a as _t,g as mt,k as yt,o as St,u as xe,v as ht,x as de}from"./project-route-CwOywjoT.js";import{t as Et}from"./react-dom-s4nupq_N.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"3.27.2"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6d3665bb-df61-493d-9502-003f59627271",e._sentryDebugIdIdentifier="sentry-dbid-6d3665bb-df61-493d-9502-003f59627271")}catch{}})();var Ge="phc_dTOPniyUNU2kD8Jx8yHMXSqiZHM8I91uWopTMX6EBE9",ve=e=>{let t;const r=new Set,n=(c,U)=>{const m=typeof c=="function"?c(t):c;if(!Object.is(m,t)){const u=t;t=U??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(a=>a(t,u))}},s=()=>t,l={setState:n,getState:s,getInitialState:()=>_,subscribe:c=>(r.add(c),()=>r.delete(c))},_=t=e(n,s,l);return l},je=(e=>e?ve(e):ve);function re(){try{if(typeof crypto.randomUUID=="function")return crypto.randomUUID()}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`}var fe=lt(Et(),1);function we(e){if(typeof e!="string"||e.trim().length===0)return null;try{const t=new URL(e.trim());return t.protocol!=="http:"&&t.protocol!=="https:"?null:t.origin}catch{return null}}function I(){if(typeof window>"u")return null;const e=window.__MCP_RUNTIME_CONFIG__;return!e||typeof e!="object"?null:e}function M(e){return typeof e=="string"&&e.trim()?e:void 0}function Vr(){return M(I()?.convexUrl)}function qr(){return M(I()?.convexSiteUrl)}function Wr(){return M(I()?.workosClientId)}function Jr(){return M(I()?.workosApiHostname)}function vt(){return M(I()?.sandboxOrigin)}function pe(){return I()?.doNotTrack===!0}function Xr(){return I()?.platformAgentDisabled!==!0}var Zr=we(vt())??we(void 0),Qr="write",Te=null,wt=String(101376);function en(){return Te?`https://discord.com/oauth2/authorize?${new URLSearchParams({client_id:Te,scope:"bot applications.commands",permissions:wt}).toString()}`:null}var $="mcpjam.project-transition.v1",tn=18e5;function H(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.sourceActor=="string"&&/^(guest|workos):.{1,200}$/.test(t.sourceActor)&&typeof t.path=="string"&&_t(t.path)&&typeof t.requestedProjectId=="string"&&St(t.requestedProjectId)&&xe(t.path)===t.requestedProjectId&&typeof t.attempt=="string"&&/^[a-zA-Z0-9-]{1,80}$/.test(t.attempt)&&Number.isFinite(t.storedAt)&&t.storedAt<=Date.now()+1e3&&Date.now()-t.storedAt<18e5}function Tt(e=()=>sessionStorage){let t=null;try{const i=JSON.parse(e().getItem($)??"null");H(i)?t=i:e().removeItem($)}catch{}const r=je(()=>({marker:t}));let n=null;const s=i=>{if(!(i&&r.getState().marker?.attempt!==i)){r.setState({marker:null});try{e().removeItem($)}catch{}}},o=(i,l=re())=>{if(!n||n.path!==i)return;const _=r.getState().marker;if(_?.path===i&&H(_))return;const c={path:i,requestedProjectId:xe(i),attempt:l,storedAt:Date.now(),sourceActor:n.actor};if(H(c)){n=null;try{e().setItem($,JSON.stringify(c))}catch{}r.setState({marker:c})}};return{store:r,clear:s,arm:o,isValid:H,remember(i,l){n={path:i,actor:l}},observeActor(i,l){n&&n.actor!==i&&(i.startsWith("workos:")&&o(l),n=null)}}}var bt=Tt();function It(){return window.location.pathname+window.location.search+window.location.hash}var P="mcpjam.guest-transition.v1",be=`${P}.reloaded`,Ie=`${P}.handled`,ee=15e3,K=6e4;function At(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.guestId!="string"||!t.guestId||t.guestId.length>200||typeof t.attempt!="string"||!/^[a-zA-Z0-9-]{1,80}$/.test(t.attempt)||!Number.isFinite(t.startedAt)||t.startedAt>Date.now()+1e3||Date.now()-t.startedAt>K||!["started","completed","failed"].includes(t.phase)?null:{guestId:t.guestId,attempt:t.attempt,startedAt:t.startedAt,phase:t.phase}}function kt(e){const t=je(()=>({status:"idle",attempt:null})),r=new Map;try{const u=JSON.parse(sessionStorage.getItem(Ie)??"[]");if(Array.isArray(u))for(const a of u)Array.isArray(a)&&typeof a[0]=="string"&&/^[a-zA-Z0-9-]{1,80}$/.test(a[0])&&Number.isFinite(a[1])&&a[1]<=Date.now()+1e3&&Date.now()-a[1]<=K&&r.set(a[0],a[1])}catch{}const n=u=>{for(const[a,A]of r)Date.now()-A>K&&r.delete(a);r.set(u.attempt,u.startedAt);try{sessionStorage.setItem(Ie,JSON.stringify([...r]))}catch{}};let s=null,o=null,i;const l=new Map,_=()=>{clearTimeout(i),o=null,t.setState({status:"idle",attempt:null})},c=()=>{clearTimeout(i),t.setState({status:"failed"})},U=u=>{if(u&&!e.allowAutomaticReload()){c();return}t.setState({status:"waiting"}),clearTimeout(i),i=setTimeout(c,ee);try{e.reload()}catch{c()}},m=u=>{const a=At(u);!a||!s||a.guestId!==s||r.has(a.attempt)||o&&(a.startedAt<o.startedAt||a.startedAt===o.startedAt&&a.attempt!==o.attempt)||o?.attempt===a.attempt&&o.phase!=="started"||(e.beforeTransition?.(a),o=a,clearTimeout(i),t.setState({status:"waiting",attempt:a.attempt}),a.phase==="failed"?(c(),n(a)):a.phase==="completed"?(n(a),U(!0)):i=setTimeout(()=>{c(),n(a)},Math.max(0,ee-(Date.now()-a.startedAt))))};return{store:t,setGuest(u,a=!0){if(u!==s){s=u;const A=t.getState().status!=="idle";clearTimeout(i),o=null,A&&!a?(t.setState({status:"waiting",attempt:null}),i=setTimeout(c,ee)):_()}else!o&&a&&t.getState().status!=="idle"&&_()},getGuest:()=>s,receive:m,begin(u){let a=l.get(u);if(!a){a={message:{guestId:u,attempt:re(),startedAt:Date.now(),phase:"started"},count:0,failed:!1},l.set(u,a);try{e.publish(a.message)}catch{}}a.count++;let A=!1;return ct=>{if(!A&&(A=!0,a.failed||=!ct,!--a.count)){l.delete(u);try{e.publish({...a.message,phase:a.failed?"failed":"completed"})}catch{}}}},revoked(u){return u&&u!==s?!0:s?(t.getState().status!=="idle"||m({guestId:s,attempt:re(),startedAt:Date.now(),phase:"completed"}),!0):!1},retry:()=>U(!1),dispose:_}}var G,h=kt({beforeTransition:e=>bt.arm(It(),e.attempt),publish(e){try{G?.postMessage(e)}catch{}try{localStorage.setItem(P,JSON.stringify(e))}catch{}},reload:()=>{const e=h.getGuest();queueMicrotask(()=>{h.getGuest()===e&&window.location.reload()})},allowAutomaticReload(){try{const e=Number(sessionStorage.getItem(be));return e&&Date.now()-e<K?!1:(sessionStorage.setItem(be,String(Date.now())),!0)}catch{return!1}}});function rn(){try{G=new BroadcastChannel(P),G.onmessage=r=>(0,fe.flushSync)(()=>h.receive(r.data))}catch{}const e=Rt,t=r=>{r.key===P&&e()};return window.addEventListener("storage",t),window.addEventListener("pageshow",e),window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),e(),()=>{G?.close(),G=void 0,window.removeEventListener("storage",t),window.removeEventListener("pageshow",e),window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}}function nn(e){const t=h.getGuest();return e&&e!==t?!0:t?(queueMicrotask(()=>{h.getGuest()===t&&(0,fe.flushSync)(()=>h.revoked(t))}),!0):!1}function Rt(){queueMicrotask(()=>{try{(0,fe.flushSync)(()=>h.receive(JSON.parse(localStorage.getItem(P)??"null")))}catch{}})}var Ot=["timeout","network","upstream_status","bad_json","bad_payload","configuration"];var Ct=["guest_session/exhausted","guest_session/unreachable","guest_session/bad_response","guest_session/http_4xx","guest_session/http_5xx","guest_session/timeout","guest_session/network","guest_session/upstream_status","guest_session/bad_json","guest_session/bad_payload","guest_session/configuration","guest_session/network/SELF_SIGNED_CERT_IN_CHAIN","guest_session/network/UNABLE_TO_GET_ISSUER_CERT_LOCALLY","guest_session/network/UNABLE_TO_VERIFY_LEAF_SIGNATURE","guest_session/network/DEPTH_ZERO_SELF_SIGNED_CERT","guest_session/network/CERT_HAS_EXPIRED","guest_session/network/ERR_TLS_CERT_ALTNAME_INVALID","guest_session/network/ECONNREFUSED","guest_session/network/ECONNRESET","guest_session/network/ENOTFOUND","guest_session/network/EAI_AGAIN","guest_session/network/ETIMEDOUT","guest_session/network/EHOSTUNREACH","guest_session/network/ENETUNREACH","guest_session/network/UND_ERR_CONNECT_TIMEOUT","guest_session/network/UND_ERR_SOCKET"];function Pt(e){return Ct.includes(e)}function sn(e){if(!e)return"guest_session/exhausted";const{httpStatus:t,details:r}=e;if(r){const n=`guest_session/network/${r.networkCode}`;return r.reason==="network"&&Pt(n)?n:`guest_session/${r.reason}`}return t===void 0?"guest_session/unreachable":t<400?"guest_session/bad_response":t<500?"guest_session/http_4xx":"guest_session/http_5xx"}var Nt=/^[A-Z][A-Z0-9_]{1,63}$/;function Lt(e){return typeof e=="string"&&Ot.includes(e)}function Dt(e){if(!e||typeof e!="object")return;const{reason:t,upstreamStatus:r,networkCode:n}=e;if(!Lt(t))return;const s={reason:t};return typeof r=="number"&&Number.isInteger(r)&&r>=100&&r<=599&&(s.upstreamStatus=r),typeof n=="string"&&Nt.test(n)&&(s.networkCode=n),s}var R=class extends Error{status;upstreamFailure;constructor(e,t,r,n){super(e,n===void 0?void 0:{cause:n}),this.name="GuestSessionRequestError",this.status=t,this.upstreamFailure=r}},Fe=class extends R{},C=class extends R{retryAfterMs;reason;constructor(e,t){super("Couldn't start a guest session. Sign in to continue."),this.name="GuestSessionRefusedError",this.retryAfterMs=e,this.reason=t}};function Ut(e){return e instanceof Fe||e instanceof C&&e.reason==="guest_access_disabled"}var Me="mcpjam_guest_session_v1",N="mcpjam_guest_activated",W=3e5,d=null,y=null,S=null,T=null,$e=!1,E=0,ne=new Set,se=6e5,O=null,x=null;function He(){for(const e of ne)e()}function ge(e){x!==null&&(clearTimeout(x),x=null),O=e,e&&(x=setTimeout(()=>{x=null,O===e&&ge(null)},Math.max(0,e.until-Date.now()))),He()}function Be(){return O&&O.until<=Date.now()&&(O=null),O}function J(e){const t=d?.guestId??null,r=d?.token??null;d=e,(t!==(d?.guestId??null)||r!==(e?.token??null))&&He()}function on(e){return ne.add(e),()=>{ne.delete(e)}}function an(e){if(e)try{localStorage.getItem(N)!==e&&localStorage.setItem(N,e)}catch{}}function un(e){if(!e)return!1;try{return localStorage.getItem(N)===e}catch{return!1}}function cn(e){try{localStorage.getItem(N)===e&&localStorage.removeItem(N)}catch{}}function ln(){try{return localStorage.getItem(N)}catch{return null}}function xt(){if(typeof window>"u")return;const e=window.__MCP_GUEST_BOOTSTRAP__;try{delete window.__MCP_GUEST_BOOTSTRAP__}catch{window.__MCP_GUEST_BOOTSTRAP__=void 0}e&&(typeof e.token!="string"||e.token.length===0||typeof e.expiresAt!="number"||typeof e.guestId!="string"||e.guestId.length===0||e.expiresAt-W<=Date.now()||(d={guestId:e.guestId,token:e.token,expiresAt:e.expiresAt}))}xt();function _e(){if($e)return null;try{const e=localStorage.getItem(Me);if(!e)return null;const t=JSON.parse(e);return typeof t.token=="string"&&t.token.length>0?t.token:null}catch{return null}}function Ae(){try{localStorage.removeItem(Me)}catch{}$e=!0}var Gt=1e3;async function jt(e){if(typeof e.json!="function")return;let t;try{const r=await Promise.race([e.json(),new Promise(n=>{t=setTimeout(()=>n(void 0),Gt)})]);return r&&typeof r=="object"?r:void 0}catch{return}finally{t!==void 0&&clearTimeout(t)}}function Ft(e){if(!e)return"";const t=e.networkCode??(e.upstreamStatus!==void 0?String(e.upstreamStatus):void 0);return` (${e.reason}${t?` ${t}`:""})`}function Mt(e){const t=e?Number.parseInt(e,10):NaN;return Number.isFinite(t)&&t>0?t*1e3:se}async function me(e,t){const r={mode:e};t&&(r.legacyToken=t);let n;try{n=await fetch("/api/web/guest-session",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}catch(o){throw new R(o instanceof Error?o.message:"network error",void 0,void 0,o)}if(n.status===204)return t&&Ae(),null;if(n.status===429)throw new C(Mt(n.headers?.get?.("retry-after")),"rate_limited");if(n.status===403&&n.headers?.get?.("x-mcpjam-guest-refusal")==="GUEST_ACCESS_DISABLED")throw new C(se,"guest_access_disabled");if(!n.ok){const o=await jt(n);if(n.status===403&&o?.code==="GUEST_ACCESS_DISABLED")throw new C(se,"guest_access_disabled");const i=Dt(o?.details);throw new(n.status===403&&n.headers?.get?.("x-mcpjam-guest-refusal")==="GUEST_SESSION_REVOKED"?Fe:R)(`guest-session request failed: ${n.status} ${n.statusText}${Ft(i)}`,n.status,i)}let s;try{s=await n.json()}catch(o){throw new R(`guest-session response was not valid JSON: ${o instanceof Error?o.message:String(o)}`,n.status)}if(typeof s?.token!="string"||typeof s?.expiresAt!="number")throw new R("guest-session response missing token or expiresAt",n.status);return t&&Ae(),s}async function $t(){if(d&&d.expiresAt-W>Date.now())return d;if(Be())return null;if(y)return y;const e=_e(),t=E;let r=Promise.resolve(null);return r=(async()=>{try{const n=await me("lookup_or_create",e);return n&&t===E&&J(n),n}catch(n){if(n instanceof C)return ge({until:Date.now()+n.retryAfterMs,reason:n.reason}),null;throw console.error("Failed to create guest session:",n),n}finally{y===r&&(y=null)}})(),y=r,r.catch(()=>{}),y}async function Ht(){try{return await $t()}catch{return null}}async function dn(){return(await Ht())?.token??null}function oe(){return d&&d.expiresAt-W>Date.now()?d:null}async function Bt(){if(d&&d.expiresAt-W>Date.now())return d.token;if(S)return(await S)?.token??null;const e=_e(),t=E;let r=Promise.resolve(null);return r=(async()=>{try{const n=await me("lookup_only",e);return n&&t===E&&J(n),n}finally{S===r&&(S=null)}})(),S=r,(await S)?.token??null}async function fn(){const e=oe();if(e?.guestId)return e.guestId;if(await Bt().catch(r=>{if(Ut(r))return null;throw r})===null)return null;const t=oe()?.guestId;if(!t)throw new Error("guest session cleared during lookup");return t}function Yt(){E+=1,J(null),y=null,S=null,T=null}async function pn(){const e=d?.guestId,t=e?h.begin(e):void 0;let r=!1;try{r=(await fetch("/api/web/guest-session/revoke",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).ok}catch(n){console.error("Failed to revoke guest session:",n)}finally{Yt(),t?.(r)}return r}async function gn(){try{const e=await fetch("/api/web/guest-session/promotion-proof",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}});if(e.status===204||!e.ok)return null;const t=await e.json();return typeof t.token=="string"&&t.token.length>0?t.token:null}catch(e){return console.error("Failed to fetch guest promotion proof:",e),null}}async function Kt(){if(T)return(await T)?.token??null;if(Be())return null;E+=1;const e=E;d=null,y=null,S=null,T=(async()=>{try{const t=await me("lookup_or_create",_e());return t&&e===E&&J(t),t}catch(t){if(t instanceof C)return ge({until:Date.now()+t.retryAfterMs,reason:t.reason}),null;throw console.error("Failed to refresh guest session:",t),t}})(),T.catch(()=>{});try{return(await T)?.token??null}finally{T=null}}async function _n(){try{return await Kt()}catch{return null}}var mn=dt.flatMap(e=>{if(e.secretIn!=="path"||e.scope!=="page")return[];const t=`:${e.secretParam}`;if(!e.pattern.endsWith(t))return[];const r=e.pattern.slice(0,-t.length);return r.includes(":")?[]:[r]});function ke(e){return de(e).replace(/(\/organizations\/)[^/?#]+/g,"$1[redacted]")}var zt=Object.freeze({recording:"off",identity:"id_only",content:"strict"}),yn=Object.freeze({recording:"full",identity:"full",content:"full"});function Sn(e){if(typeof e!="object"||e===null)return!1;const{recording:t,identity:r,content:n}=e;return(t==="full"||t==="masked"||t==="off")&&(r==="full"||r==="id_only")&&(n==="full"||n==="strict")}var Vt="$mcpjam_telemetry_context";var qt=64;function z(e){return[...new Set(e.filter(t=>typeof t=="string"&&t.length>0&&t.length<=qt))].sort().slice(0,8)}function Wt(e){return{v:2,p:z(e.projectIds),o:z(e.organizationIds),r:e.policy.recording,i:e.policy.identity,c:e.policy.content}}function V(e){return`${z(e.projectIds).join(",")}|${z(e.organizationIds).join(",")}`}var Jt=new Set(["class","style","_csstext","rr_width","rr_height","rr_left","rr_top","rr_position","rr_transform","rr_display","rr_scrollleft","rr_scrolltop","rr_open_mode","role","type","dir","lang","rel","tabindex","width","height","colspan","rowspan","disabled","checked","selected","hidden","open","viewbox","xmlns","d","fill","stroke","stroke-width","stroke-linecap","stroke-linejoin","points","cx","cy","r","rx","ry","x","y","x1","x2","y1","y2","transform","opacity","aria-hidden","aria-expanded","aria-selected","aria-checked","aria-disabled","aria-pressed","aria-current","aria-orientation","data-state","data-side","data-align","data-orientation","data-disabled","data-highlighted","data-selected","data-active","data-open","data-slot","data-variant","data-size"]);function Ye(e,t){const r=e.toLowerCase();return Jt.has(r)?r==="style"?lr(t):Ue(t):"***"}function X(e){return e.replace(/\S/g,"*")}var Xt=new Set(["img","picture","video","audio","canvas","iframe","object","embed","image"]),b="[name]",Ke="[redacted]",Zt=new Set(["p","api","web","v1","mcp","about","access-requests","api-keys","appearance","audit-log","bench","billing","budget","byok","callback","capabilities","cases","chat","ci-evals","client-config","clients","commit","compare","compatibility","computer","conformance","create","data-management","discord","edit","embed","environments","eval-server","evals","evaluate","evaluators","events","github","github-checks","home","host-compare","hosts","integrations","iterations","learning","login","members","models","new","oauth","oauth-flow","observability","organizations","plans","playground","plugins","profile","project-settings","prompts","readiness","reconnect","redeem","registry","resources","results","runs","scenarios","score","secrets","security","servers","sessions","settings","shared","sharing","skills","slack","suite","support","swarms","tasks","test","tools","tracing","triggers","usage","user-testing","web-accounts","webmcp","xaa-flow"]),Qt="[host]",Re="host.scrub.invalid",er=["mcpjam.com","caniuse.dev"],tr=new Set(["localhost","127.0.0.1","[::1]","::1"]);function rr(e){const t=e.toLowerCase();if(tr.has(t)||er.some(n=>t===n||t.endsWith(`.${n}`)))return!0;const r=globalThis.location?.hostname;return typeof r=="string"&&r.toLowerCase()===t}var nr=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ze(e){return/^\d+$/.test(e)||nr.test(e)||/^[0-9a-z]{25,40}$/.test(e)&&/\d/.test(e)}function sr(e){return!e||e===b||e===Ke||Zt.has(e)||ze(e)?e:b}var or="[key]",ar=new Set(["code","state","token","t","_token","access_token","id_token","refresh_token","key","api_key","apikey","secret","client_secret","password","sig","signature","auth","authorization","code_verifier","code_challenge","ticket","otp","nonce","jwt"]),ir=new Set(["tab","view","page","limit","cursor","before","after","sort","order","filter","status","plan","interval","surface","flow","mode","step","project","projectId","organizationId","org","session","sessionId","chatSessionId","tabId","sel","compose","host","v","ver","version","ip","compression","_","error","error_description","redirect_uri","resource","code_challenge_method","iss","browser","wire","codec","sharp","installation_id","accessVersion","distinct_id","q","search","privacy","server","run","case","suite","target","persona","iteration","checks","compare","compareTo","insights","replay","importJob","fromCommit","fromEvalServer","cwd","dir","_t"]);function ur(e,t){return ar.has(e.toLowerCase())?`${encodeURIComponent(e)}=${Ke}`:ir.has(e)?`${encodeURIComponent(e)}=${ze(t)?encodeURIComponent(t):b}`:`${or}=${b}`}function F(e){const t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e);if(!t&&!e.startsWith("/"))return ke(e);const r=ke(e);try{const n=new URL(t?r.replace(/^([a-z][a-z0-9+.-]*:\/\/)\[host\]/i,`$1${Re}`):r,"http://scrub.invalid"),s=n.pathname.split("/").map(i=>sr(decodeURIComponent(i))).join("/"),o=[...n.searchParams].map(([i,l])=>ur(i,l)).join("&");return`${t?`${n.protocol}//${n.hostname!==Re&&rr(n.hostname)?n.host:Qt}`:""}${s}${o?`?${o}`:""}`}catch{return b}}function Oe(e){return typeof e!="string"||!/^[a-z][a-z0-9+.-]*:\/\//i.test(e)&&!e.startsWith("/")?b:F(e)}var Ce=/url\(\s*("(?:[^"\\\n]|\\[\s\S])*"|'(?:[^'\\\n]|\\[\s\S])*'|(?:[^"'()\s\\]|\\[\s\S])*)\s*\)|"(?:[^"\\\n]|\\[\s\S])*"|'(?:[^'\\\n]|\\[\s\S])*'/gi,cr=/[/:.]/;function Pe(e){return(e.startsWith('"')||e.startsWith("'")?e.slice(1,-1):e).replace(/\\([\s\S])/g,"$1")}function lr(e){if(!/url\(|["'\\]/i.test(e))return e;const t=e.replace(Ce,(n,s)=>{if(s!==void 0){const i=Oe(Pe(s));return`url(${JSON.stringify(i)})`}const o=Pe(n);return JSON.stringify(cr.test(o)?Oe(o):X(o))}),r=t.replace(Ce,"");return/url\(|["'\\]/i.test(r)?"***":t}function ye(){return dr()}function dr(){return typeof window<"u"&&window.isElectron===!0}function Ve(e=fr()){return e?ht(typeof e=="string"?{pathname:e}:e):!1}function fr(){if(typeof window>"u"||!window.location)return;const{pathname:e,search:t,hash:r}=window.location;return{pathname:e,search:t,hash:r}}function qe(){return!ye()||pe()?"off":"desktop"}function hn(e){return e.surface!=="hosted"||e.sharedLink?"off":e.recording===void 0?"pending":e.recording==="off"?"off":e.recording==="full"?"full":"masked"}var ae="mcpjam.telemetry.replayOffActor",k;function We(){if(k!==void 0)return k;try{k=window.localStorage.getItem(ae)}catch{k=null}return k}function En(e,t){if(e===null)return;const r=We(),n=t?e:r===e?null:r;if(n!==r){k=n;try{n===null?window.localStorage.removeItem(ae):window.localStorage.setItem(ae,n)}catch{}}}function vn(e){const t=We();return t===null?!1:e===void 0||e===t}var Je;function Se(){return Je??(qe()==="off"?"off":"pending")}function wn(e){Je=e}function p(){return ft()!=="full"}var Ne="https://redacted.invalid/",pr=["entryType","initiatorType","method","status","responseStatus","isInitial","startTime","endTime","duration","timeOrigin","timestamp","fetchStart","domainLookupStart","domainLookupEnd","connectStart","secureConnectionStart","connectEnd","requestStart","responseStart","responseEnd","redirectStart","redirectEnd","workerStart","transferSize","encodedBodySize","decodedBodySize","nextHopProtocol","renderBlockingStatus","deliveryType"];function Xe(e){const t=r=>e==="masked"?F(r):de(r);return function(n){const s=n.entryType===void 0&&!n.isInitial;try{const o={};for(const i of pr)n[i]!==void 0&&(o[i]=n[i]);return typeof n.name=="string"&&(o.name=t(n.name)),typeof n.url=="string"&&(o.url=t(n.url)),s&&!o.name&&(o.name=Ne),o}catch{return s?{name:Ne}:null}}}var gr=Xe("full"),_r=Xe("masked"),mr="data-ph-no-capture",Ze=[...Xt].map(e=>e==="image"?"svg image":e).join(", "),yr={maskAllInputs:!0,maskInputOptions:{password:!0},maskTextSelector:"*",maskTextFn:X,blockSelector:Ze,maskAttributeFn:Ye,recordHeaders:!1,recordBody:!1,maskCapturedNetworkRequestFn:gr,compress_events:!1},Qe={maskAllInputs:!0,maskInputOptions:{password:!0},maskTextSelector:"*",maskTextFn:X,blockSelector:Ze,maskAttributeFn:Ye,recordHeaders:!1,recordBody:!1,captureCanvas:{recordCanvas:!1},captureJsonLd:!1,recordCrossOriginIframes:!1,maskCapturedNetworkRequestFn:_r,compress_events:!1};function Sr(e){return e==="masked"?{session_recording:Qe,disable_session_recording:!0,autocapture:!1,capture_dead_clicks:!1,rageclick:!1,capture_exceptions:!1,disable_surveys:!0,enable_heatmaps:!1,capture_performance:!1,enable_recording_console_log:!1,mask_all_text:!0,mask_all_element_attributes:!0}:{session_recording:yr,disable_session_recording:!0,autocapture:!0,capture_dead_clicks:!0,rageclick:!0,capture_exceptions:ye(),disable_surveys:!1,enable_heatmaps:!0,enable_recording_console_log:!1,mask_all_text:!1,mask_all_element_attributes:!1}}var te=null,w=!1,B=null;function Tn(){return B}var j=!1,ie=null;function hr(e){if(j||Se()!=="full"||!Array.isArray(e))return null;if(ie===null)return e;const t=ie,r=e.filter(n=>{const s=n?.timestamp;return typeof s=="number"&&s>=t});return r.length>0?r:null}function bn(e,t){if(B!==e){j=!0;try{B?.stopSessionRecording?.()}finally{j=!1}te=null,w=!1}B=e;try{const r=Se(),n=p()||r==="masked"?"masked":"full";if(n!==te){if(w){j=n==="masked";try{e.stopSessionRecording?.()}finally{j=!1}w=!1}e.set_config?.(Sr(n)),te=n}const s=qe()==="hosted"&&r==="full"&&!p()&&!Ve(t);s&&!w?(ie=Date.now(),e.startSessionRecording?.(),w=!0):!s&&w&&(e.stopSessionRecording?.(),w=!1)}catch{}}var Er=/\[[\w:.-]+(?:="[^"]*")?\]/g,vr=/#[^\s.#[>:]+/g;function wr(e){const t=e.replace(Er,"").replace(vr,""),r=t.search(/[["]/);return r===-1?t:t.slice(0,r)}var Tr=new Set(["class","role","disabled","aria-disabled","data-sentry-component"]);function br(e){const t={...e};typeof e.message=="string"&&(t.message=wr(e.message));const r=e.data;if(r&&typeof r=="object"){const n={...r};typeof r.url=="string"&&(n.url=F(r.url)),typeof r.route=="string"&&(n.route=F(r.route));const s=r.node;if(s&&typeof s=="object"){const o=s.attributes&&typeof s.attributes=="object"?Object.fromEntries(Object.entries(s.attributes).map(([i,l])=>[i,Tr.has(i)?l:"***"])):s.attributes;n.node={...s,attributes:o,...typeof s.textContent=="string"?{textContent:X(s.textContent)}:{}}}t.data=n}return t}function Ir(e){const t=p(),r=t?F:de,n=e?.data,s=n?.payload;if(!n||!s)return e;if(t&&n.tag==="breadcrumb"&&s.category==="console")return null;if(t&&n.tag==="breadcrumb"&&typeof s.category=="string"&&s.category.startsWith("ui."))return{...e,data:{...n,payload:br(s)}};if(n.tag==="breadcrumb"&&s.category==="navigation"){const o=s.data??{};return(typeof o.from!="string"||r(o.from)===o.from)&&(typeof o.to!="string"||r(o.to)===o.to)?e:{...e,data:{...n,payload:{...s,data:{...o,...typeof o.from=="string"?{from:r(o.from)}:{},...typeof o.to=="string"?{to:r(o.to)}:{}}}}}}if(n.tag==="performanceSpan"&&typeof s.description=="string")return r(s.description)===s.description?e:{...e,data:{...n,payload:{...s,description:r(s.description)}}};if(n.tag==="breadcrumb"&&typeof s.message=="string"){const o=Ue(s.message);return o===s.message?e:{...e,data:{...n,payload:{...s,message:o}}}}return e}var Ar=["a[href]","area[href]","iframe","frame[src]","embed[src]","source","track","input[src]","[srcset]","object[data]","table[background]","td[background]","th[background]",'[style*="url(" i]','[style*="image-set(" i]'],In={maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,maskAttributes:["title","placeholder","aria-label","aria-description","alt","action","formaction","poster","href","src","srcset","data","value"],block:[".rr-block",`[${mr}]`,...Ar,`[style*='"']`,`[style*="'"]`,...gt()],networkDetailAllowUrls:[],networkCaptureBodies:!1,beforeAddRecordingEvent:Ir},v=null,L,g,ue=new Set,Y=0,ce=!1,Z=0,Le=!1,et=!1,tt=0;function rt(){const e=Q();return Le&&!e&&(Z+=1),Le=e,e}function D(){if(Y>0){ce=!0;return}et=rt(),tt=Z;for(const e of ue)try{e()}catch{}}function An(){return v}function kn(e){e!==v&&(v=e,L=void 0,g=void 0,D())}function Rn(e,t){if(e!==v)return;const r=e===null?void 0:t;r!==L&&(L=r,D())}function On(){L!==void 0&&(L=void 0,D())}function kr(e){return e!==null&&e===v?L:void 0}function Rr(e=v){return kr(e)==="full"&&Q()}function Cn(){return Z}function Pn(e){return ue.add(e),()=>ue.delete(e)}var f={projectIds:[],organizationIds:[]};function Or(e){const t=V(f),r=!!f.sharedLink;f={sharedLink:e.sharedLink,projectIds:e.projectIds.filter(n=>!!n),organizationIds:e.organizationIds.filter(n=>!!n)},(t!==V(f)||r!==!!f.sharedLink)&&(g=void 0,D())}function Cr(e,t){const r=e&&e===v&&t?{actor:e,context:V(f),content:t}:void 0;r?.actor===g?.actor&&r?.context===g?.context&&r?.content===g?.content||(g=r,D())}function Nn(e,t,r){Y+=1;try{Or(e),Cr(t,r)}finally{Y-=1,Y===0&&(ce||Q()!==et||Z!==tt)&&(ce=!1,D())}}function Q(){return g?.actor===v&&g?.content==="full"&&g.context===V(f)&&typeof window<"u"&&!window.isElectron&&!f.sharedLink&&!Ve()&&f.projectIds.length+f.organizationIds.length>0}function Pr(){const e=Q(),t=Se();return{projectIds:[...f.projectIds],organizationIds:[...f.organizationIds],policy:e?{recording:t==="full"||t==="masked"?t:"off",identity:Rr()?"full":"id_only",content:"full"}:{...zt}}}function nt(e){if(!e)return e;try{const t=Pr(),r={...e.properties??{},[Vt]:Wt(t)};if(e.event==="$snapshot"&&"$snapshot_data"in r){const n=hr(r.$snapshot_data);if(n===null)return null;r.$snapshot_data=n}return{...e,properties:r}}catch{return null}}pt(()=>rt()?"full":"strict");var Nr=/\.[cm]?[jt]sx?$/,Lr=/^(?:[a-z][a-z0-9+.-]*:\/\/|\/)/i;function Dr(e,t){if(typeof e!="string"||!Lr.test(e))return!1;let r;try{r=new URL(e,t)}catch{return!1}return r.origin!==t?!1:!Nr.test(r.pathname)}function Ur(e,t){return e.length===0?!1:e.every(r=>Dr(r,t))}function xr(e,t){return e.length===0?!1:e.every(r=>Ur(r,t))}var st=`${Ge}_tab`,Gr=`ph_${st}`;function jr(){let e="memory";try{const t=`${Gr}_probe`;window.sessionStorage.setItem(t,"1");const r=window.sessionStorage.getItem(t)==="1";window.sessionStorage.removeItem(t),r&&(e="sessionStorage")}catch{}return{persistence:e,persistence_name:st}}function he(){return typeof window<"u"&&window.location?.origin?.startsWith("http")?`${window.location.origin}/tlm`:"/tlm"}function Ee(e){const t=oe()?.guestId,r=e&&Object.keys(e).length>0?e:void 0;return!t&&!r?{}:{bootstrap:{...t?{distinctID:t,isIdentifiedID:!1}:{},...r?{featureFlags:r}:{}}}}var ot={...jr(),advanced_disable_feature_flags:!0,advanced_disable_feature_flags_on_first_load:!0},at=null;function le(e=at){if(e)for(const t of[e.persistence,e.sessionPersistence]){const r=t?.props;if(!(!t||!r)){try{const n=mt(r);if(n===r)continue;for(const s of Object.keys(r))s in n||delete r[s];Object.assign(r,n)}catch{delete r.$initial_person_info}try{t.save?.()}catch{}}}}function it(e){if(e?.event!=="$exception"||typeof window>"u")return e;const t=e.properties?.$exception_list;if(!Array.isArray(t))return e;const r=t.map(n=>{const s=n?.stacktrace?.frames;return Array.isArray(s)?s.map(o=>o?.filename):[]});return xr(r,window.location.origin)?null:e}var Fr=yt,Mr=he()==="/tlm"||pe(),$r={advanced_disable_flags:!0,disable_surveys:!0,disable_external_dependency_loading:!0};function ut(e=typeof window>"u"?void 0:window.location?.hostname){const t=!!e&&Fr.has(e.toLowerCase());return{capture_pageview:t?"history_change":!1,capture_pageleave:t}}var De={api_host:he(),ui_host:"https://us.posthog.com",...Ee(),...ut(),...ot,person_profiles:"always",disable_beacon:!0,before_send:[it,nt,e=>(le(),e)],disable_capture_url_hashes:!0,get capture_dead_clicks(){return!p()},get autocapture(){return!p()},get rageclick(){return!p()},get disable_surveys(){return p()},get enable_heatmaps(){return!p()},get capture_exceptions(){return ye()&&!p()},disable_session_recording:!0,session_recording:Qe,enable_recording_console_log:!1,get mask_all_text(){return p()},get mask_all_element_attributes(){return p()},loaded:e=>{at=e,le(e),e.register({environment:"production",platform:q(),version:"3.27.2",deployment:"self_hosted",source:"client"}),e.setPersonPropertiesForFlags?.({deployment:"self_hosted",platform:q()})}};function Ln(e){if(e===!0)return!0;if(e===!1||e===void 0||e===null)return!1;if(typeof e=="string"){const t=e.trim().toLowerCase();return t==="true"||t==="1"||t==="yes"||t==="on"}return!1}function Hr(e){const t=Ee(e);return"bootstrap"in t?Object.defineProperties({},{...Object.getOwnPropertyDescriptors(De),bootstrap:{value:t.bootstrap,enumerable:!0,configurable:!0,writable:!0}}):De}var Dn=()=>Ge,Un=e=>Mr?{api_host:he(),ui_host:"https://us.posthog.com",...Ee(e),...ut(),...ot,person_profiles:"always",disable_beacon:!0,disable_session_recording:!0,capture_exceptions:!1,...pe()?$r:{},opt_out_capturing_by_default:!0,before_send:[it,nt,t=>(le(),t)],disable_capture_url_hashes:!0,loaded:t=>{t.setPersonPropertiesForFlags?.({deployment:"self_hosted",platform:q()})}}:Hr(e);function q(){if(window?.isElectron){const e=navigator.userAgent.toLowerCase();return e.includes("mac")||e.includes("darwin")?"mac":e.includes("win")?"win":"electron"}return"npm"}function Br(){return"production"}function xn(e){const t=Br();return{location:e,platform:q(),...t!==void 0?{environment:t}:{}}}export{dn as $,bn as A,Sn as B,Pn as C,Jr as Ct,mr as D,je as Dt,In as E,re as Et,En as F,cn as G,lr as H,vn as I,Kt as J,Yt as K,hn as L,Ve as M,ye as N,yr as O,Ge as Ot,qe as P,fn as Q,wn as R,Rn as S,pe as St,Rr as T,Xr as Tt,F as U,Ye as V,ke as W,oe as X,ln as Y,Bt as Z,Pr as _,Zr as _t,ut as a,an as at,kn as b,qr as bt,Un as c,sn as ct,De as d,rn as dt,gn as et,le as f,Rt as ft,An as g,bt as gt,xr as h,It as ht,it as i,un as it,Se as j,Tn as k,Ln as l,Dt as lt,Gr as m,tn as mt,Br as n,Ht as nt,he as o,pn as ot,xn as p,nn as pt,_n as q,q as r,$t as rt,Dn as s,on as st,Fr as t,Be as tt,Mr as u,h as ut,Cn as v,Qr as vt,kr as w,Wr as wt,Nn as x,Vr as xt,On as y,en as yt,zt as z};
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=PosthogUtils-
|
|
3
|
+
//# sourceMappingURL=PosthogUtils-CreNC30F.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"3.27.
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"3.27.2"};var n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d6395bf6-210a-4c22-a9db-cf841b16383c",e._sentryDebugIdIdentifier="sentry-dbid-d6395bf6-210a-4c22-a9db-cf841b16383c")}catch{}})();var r="mcpjam.local-access",l="mcpjam:access-required",f="mcpjam:access-granted",s=null,a=e=>typeof e=="string"&&/^[A-Za-z0-9_-]{24,}$/.test(e);function o(e){s=e;try{localStorage.setItem(r,e)}catch{}}function u(e=!1){if(!e&&s)return s;try{const n=localStorage.getItem(r);if(a(n))return n}catch{}return s}function E(e){if(a(e.trim()))return e.trim();try{const n=new URLSearchParams(new URL(e.trim()).hash.slice(1)).get("token");return a(n)?n:null}catch{return null}}var i="mcpjam:access-link-received";function d(){const e=new URLSearchParams(window.location.hash.slice(1));if(!e.has("token"))return null;const n=e.get("token"),t=a(n)?n:null;t&&o(t);const c=e.get("tab");return history.replaceState(history.state,"",`${location.pathname}${location.search}${c?`#${encodeURIComponent(c)}`:""}`),t}function h(){const e=()=>{d()&&window.dispatchEvent(new Event(i))};return window.addEventListener("popstate",e),window.addEventListener("hashchange",e),()=>{window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)}}export{d as a,u as c,r as i,o as l,i as n,a as o,l as r,E as s,f as t,h as u};
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=access-link-
|
|
3
|
+
//# sourceMappingURL=access-link-CiqZlBT_.js.map
|