Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat: add react-pdf
Marc Seitzccc22f6e3e07
diff --git a/components/PDFViewer.tsx b/components/PDFViewer.tsxnew file mode 100644index 00000000..1c141669--- /dev/null+++ b/components/PDFViewer.tsx@@ -0,0 +1,130 @@+import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/20/solid";+import { Fragment, useState } from "react";+import { Document, Page, pdfjs } from "react-pdf";++pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;++export default function PDFViewer(props: any) {+ const [numPages, setNumPages] = useState<number>(0);+ const [pageNumber, setPageNumber] = useState<number>(1); // start on first page+ const [loading, setLoading] = useState(true);+ const [pageHeight, setPageHeight] = useState(0);+ const [pageWidth, setPageWidth] = useState(0);+++ function onDocumentLoadSuccess({ numPages: nextNumPages }: { numPages: number}) {+ setNumPages(nextNumPages);+ }++ const options = {+ cMapUrl: "cmaps/",+ cMapPacked: true,+ standardFontDataUrl: "standard_fonts/",+ };++ // Go to next page+ function goToNextPage() {+ setPageNumber((prevPageNumber) => prevPageNumber + 1);+ }++ function goToPreviousPage() {+ setPageNumber((prevPageNumber) => prevPageNumber - 1);+ }++ async function trackPageView() {+ const response = await fetch("/api/views", {+ method: "POST",+ body: JSON.stringify({+ linkId: props.linkId,+ email: props.email,+ documentId: props.documentId,+ }),+ headers: {+ "Content-Type": "application/json",+ },+ });+ }+++ return (+ <>+ <Nav pageNumber={pageNumber} numPages={numPages} />+ <div+ hidden={loading}+ style={{ height: "calc(100vh - 64px)" }}+ className="flex items-center"+ >+ <div+ className={`flex items-center justify-between w-full absolute z-10 px-2`}+ >+ <button+ onClick={goToPreviousPage}+ disabled={pageNumber <= 1}+ className="relative h-[calc(100vh - 64px)] px-2 py-24 text-gray-400 hover:text-gray-50 focus:z-20"+ >+ <span className="sr-only">Previous</span>+ <ChevronLeftIcon className="h-10 w-10" aria-hidden="true" />+ </button>+ <button+ onClick={goToNextPage}+ disabled={pageNumber >= numPages!}+ className="relative h-[calc(100vh - 64px)] px-2 py-24 text-gray-400 hover:text-gray-50 focus:z-20"+ >+ <span className="sr-only">Next</span>+ <ChevronRightIcon className="h-10 w-10" aria-hidden="true" />+ </button>+ </div>++ <div className="h-full flex justify-center mx-auto">+ <Document+ file={props.file}+ onLoadSuccess={onDocumentLoadSuccess}+ options={options}+ renderMode="canvas"+ className=""+ >+ <Page+ className=""+ key={pageNumber}+ pageNumber={pageNumber}+ renderAnnotationLayer={false}+ renderTextLayer={false}+ onLoadSuccess={(e) => {+ if (e.height) setPageHeight(e.height);+ setPageWidth(window.innerWidth);+ setLoading(false);+ }}+ onRenderError={() => setLoading(false)}+ width={Math.max(pageWidth * 0.8, 390)}+ />+ </Document>+ </div>+ </div>+ </>+ );+}+++function Nav({pageNumber, numPages}: {pageNumber: number, numPages: number}) {+ return (+ <nav className="bg-black">+ <div className="mx-auto px-2 sm:px-6 lg:px-8">+ <div className="relative flex h-16 items-center justify-between">+ <div className="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start">+ <div className="flex flex-shrink-0 items-center">+ <p className="text-2xl font-bold tracking-tighter text-white">+ Papermark+ </p>+ </div>+ </div>+ <div className="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">+ <div className="bg-gray-900 text-white rounded-md px-3 py-2 text-sm font-medium">+ <span>{pageNumber}</span>+ <span className="text-gray-400"> / {numPages}</span>+ </div>+ </div>+ </div>+ </div>+ </nav>+ );+}\ No newline at end of filediff --git a/package-lock.json b/package-lock.jsonindex 5d7e4894..e218a4fe 100644--- a/package-lock.json+++ b/package-lock.json@@ -37,6 +37,7 @@"react-email": "^1.9.4","react-hot-toast": "^2.4.1","react-icons": "^4.9.0",+ "react-pdf": "^7.1.2","resend": "^0.15.1","swr": "^2.1.5","tailwind-merge": "^1.13.1",@@ -807,6 +808,41 @@"node": ">= 4.0.0"}},+ "node_modules/@mapbox/node-pre-gyp": {+ "version": "1.0.10",+ "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz",+ "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==",+ "optional": true,+ "dependencies": {+ "detect-libc": "^2.0.0",+ "https-proxy-agent": "^5.0.0",+ "make-dir": "^3.1.0",+ "node-fetch": "^2.6.7",+ "nopt": "^5.0.0",+ "npmlog": "^5.0.1",+ "rimraf": "^3.0.2",+ "semver": "^7.3.5",+ "tar": "^6.1.11"+ },+ "bin": {+ "node-pre-gyp": "bin/node-pre-gyp"+ }+ },+ "node_modules/@mapbox/node-pre-gyp/node_modules/nopt": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",+ "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",+ "optional": true,+ "dependencies": {+ "abbrev": "1"+ },+ "bin": {+ "nopt": "bin/nopt.js"+ },+ "engines": {+ "node": ">=6"+ }+ },"node_modules/@next-auth/prisma-adapter": {"version": "1.0.6","resolved": "https://registry.npmjs.org/@next-auth/prisma-adapter/-/prisma-adapter-1.0.6.tgz",@@ -2013,6 +2049,18 @@"node": ">=0.4.0"}},+ "node_modules/agent-base": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",+ "optional": true,+ "dependencies": {+ "debug": "4"+ },+ "engines": {+ "node": ">= 6.0.0"+ }+ },"node_modules/ajv": {"version": "6.12.6","resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",@@ -2067,6 +2115,25 @@"node": ">= 8"}},+ "node_modules/aproba": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",+ "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",+ "optional": true+ },+ "node_modules/are-we-there-yet": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",+ "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",+ "optional": true,+ "dependencies": {+ "delegates": "^1.0.0",+ "readable-stream": "^3.6.0"+ },+ "engines": {+ "node": ">=10"+ }+ },"node_modules/arg": {"version": "5.0.2","resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",@@ -2512,6 +2579,21 @@}]},+ "node_modules/canvas": {+ "version": "2.11.2",+ "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.2.tgz",+ "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==",+ "hasInstallScript": true,+ "optional": true,+ "dependencies": {+ "@mapbox/node-pre-gyp": "^1.0.0",+ "nan": "^2.17.0",+ "simple-get": "^3.0.3"+ },+ "engines": {+ "node": ">=6"+ }+ },"node_modules/chainsaw": {"version": "0.1.0","resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",@@ -2575,6 +2657,15 @@"node": ">= 6"}},+ "node_modules/chownr": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",+ "optional": true,+ "engines": {+ "node": ">=10"+ }+ },"node_modules/class-variance-authority": {"version": "0.6.0","resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.6.0.tgz",@@ -2653,6 +2744,15 @@"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz","integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="},+ "node_modules/color-support": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",+ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",+ "optional": true,+ "bin": {+ "color-support": "bin.js"+ }+ },"node_modules/combined-stream": {"version": "1.0.8","resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",@@ -2699,6 +2799,12 @@"proto-list": "~1.2.1"}},+ "node_modules/console-control-strings": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",+ "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",+ "optional": true+ },"node_modules/cookie": {"version": "0.5.0","resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",@@ -2777,6 +2883,18 @@}}},+ "node_modules/decompress-response": {+ "version": "4.2.1",+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",+ "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",+ "optional": true,+ "dependencies": {+ "mimic-response": "^2.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },"node_modules/deep-equal": {"version": "2.2.1","resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.1.tgz",@@ -2903,11 +3021,26 @@"node": ">=0.4.0"}},+ "node_modules/delegates": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",+ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",+ "optional": true+ },"node_modules/deprecation": {"version": "2.3.1","resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz","integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="},+ "node_modules/detect-libc": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz",+ "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==",+ "optional": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/detect-node-es": {"version": "1.1.0","resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz",@@ -4071,6 +4204,30 @@"node": ">=14.14"}},+ "node_modules/fs-minipass": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",+ "optional": true,+ "dependencies": {+ "minipass": "^3.0.0"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/fs-minipass/node_modules/minipass": {+ "version": "3.3.6",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",+ "optional": true,+ "dependencies": {+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },"node_modules/fs.realpath": {"version": "1.0.0","resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",@@ -4144,6 +4301,26 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/gauge": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",+ "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",+ "optional": true,+ "dependencies": {+ "aproba": "^1.0.3 || ^2.0.0",+ "color-support": "^1.1.2",+ "console-control-strings": "^1.0.0",+ "has-unicode": "^2.0.1",+ "object-assign": "^4.1.1",+ "signal-exit": "^3.0.0",+ "string-width": "^4.2.3",+ "strip-ansi": "^6.0.1",+ "wide-align": "^1.1.2"+ },+ "engines": {+ "node": ">=10"+ }+ },"node_modules/get-intrinsic": {"version": "1.2.1","resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",@@ -4383,6 +4560,12 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/has-unicode": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",+ "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",+ "optional": true+ },"node_modules/hosted-git-info": {"version": "2.8.9","resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",@@ -4462,6 +4645,19 @@"entities": "^4.4.0"}},+ "node_modules/https-proxy-agent": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",+ "optional": true,+ "dependencies": {+ "agent-base": "6",+ "debug": "4"+ },+ "engines": {+ "node": ">= 6"+ }+ },"node_modules/human-signals": {"version": "4.3.1","resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz",@@ -4714,6 +4910,15 @@"node": ">=0.10.0"}},+ "node_modules/is-fullwidth-code-point": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",+ "optional": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/is-glob": {"version": "4.0.3","resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",@@ -5251,6 +5456,57 @@"react": "^16.5.1 || ^17.0.0 || ^18.0.0"}},+ "node_modules/make-cancellable-promise": {+ "version": "1.3.1",+ "resolved": "https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-1.3.1.tgz",+ "integrity": "sha512-DWOzWdO3xhY5ESjVR+wVFy03rpt0ZccS4bunccNwngoX6rllKlMZm6S9ZnJ5nMuDDweqDMjtaO0g6tZeh+cCUA==",+ "funding": {+ "url": "https://github.com/wojtekmaj/make-cancellable-promise?sponsor=1"+ }+ },+ "node_modules/make-dir": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",+ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",+ "optional": true,+ "dependencies": {+ "semver": "^6.0.0"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/make-dir/node_modules/semver": {+ "version": "6.3.0",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",+ "optional": true,+ "bin": {+ "semver": "bin/semver.js"+ }+ },+ "node_modules/make-event-props": {+ "version": "1.6.1",+ "resolved": "https://registry.npmjs.org/make-event-props/-/make-event-props-1.6.1.tgz",+ "integrity": "sha512-JhvWq/iz1BvlmnPvLJjXv+xnMPJZuychrDC68V+yCGQJn5chcA8rLGKo5EP1XwIKVrigSXKLmbeXAGkf36wdCQ==",+ "funding": {+ "url": "https://github.com/wojtekmaj/make-event-props?sponsor=1"+ }+ },+ "node_modules/merge-refs": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/merge-refs/-/merge-refs-1.2.1.tgz",+ "integrity": "sha512-pRPz39HQz2xzHdXAGvtJ9S8aEpNgpUjzb5yPC3ytozodmsHg+9nqgRs7/YOmn9fM/TLzntAC8AdGTidKxOq9TQ==",+ "dependencies": {+ "@types/react": "*"+ },+ "funding": {+ "url": "https://github.com/wojtekmaj/merge-refs?sponsor=1"+ }+ },"node_modules/merge-stream": {"version": "2.0.0","resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",@@ -5306,6 +5562,18 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/mimic-response": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",+ "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",+ "optional": true,+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/mini-svg-data-uri": {"version": "1.4.4","resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz",@@ -5334,6 +5602,40 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/minipass": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",+ "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",+ "optional": true,+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/minizlib": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",+ "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",+ "optional": true,+ "dependencies": {+ "minipass": "^3.0.0",+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/minizlib/node_modules/minipass": {+ "version": "3.3.6",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",+ "optional": true,+ "dependencies": {+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },"node_modules/mkdirp": {"version": "0.5.6","resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",@@ -5360,6 +5662,12 @@"thenify-all": "^1.0.0"}},+ "node_modules/nan": {+ "version": "2.17.0",+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",+ "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",+ "optional": true+ },"node_modules/nanoid": {"version": "3.3.6","resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",@@ -5579,6 +5887,18 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/npmlog": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",+ "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",+ "optional": true,+ "dependencies": {+ "are-we-there-yet": "^2.0.0",+ "console-control-strings": "^1.1.0",+ "gauge": "^3.0.0",+ "set-blocking": "^2.0.0"+ }+ },"node_modules/oauth": {"version": "0.9.15","resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz",@@ -5917,6 +6237,29 @@"node": ">=8"}},+ "node_modules/path2d-polyfill": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/path2d-polyfill/-/path2d-polyfill-2.0.1.tgz",+ "integrity": "sha512-ad/3bsalbbWhmBo0D6FZ4RNMwsLsPpL6gnvhuSaU5Vm7b06Kr5ubSltQQ0T7YKsiJQO+g22zJ4dJKNTXIyOXtA==",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/pdfjs-dist": {+ "version": "3.6.172",+ "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-3.6.172.tgz",+ "integrity": "sha512-bfOhCg+S9DXh/ImWhWYTOiq3aVMFSCvzGiBzsIJtdMC71kVWDBw7UXr32xh0y56qc5wMVylIeqV3hBaRsu+e+w==",+ "dependencies": {+ "path2d-polyfill": "^2.0.1",+ "web-streams-polyfill": "^3.2.1"+ },+ "engines": {+ "node": ">=16"+ },+ "optionalDependencies": {+ "canvas": "^2.11.2"+ }+ },"node_modules/peberminta": {"version": "0.8.0","resolved": "https://registry.npmjs.org/peberminta/-/peberminta-0.8.0.tgz",@@ -6407,6 +6750,28 @@"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz","integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="},+ "node_modules/react-pdf": {+ "version": "7.1.2",+ "resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-7.1.2.tgz",+ "integrity": "sha512-hmTUKh3WVYDJlP8XvebGN8HH0Gk/tXh9WgNAtvdHn79FHL78UEPSbVj3veHHGqmMa2hz1wJCItLUqGVP68Qsjw==",+ "dependencies": {+ "clsx": "^1.2.1",+ "make-cancellable-promise": "^1.0.0",+ "make-event-props": "^1.5.0",+ "merge-refs": "^1.1.3",+ "pdfjs-dist": "3.6.172",+ "prop-types": "^15.6.2",+ "tiny-invariant": "^1.0.0",+ "tiny-warning": "^1.0.0"+ },+ "funding": {+ "url": "https://github.com/wojtekmaj/react-pdf?sponsor=1"+ },+ "peerDependencies": {+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"+ }+ },"node_modules/react-property": {"version": "2.0.0","resolved": "https://registry.npmjs.org/react-property/-/react-property-2.0.0.tgz",@@ -6888,6 +7253,12 @@"node": ">=10"}},+ "node_modules/set-blocking": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",+ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",+ "optional": true+ },"node_modules/setimmediate": {"version": "1.0.5","resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",@@ -6951,6 +7322,37 @@"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz","integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="},+ "node_modules/simple-concat": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",+ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "optional": true+ },+ "node_modules/simple-get": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz",+ "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",+ "optional": true,+ "dependencies": {+ "decompress-response": "^4.2.0",+ "once": "^1.3.1",+ "simple-concat": "^1.0.0"+ }+ },"node_modules/slash": {"version": "3.0.0","resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",@@ -7027,6 +7429,26 @@"safe-buffer": "~5.2.0"}},+ "node_modules/string-width": {+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "optional": true,+ "dependencies": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/string-width/node_modules/emoji-regex": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",+ "optional": true+ },"node_modules/string.prototype.matchall": {"version": "4.0.8","resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz",@@ -7324,6 +7746,35 @@"node": ">=6"}},+ "node_modules/tar": {+ "version": "6.1.15",+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.15.tgz",+ "integrity": "sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==",+ "optional": true,+ "dependencies": {+ "chownr": "^2.0.0",+ "fs-minipass": "^2.0.0",+ "minipass": "^5.0.0",+ "minizlib": "^2.1.1",+ "mkdirp": "^1.0.3",+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/tar/node_modules/mkdirp": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",+ "optional": true,+ "bin": {+ "mkdirp": "bin/cmd.js"+ },+ "engines": {+ "node": ">=10"+ }+ },"node_modules/text-table": {"version": "0.2.0","resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",@@ -7348,6 +7799,16 @@"node": ">=0.8"}},+ "node_modules/tiny-invariant": {+ "version": "1.3.1",+ "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz",+ "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw=="+ },+ "node_modules/tiny-warning": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",+ "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="+ },"node_modules/titleize": {"version": "3.0.0","resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz",@@ -7857,6 +8318,14 @@"defaults": "^1.0.3"}},+ "node_modules/web-streams-polyfill": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",+ "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==",+ "engines": {+ "node": ">= 8"+ }+ },"node_modules/webidl-conversions": {"version": "3.0.1","resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",@@ -7933,6 +8402,15 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/wide-align": {+ "version": "1.1.5",+ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",+ "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",+ "optional": true,+ "dependencies": {+ "string-width": "^1.0.2 || 2 || 3 || 4"+ }+ },"node_modules/word-wrap": {"version": "1.2.3","resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",@@ -8441,6 +8919,34 @@}}},+ "@mapbox/node-pre-gyp": {+ "version": "1.0.10",+ "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz",+ "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==",+ "optional": true,+ "requires": {+ "detect-libc": "^2.0.0",+ "https-proxy-agent": "^5.0.0",+ "make-dir": "^3.1.0",+ "node-fetch": "^2.6.7",+ "nopt": "^5.0.0",+ "npmlog": "^5.0.1",+ "rimraf": "^3.0.2",+ "semver": "^7.3.5",+ "tar": "^6.1.11"+ },+ "dependencies": {+ "nopt": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",+ "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",+ "optional": true,+ "requires": {+ "abbrev": "1"+ }+ }+ }+ },"@next-auth/prisma-adapter": {"version": "1.0.6","resolved": "https://registry.npmjs.org/@next-auth/prisma-adapter/-/prisma-adapter-1.0.6.tgz",@@ -9210,6 +9716,15 @@"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz","integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA=="},+ "agent-base": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",+ "optional": true,+ "requires": {+ "debug": "4"+ }+ },"ajv": {"version": "6.12.6","resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",@@ -9248,6 +9763,22 @@"picomatch": "^2.0.4"}},+ "aproba": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",+ "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",+ "optional": true+ },+ "are-we-there-yet": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",+ "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",+ "optional": true,+ "requires": {+ "delegates": "^1.0.0",+ "readable-stream": "^3.6.0"+ }+ },"arg": {"version": "5.0.2","resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",@@ -9534,6 +10065,17 @@"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001492.tgz","integrity": "sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw=="},+ "canvas": {+ "version": "2.11.2",+ "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.2.tgz",+ "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==",+ "optional": true,+ "requires": {+ "@mapbox/node-pre-gyp": "^1.0.0",+ "nan": "^2.17.0",+ "simple-get": "^3.0.3"+ }+ },"chainsaw": {"version": "0.1.0","resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",@@ -9576,6 +10118,12 @@}}},+ "chownr": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",+ "optional": true+ },"class-variance-authority": {"version": "0.6.0","resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.6.0.tgz",@@ -9625,6 +10173,12 @@"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz","integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="},+ "color-support": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",+ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",+ "optional": true+ },"combined-stream": {"version": "1.0.8","resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",@@ -9662,6 +10216,12 @@"proto-list": "~1.2.1"}},+ "console-control-strings": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",+ "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",+ "optional": true+ },"cookie": {"version": "0.5.0","resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",@@ -9713,6 +10273,15 @@"ms": "2.1.2"}},+ "decompress-response": {+ "version": "4.2.1",+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",+ "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",+ "optional": true,+ "requires": {+ "mimic-response": "^2.0.0"+ }+ },"deep-equal": {"version": "2.2.1","resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.1.tgz",@@ -9800,11 +10369,23 @@"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz","integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="},+ "delegates": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",+ "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",+ "optional": true+ },"deprecation": {"version": "2.3.1","resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz","integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="},+ "detect-libc": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz",+ "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==",+ "optional": true+ },"detect-node-es": {"version": "1.1.0","resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz",@@ -10669,6 +11250,26 @@"universalify": "^2.0.0"}},+ "fs-minipass": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",+ "optional": true,+ "requires": {+ "minipass": "^3.0.0"+ },+ "dependencies": {+ "minipass": {+ "version": "3.3.6",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",+ "optional": true,+ "requires": {+ "yallist": "^4.0.0"+ }+ }+ }+ },"fs.realpath": {"version": "1.0.0","resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",@@ -10722,6 +11323,23 @@"resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz","integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ=="},+ "gauge": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",+ "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",+ "optional": true,+ "requires": {+ "aproba": "^1.0.3 || ^2.0.0",+ "color-support": "^1.1.2",+ "console-control-strings": "^1.0.0",+ "has-unicode": "^2.0.1",+ "object-assign": "^4.1.1",+ "signal-exit": "^3.0.0",+ "string-width": "^4.2.3",+ "strip-ansi": "^6.0.1",+ "wide-align": "^1.1.2"+ }+ },"get-intrinsic": {"version": "1.2.1","resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",@@ -10878,6 +11496,12 @@"has-symbols": "^1.0.2"}},+ "has-unicode": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",+ "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",+ "optional": true+ },"hosted-git-info": {"version": "2.8.9","resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",@@ -10939,6 +11563,16 @@"entities": "^4.4.0"}},+ "https-proxy-agent": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",+ "optional": true,+ "requires": {+ "agent-base": "6",+ "debug": "4"+ }+ },"human-signals": {"version": "4.3.1","resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz",@@ -11105,6 +11739,12 @@"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz","integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="},+ "is-fullwidth-code-point": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",+ "optional": true+ },"is-glob": {"version": "4.0.3","resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",@@ -11475,6 +12115,41 @@"integrity": "sha512-PeDVbx5PlIRrVvdxiuSxPfBo7sK5qrL3LbvvRoGVNiHYRAkBm/48lKqoioxcmp0bgsyJs9lMw7CdtGFvnMJbVg==","requires": {}},+ "make-cancellable-promise": {+ "version": "1.3.1",+ "resolved": "https://registry.npmjs.org/make-cancellable-promise/-/make-cancellable-promise-1.3.1.tgz",+ "integrity": "sha512-DWOzWdO3xhY5ESjVR+wVFy03rpt0ZccS4bunccNwngoX6rllKlMZm6S9ZnJ5nMuDDweqDMjtaO0g6tZeh+cCUA=="+ },+ "make-dir": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",+ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",+ "optional": true,+ "requires": {+ "semver": "^6.0.0"+ },+ "dependencies": {+ "semver": {+ "version": "6.3.0",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",+ "optional": true+ }+ }+ },+ "make-event-props": {+ "version": "1.6.1",+ "resolved": "https://registry.npmjs.org/make-event-props/-/make-event-props-1.6.1.tgz",+ "integrity": "sha512-JhvWq/iz1BvlmnPvLJjXv+xnMPJZuychrDC68V+yCGQJn5chcA8rLGKo5EP1XwIKVrigSXKLmbeXAGkf36wdCQ=="+ },+ "merge-refs": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/merge-refs/-/merge-refs-1.2.1.tgz",+ "integrity": "sha512-pRPz39HQz2xzHdXAGvtJ9S8aEpNgpUjzb5yPC3ytozodmsHg+9nqgRs7/YOmn9fM/TLzntAC8AdGTidKxOq9TQ==",+ "requires": {+ "@types/react": "*"+ }+ },"merge-stream": {"version": "2.0.0","resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",@@ -11512,6 +12187,12 @@"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz","integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw=="},+ "mimic-response": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",+ "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",+ "optional": true+ },"mini-svg-data-uri": {"version": "1.4.4","resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz",@@ -11531,6 +12212,33 @@"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz","integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="},+ "minipass": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",+ "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",+ "optional": true+ },+ "minizlib": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",+ "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",+ "optional": true,+ "requires": {+ "minipass": "^3.0.0",+ "yallist": "^4.0.0"+ },+ "dependencies": {+ "minipass": {+ "version": "3.3.6",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",+ "optional": true,+ "requires": {+ "yallist": "^4.0.0"+ }+ }+ }+ },"mkdirp": {"version": "0.5.6","resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",@@ -11554,6 +12262,12 @@"thenify-all": "^1.0.0"}},+ "nan": {+ "version": "2.17.0",+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",+ "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",+ "optional": true+ },"nanoid": {"version": "3.3.6","resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",@@ -11679,6 +12393,18 @@}}},+ "npmlog": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",+ "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",+ "optional": true,+ "requires": {+ "are-we-there-yet": "^2.0.0",+ "console-control-strings": "^1.1.0",+ "gauge": "^3.0.0",+ "set-blocking": "^2.0.0"+ }+ },"oauth": {"version": "0.9.15","resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz",@@ -11909,6 +12635,21 @@"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz","integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="},+ "path2d-polyfill": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/path2d-polyfill/-/path2d-polyfill-2.0.1.tgz",+ "integrity": "sha512-ad/3bsalbbWhmBo0D6FZ4RNMwsLsPpL6gnvhuSaU5Vm7b06Kr5ubSltQQ0T7YKsiJQO+g22zJ4dJKNTXIyOXtA=="+ },+ "pdfjs-dist": {+ "version": "3.6.172",+ "resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-3.6.172.tgz",+ "integrity": "sha512-bfOhCg+S9DXh/ImWhWYTOiq3aVMFSCvzGiBzsIJtdMC71kVWDBw7UXr32xh0y56qc5wMVylIeqV3hBaRsu+e+w==",+ "requires": {+ "canvas": "^2.11.2",+ "path2d-polyfill": "^2.0.1",+ "web-streams-polyfill": "^3.2.1"+ }+ },"peberminta": {"version": "0.8.0","resolved": "https://registry.npmjs.org/peberminta/-/peberminta-0.8.0.tgz",@@ -12223,6 +12964,21 @@"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz","integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="},+ "react-pdf": {+ "version": "7.1.2",+ "resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-7.1.2.tgz",+ "integrity": "sha512-hmTUKh3WVYDJlP8XvebGN8HH0Gk/tXh9WgNAtvdHn79FHL78UEPSbVj3veHHGqmMa2hz1wJCItLUqGVP68Qsjw==",+ "requires": {+ "clsx": "^1.2.1",+ "make-cancellable-promise": "^1.0.0",+ "make-event-props": "^1.5.0",+ "merge-refs": "^1.1.3",+ "pdfjs-dist": "3.6.172",+ "prop-types": "^15.6.2",+ "tiny-invariant": "^1.0.0",+ "tiny-warning": "^1.0.0"+ }+ },"react-property": {"version": "2.0.0","resolved": "https://registry.npmjs.org/react-property/-/react-property-2.0.0.tgz",@@ -12536,6 +13292,12 @@"lru-cache": "^6.0.0"}},+ "set-blocking": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",+ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",+ "optional": true+ },"setimmediate": {"version": "1.0.5","resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",@@ -12584,6 +13346,23 @@"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz","integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="},+ "simple-concat": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",+ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",+ "optional": true+ },+ "simple-get": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz",+ "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",+ "optional": true,+ "requires": {+ "decompress-response": "^4.2.0",+ "once": "^1.3.1",+ "simple-concat": "^1.0.0"+ }+ },"slash": {"version": "3.0.0","resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",@@ -12648,6 +13427,25 @@"safe-buffer": "~5.2.0"}},+ "string-width": {+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",+ "optional": true,+ "requires": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"+ },+ "dependencies": {+ "emoji-regex": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",+ "optional": true+ }+ }+ },"string.prototype.matchall": {"version": "4.0.8","resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz",@@ -12852,6 +13650,28 @@"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz","integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ=="},+ "tar": {+ "version": "6.1.15",+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.15.tgz",+ "integrity": "sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==",+ "optional": true,+ "requires": {+ "chownr": "^2.0.0",+ "fs-minipass": "^2.0.0",+ "minipass": "^5.0.0",+ "minizlib": "^2.1.1",+ "mkdirp": "^1.0.3",+ "yallist": "^4.0.0"+ },+ "dependencies": {+ "mkdirp": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",+ "optional": true+ }+ }+ },"text-table": {"version": "0.2.0","resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",@@ -12873,6 +13693,16 @@"thenify": ">= 3.1.0 < 4"}},+ "tiny-invariant": {+ "version": "1.3.1",+ "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz",+ "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw=="+ },+ "tiny-warning": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",+ "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="+ },"titleize": {"version": "3.0.0","resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz",@@ -13218,6 +14048,11 @@"defaults": "^1.0.3"}},+ "web-streams-polyfill": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",+ "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q=="+ },"webidl-conversions": {"version": "3.0.1","resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",@@ -13276,6 +14111,15 @@"is-typed-array": "^1.1.10"}},+ "wide-align": {+ "version": "1.1.5",+ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",+ "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",+ "optional": true,+ "requires": {+ "string-width": "^1.0.2 || 2 || 3 || 4"+ }+ },"word-wrap": {"version": "1.2.3","resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",diff --git a/package.json b/package.jsonindex 81bbb4a2..7f63e374 100644--- a/package.json+++ b/package.json@@ -42,6 +42,7 @@"react-email": "^1.9.4","react-hot-toast": "^2.4.1","react-icons": "^4.9.0",+ "react-pdf": "^7.1.2","resend": "^0.15.1","swr": "^2.1.5","tailwind-merge": "^1.13.1",diff --git a/pages/view/[linkId].tsx b/pages/view/[linkId].tsxindex a14b4ac7..d8418052 100644--- a/pages/view/[linkId].tsx+++ b/pages/view/[linkId].tsx@@ -3,6 +3,7 @@ import EmailForm from "@/components/EmailForm";import { getExtension } from "@/lib/utils";import { useLink } from "@/lib/swr/use-link";import ErrorPage from "next/error";+import PDFViewer from "@/components/PDFViewer";export default function DocumentView() {const { link, error } = useLink();@@ -74,11 +75,8 @@ export default function DocumentView() {);}return (- <div className="h-screen bg-gray-900">- <iframe- className="w-full h-full"- src={`https://docs.google.com/viewer?url=${document.file}&embedded=true`}- ></iframe>+ <div className="bg-gray-950">+ <PDFViewer file={document.file} /></div>);}