099f3c9fda8bf1524b6d8d8121b25296.json 3.78 KB
{"ast":null,"code":"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _dangerousStyleValue=_interopRequireDefault(require(\"../dangerousStyleValue\"));var _hyphenateStyleName=_interopRequireDefault(require(\"hyphenate-style-name\"));var _warnValidStyle=_interopRequireDefault(require(\"../warnValidStyle\"));function setValueForStyles(node,styles,getStack){var style=node.style;for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue;}var isCustomProperty=styleName.indexOf('--')===0;if(process.env.NODE_ENV!=='production'){if(!isCustomProperty){(0,_warnValidStyle.default)(styleName,styles[styleName],getStack);}}var styleValue=(0,_dangerousStyleValue.default)(styleName,styles[styleName],isCustomProperty);if(styleName==='float'){styleName='cssFloat';}if(isCustomProperty){var name=isCustomProperty?styleName:(0,_hyphenateStyleName.default)(styleName);style.setProperty(name,styleValue);}else{style[styleName]=styleValue;}}}var _default=setValueForStyles;exports.default=_default;","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/react-native-web/dist/vendor/react-dom/setValueForStyles/index.js"],"names":["setValueForStyles","node","styles","getStack","style","styleName","hasOwnProperty","isCustomProperty","indexOf","process","env","NODE_ENV","styleValue","name","setProperty"],"mappings":"mKAWA,mFACA,gFACA,yEASA,QAASA,CAAAA,iBAAT,CAA2BC,IAA3B,CAAiCC,MAAjC,CAAyCC,QAAzC,CAAmD,CACjD,GAAIC,CAAAA,KAAK,CAAGH,IAAI,CAACG,KAAjB,CAEA,IAAK,GAAIC,CAAAA,SAAT,GAAsBH,CAAAA,MAAtB,CAA8B,CAC5B,GAAI,CAACA,MAAM,CAACI,cAAP,CAAsBD,SAAtB,CAAL,CAAuC,CACrC,SACD,CAED,GAAIE,CAAAA,gBAAgB,CAAGF,SAAS,CAACG,OAAV,CAAkB,IAAlB,IAA4B,CAAnD,CAEA,GAAIC,OAAO,CAACC,GAAR,CAAYC,QAAZ,GAAyB,YAA7B,CAA2C,CACzC,GAAI,CAACJ,gBAAL,CAAuB,CACrB,4BAAeF,SAAf,CAA0BH,MAAM,CAACG,SAAD,CAAhC,CAA6CF,QAA7C,EACD,CACF,CAED,GAAIS,CAAAA,UAAU,CAAG,iCAAoBP,SAApB,CAA+BH,MAAM,CAACG,SAAD,CAArC,CAAkDE,gBAAlD,CAAjB,CAEA,GAAIF,SAAS,GAAK,OAAlB,CAA2B,CACzBA,SAAS,CAAG,UAAZ,CACD,CAED,GAAIE,gBAAJ,CAAsB,CACpB,GAAIM,CAAAA,IAAI,CAAGN,gBAAgB,CAAGF,SAAH,CAAe,gCAAmBA,SAAnB,CAA1C,CACAD,KAAK,CAACU,WAAN,CAAkBD,IAAlB,CAAwBD,UAAxB,EACD,CAHD,IAGO,CACLR,KAAK,CAACC,SAAD,CAAL,CAAmBO,UAAnB,CACD,CACF,CACF,C,aAEcZ,iB","sourcesContent":["/* eslint-disable */\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * From React 16.3.0\n * \n */\nimport dangerousStyleValue from '../dangerousStyleValue';\nimport hyphenateStyleName from 'hyphenate-style-name';\nimport warnValidStyle from '../warnValidStyle';\n/**\n * Sets the value for multiple styles on a node.  If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\nfunction setValueForStyles(node, styles, getStack) {\n  var style = node.style;\n\n  for (var styleName in styles) {\n    if (!styles.hasOwnProperty(styleName)) {\n      continue;\n    }\n\n    var isCustomProperty = styleName.indexOf('--') === 0;\n\n    if (process.env.NODE_ENV !== 'production') {\n      if (!isCustomProperty) {\n        warnValidStyle(styleName, styles[styleName], getStack);\n      }\n    }\n\n    var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n\n    if (styleName === 'float') {\n      styleName = 'cssFloat';\n    }\n\n    if (isCustomProperty) {\n      var name = isCustomProperty ? styleName : hyphenateStyleName(styleName);\n      style.setProperty(name, styleValue);\n    } else {\n      style[styleName] = styleValue;\n    }\n  }\n}\n\nexport default setValueForStyles;"]},"metadata":{},"sourceType":"script"}