PageSourceSearch

https://antler.digital/_next/static/chunks/pages/auth/document-277cf594295cb41b.js

js antler.digital collected 2026-10-06 06:10:25 UTC 3,202 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[267],{98107:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/document",function(){return s(31297)}])},31297:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return DocumentAuth}});var n=s(85893),r=s(67294),i=s(11163),a=s(9008),c=s.n(a),l=s(32336),o=s(63506),u=s(70478);function DocumentAuth(){let e=(0,i.useRouter)(),{document:t}=e.query,[s,a]=(0,r.useState)(""),[o,d]=(0,r.useState)(!1),[m,h]=(0,r.useState)(""),[f,x]=(0,r.useState)("");(0,r.useEffect)(()=>{if(t&&"string"==typeof t){let e=t.split("?")[0],s=e.replace(/\.\w+$/,""),n=s.replace(/[-_]/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ");x(n)}},[t]);let handleSubmit=async n=>{n.preventDefault(),d(!0),h("");let r="string"==typeof t?t.split("?")[0]:t;try{let n=await fetch("/api/auth/document",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:s,document:r})}),i=await n.json();n.ok?e.push("/docs/".concat(t)):h(i.message||"Authentication failed. Please try again.")}catch(e){h("An error occurred. Please try again.")}};return(0,n.jsxs)("div",{className:"min-h-screen flex flex-col items-center justify-center bg-bg text-white",children:[(0,n.jsxs)(c(),{children:[(0,n.jsx)("title",{children:"Document Access - Antler Digital"}),(0,n.jsx)("meta",{name:"description",content:"Protected document access"})]}),(0,n.jsx)("main",{className:"flex w-full flex-1 flex-col items-center justify-center px-4 sm:px-6 lg:px-8",children:(0,n.jsxs)("div",{className:"w-full max-w-md rounded-lg border border-gray-800 p-8 bg-bg shadow-lg",children:[(0,n.jsx)("div",{className:"flex justify-center mb-8",children:(0,n.jsx)(l.Z,{})}),(0,n.jsx)("h1",{className:"text-2xl font-bold text-center text-white mb-4",children:"Restricted Document"}),f&&(0,n.jsx)("p",{className:"text-center text-lg font-medium text-gray-300 mb-6",children:f}),(0,n.jsx)("p",{className:"text-center text-gray-400 mb-6",children:"Please enter your email to access this document"}),(0,n.jsxs)("form",{onSubmit:handleSubmit,className:"space-y-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-300 mb-1",children:"Email Address"}),(0,n.jsx)("input",{id:"email",type:"email",value:s,onChange:e=>a(e.target.value),placeholder:"Enter your email",className:"w-full px-3 py-2 border border-gray-700 rounded-md shadow-sm bg-gray-900 text-white placeholder-gray-500 focus:outline-none focus:ring-highlight focus:border-highlight ".concat(u.inter.variable," font-sans"),required:!0})]}),m&&(0,n.jsx)("p",{className:"text-sm text-red",children:m}),(0,n.jsx)("button",{type:"submit",className:"w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-highlight hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-highlight disabled:opacity-50",disabled:o,children:o?"Verifying...":"Access Document"})]})]})})]})}DocumentAuth.getLayout=function(e){return(0,n.jsx)(o.Z,{children:e})}}},function(e){e.O(0,[144,506,774,888,179],function(){return e(e.s=98107)}),_N_E=e.O()}]);

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.