{"version":3,"file":"glamorous.umd.min.js","sources":["../src/with-theme.js","../node_modules/brcast/dist/brcast.es.js","../src/get-glamor-classname.js","../node_modules/fast-memoize/src/index.js","../src/split-props.js","../src/index.js","../src/dom-elements.js","../src/constants.js","../src/react-compat.js","../src/theme-provider.js","../node_modules/react-html-attributes/dist/index.js","../src/react-props.js","../src/should-forward-property.js","../src/create-glamorous.js","../src/umd-entry.js"],"sourcesContent":["import React, {Component} from 'react'\n\nimport {CHANNEL} from './constants'\nimport {PropTypes} from './react-compat'\n\nfunction generateWarningMessage(componentName) {\n // eslint-disable-next-line max-len\n return `glamorous warning: Expected component called \"${componentName}\" which uses withTheme to be within a ThemeProvider but none was found.`\n}\n\nexport default function withTheme(ComponentToTheme) {\n class ThemedComponent extends Component {\n state = {theme: {}}\n setTheme = theme => this.setState({theme})\n\n componentWillMount() {\n if (!this.context[CHANNEL]) {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn(\n generateWarningMessage(\n ComponentToTheme.displayName ||\n ComponentToTheme.name ||\n 'Stateless Function',\n ),\n )\n }\n\n return\n }\n\n this.setState({theme: this.context[CHANNEL].getState()})\n }\n\n componentDidMount() {\n if (this.context[CHANNEL]) {\n this.unsubscribe = this.context[CHANNEL].subscribe(this.setTheme)\n }\n }\n\n componentWillUnmount() {\n // cleanup subscription\n this.unsubscribe && this.unsubscribe()\n }\n\n render() {\n return \n }\n }\n\n ThemedComponent.contextTypes = {\n [CHANNEL]: PropTypes.object,\n }\n\n return ThemedComponent\n}\n","function createBroadcast (initialState) {\n var listeners = [];\n var _state = initialState;\n\n var getState = function () { return _state; };\n\n var setState = function (state) {\n _state = state;\n listeners.forEach(function (listener) { return listener(_state); });\n };\n\n var subscribe = function (listener) {\n listeners.push(listener);\n\n return function unsubscribe () {\n listeners = listeners.filter(function (item) { return item !== listener; });\n }\n };\n\n return { getState: getState, setState: setState, subscribe: subscribe }\n}\n\nexport default createBroadcast;\n","import {css, styleSheet} from 'glamor'\n/**\n * This function takes a className string and gets all the\n * associated glamor styles. It's used to merge glamor styles\n * from a className to make sure that specificity is not\n * a problem when passing a className to a component.\n * @param {String} [className=''] the className string\n * @return {Object} { glamorStyles, glamorlessClassName }\n * - glamorStyles is an array of all the glamor styles objects\n * - glamorlessClassName is the rest of the className string\n * without the glamor classNames\n */\nfunction extractGlamorStyles(className = '') {\n return className.toString().split(' ').reduce((groups, name) => {\n if (name.indexOf('css-') === 0) {\n const id = name.slice('css-'.length)\n const {style} = styleSheet.registered[id]\n groups.glamorStyles.push(style)\n } else {\n // eslint-disable-next-line max-len\n groups.glamorlessClassName = `${groups.glamorlessClassName} ${name}`.trim()\n }\n return groups\n }, {glamorlessClassName: '', glamorStyles: []})\n}\n\nexport default getGlamorClassName\n\nfunction getGlamorClassName(styles, props, cssOverrides, theme) {\n const mappedArgs = styles.slice()\n for (let i = mappedArgs.length; i--;) {\n if (typeof mappedArgs[i] === 'function') {\n mappedArgs[i] = mappedArgs[i](props, theme)\n }\n }\n const {\n glamorStyles: parentGlamorStyles,\n glamorlessClassName,\n } = extractGlamorStyles(props.className)\n const glamorClassName = css(\n ...mappedArgs,\n ...parentGlamorStyles,\n cssOverrides,\n ).toString()\n return `${glamorlessClassName} ${glamorClassName}`.trim()\n}\n","//\n// Main\n//\n\nmodule.exports = function memoize (fn, options) {\n var cache = options && options.cache\n ? options.cache\n : cacheDefault\n\n var serializer = options && options.serializer\n ? options.serializer\n : serializerDefault\n\n var strategy = options && options.strategy\n ? options.strategy\n : strategyDefault\n\n return strategy(fn, {\n cache: cache,\n serializer: serializer\n })\n}\n\n//\n// Strategy\n//\n\nfunction isPrimitive (value) {\n return value == null || (typeof value !== 'function' && typeof value !== 'object')\n}\n\nfunction monadic (fn, cache, serializer, arg) {\n var cacheKey = isPrimitive(arg) ? arg : serializer(arg)\n\n if (!cache.has(cacheKey)) {\n var computedValue = fn.call(this, arg)\n cache.set(cacheKey, computedValue)\n return computedValue\n }\n\n return cache.get(cacheKey)\n}\n\nfunction variadic (fn, cache, serializer) {\n var args = Array.prototype.slice.call(arguments, 3)\n var cacheKey = serializer(args)\n\n if (!cache.has(cacheKey)) {\n var computedValue = fn.apply(this, args)\n cache.set(cacheKey, computedValue)\n return computedValue\n }\n\n return cache.get(cacheKey)\n}\n\nfunction strategyDefault (fn, options) {\n var memoized = fn.length === 1 ? monadic : variadic\n\n memoized = memoized.bind(\n this,\n fn,\n options.cache.create(),\n options.serializer\n )\n\n return memoized\n}\n\n//\n// Serializer\n//\n\nfunction serializerDefault () {\n return JSON.stringify(arguments)\n}\n\n//\n// Cache\n//\n\nfunction ObjectWithoutPrototypeCache () {\n this.cache = Object.create(null)\n}\n\nObjectWithoutPrototypeCache.prototype.has = function (key) {\n return (key in this.cache)\n}\n\nObjectWithoutPrototypeCache.prototype.get = function (key) {\n return this.cache[key]\n}\n\nObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n this.cache[key] = value\n}\n\nvar cacheDefault = {\n create: function create () {\n return new ObjectWithoutPrototypeCache()\n }\n}\n","import shouldForwardProperty from './should-forward-property'\n\nexport default function splitProps(\n {\n css: cssOverrides = {},\n // these are plucked off\n theme, // because they\n className, // should never\n innerRef, // be forwarded\n glam, // to the lower\n // component ever\n ...rest\n },\n {propsAreCssOverrides, rootEl, forwardProps},\n) {\n const returnValue = {toForward: {}, cssOverrides}\n if (!propsAreCssOverrides) {\n if (typeof rootEl !== 'string') {\n // if it's not a string, then we can forward everything\n // (because it's a component)\n returnValue.toForward = rest\n return returnValue\n }\n }\n return Object.keys(rest).reduce((split, propName) => {\n if (\n forwardProps.indexOf(propName) !== -1 ||\n shouldForwardProperty(rootEl, propName)\n ) {\n split.toForward[propName] = rest[propName]\n } else if (propsAreCssOverrides) {\n split.cssOverrides[propName] = rest[propName]\n }\n return split\n }, returnValue)\n}\n","import domElements from './dom-elements'\nimport withTheme from './with-theme'\nimport ThemeProvider from './theme-provider'\nimport createGlamorous from './create-glamorous'\nimport splitProps from './split-props'\n\nconst glamorous = createGlamorous(splitProps)\n\n/*\n * This creates a glamorousComponentFactory for every DOM element so you can\n * simply do:\n * const GreenButton = glamorous.button({\n * backgroundColor: 'green',\n * padding: 20,\n * })\n * Click Me!\n */\nObject.assign(\n glamorous,\n domElements.reduce((getters, tag) => {\n getters[tag] = glamorous(tag)\n return getters\n }, {}),\n)\n\n/*\n * This creates a glamorous component for each DOM element so you can\n * simply do:\n * \n * I'm green!\n * \n */\nObject.assign(\n glamorous,\n domElements.reduce((comps, tag) => {\n const capitalTag = capitalize(tag)\n comps[capitalTag] = glamorous[tag]()\n comps[capitalTag].displayName = `glamorous.${capitalTag}`\n comps[capitalTag].propsAreCssOverrides = true\n return comps\n }, {}),\n)\n\nfunction capitalize(s) {\n return s.slice(0, 1).toUpperCase() + s.slice(1)\n}\n\nexport default glamorous\nexport {ThemeProvider, withTheme}\n","import htmlTagNames from 'html-tag-names'\nimport svgTagNames from 'svg-tag-names'\n\nconst domElements = htmlTagNames\n .concat(svgTagNames)\n .filter((tag, index, array) => array.indexOf(tag) === index)\n\nexport default domElements\n","export const CHANNEL = '__glamorous__'\n","/* eslint import/no-mutable-exports:0, import/prefer-default-export:0 */\nimport React from 'react'\n\nlet PropTypes\n\n/* istanbul ignore next */\nif (React.version.slice(0, 4) === '15.5') {\n /* istanbul ignore next */\n try {\n PropTypes = require('prop-types')\n /* istanbul ignore next */\n } catch (error) {\n // ignore\n }\n}\n/* istanbul ignore next */\nPropTypes = PropTypes || React.PropTypes\n\nexport {PropTypes}\n","import React, {Component} from 'react'\nimport brcast from 'brcast'\nimport {PropTypes} from './react-compat'\nimport {CHANNEL} from './constants'\n/**\n * This is a component which will provide a theme to the entire tree\n * via context and event listener\n * (because pure components block context updates)\n * inspired by the styled-components implementation\n * https://github.com/styled-components/styled-components\n * @param {Object} theme the theme object..\n */\nclass ThemeProvider extends Component {\n broadcast = brcast(this.props.theme)\n\n // create theme, by merging with outer theme, if present\n getTheme(passedTheme) {\n const theme = passedTheme || this.props.theme\n return {...this.outerTheme, ...theme}\n }\n\n getChildContext() {\n return {\n [CHANNEL]: this.broadcast,\n }\n }\n\n setOuterTheme = theme => {\n this.outerTheme = theme\n }\n\n componentDidMount() {\n // create a new subscription for keeping track of outer theme, if present\n if (this.context[CHANNEL]) {\n this.unsubscribe = this.context[CHANNEL].subscribe(this.setOuterTheme)\n }\n }\n\n componentWillMount() {\n // set broadcast state by merging outer theme with own\n if (this.context[CHANNEL]) {\n this.setOuterTheme(this.context[CHANNEL].getState())\n this.broadcast.setState(this.getTheme())\n }\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.theme !== nextProps.theme) {\n this.broadcast.setState(this.getTheme(nextProps.theme))\n }\n }\n\n componentWillUnmount() {\n this.unsubscribe && this.unsubscribe()\n }\n\n render() {\n return this.props.children ?\n React.Children.only(this.props.children) :\n null\n }\n}\n\nThemeProvider.childContextTypes = {\n [CHANNEL]: PropTypes.object.isRequired,\n}\n\nThemeProvider.contextTypes = {\n [CHANNEL]: PropTypes.object,\n}\n\nThemeProvider.propTypes = {\n theme: PropTypes.object.isRequired,\n children: PropTypes.node,\n}\n\nexport default ThemeProvider\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar reactHtmlAttributes = require('./react-html-attributes.json');\n\nexports.default = reactHtmlAttributes;\n\nmodule.exports = reactHtmlAttributes; // for CommonJS compatibility","/*\n * This is used to check if a property name is one of the React-specific\n * properties and determine if that property should be forwarded\n * to the React component\n */\n\n/* Logic copied from ReactDOMUnknownPropertyHook */\nexport default [\n 'children',\n 'dangerouslySetInnerHTML',\n 'key',\n 'ref',\n 'autoFocus',\n 'defaultValue',\n 'valueLink',\n 'defaultChecked',\n 'checkedLink',\n 'innerHTML',\n 'suppressContentEditableWarning',\n 'onFocusIn',\n 'onFocusOut',\n 'className',\n\n /* List copied from https://facebook.github.io/react/docs/events.html */\n 'onCopy',\n 'onCut',\n 'onPaste',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'onFocus',\n 'onBlur',\n 'onChange',\n 'onInput',\n 'onSubmit',\n 'onClick',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onError',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n 'onLoad',\n 'onAnimationStart',\n 'onAnimationEnd',\n 'onAnimationIteration',\n 'onTransitionEnd',\n\n 'onCopyCapture',\n 'onCutCapture',\n 'onPasteCapture',\n 'onCompositionEndCapture',\n 'onCompositionStartCapture',\n 'onCompositionUpdateCapture',\n 'onKeyDownCapture',\n 'onKeyPressCapture',\n 'onKeyUpCapture',\n 'onFocusCapture',\n 'onBlurCapture',\n 'onChangeCapture',\n 'onInputCapture',\n 'onSubmitCapture',\n 'onClickCapture',\n 'onContextMenuCapture',\n 'onDoubleClickCapture',\n 'onDragCapture',\n 'onDragEndCapture',\n 'onDragEnterCapture',\n 'onDragExitCapture',\n 'onDragLeaveCapture',\n 'onDragOverCapture',\n 'onDragStartCapture',\n 'onDropCapture',\n 'onMouseDownCapture',\n 'onMouseEnterCapture',\n 'onMouseLeaveCapture',\n 'onMouseMoveCapture',\n 'onMouseOutCapture',\n 'onMouseOverCapture',\n 'onMouseUpCapture',\n 'onSelectCapture',\n 'onTouchCancelCapture',\n 'onTouchEndCapture',\n 'onTouchMoveCapture',\n 'onTouchStartCapture',\n 'onScrollCapture',\n 'onWheelCapture',\n 'onAbortCapture',\n 'onCanPlayCapture',\n 'onCanPlayThroughCapture',\n 'onDurationChangeCapture',\n 'onEmptiedCapture',\n 'onEncryptedCapture',\n 'onEndedCapture',\n 'onErrorCapture',\n 'onLoadedDataCapture',\n 'onLoadedMetadataCapture',\n 'onLoadStartCapture',\n 'onPauseCapture',\n 'onPlayCapture',\n 'onPlayingCapture',\n 'onProgressCapture',\n 'onRateChangeCapture',\n 'onSeekedCapture',\n 'onSeekingCapture',\n 'onStalledCapture',\n 'onSuspendCapture',\n 'onTimeUpdateCapture',\n 'onVolumeChangeCapture',\n 'onWaitingCapture',\n 'onLoadCapture',\n 'onAnimationStartCapture',\n 'onAnimationEndCapture',\n 'onAnimationIterationCapture',\n 'onTransitionEndCapture',\n]\n","/* eslint max-lines:0, func-style:0 */\n// copied from:\n// https://github.com/styled-components/styled-components/tree/\n// 956e8210b6277860c89404f9cb08735f97eaa7e1/src/utils/validAttr.js\n/* Trying to avoid the unknown-prop errors on glamorous components\n by filtering by React's attribute whitelist.\n */\n\nimport memoize from 'fast-memoize'\nimport reactHTMLAttributes from 'react-html-attributes'\nimport reactProps from './react-props'\n\nconst globalReactHtmlProps = reactHTMLAttributes['*']\n\n// these are valid attributes that have the\n// same name as CSS properties, and is used\n// for css overrides API\nconst cssProps = ['color', 'height', 'width']\n\n/* From DOMProperty */\n// eslint-disable-next-line max-len\nconst ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD'\n// eslint-disable-next-line max-len\nconst ATTRIBUTE_NAME_CHAR = `${ATTRIBUTE_NAME_START_CHAR}\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040`\nconst isCustomAttribute = RegExp.prototype.test.bind(\n new RegExp(`^(data|aria)-[${ATTRIBUTE_NAME_CHAR}]*$`),\n)\n\nconst isHtmlProp = (name, tagName) => {\n const elementAttributes = reactHTMLAttributes[tagName]\n\n return globalReactHtmlProps.indexOf(name) !== -1 ||\n (elementAttributes === undefined ?\n false :\n elementAttributes.indexOf(name) !== -1)\n}\nconst isCssProp = name => cssProps.indexOf(name) !== -1\nconst isReactProp = name => reactProps.indexOf(name) !== -1\n\n// eslint-disable-next-line complexity\nconst shouldForwardProperty = (tagName, name) =>\n typeof tagName !== 'string' ||\n ((isHtmlProp(name, tagName) ||\n isReactProp(name) ||\n isCustomAttribute(name.toLowerCase())) &&\n (tagName === 'svg' || !isCssProp(name)))\n\nexport default memoize(shouldForwardProperty)\n","/*\n * This is a relatively small abstraction that's ripe for open sourcing.\n * Documentation is in the README.md\n */\nimport React, {Component} from 'react'\nimport {PropTypes} from './react-compat'\nimport {CHANNEL} from './constants'\nimport getGlamorClassName from './get-glamor-classname'\n\nexport default function createGlamorous(splitProps) {\n /**\n * This is the main export and the function that people\n * interact with most directly.\n *\n * It accepts a component which can be a string or\n * a React Component and returns\n * a \"glamorousComponentFactory\"\n * @param {String|ReactComponent} comp the component to render\n * @param {Object} options helpful info for the GlamorousComponents\n * @return {Function} the glamorousComponentFactory\n */\n return function glamorous(\n comp,\n {rootEl, displayName, forwardProps = []} = {},\n ) {\n return glamorousComponentFactory\n\n /**\n * This returns a React Component that renders the comp (closure)\n * with a className based on the given glamor styles object(s)\n * @param {...Object|Function} styles the styles to create with glamor.\n * If any of these are functions, they are invoked with the component\n * props and the return value is used.\n * @return {ReactComponent} the ReactComponent function\n */\n function glamorousComponentFactory(...styles) {\n /**\n * This is a component which will render the comp (closure)\n * with the glamorous styles (closure). Forwards any valid\n * props to the underlying component.\n * @param {Object} theme the theme object\n * @return {ReactElement} React.createElement\n */\n class GlamorousComponent extends Component {\n state = {theme: null}\n setTheme = theme => this.setState({theme})\n\n componentWillMount() {\n const {theme} = this.props\n if (this.context[CHANNEL]) {\n // if a theme is provided via props,\n // it takes precedence over context\n this.setTheme(theme ? theme : this.context[CHANNEL].getState())\n } else {\n this.setTheme(theme || {})\n }\n }\n\n componentWillReceiveProps(nextProps) {\n if (this.props.theme !== nextProps.theme) {\n this.setTheme(nextProps.theme)\n }\n }\n\n componentDidMount() {\n if (this.context[CHANNEL] && !this.props.theme) {\n // subscribe to future theme changes\n this.unsubscribe = this.context[CHANNEL].subscribe(this.setTheme)\n }\n }\n\n componentWillUnmount() {\n // cleanup subscription\n this.unsubscribe && this.unsubscribe()\n }\n\n render() {\n // in this function, we're willing to sacrafice a little on\n // readability to get better performance because it actually\n // matters.\n const props = this.props\n const {toForward, cssOverrides} = splitProps(\n props,\n GlamorousComponent,\n )\n\n // freeze the theme object in dev mode\n const theme = process.env.NODE_ENV === 'production' ?\n this.state.theme :\n Object.freeze(this.state.theme)\n // create className to apply\n const fullClassName = getGlamorClassName(\n GlamorousComponent.styles,\n props,\n cssOverrides,\n theme,\n )\n\n return React.createElement(GlamorousComponent.comp, {\n ref: props.innerRef,\n ...toForward,\n className: fullClassName,\n })\n }\n }\n\n GlamorousComponent.propTypes = {\n className: PropTypes.string,\n cssOverrides: PropTypes.object,\n theme: PropTypes.object,\n innerRef: PropTypes.func,\n glam: PropTypes.object,\n }\n\n GlamorousComponent.contextTypes = {\n [CHANNEL]: PropTypes.object,\n }\n\n Object.assign(\n GlamorousComponent,\n getGlamorousComponentMetadata({\n comp,\n styles,\n rootEl,\n forwardProps,\n displayName,\n }),\n )\n return GlamorousComponent\n }\n }\n\n function getGlamorousComponentMetadata({\n comp,\n styles,\n rootEl,\n forwardProps,\n displayName,\n }) {\n const componentsComp = comp.comp ? comp.comp : comp\n return {\n // join styles together (for anyone doing: glamorous(glamorous.a({}), {}))\n styles: comp.styles ? comp.styles.concat(styles) : styles,\n // keep track of the ultimate rootEl to render (we never\n // actually render anything but\n // the base component, even when people wrap a glamorous\n // component in glamorous\n comp: componentsComp,\n rootEl: rootEl || componentsComp,\n forwardProps,\n // set the displayName to something that's slightly more\n // helpful than `GlamorousComponent` :)\n displayName: displayName || `glamorous(${getDisplayName(comp)})`,\n }\n }\n\n function getDisplayName(comp) {\n return typeof comp === 'string' ?\n comp :\n comp.displayName || comp.name || 'unknown'\n }\n}\n","import * as glamorousStar from './'\n\nconst glamorous = glamorousStar.default\n\nObject.assign(\n glamorous,\n Object.keys(glamorousStar).reduce(\n (e, prop) => {\n if (prop !== 'default') {\n // eslint-disable-next-line import/namespace\n e[prop] = glamorousStar[prop]\n }\n return e\n },\n {},\n ),\n)\n\nexport default glamorous\n"],"names":["withTheme","ComponentToTheme","ThemedComponent","state","theme","setTheme","_this","setState","this","context","CHANNEL","getState","unsubscribe","subscribe","React","props","Component","contextTypes","PropTypes","object","createBroadcast","initialState","listeners","_state","forEach","listener","push","filter","item","extractGlamorStyles","toString","split","reduce","groups","name","indexOf","id","slice","length","style","styleSheet","registered","glamorStyles","glamorlessClassName","trim","getGlamorClassName","styles","cssOverrides","mappedArgs","i","className","parentGlamorStyles","css","isPrimitive","value","monadic","fn","cache","serializer","arg","cacheKey","has","computedValue","call","set","get","variadic","args","Array","prototype","arguments","apply","strategyDefault","options","memoized","bind","create","serializerDefault","JSON","stringify","ObjectWithoutPrototypeCache","Object","splitProps","propsAreCssOverrides","rootEl","forwardProps","rest","innerRef","glam","returnValue","toForward","keys","propName","shouldForwardProperty","capitalize","s","toUpperCase","domElements","htmlTagNames","concat","svgTagNames","tag","index","array","version","require","error","ThemeProvider","broadcast","brcast","setOuterTheme","outerTheme","passedTheme","getTheme","nextProps","children","Children","only","childContextTypes","isRequired","propTypes","node","key","cacheDefault","defineProperty","exports","reactHtmlAttributes","module","globalReactHtmlProps","reactHTMLAttributes","cssProps","isCustomAttribute","RegExp","test","isHtmlProp","tagName","elementAttributes","undefined","isCssProp","isReactProp","reactProps","toLowerCase","strategy","glamorous","getGlamorousComponentMetadata","comp","displayName","componentsComp","getDisplayName","glamorousComponentFactory","GlamorousComponent","fullClassName","createElement","string","func","assign","getters","comps","capitalTag","glamorousStar","e","prop"],"mappings":"4PAUe,SAASA,GAAUC,MAC1BC,oNACJC,OAASC,YACTC,SAAW,kBAASC,GAAKC,UAAUH,oFAG5BI,KAAKC,QAAQC,SAebH,UAAUH,MAAOI,KAAKC,QAAQC,GAASC,yDAIxCH,KAAKC,QAAQC,UACVE,YAAcJ,KAAKC,QAAQC,GAASG,UAAUL,KAAKH,+DAMrDO,aAAeJ,KAAKI,qDAIlBE,iBAACb,OAAqBO,KAAKO,MAAWP,KAAKL,eAnCxBa,sBAuCdC,kBACbP,EAAUQ,EAAUC,QAGhBjB,ECtDT,QAASkB,GAAiBC,GACxB,GAAIC,MACAC,EAASF,CAiBb,QAASV,SAfM,WAAc,MAAOY,IAePhB,SAbd,SAAUJ,GACvBoB,EAASpB,EACTmB,EAAUE,QAAQ,SAAUC,GAAY,MAAOA,GAASF,MAWTV,UARjC,SAAUY,GAGxB,MAFAH,GAAUI,KAAKD,GAER,WACLH,EAAYA,EAAUK,OAAO,SAAUC,GAAQ,MAAOA,KAASH,OCHrE,QAASI,mEAAgC,IACtBC,WAAWC,MAAM,KAAKC,OAAO,SAACC,EAAQC,MACxB,IAAzBA,EAAKC,QAAQ,QAAe,IACxBC,GAAKF,EAAKG,MAAM,OAAOC,QACtBC,EAASC,aAAWC,WAAWL,GAA/BG,QACAG,aAAahB,KAAKa,UAGlBI,qBAAyBV,EAAOU,wBAAuBT,GAAOU,aAEhEX,KACLU,oBAAqB,GAAID,kBAG/B,QAESG,GAAmBC,EAAQ/B,EAAOgC,EAAc3C,OAElD,GADC4C,GAAaF,EAAOT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AAQA,KAAOlH,MAAKiD,OAGtBuB,EAA4BX,UAAUJ,IAAM,SAAUyD,GACpD,MAAOlH,MAAKiD,MAAMiE,IAGpB1C,EAA4BX,UAAUL,IAAM,SAAU0D,EAAKpE,GACzD9C,KAAKiD,MAAMiE,GAAOpE,EAGpB,IAAIqE,IACF/C,OAAQ,WACN,MAAO,IAAII,+/NOjGfC,OAAO2C,eAAeC,EAAS,cAC7BvE,OAAO,IAITuE,UAAkBC,GAElBC,UAAiBD,gECDf,WACA,0BACA,MACA,MACA,YACA,eACA,YACA,iBACA,cACA,YACA,iCACA,YACA,aACA,YAGA,SACA,QACA,UACA,mBACA,qBACA,sBACA,YACA,aACA,UACA,UACA,SACA,WACA,UACA,WACA,UACA,gBACA,gBACA,SACA,YACA,cACA,aACA,cACA,aACA,cACA,SACA,cACA,eACA,eACA,cACA,aACA,cACA,YACA,WACA,gBACA,aACA,cACA,eACA,WACA,UACA,UACA,YACA,mBACA,mBACA,YACA,cACA,UACA,UACA,eACA,mBACA,cACA,UACA,SACA,YACA,aACA,eACA,WACA,YACA,YACA,YACA,eACA,iBACA,YACA,SACA,mBACA,iBACA,uBACA,kBAEA,gBACA,eACA,iBACA,0BACA,4BACA,6BACA,mBACA,oBACA,iBACA,iBACA,gBACA,kBACA,iBACA,kBACA,iBACA,uBACA,uBACA,gBACA,mBACA,qBACA,oBACA,qBACA,oBACA,qBACA,gBACA,qBACA,sBACA,sBACA,qBACA,oBACA,qBACA,mBACA,kBACA,uBACA,oBACA,qBACA,sBACA,kBACA,iBACA,iBACA,mBACA,0BACA,0BACA,mBACA,qBACA,iBACA,iBACA,sBACA,0BACA,qBACA,iBACA,gBACA,mBACA,oBACA,sBACA,kBACA,mBACA,mBACA,mBACA,sBACA,wBACA,mBACA,gBACA,0BACA,wBACA,8BACA,0BClJIE,GAAuBC,GAAoB,KAK3CC,IAAY,QAAS,SAAU,SAO/BC,GAAoBC,OAAO/D,UAAUgE,KAAK1D,KAC9C,GAAIyD,uPAGA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