{"version":3,"sources":["webpack:///./node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js"],"names":["convertCase","style","converted","prop","indexOf","fallbacks","Array","isArray","map","onProcessStyle","index","length","onChangeValue","value","rule","hyphenatedProp"],"mappings":"2FAAA,aASA,SAASA,EAAYC,GACnB,IAAIC,EAAY,GAEhB,IAAK,IAAIC,KAAQF,EAAO,CAEtBC,EADiC,IAAvBC,EAAKC,QAAQ,MAAcD,EAAO,YAAUA,IACrCF,EAAME,GAOzB,OAJIF,EAAMI,YACJC,MAAMC,QAAQN,EAAMI,WAAYH,EAAUG,UAAYJ,EAAMI,UAAUG,IAAIR,GAAkBE,EAAUG,UAAYL,EAAYC,EAAMI,YAGnIH,EA0CM,IAjCf,WA2BE,MAAO,CACLO,eA3BF,SAAwBR,GACtB,GAAIK,MAAMC,QAAQN,GAAQ,CAExB,IAAK,IAAIS,EAAQ,EAAGA,EAAQT,EAAMU,OAAQD,IACxCT,EAAMS,GAASV,EAAYC,EAAMS,IAGnC,OAAOT,EAGT,OAAOD,EAAYC,IAkBnBW,cAfF,SAAuBC,EAAOV,EAAMW,GAClC,GAA2B,IAAvBX,EAAKC,QAAQ,MACf,OAAOS,EAGT,IAAIE,EAAiB,YAAUZ,GAE/B,OAAIA,IAASY,EAAuBF,GACpCC,EAAKX,KAAKY,EAAgBF,GAEnB","file":"yarn.jss-plugin-camel-case.becc34fe6fa559c58c21.js","sourcesContent":["import hyphenate from 'hyphenate-style-name';\n\n/**\n * Convert camel cased property names to dash separated.\n *\n * @param {Object} style\n * @return {Object}\n */\n\nfunction convertCase(style) {\n var converted = {};\n\n for (var prop in style) {\n var key = prop.indexOf('--') === 0 ? prop : hyphenate(prop);\n converted[key] = style[prop];\n }\n\n if (style.fallbacks) {\n if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);\n }\n\n return converted;\n}\n/**\n * Allow camel cased property names by converting them back to dasherized.\n *\n * @param {Rule} rule\n */\n\n\nfunction camelCase() {\n function onProcessStyle(style) {\n if (Array.isArray(style)) {\n // Handle rules like @font-face, which can have multiple styles in an array\n for (var index = 0; index < style.length; index++) {\n style[index] = convertCase(style[index]);\n }\n\n return style;\n }\n\n return convertCase(style);\n }\n\n function onChangeValue(value, prop, rule) {\n if (prop.indexOf('--') === 0) {\n return value;\n }\n\n var hyphenatedProp = hyphenate(prop); // There was no camel case in place\n\n if (prop === hyphenatedProp) return value;\n rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.\n\n return null;\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default camelCase;\n"],"sourceRoot":""}