PageSourceSearch

https://hunghoevervip.com/assets/Endowments-DxvC64j9.js

js hunghoevervip.com collected 2026-10-08 21:32:48 UTC 7,657 bytes, 1 lines download raw bytes

1import{j as e}from"./query-vendor-kvu6DCO6.js";import{d as O,g as $,r as s}from"./react-vendor-DhN5vIHY.js";import{s as c,D as B,b as V,d as W,e as Y}from"./index-x3WCjE4v.js";import{Q as Z}from"./index-DuiYKhZo.js";import{H as J}from"./HeaderLogos-CcCTX1ha.js";import{E}from"./EventTicketsIcon-BFiAN6uM.js";import{c as K}from"./img-uiyJBIBf.js";import{C as X}from"./chevron-left-D7o3RYBl.js";import{Q as ee}from"./qr-code-wp4N_wPQ.js";import{M as te}from"./map-pin-Y36N76ZC.js";import{C as se}from"./calendar-TCRS5DbI.js";import"./kwagi-heath-group.png.asset-DwX5yxpU.js";import"./apl-a-mark.png.asset-Dn5Bhq-r.js";const ve=()=>{const L=O(),[Q]=$(),l=Q.get("id"),[a,z]=s.useState(null),[k,D]=s.useState(!1),[_,M]=s.useState([]),[ae,A]=s.useState(null);s.useState(!1);const[I,S]=s.useState(!1),[v,C]=s.useState(!1),[P,b]=s.useState(null),[q,m]=s.useState(null),[R,T]=s.useState(!1);s.useEffect(()=>{l&&(async()=>{const{data:t}=await c.from("events").select("id,title,description,event_date,location,image_url,ticket_url,sold_out").eq("id",l).maybeSingle();t&&z(t);const{data:n}=await c.from("ticket_tiers").select("id, name, price_cents, quantity_available, status").eq("event_id",l).order("price_cents",{ascending:!0});M(n||[]),n&&n.length&&A(n[0].id)})()},[l]),s.useEffect(()=>{if(!l||!a)return;let t=!1;return(async()=>{try{const{data:{user:n}}=await c.auth.getUser();if(!n)return;const{data:d}=await c.from("event_registrations").select("id,status").eq("user_id",n.id).eq("event_id",l).limit(5);if((d??[]).some(o=>{const N=String(o?.status??"").toLowerCase().replace(/[\s_-]/g,"");return N!=="cancelled"&&N!=="canceled"&&N!=="refunded"})){t||T(!0);return}const{data:i}=await c.functions.invoke("eventbrite-my-tickets");if(!i?.connected)return;const p=Array.isArray(i?.orders)?i.orders:[],g=(a.ticket_url||"").match(/(\d{8,})/)?.[1]??null,x=o=>String(o??"").trim().toLowerCase(),h=x(a.title),r=p.some(o=>g&&String(o?.event_id??o?.event?.id)===g||x(o?.event?.name?.text)===h||h.length>3&&x(o?.event?.name?.text).includes(h));!t&&r&&T(!0)}catch{}})(),()=>{t=!0}},[l,a]);const U=async()=>{S(!0),C(!0),b(null),m(null);try{const{data:t,error:n}=await c.functions.invoke("eventbrite-my-tickets");if(n)throw n;if(!t?.connected){m("Connect your Eventbrite account to view your ticket QR code.");return}const d=Array.isArray(t?.orders)?t.orders:[],y=(j||"").match(/(\d{8,})/)?.[1]??null,i=r=>String(r??"").trim().toLowerCase(),p=d.find(r=>y&&String(r?.event_id??r?.event?.id)===y)||d.find(r=>i(r?.event?.name?.text)===i(u))||d.find(r=>i(r?.event?.name?.text).includes(i(u))&&i(u).length>3);if(!p){m("No ticket found for this event on your Eventbrite account.");return}const{data:g,error:x}=await c.functions.invoke("issue-ticket-qr",{body:{order_id:String(p?.id??"")}});if(x)throw x;const h=g?.codes??[];b(h),h.length||m("No ticket codes found for this order yet.")}catch{m("Could not load your ticket QR code.")}finally{C(!1)}},G=s.useMemo(()=>{if(!a?.event_date)return"Date TBA";const t=new Date(a.event_date),n=t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"}),d=t.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",timeZoneName:"short"});return`${n} · ${d}`},[a]),j=s.useMemo(()=>{const t=(a?.ticket_url||"").trim();return t?/^https?:\/\//i.test(t)?t:`https://${t}`:null},[a]);s.useMemo(()=>_.some(t=>(t.status==null||String(t.status).toLowerCase()==="active")&&(t.quantity_available==null||t.quantity_available>0)),[_]);const w=(t=>{if(!t)return null;if(/^https?:\/\//i.test(t))return t;const n=t.replace(/^\/?events\//,"").replace(/^\//,"");return c.storage.from("events").getPublicUrl(n).data.publicUrl})(a?.image_url),u=a?.title||"Winter Music Festival 2026",H=a?.location||"Central Park, NY",f=a?.description||"A cozy, pressure-free night with great music and easygoing vibes. Meet new people, enjoy genuine moments, and let conversations flow naturally. A bright city hangout made for connection, comfort, and good energy.",F=f.length>180&&!k?f.slice(0,180)+"…":f;return e.jsx("div",{className:"min-h-screen text-white pb-12 bg-[#0a1530] relative",children:e.jsxs("div",{className:"relative z-10",children:[e.jsxs("div",{className:"absolute top-0 inset-x-0 z-40",children:[e.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-[150px] bg-gradient-to-b from-[#0a1530] via-[#0a1530]/70 to-transparent"}),e.jsxs("header",{className:"relative flex items-center justify-between px-5 pt-6 pb-3",children:[e.jsx("div",{className:"flex items-center h-10",children:e.jsx("button",{onClick:()=>L(-1),"aria-label":"Back",className:"-ml-2 p-2 text-[#f5c518] hover:bg-white/10 rounded-lg transition-colors",children:e.jsx(X,{size:28})})}),e.jsx(J,{})]})]}),w&&e.jsxs("div",{className:"relative w-full",children:[e.jsx("img",{loading:"lazy",decoding:"async",src:K(w,900)??void 0,alt:u,className:"block w-full h-auto bg-[#0a1530]"}),e.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-3/4 bg-gradient-to-b from-transparent to-[#0a1530]"})]}),!w&&e.jsx("div",{className:"h-[88px]"}),e.jsxs("div",{className:"w-full px-4 sm:px-6 lg:px-10 pt-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold leading-snug text-[#f5c518] break-words",children:u}),e.jsxs("div",{className:"ml-auto shrink-0 flex items-center gap-3 mt-1",children:[String(a?.sold_out??"").toLowerCase()!=="yes"&&(j?e.jsx("a",{href:j,target:"_blank",rel:"noopener noreferrer","aria-label":"Get Tickets",title:"Get Tickets",className:"text-[#f5c518] hover:brightness-125 transition",children:e.jsx(E,{size:28})}):e.jsx("span",{"aria-label":"Get Tickets",title:"Get Tickets",className:"text-white/30 curs
1or-not-allowed",children:e.jsx(E,{size:28})})),R&&e.jsx("button",{onClick:U,"aria-label":"Show my ticket QR code",className:"text-[#f5c518] hover:brightness-125",children:e.jsx(ee,{size:28})})]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-base text-white/90 font-bold",children:[e.jsx(te,{size:16}),e.jsx("span",{className:"truncate",children:H})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-1.5 text-base text-white/90 font-bold",children:[e.jsx(se,{size:16}),e.jsx("span",{children:G})]}),e.jsxs("div",{className:"mt-6",children:[e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-[#f5c518]",children:"Description"}),e.jsx("p",{className:"mt-3 text-base font-bold leading-relaxed text-white/90 break-words whitespace-pre-wrap",children:F}),f.length>180&&e.jsx("button",{onClick:()=>D(t=>!t),className:"mt-2 text-base font-bold text-[#f5c518]",children:k?"Read less":"Read more"})]}),!1]}),e.jsx(B,{open:I,onOpenChange:t=>{t||(S(!1),b(null),m(null))},children:e.jsxs(V,{className:"bg-[#0a1530] border border-[#f5c518]/50 text-white max-w-sm",children:[e.jsx(W,{children:e.jsx(Y,{className:"text-[#f5c518] text-2xl",children:u})}),e.jsxs("div",{className:"flex flex-col items-center gap-6 pb-2 max-h-[70vh] overflow-y-auto",children:[v&&e.jsx("p",{className:"text-white/70 py-8",children:"Loading your ticket…"}),!v&&q&&e.jsx("p",{className:"text-white/70 py-8 text-center",children:q}),!v&&(P??[]).map(t=>e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx("div",{className:"bg-white p-4 rounded-xl",children:e.jsx(Z,{value:t.code,size:200})}),t.attendee_name&&e.jsx("p",{className:"text-white font-semibold",children:t.attendee_name}),t.ticket_class_name&&e.jsx("p",{className:"text-white/70 text-sm",children:t.ticket_class_name}),t.used&&e.jsx("p",{className:"text-red-400 text-sm font-semibold",children:"Already checked in"})]},t.id))]})]})})]})})};export{ve as default};

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.