PageSourceSearch

https://theprintbar.com/assets/HoneypotForm-D6ijNBoq.js

js theprintbar.com collected 2026-10-02 07:06:53 UTC 2,910 bytes, 2 lines download raw bytes

1import{j as a,r as c}from"./vendor-react-DA8Lujin.js";import{b as w,V as S}from"./index.esm-D6JLymnB.js";import{k as T,d as C}from"./vendor-remix-aZLWQpZ4.js";import{a as I}from"./GAUtils-BjcvVRmX.js";import{c as R}from"./cn-DyVGX7hK.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="341109e7-8c76-4d49-9077-24bf7bd50488",e._sentryDebugIdIdentifier="sentry-dbid-341109e7-8c76-4d49-9077-24bf7bd50488")}catch{}function F({className:e,...o}){const{fieldErrors:n}=w(),r=n["global-error"];return r?a.jsx("p",{...o,className:R("text-red text-xs h-6 flex items-center"),children:r}):null}function G(){const{fieldErrors:e}=w();return c.useEffect(()=>{Object.keys(e).length&&console.warn(e)},[e]),null}function N({recaptchaKey:e,action:o=""}){const[n,r]=c.useState(!1);c.useEffect(()=>{if(!e){r(!0);return}const t=document.createElement("script");try{const s=new URL("https://www.google.com/recaptcha/enterprise.js");s.searchParams.set("render",e||""),t.onload=()=>{console.debug("recaptcha loaded"),window.grecaptcha.enterprise.ready(()=>{r(!0)})},t.onerror=()=>{console.error("Failed to load recaptcha")},t.src=s.toString(),t.async=!0,t.defer=!0,document.head.appendChild(t)}catch(s){console.error("Failed to load recaptcha",s)}return()=>{r(!1),console.debug("recaptcha unloaded");try{document.head.removeChild(t)}catch{}}},[e]);const l=c.useCallback(async()=>{if(!e)return"";if(!n)return console.log("recaptcha was not loaded properly, skipping check"),"";try{return await window.grecaptcha.enterprise.execute(e,{action:o})}catch(t){return console.error("Failed to execute recaptcha, skipping",t),""}},[e,o,n]);return{ready:n,execute:l}}function V({children:e,honeyField:o,recaptchaKey:n="",recaptchaAction:r,confirm:l,gaCategory:t,gaLabelKey:s,fetcher:i,onSubmit:f,...x}){const[u,y]=c.useState(""),[k,E]=c.useState(""),{ready:m,execute:g}=N({recaptchaKey:n,action:r});let b=T();const j=C(),v=c.useCallback(async(d,p)=>{p.preventDefault();const h=p.target;if(!(l&&!window.confirm(l))){if(t&&I({action:"submit_form",category:t,label:s?JSON.stringify(d[s]||""):"General"}),u){console.log("Honeypot caught a bot with value:",u),j("/");return}if(n)if(m){const D=await g();E(D)}else console.log("Recaptcha not ready");setTimeout(()=>{f?f(d,p):i?i.submit(h):b(h)},0)}},[u,m,i,l,g,b]);return a.jsxs(S,{method:"post",fetcher:i,onSubmit:v,...x,children:[e,o&&a.jsx("input",{className:"absolute left-[-5000px]",autoComplete:"new-password",type:"text","aria-autocomplete":"none",name:o,tabIndex:-1,value:u,onChange:d=>y(d.target.value)}),a.jsx("input",{type:"hidden",name:"recaptchaToken",value:k}),a.jsx("input",{type:"hidden",name:"recaptchaAction",value:r}),a.jsx(G,{}),a.jsx(F,{})]})}export{G as D,F as G,V as H};
2//# sourceMappingURL=HoneypotForm-D6ijNBoq.js.map

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.