{"version":3,"sources":["node_modules\\react-dom\\lib\\getEventCharCode.js"],"names":["getEventCharCode","nativeEvent","charCode","keyCode","module","exports"],"mappings":";;;;;;;;;;AAUA;;;;;;;;;;;;;AAaA,QAASA,iBAAT,CAA0BC,WAA1B,CAAuC;AACrC,GAAIC,SAAJ;AACA,GAAIC,SAAUF,YAAYE,OAA1B;;AAEA,GAAI,YAAcF,YAAlB,CAA+B;AAC7BC,SAAWD,YAAYC,QAAvB;;;AAGA,GAAIA,WAAa,CAAb,EAAkBC,UAAY,EAAlC,CAAsC;AACpCD,SAAW,EAAX;AACD;AACF,CAPD,IAOO;;AAELA,SAAWC,OAAX;AACD;;;;AAID,GAAID,UAAY,EAAZ,EAAkBA,WAAa,EAAnC,CAAuC;AACrC,MAAOA,SAAP;AACD;;AAED,MAAO,EAAP;AACD;;AAEDE,OAAOC,OAAP,CAAiBL,gBAAjB","file":"getEventCharCode.js","sourceRoot":"D:/Work/Office/react-native-on-web/cli/tmpl/project","sourcesContent":["/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\n\nfunction getEventCharCode(nativeEvent) {\n  var charCode;\n  var keyCode = nativeEvent.keyCode;\n\n  if ('charCode' in nativeEvent) {\n    charCode = nativeEvent.charCode;\n\n    // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n    if (charCode === 0 && keyCode === 13) {\n      charCode = 13;\n    }\n  } else {\n    // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n    charCode = keyCode;\n  }\n\n  // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n  // Must not discard the (non-)printable Enter-key.\n  if (charCode >= 32 || charCode === 13) {\n    return charCode;\n  }\n\n  return 0;\n}\n\nmodule.exports = getEventCharCode;"]}