UNPKG

react-grecaptcha-v3

Version:

Google Recaptcha V3 for React.js based application. Keep website performance high while prioritizing security.

1 lines 3.68 kB
{"version":3,"sources":["/home/runner/work/react-grecaptcha-v3/react-grecaptcha-v3/dist/unsubscribeEvent.cjs","../src/unsubscribeEvent.ts"],"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","unsubscribeEvent_exports","default","unsubscribeEvent_default","module","exports","import_globals","require","notExistsIndex","countToDelete","unsubscribeEvent","item","window","callbacks","queueKey","index","indexOf","splice"],"mappings":"AAAA;;;;;AACA,IAAIA,YAAYC,OAAOC,cAAc;AACrC,IAAIC,mBAAmBF,OAAOG,wBAAwB;AACtD,IAAIC,oBAAoBJ,OAAOK,mBAAmB;AAClD,IAAIC,eAAeN,OAAOO,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,SAACC,QAAQC;IACtB,IAAK,IAAIC,QAAQD,IACfZ,UAAUW,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,MAAJ;gBACH,IAAI,CAACd,aAAae,IAAI,CAACL,IAAII,QAAQA,QAAQF,QACzCnB,UAAUiB,IAAII,KAAK;oBAAEP,KAAK;+BAAMI,IAAI,CAACG,IAAI;;oBAAEN,YAAY,CAAEK,CAAAA,OAAOjB,iBAAiBe,MAAMG,IAAG,KAAMD,KAAKL,UAAU;gBAAC;;YAFpH,QAAK,YAAWV,kBAAkBa,0BAA7B,SAAA,6BAAA,QAAA,yBAAA;;YAAA;YAAA;;;qBAAA,6BAAA;oBAAA;;;oBAAA;0BAAA;;;;IAGP;IACA,OAAOD;AACT;AACA,IAAIM,eAAe,SAACC;WAAQR,YAAYhB,UAAU,CAAC,GAAG,cAAc;QAAEyB,OAAO;IAAK,IAAID;;ACjBtF,IAAAE,2BAAA,CAAA;AAAAhB,SAAAgB,0BAAA;IAAAC,SAAA;eAAAC;;AAAA;AAAAC,OAAAC,OAAA,GAAAP,aAAAG;AAAA,IAAAK,iBAAyBC,QAAA;AAEzB,IAAMC,iBAAiB,CAAA;AACvB,IAAMC,gBAAgB;AACtB,IAAMC,mBAAmB,SAACC;QACJC;IAAlB,IAAMC,aAAYD,kCAAAA,MAAA,CAAON,eAAAQ,QAAQ,CAAA,cAAfF,6CAAAA,kCAAoB,EAAC;IACvC,IAAMG,QAAQF,UAAUG,OAAA,CAAQL;IAChC,IAAII,QAAQP,gBAAgB;QACxBK,UAAUI,MAAA,CAAOF,OAAON;IAC5B;AACJ;AACA,IAAON,2BAAQO","sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\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 __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar unsubscribeEvent_exports = {};\n__export(unsubscribeEvent_exports, {\n default: () => unsubscribeEvent_default\n});\nmodule.exports = __toCommonJS(unsubscribeEvent_exports);\nvar import_globals = require(\"./global/globals\");\nconst notExistsIndex = -1;\nconst countToDelete = 1;\nconst unsubscribeEvent = (item) => {\n const callbacks = window[import_globals.queueKey] ?? [];\n const index = callbacks.indexOf(item);\n if (index > notExistsIndex) {\n callbacks.splice(index, countToDelete);\n }\n};\nvar unsubscribeEvent_default = unsubscribeEvent;\n","import { queueKey } from './global/globals'\n\nconst notExistsIndex = -1\nconst countToDelete = 1\nconst unsubscribeEvent = (item: () => void): void => {\n const callbacks = window[queueKey] ?? []\n const index = callbacks.indexOf(item)\n if (index > notExistsIndex) {\n callbacks.splice(index, countToDelete)\n }\n}\nexport default unsubscribeEvent\n"]}