PageSourceSearch

https://streetfoodexpo.co.uk/assets/ViewFloorplan-D5N859Dp.js

js streetfoodexpo.co.uk collected 2026-09-30 09:32:03 UTC 3,241 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-ui-BUR-GDUn.js";import{u,a3 as p,d as h,N as v,W as f,I as g,B as c,a4 as w,F as b,s as d,q as m}from"./index-B0Fu6ckJ.js";import{r as n}from"./vendor-react-DCbXEM4Z.js";import"./vendor-charts-BbJn_gn3.js";import"./vendor-editor-CS7TB4mw.js";import"./vendor-data-CUxnnq7o.js";import"./vendor-dnd-CecOPVzN.js";const F=()=>{u();const{isEditMode:l}=p(),[s,o]=n.useState(""),[r,i]=n.useState("");n.useEffect(()=>{(async()=>{const{data:t}=await d.from("page_content").select("content_value").eq("page_name","view-floorplan").eq("section_name","settings").eq("content_key","viewer-url").maybeSingle();t!=null&&t.content_value&&(o(t.content_value),i(t.content_value))})()},[]);const x=async()=>{if(!r.trim())return;const{error:a}=await d.from("page_content").upsert({page_name:"view-floorplan",section_name:"settings",content_key:"viewer-url",content_value:r,content_type:"text"},{onConflict:"page_name,section_name,content_key"});a?m.error("Failed to save URL"):(o(r),m.success("URL saved"))};return e.jsxs(e.Fragment,{children:[e.jsx(h,{titlePrefix:"View Floorplan",description:"View the interactive floorplan for {eventName}."}),e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(v,{}),e.jsxs("main",{className:"pt-page",children:[e.jsx("section",{className:"pt-page pb-5 bg-white",children:e.jsxs("div",{className:"container mx-auto px-4 text-center",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4 text-gradient-title",children:"Event Floorplan"}),e.jsx("p",{className:"text-xl text-muted-foreground w-full mx-auto",children:"Explore our interactive floorplan below"})]})}),e.jsxs("section",{className:"py-8",children:[l&&e.jsx("div",{className:"container mx-auto px-4 mb-4",children:e.jsxs("div",{className:"p-4 bg-muted rounded-lg border border-border",children:[e.jsx(f,{children:"Viewer URL"}),e.jsxs("div",{className:"flex gap-2 mt-1",children:[e.jsx(g,{value:r,onChange:a=>i(a.target.value),placeholder:"Enter URL",className:"flex-1"}),e.jsx(c,{onClick:x,size:"sm",children:"Save URL"})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Supports PDFs, interactive viewers, images, etc."})]})}),s?e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsx("div",{className:"relative w-full bg-white rounded-lg border border-border shadow-lg overflow-hidden",style:{paddingBottom:"56.25%"},children:e.jsx("object",{data:s,type:"application/pdf",className:"absolute inset-0 w-full h-full",title:"Document Viewer",children:e.jsx("iframe",{src:`https://docs.google.com/viewer?url=${encodeURIComponent(s)}&embedded=true`,className:"absolute inset-0 w-full h-full border-0",allowFullScreen:!0,title:"Document Viewer Fallback"})})}),e.jsx("div",{className:"mt-6 text-center",children:e.jsx(c,{asChild:!0,children:e.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(w,{className:"w-4 h-4 mr-2"}),"Download / Open in new tab"]})})})]}):e.jsx("div",{className:"container mx-auto px-4",children:e.jsx("div",{className:"bg-muted rounded-lg border border-border p-12 text-center",children:e.jsx("p",{className:"text-muted-foreground",children:l?"Enter a URL above":"Coming soon"})})})]})]}),e.jsx(b,{})]})]})};export{F 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.