PageSourceSearch

https://socialloop.ai/_next/static/chunks/1311.e41189ee6f322054.js

js socialloop.ai collected 2026-10-05 12:46:01 UTC 2,810 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1311],{31311:(e,t,n)=>{n.d(t,{KI:()=>o,gv:()=>l,inviteRegistrationService:()=>c});var s=n(42423),i=n(12353);let r={guest:"Guest",vip:"VIP",staff:"Staff",talent:"Talent",talentGuest:"Talent Guest",press:"Press",influencer:"Influencer",industry:"Industry",sponsor:"Sponsor",vendor:"Vendor",friendsFamily:"Friends & Family"},a={doorPerson:"Check-in Attendant",guestList:"Guest Services",manager:"Event Manager",host:"Host",custom:"Custom Role"};function o(e){return r[e]||"Guest"}function l(e){return a[e]||e}class u{static getInstance(){return u.instance||(u.instance=new u),u.instance}async checkForPendingInvite(e,t){try{let{db:n,collection:i,query:r,where:a,getDocs:o,limit:l}=await (0,s.g)(),u=r(i(n,"event_invites"),a("eventID","==",e),a("toUserID","==",t),a("status","==","pending"),l(1)),c=await o(u);if(c.empty)return null;let d=c.docs[0],f=this.parseInviteDocument(d);if(!f)return null;return f.staffRole,f}catch(t){return(0,i.V9)("check-pending-invite",t,{stage:"check-pending-invite",eventId:e}),null}}async consumeInvite(e,t,n){let{db:i,doc:r,writeBatch:a,serverTimestamp:o}=await (0,s.g)(),l=a(i),u=r(i,"event_invites",e);l.update(u,{status:"accepted",acceptedAt:o(),resultingTicketId:n});let c=r(i,"users",t,"pendingInvites",e);l.delete(c),await l.commit()}async prepareForRegistration(e,t){let n=await this.checkForPendingInvite(e,t);return n&&n.staffRole,n}reportMalformedInviteDocument(e,t,n){let s=e.join("+"),r={stage:"parse-invite-document",missing:s};"string"==typeof t&&t&&(r.inviteId=t),"string"==typeof n&&n&&(r.eventId=n),(0,i.V9)("check-pending-invite-malformed",Error("Invite document is missing required fields: ".concat(s)),r)}parseInviteDocument(e){var t,n,s,i,r,a,o,l;let u,c=e.data();if(!c)return this.reportMalformedInviteDocument(["data"],null==e?void 0:e.id,void 0),null;let d=e.id,f=c.eventID,v=c.fromUserID;if(!f||!v){console.warn("⚠️ Invalid invite document: missing required fields");let e=[];return f||e.push("eventID"),v||e.push("fromUserID"),this.reportMalformedInviteDocument(e,d,f),null}let g=c.senderName||"Unknown",m=c.eventName,p="function"==typeof(null==(t=c.eventDate)?void 0:t.toDate)?c.eventDate.toDate():void 0,I=c.category||"guest",h=c.staffRole;if(c.staffPermissions&&"object"==typeof c.staffPermissions){let e=c.staffPermissions;u={scanner:null!=(n=e.scanner)&&n,guestListCheckIn:null!=(s=e.guestListCheckIn)&&s,guestListEdit:null!=(i=e.guestListEdit)&&i,staffManagement:null!=(r=e.staffManagement)&&r,networkController:null!=(a=e.networkController)&&a,refunds:null!=(o=e.refunds)&&o,analytics:null!=(l=e.analytics)&&l}}return{inviteId:d,eventId:f,fromUserId:v,senderName:g,category:I,staffRole:h,staffPermissions:u,eventName:m,eventDate:p}}constructor(){}}let c=u.getInstance()}}]);

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.