PageSourceSearch

https://www.videomagic.ai/chunk-GXM4Z5RC.js

js videomagic.ai collected 2026-09-24 13:01:41 UTC 1,644 bytes, 1 lines download raw bytes

1import{a as m}from"./chunk-CAAZG465.js";import{b as h}from"./chunk-DPRQLTJ7.js";import"./chunk-D5H5FCXI.js";import{C as u,F as a,S as s,i as p,j as n,jb as c,pb as l}from"./chunk-5C5N6S5K.js";import{a as d}from"./chunk-VZBGOO6O.js";var I=(()=>{class r{auth;pageCacheService;messageHandler=e=>this.onMessage(e);constructor(e,t){this.auth=e,this.pageCacheService=t}processUserId(e){let t=e?.sub||"";return e?.primary_user_id&&(t=e.primary_user_id),t&&t.includes("|")&&(t=t.split("|")[1]),t||""}ngOnInit(){window.addEventListener("message",this.messageHandler),window.parent!==window&&window.parent.postMessage({type:"token-bridge-ready"},"*")}ngOnDestroy(){window.removeEventListener("message",this.messageHandler)}onMessage(e){if(e.data?.type==="mark-cache-dirty"){this.handleMarkCacheDirty(e.data.key);return}if(e.data?.type!=="request-token")return;let t=e.origin;this.auth.isAuthenticated$.pipe(a(1),s(i=>i?p(this.auth.getAccessTokenSilently()).pipe(s(f=>this.auth.user$.pipe(a(1),s(o=>n({authenticated:!0,token:f,userId:this.processUserId(o),email:o?.email||null,name:o?.name||null})))),u(()=>n({authenticated:!1,token:null,userId:null,email:null}))):n({authenticated:!1,token:null,userId:null,email:null}))).subscribe(i=>{window.parent.postMessage(d({type:"auth-token"},i),t)})}handleMarkCacheDirty(e){e&&this.auth.user$.pipe(a(1)).subscribe(t=>{let i=this.processUserId(t);i&&this.pageCacheService.markDirty(e,i)})}static \u0275fac=function(t){return new(t||r)(c(h),c(m))};static \u0275cmp=l({type:r,selectors:[["app-token-bridge"]],decls:0,vars:0,template:function(t,i){},encapsulation:2})}return r})();export{I as TokenBridgeComponent};

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.