This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use client'; | |
import Script from 'next/script'; | |
import { useEffect, useRef, useState } from 'react'; | |
const scriptLink = 'https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit'; | |
type TurnstileRenderParameters = Turnstile.RenderParameters; | |
export default function Captcha( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const maskString = ( | |
value: any, | |
mask: string, | |
maskPatterns: Record<string, RegExp | ((char: string) => boolean)> | |
) => { | |
value = value || ''; | |
mask = mask || ''; | |
maskPatterns = maskPatterns || {}; | |
let maskedValue = ''; |