PageSourceSearch

https://app.gojiberry.ai/chunk-ETKWYBA2.js

js gojiberry.ai collected 2026-10-01 14:43:58 UTC 14,103 bytes, 3 lines download raw bytes

1import{A as Y,K as H,M as W,V as G,W as J,X as q,a as M,b as N,d as O,e as F,n as D,na as K,o as A,oa as Q,q as C,s as T,w as L}from"./chunk-E77342GJ.js";import{Ac as R,Cc as B,Db as b,Eb as c,Ia as s,Kc as z,Mb as a,Nb as w,Oa as m,Ob as k,Oc as $,Ua as P,Za as y,_b as _,cc as j,eb as l,ec as U,fb as V,gb as I,ia as p,ja as g,pb as i,qb as r,rb as u,vb as x}from"./chunk-LFRAKHYS.js";import{h as E}from"./chunk-WWX6BADO.js";var X=(n,d,e)=>({"bg-yellow-100":n,"bg-green-100":d,"bg-red-100":e}),Z=(n,d,e)=>({"bx-loader-lines bx-spin text-yellow-600":n,"bx-check text-green-600":d,"bx-x text-red-600":e}),ee=(n,d,e)=>({"bg-yellow-500":n,"bg-green-500":d,"bg-red-500":e});function te(n,d){if(n&1){let e=x();i(0,"div")(1,"div",7)(2,"div",8)(3,"div",9)(4,"div",10)(5,"div",11),u(6,"i",12),r(),i(7,"div",13)(8,"h3",14),a(9),r()()(),i(10,"button",15),b("click",function(){p(e);let t=c();return g(t.closeBanner())}),u(11,"i",16),r()(),i(12,"div",17)(13,"p",18),a(14),r()(),u(15,"div",19),r()()()}if(n&2){let e=c();s(5),l("ngClass",_(5,X,e.banner.type==="yellow",e.banner.type==="green",e.banner.type==="red")),s(),l("ngClass",_(9,Z,e.banner.type==="yellow",e.banner.type==="green",e.banner.type==="red")),s(3),w(e.banner.title),s(5),w(e.banner.message),s(),l("ngClass",_(13,ee,e.banner.type==="yellow",e.banner.type==="green",e.banner.type==="red"))}}function ne(n,d){if(n&1){let e=x();i(0,"div",20)(1,"button",21),b("click",function(){p(e);let t=c();return g(t.closeSubscriptionCancelNotice())}),u(2,"i",16),r(),a(3," Your subscription is scheduled to be canceled on "),i(4,"b"),a(5),j(6,"date"),r(),a(7,". To keep your account active, please "),i(8,"a",22),b("click",function(){p(e);let t=c();return g(t.renewSubscription())}),a(9,"renew your subscription"),r(),a(10,`.
2`),r()}if(n&2){let e=c();s(5),w(U(6,1,e.globalService.currentSubscription==null||e.globalService.currentSubscription.subscription==null?null:e.globalService.currentSubscription.subscription.cancelAt,"dd MMM yyyy"))}}function ie(n,d){if(n&1){let e=x();i(0,"div",25)(1,"div",26)(2,"div",27)(3,"div",28),u(4,"i",29),i(5,"span",30),u(6,"span",31)(7,"span",32),r()(),i(8,"div",33)(9,"div",34)(10,"p",35),a(11,"Finding leads..."),r(),i(12,"span",36),a(13,"Active"),r()(),i(14,"p",37),a(15),r()(),i(16,"button",38),b("click",function(){p(e);let t=c(2);return g(t.showAgentRunningBanner=!1)}),u(17,"i",16),r()(),i(18,"div",39)(19,"div",40)(20,"div",41),u(21,"div",42)(22,"div",43)(23,"div",44),r(),i(24,"p",45),a(25,"Hunting for high-intent leads..."),r()()()()()}if(n&2){let e=c(2);l("@slideIn",void 0),s(15),k("Started ",e.getAgentStartTime(),"")}}function re(n,d){if(n&1&&(i(0,"div",23),y(1,ie,26,2,"div",24),r()),n&2){let e=c();s(),l("ngIf",e.showAgentRunningBanner)}}function oe(n,d){if(n&1){let e=x();i(0,"div",46),b("click",function(){p(e);let t=c();return g(t.openSessionPortal())}),i(1,"div",47)(2,"div",48)(3,"div",49)(4,"p",50),a(5," Payment failed. Please update your payment method to avoid deactivation. "),i(6,"a",51),a(7,"Fix payment"),r()()()()()()}}function se(n,d){if(n&1&&(i(0,"div",52),a(1),r()),n&2){let e=c();I("lg:left-64!",e.offsetImpersonationBannerForSidebar&&!e.globalService.sidebarCollapsed)("lg:left-16!",e.offsetImpersonationBannerForSidebar&&e.globalService.sidebarCollapsed),s(),k(" ",e.impersonationBannerText,`
3`)}}function ae(n,d){if(n&1){let e=x();i(0,"div",53)(1,"div",54)(2,"div",55)(3,"div",56),b("click",function(){p(e);let t=c();return g(t.navigateToCampaigns())}),u(4,"i",57),i(5,"span",58),a(6,"Start your first campaign"),r()(),i(7,"button",59),b("click",function(){p(e);let t=c();return g(t.closeCampaignPill())}),u(8,"i",60),r()()()()}n&2&&l("@slideInOut",void 0)}var we=(()=>{class n{accountService;globalService;apiService;router;agentsService;posthogService;alertsService;title="client";showCampaignPill=!0;currentRoute="";userSubscription;loginSubscription;bannerSubscriptionOpen=!1;banner=null;showAgentRunningBanner=!0;showSubscriptionCancelNotice=!0;constructor(e,o,t,v,f,h,S){this.accountService=e,this.globalService=o,this.apiService=t,this.router=v,this.agentsService=f,this.posthogService=h,this.alertsService=S}get isImpersonating(){return this.apiService.isImpersonating()}get offsetImpersonationBannerForSidebar(){if(!this.globalService.showSidebar)return!1;let e=(this.currentRoute||this.router.url).split("?")[0];return e!=="/"&&e!=="/login"&&e!=="/registration"&&e!=="/reset-password"&&!e.startsWith("/auth/")&&!e.startsWith("/onboarding")}get impersonationBannerText(){let e=this.globalService.currentUser;if(!e)return"Impersonating\u2026";let o=`${e.firstName??""} ${e.lastName??""}`.trim();return o?`Impersonating ${o} (${e.email})`:`Impersonating ${e.email}`}ngOnInit(){this.showInformationBanner(),window.addEventListener("storage",this.onAuthTokenStorageChange),this.userSubscription=this.accountService.currentUser$.subscribe(e=>{this.globalService.setCurrentUser(e)}),this.loginSubscription=this.accountService.isLoggedIn$.subscribe(e=>{this.globalService.setLoginStatus(e)}),this.router.events.subscribe(e=>{e instanceof M?document.body.classList.remove("transitions-enabled"):e instanceof N&&(this.currentRoute=e.url,setTimeout(()=>{document.body.classList.add("transitions-enabled")},50))}),setInterval(()=>{this.getRunningUserAgents()},1e3*60),this.getRunningUserAgents()}ngOnDestroy(){window.removeEventListener("storage",this.onAuthTokenStorageChange),this.userSubscription?.unsubscribe(),this.loginSubscription?.unsubscribe()}onAuthTokenStorageChange=e=>{e.key==="auth_token"&&this.tokenUserId(e.oldValue)!==this.tokenUserId(e.newValue)&&window.location.reload()};tokenUserId(e){if(!e)return null;try{let o=JSON.parse(atob(e.split(".")[1]));return o?.id!=null?String(o.id):null}catch{return null}}closeCampaignPill(){this.showCampaignPill=!1}navigateToCampaigns(){this.router.navigate(["/campaigns"])}shouldShowCampaignPill(){let e=this.currentRoute.split("?")[0];return this.globalService.nbrCampaigns===0&&this.showCampaignPill&&(e==="/ai-agents"||e==="/contacts"||e==="/copilot")}showInformationBanner(){fetch("https://gojiberry-public.s3.eu-west-3.amazonaws.com/client_banner.json").then(e=>e.json()).then(e=>{console.log("Banner data:",e),e.type&&e.title&&e.message&&e.id&&(this.banner=e)}).catch(e=>{console.error("Error fetching banner data:",e),this.banner=null})}closeBanner(){this.banner=null}openSessionPortal(){this.accountService.createPortalPage().subscribe(e=>{console.log("Session portal response:",e),window.open(e.url,"_blank"),this.bannerSubscriptionOpen=!0})}getRunningUserAgents(){this.agentsService.getRunningUserAgents().subscribe({next:e=>{console.log("Running user agents:",e),this.globalService.runningUserAgents=e.tasks}})}getAgentStartTime(){if(this.globalService.runningUserAgents&&this.globalService.runningUserAgents.length>0){let e=this.globalService.runningUserAgents[0].createdAt;if(e){let o=new Date,t=new Date(e),v=o.getTime()-t.getTime(),f=Math.floor(v/6e4),h=Math.floor(v%6e4/1e3);if(f===0)return`${h} second${h!==1?"s":""} ago`;if(f<60)return`${f} minute${f!==1?"s":""} ago`;{let S=Math.floor(f/60);return`${S} hour${S!==1?"s":""} ago`}}}return"just now"}renewSubscription(){return E(this,null,function*(){try{yield this.alertsService.show({title:"Renew Subscription",message:"Are you sure you want to renew your subscription? The scheduled cancellation will be removed and your subscription will continue as usual.",type:"success",dialog:"confirm",button:"Renew"})}catch{return}this.accountService.renewSubscription().subscribe({next:e=>{console.log("response",e),Q({zIndex:1e5}),setTimeout(()=>{location.reload()},2e3)},error:e=>{console.error("Error renewing subscription:",e),this.alertsService.show({title:"Unable to renew subscription",message:e?.status===403?"Only the owner of your organization can renew the subscription. Please ask them to renew it.":e?.error?.message||"Something went wrong while renewing your subscription. Please try again later.",type:"error",dialog:"alert",button:"Close"}).catch(()=>{})}})})}closeSubscriptionCancelNotice(){this.showSubscriptionCancelNotice=!1}static \u0275fac=function(o){return new(o||n)(m(q),m(J),m(W),m(F),m(K),m(G),m(H))};static \u0275cmp=P({type:n,selectors:[["app-root"]],decls:8,vars:10,consts:[[4,"ngIf"],["class","bg-red-100 text-red-800 border border-red-200 p-4 rounded-lg text-center fixed top-4 right-4 z-50 max-w-md",4,"ngIf"],["class","fixed top-4 z-50 right-4",4,"ngIf"],[3,"click",4,"ngIf"],["class","fixed top-0 right-0 left-0 z-40 alert alert-info alert-soft justify-center rounded-none border-x-0 border-t-0 text-center text-sm font-medium py-2 px-4 transition-[left] duration-300 ease-in-out",3,"lg:left-64!","lg:left-16!",4,"ngIf"],[1,"min-h-screen","bg-slate-50","relative","overflow-hidden"],["class","fixed bottom-6 left-1/2 transform -translate-x-1/2 z-50 hidden md:block",4,"ngIf"],[1,"fixed","top-4","right-4","z-50","max-w-md"],[1,"bg-white","border","border-gray-200","rounded-lg","shadow-lg","backdrop-blur-sm","bg-opacity-95"],[1,"flex","items-start","justify-between","p-4","pb-3"],[1,"flex","items-center"],[1,"flex-shrink-0","w-8","h-8","rounded-full","flex","items-center","justify-center",3,"ngClass"],[1,"text-sm","bx",3,"ngClass"],[1,"ml-3"],[1,"text-sm","font-semibold","text-gray-900","leading-5"],[1,"flex-shrink-0","ml-4","p-1","rounded-md","text-gray-400","hover:text-gray-600","hover:bg-gray-100","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-gray-300",3,"click"],[1,"bx","bx-x","text-lg"],[1,"px-4","pb-4"],[1,"text-sm","text-gray-600","leading-relaxed"],[1,"h-1","rounded-b-lg",3,"ngClass"],[1,"bg-red-100","text-red-800","border","border-red-200","p-4","rounded-lg","text-center","fixed","top-4","right-4","z-50","max-w-md"],[1,"absolute","top-2","right-2","flex","items-center","justify-center","w-6","h-6","rounded-md","hover:bg-red-200","text-red-600","hover:text-red-800","transition-colors","cursor-pointer",3,"click"],[1,"text-red-700","hover:text-red-900","underline","cursor-pointer","transition-colors","duration-200","font-bold",3,"click"],[1,"fixed","top-4","z-50","right-4"],["class","cursor-auto",4,"ngIf"],[1,"curs
3or-auto"],[1,"bg-white","border","border-gray-200","rounded-lg","shadow-lg","overflow-hidden","min-w-[280px]"],[1,"px-3","py-2.5","flex","items-center","gap-2.5","border-b","border-gray-100"],[1,"relative","flex","items-center","justify-center","w-8","h-8","bg-gray-50","rounded-md","border","border-gray-200"],[1,"bx","bx-radar","text-gray-700","text-base"],[1,"absolute","-top-0.5","-right-0.5","flex","h-2.5","w-2.5"],[1,"animate-ping","absolute","inline-flex","h-full","w-full","rounded-full","bg-green-400","opacity-75"],[1,"relative","inline-flex","rounded-full","h-2.5","w-2.5","bg-green-500"],[1,"flex-1"],[1,"flex","items-center","gap-1.5"],[1,"text-xs","font-medium","text-gray-900"],[1,"px-1.5","py-0.5","bg-green-50","text-green-700","text-xs","font-medium","rounded"],[1,"text-xs","text-gray-500","mt-0.5"],[1,"flex","items-center","justify-center","w-6","h-6","rounded-md","hover:bg-gray-100","text-gray-400","hover:text-gray-600","transition-colors","cursor-pointer",3,"click"],[1,"px-3","py-2.5","bg-gray-50","border-t","border-gray-100"],[1,"flex","items-center","gap-2"],[1,"flex","items-center","gap-1"],[1,"w-1","h-1","bg-orange-500","rounded-full","animate-bounce",2,"animation-delay","0s"],[1,"w-1","h-1","bg-orange-500","rounded-full","animate-bounce",2,"animation-delay","0.2s"],[1,"w-1","h-1","bg-orange-500","rounded-full","animate-bounce",2,"animation-delay","0.4s"],[1,"text-xs","text-gray-600"],[3,"click"],[1,"fixed","top-4","z-50","left-1/2","transform","-translate-x-1/2","cursor-pointer"],[1,"bg-red-100","border","border-red-200","rounded-lg","shadow-lg","backdrop-blur-sm","bg-opacity-95"],[1,"p-4"],[1,"text-sm","text-red-600","leading-relaxed","text-center"],["target","_blank",1,"text-red-700","underline","font-bold"],[1,"fixed","top-0","right-0","left-0","z-40","alert","alert-info","alert-soft","justify-center","rounded-none","border-x-0","border-t-0","text-center","text-sm","font-medium","py-2","px-4","transition-[left]","duration-300","ease-in-out"],[1,"fixed","bottom-6","left-1/2","transform","-translate-x-1/2","z-50","hidden","md:block"],[1,"bg-gradient-to-r","from-orange-500","to-red-500","text-white","px-6","py-3","rounded-full","shadow-lg","hover:shadow-xl","transition-all","duration-300","cursor-pointer","group","relative","overflow-hidden"],[1,"flex","items-center","space-x-2"],[1,"flex","items-center","space-x-2",3,"click"],[1,"bx","bx-rocket","text-lg","group-hover:animate-bounce"],[1,"font-medium"],[1,"w-6","h-6","bg-white","text-orange-500","rounded-full","flex","items-center","justify-center","text-xs","hover:bg-gray-100","transition-colors","duration-200",3,"click"],[1,"bx","bx-x"]],template:function(o,t){o&1&&(y(0,te,16,17,"div",0)(1,ne,11,4,"div",1)(2,re,2,1,"div",2)(3,oe,8,0,"div",3)(4,se,2,5,"div",4),i(5,"div",5),u(6,"router-outlet"),r(),y(7,ae,9,1,"div",6)),o&2&&(l("ngIf",t.banner),s(),l("ngIf",(t.globalService.currentSubscription==null||t.globalService.currentSubscription.subscription==null?null:t.globalService.currentSubscription.subscription.cancelAt)&&t.showSubscriptionCancelNotice),s(),l("ngIf",t.globalService.runningUserAgents&&t.globalService.runningUserAgents.length>0),s(),l("ngIf",(t.globalService.currentSubscription==null||t.globalService.currentSubscription.subscription==null?null:t.globalService.currentSubscription.subscription.status)==="payment_failed"&&!t.bannerSubscriptionOpen),s(),l("ngIf",t.isImpersonating),s(),V("--app-top-offset",t.isImpersonating?"2.25rem":"0px"),I("pt-9",t.isImpersonating),s(2),l("ngIf",t.shouldShowCampaignPill()))},dependencies:[$,R,B,z,O],styles:["@keyframes _ngcontent-%COMP%_shimmer{0%{transform:translate(-100%)}to{transform:translate(300%)}}"],data:{animation:[L,Y,D("slideInOut",[T(":enter",[C({transform:"translateY(100px)",opacity:0}),A("500ms ease-out",C({transform:"translateY(0)",opacity:1}))]),T(":leave",[A("300ms ease-in",C({transform:"translateY(100px)",opacity:0}))])])]}})}return n})();export{we as AppComponent};

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.