react-grecaptcha-v3
Version:
Google Recaptcha V3 for React.js based application. Keep website performance high while prioritizing security.
1 lines • 5.02 kB
Source Map (JSON)
{"version":3,"sources":["/home/runner/work/react-grecaptcha-v3/react-grecaptcha-v3/dist/useExecuteReCaptcha.cjs","../src/useExecuteReCaptcha.ts"],"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","useExecuteReCaptcha_exports","default","useExecuteReCaptcha_default","module","exports","import_react","require","import_makeContextError","import_ReCaptchaProvider","useExecuteReCaptcha","useContext","Context","executeRecaptcha","action","Promise","reject","makeContextError"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAIA,WAAWC,OAAOC,MAAM;AAC5B,IAAIC,YAAYF,OAAOG,cAAc;AACrC,IAAIC,mBAAmBJ,OAAOK,wBAAwB;AACtD,IAAIC,oBAAoBN,OAAOO,mBAAmB;AAClD,IAAIC,eAAeR,OAAOS,cAAc;AACxC,IAAIC,eAAeV,OAAOW,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,SAACC,QAAQC;IACtB,IAAK,IAAIC,QAAQD,IACfb,UAAUY,QAAQE,MAAM;QAAEC,KAAKF,GAAG,CAACC,KAAK;QAAEE,YAAY;IAAK;AAC/D;AACA,IAAIC,cAAc,SAACC,IAAIC,MAAMC,QAAQC;IACnC,IAAIF,QAAQ,CAAA,OAAOA,qCAAP,SAAOA,KAAG,MAAM,YAAY,OAAOA,SAAS,YAAY;YAC7D,kCAAA,2BAAA;;;gBAAA,IAAIG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AQO","sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useExecuteReCaptcha_exports = {};\n__export(useExecuteReCaptcha_exports, {\n default: () => useExecuteReCaptcha_default\n});\nmodule.exports = __toCommonJS(useExecuteReCaptcha_exports);\nvar import_react = require(\"react\");\nvar import_makeContextError = __toESM(require(\"./makeContextError\"), 1);\nvar import_ReCaptchaProvider = require(\"./ReCaptchaProvider\");\nconst useExecuteReCaptcha = () => (0, import_react.useContext)(import_ReCaptchaProvider.Context)?.executeRecaptcha ?? (async (action) => await Promise.reject((0, import_makeContextError.default)(`${action} missed`)));\nvar useExecuteReCaptcha_default = useExecuteReCaptcha;\n","import { useContext } from 'react'\nimport makeContextError from './makeContextError'\nimport { Context } from './ReCaptchaProvider'\nexport type ExecuteRecaptcha = (action: string) => Promise<string>\n\nconst useExecuteReCaptcha = (): ExecuteRecaptcha =>\n useContext(Context)?.executeRecaptcha ??\n (async action => await Promise.reject(makeContextError(`${action} missed`)))\nexport default useExecuteReCaptcha\n"]}