{"version":3,"sources":["jsdelivr-header.js","/npm/react-alt-text@2.0.0/lib/AltText.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,MAAQ,QAAQ,SAChB,UAAY,QAAQ,aACpB,KAAO,QAAQ,QAEf,QAAU,MAAM,YAAY,CACjC,YAAa,UACb,gBAAiB,WAChB,MAAO,CACN,UAAW,OACX,SAAU,QACV,OAAQ,GACR,SAAU,GAEZ,EACA,gBAAiB,WAChB,MAAO,CACN,UAAU,EAEZ,EACA,kBAAmB,WAClB,SAAS,KAAK,iBAAiB,UAAW,KAAK,eAAe,GAC9D,SAAS,KAAK,iBAAiB,QAAS,KAAK,aAAa,EAC3D,EACA,qBAAsB,WACrB,SAAS,KAAK,oBAAoB,UAAW,KAAK,eAClD,SAAS,KAAK,oBAAoB,QAAS,KAAK,YACjD,EACA,cAAe,SAAU,GACpB,KAAK,EAAE,WAAa,KAAK,MAAM,UACnC,KAAK,SAAS,CACb,UAAU,GAEZ,EACA,YAAa,SAAU,GAClB,KAAK,EAAE,WAAa,KAAK,MAAM,UACnC,KAAK,SAAS,CACb,UAAU,GAEZ,EACA,OAAQ,WACP,IAAI,EAAQ,UAAU,KAAK,MAAO,YAAa,WAAY,SAAU,YACrE,OAAO,MAAM,cAAc,KAAK,MAAM,UAAW,EAAO,KAAK,MAAM,SAAW,KAAK,MAAM,SAAW,KAAK,MAAM,OAChH,IAGD,OAAO,QAAU","file":"/npm/react-alt-text@2.0.0/lib/AltText.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/react-alt-text@2.0.0/lib/AltText.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const React = require('react');\nconst blacklist = require('blacklist');\nconst vkey = require('vkey');\n\nconst AltText = React.createClass({\n\tdisplayName: 'AltText',\n\tgetDefaultProps: function () {\n\t\treturn {\n\t\t\tcomponent: 'span',\n\t\t\tmodifier: '<alt>',\n\t\t\tnormal: '',\n\t\t\tmodified: '',\n\t\t};\n\t},\n\tgetInitialState: function () {\n\t\treturn {\n\t\t\tmodified: false,\n\t\t};\n\t},\n\tcomponentDidMount: function () {\n\t\tdocument.body.addEventListener('keydown', this.handleKeyDown, false);\n\t\tdocument.body.addEventListener('keyup', this.handleKeyUp, false);\n\t},\n\tcomponentWillUnmount: function () {\n\t\tdocument.body.removeEventListener('keydown', this.handleKeyDown);\n\t\tdocument.body.removeEventListener('keyup', this.handleKeyUp);\n\t},\n\thandleKeyDown: function (e) {\n\t\tif (vkey[e.keyCode] !== this.props.modifier) return;\n\t\tthis.setState({\n\t\t\tmodified: true,\n\t\t});\n\t},\n\thandleKeyUp: function (e) {\n\t\tif (vkey[e.keyCode] !== this.props.modifier) return;\n\t\tthis.setState({\n\t\t\tmodified: false,\n\t\t});\n\t},\n\trender: function () {\n\t\tvar props = blacklist(this.props, 'component', 'modifier', 'normal', 'modified');\n\t\treturn React.createElement(this.props.component, props, this.state.modified ? this.props.modified : this.props.normal);\n\t},\n});\n\nmodule.exports = AltText;\n"]}