{ "version": 3, "sources": ["../static/components/util.ts", "../static/components/Feedback.html", "../static/components/feedback.js", "../static/components/Page.html", "../static/components/icons.json", "../static/components/Page.js", "../static/components/Admin.html", "../static/components/Admin.ts", "../static/components/AdminPage.html", "../static/components/AdminPage.js", "../static/components/AdminFeedback.html", "../static/components/AdminFeedback.js", "../static/components/Modal.html", "../static/components/Modal.js", "../static/components/AdminModal.html", "../static/components/AdminModal.js", "../static/components/Login.html", "../static/components/Login.js", "../static/components/Checkmark.html", "../static/components/Checkmark.js", "../static/script.ts"], "sourcesContent": ["import { Person, Feedback } from \"./types\";\n\n/********************************************************\n * utility functions\n *********************************************************/\n\n/*\n * how local storage is structured:\n * name -> string\n * email -> string\n * uuid -> string\n * feedback -> serialized feedback hash (key: page_id, value: array of feedback)\n */\n\nexport function uuidv4(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = Math.random() * 16 | 0,\n v = c == 'x' ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\n\nexport function getUUID(): string {\n var uuid = localStorage.getItem(\"uuid\");\n if (!uuid) {\n uuid = uuidv4();\n localStorage.setItem(\"uuid\", uuid);\n }\n return uuid;\n}\n\nexport async function saveFeedback(feedback: Feedback) {\n if (!feedback.id) {\n feedback.id = uuidv4();\n }\n const resp = await fetch(\"/api/feedback\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify(feedback),\n signal: AbortSignal.timeout(1000),\n });\n return resp.ok;\n}\n\nexport async function createPerson(person: Person) {\n const result = await fetch(\"/api/person\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify(person),\n });\n return result;\n}\n\nexport function getPosition(feedback: Feedback, currWidth: number, currHeight: number) {\n const currX = feedback.x * currWidth / feedback.width;\n const currY = feedback.y * currHeight / feedback.height;\n return {\n left: currX + 'px',\n top: currY + 'px',\n };\n}\n", "
\n Hello! \n
\n\n You're here because I asked you for feedback on this zine. Thank you!\n
\n\n\n First, please enter your name and email so that I know who the feedback\n is from, and what email address to send the zine to when it's finished.\n
\n\nName: | \n\n \n | \n
Email: | \n\n \n | \n
\n Now, here's the zine! You can click anywhere on a page to leave feedback.\n
\n