{"version":3,"sources":["node_modules\\react-dom\\lib\\Danger.js"],"names":["_prodInvariant","require","DOMLazyTree","ExecutionEnvironment","createNodesFromMarkup","emptyFunction","invariant","Danger","dangerouslyReplaceNodeWithMarkup","oldChild","markup","canUseDOM","process","env","NODE_ENV","nodeName","newChild","parentNode","replaceChild","replaceChildWithTree","module","exports"],"mappings":";;;;;;;;;;AAUA;;AAEA,GAAIA,gBAAiBC,QAAQ,sBAAR,CAArB;;AAEA,GAAIC,aAAcD,QAAQ,eAAR,CAAlB;AACA,GAAIE,sBAAuBF,QAAQ,+BAAR,CAA3B;;AAEA,GAAIG,uBAAwBH,QAAQ,gCAAR,CAA5B;AACA,GAAII,eAAgBJ,QAAQ,wBAAR,CAApB;AACA,GAAIK,WAAYL,QAAQ,oBAAR,CAAhB;;AAEA,GAAIM,QAAS;;;;;;;;;AASXC,iCAAkC,0CAAUC,QAAV,CAAoBC,MAApB,CAA4B;AAC5D,CAACP,qBAAqBQ,SAAtB,CAAkCC,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAAzB,CAAwCR,UAAU,KAAV,CAAiB,gPAAjB,CAAxC,CAA6SN,eAAe,IAAf,CAA/U,CAAsW,IAAK,EAA3W;AACA,CAACU,MAAD,CAAUE,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAAzB,CAAwCR,UAAU,KAAV,CAAiB,wDAAjB,CAAxC,CAAqHN,eAAe,IAAf,CAA/H,CAAsJ,IAAK,EAA3J;AACA,EAAES,SAASM,QAAT,GAAsB,MAAxB,EAAkCH,QAAQC,GAAR,CAAYC,QAAZ,GAAyB,YAAzB,CAAwCR,UAAU,KAAV,CAAiB,yPAAjB,CAAxC,CAAsTN,eAAe,IAAf,CAAxV,CAA+W,IAAK,EAApX;;AAEA,GAAI,MAAOU,OAAP,GAAkB,QAAtB,CAAgC;AAC9B,GAAIM,UAAWZ,sBAAsBM,MAAtB,CAA8BL,aAA9B,EAA6C,CAA7C,CAAf;AACAI,SAASQ,UAAT,CAAoBC,YAApB,CAAiCF,QAAjC,CAA2CP,QAA3C;AACD,CAHD,IAGO;AACLP,YAAYiB,oBAAZ,CAAiCV,QAAjC,CAA2CC,MAA3C;AACD;AACF,CApBU,CAAb;;;AAuBAU,OAAOC,OAAP,CAAiBd,MAAjB","file":"Danger.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\nvar _prodInvariant = require('./reactProdInvariant');\n\nvar DOMLazyTree = require('./DOMLazyTree');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\n\nvar createNodesFromMarkup = require('fbjs/lib/createNodesFromMarkup');\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\n\nvar Danger = {\n  /**\n   * Replaces a node with a string of markup at its current position within its\n   * parent. The markup must render into a single root node.\n   *\n   * @param {DOMElement} oldChild Child node to replace.\n   * @param {string} markup Markup to render in place of the child node.\n   * @internal\n   */\n  dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {\n    !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0;\n    !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;\n    !(oldChild.nodeName !== 'HTML') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0;\n\n    if (typeof markup === 'string') {\n      var newChild = createNodesFromMarkup(markup, emptyFunction)[0];\n      oldChild.parentNode.replaceChild(newChild, oldChild);\n    } else {\n      DOMLazyTree.replaceChildWithTree(oldChild, markup);\n    }\n  }\n};\n\nmodule.exports = Danger;"]}