glamorous
Version:
React component styling solved
3 lines (2 loc) • 25.4 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("preact"),require("glamor")):"function"==typeof define&&define.amd?define(["preact","glamor"],t):e.glamorous=t(e.preact,e.Glamor)}(this,function(e,t){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var o=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"].concat(["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","animation","audio","canvas","circle","clipPath","color-profile","cursor","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","handler","hatch","hatchpath","hkern","iframe","image","line","linearGradient","listener","marker","mask","mesh","meshgradient","meshpatch","meshrow","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","prefetch","radialGradient","rect","script","set","solidColor","solidcolor","stop","style","svg","switch","symbol","tbreak","text","textArea","textPath","title","tref","tspan","unknown","use","video","view","vkern"]).filter(function(e,t,o){return o.indexOf(e)===t}),r="__glamorous__",n=void 0;if(e.PropTypes||(n=function(){return n},["array","bool","func","number","object","string","symbol","any","arrayOf","element","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact"].forEach(function(e){n[e]=n})),!e.Children){var a={map:function(e,t,o){return null==e?null:(e=a.toArray(e),o&&o!==e&&(t=t.bind(o)),e.map(t))},forEach:function(e,t,o){if(null==e)return null;e=a.toArray(e),o&&o!==e&&(t=t.bind(o)),e.forEach(t)},count:function(e){return e&&e.length||0},only:function(e){if(1!==(e=a.toArray(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return null==e?[]:[].concat(e)}};e.Children=a}n=n||e.PropTypes;var i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},l=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},p=function(e,t){var o={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r]);return o},u=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t};function c(t){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=a.noWarn,c=void 0!==p&&p,d=a.createElement,f=void 0===d||d,m=function(e){function o(){var t,r;i(this,o);for(var n=arguments.length,a=Array(n),s=0;s<n;s++)a[s]=arguments[s];return t=r=u(this,e.call.apply(e,[this].concat(a))),r.warned=c,r.state={theme:{}},r.setTheme=function(e){return r.setState({theme:e})},u(r,t)}return l(o,e),o.prototype.componentWillMount=function(){this.context[r];var e=this.props.theme;this.context[r]?this.setTheme(e||this.context[r].getState()):this.setTheme(e||{})},o.prototype.componentWillReceiveProps=function(e){this.props.theme!==e.theme&&this.setTheme(e.theme)},o.prototype.componentDidMount=function(){this.context[r]&&!this.props.theme&&(this.subscriptionId=this.context[r].subscribe(this.setTheme))},o.prototype.componentWillUnmount=function(){this.subscriptionId&&this.context[r].unsubscribe(this.subscriptionId)},o.prototype.render=function(){return f?h(t,s({},this.props,this.state)):t.call(this,s({},this.props,this.state),this.context)},o}(e.Component),g=((o={})[r]=n.object,o),y=null;return Object.defineProperty(m,"contextTypes",{enumerable:!0,configurable:!0,set:function(e){y=e},get:function(){return y?s({},g,y):g}}),m}var d=function(e){var t=f.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},f=Object.prototype.toString;var m=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)};function g(e){return!0===m(e)&&"[object Object]"===Object.prototype.toString.call(e)}var y,b;var v=function(t){function o(){var e,r;i(this,o);for(var n=arguments.length,a=Array(n),s=0;s<n;s++)a[s]=arguments[s];return e=r=u(this,t.call.apply(t,[this].concat(a))),r.setOuterTheme=function(e){r.outerTheme=e,void 0!==r.broadcast&&r.publishTheme()},u(r,e)}return l(o,t),o.prototype.getTheme=function(e){var t,o,r,n=e||this.props.theme;if(d(n)){var a=n(this.outerTheme);if(!1===g(t=a)||"function"!=typeof(o=t.constructor)||!1===g(r=o.prototype)||!1===r.hasOwnProperty("isPrototypeOf"))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return a}return s({},this.outerTheme,n)},o.prototype.getChildContext=function(){var e;return(e={})[r]=this.broadcast,e},o.prototype.publishTheme=function(e){this.broadcast.setState(this.getTheme(e))},o.prototype.componentDidMount=function(){this.context[r]&&(this.subscriptionId=this.context[r].subscribe(this.setOuterTheme))},o.prototype.componentWillMount=function(){var e,t,o,n;this.context[r]&&this.setOuterTheme(this.context[r].getState()),this.broadcast=(e=this.getTheme(this.props.theme),t={},o=1,n=e,{getState:function(){return n},setState:function(e){n=e;for(var o=Object.keys(t),r=0,a=o.length;r<a;r++)t[o[r]]&&t[o[r]](e)},subscribe:function(e){if("function"!=typeof e)throw new Error("listener must be a function.");var r=o;return t[r]=e,o+=1,r},unsubscribe:function(e){t[e]=void 0}})},o.prototype.componentWillReceiveProps=function(e){this.props.theme!==e.theme&&this.publishTheme(e.theme)},o.prototype.componentWillUnmount=function(){this.subscriptionId&&this.context[r].unsubscribe(this.subscriptionId)},o.prototype.render=function(){return this.props.children?e.Children.only(this.props.children):null},o}(e.Component);function C(e){var o=[],r=[];return e.toString().split(" ").forEach(function(e){if(void 0===t.styleSheet.registered[e.substring(4)])o.push(e);else{var n=((a={})["data-"+e]="",a);r.push(n)}var a}),{glamorlessClassName:o,glamorStyles:r}}function x(e){var o=e.styles,r=e.props,n=e.cssOverrides,a=e.cssProp,i=e.context,s=(e.displayName,function e(t,o,r){var n=void 0;var a=[];var i=[];for(var s=0;s<t.length;s++){for(n=t[s];"function"==typeof n;)n=n(o,r);if("string"==typeof n){var l=C(n),p=l.glamorStyles,u=l.glamorlessClassName;a.push.apply(a,p),i.push.apply(i,u)}else if(Array.isArray(n)){var c=e(n,o,r);a.push.apply(a,c.mappedArgs),i.push.apply(i,c.nonGlamorClassNames)}else a.push(n)}return{mappedArgs:a,nonGlamorClassNames:i}}([].concat(o,[r.className,n,a]),r,i)),l=s.mappedArgs,p=s.nonGlamorClassNames;return(t.css.apply(void 0,[null].concat(l)).toString()+" "+p.join(" ").trim()).trim()}function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}function k(e,t){return e?e.concat(t):t}function O(e){return e.rootEl?e.rootEl:e.comp||e}function T(e,t,o,r){var n,a=null==(n=r)||"number"==typeof n||"boolean"==typeof n?r:o(r),i=t.get(a);return void 0===i&&(i=e.call(this,r),t.set(a,i)),i}function P(e,t,o){var r=Array.prototype.slice.call(arguments,3),n=o(r),a=t.get(n);return void 0===a&&(a=e.apply(this,r),t.set(n,a)),a}function S(e,t,o,r,n){return o.bind(t,e,r,n)}function E(e,t){return S(e,this,1===e.length?T:P,t.cache.create(),t.serializer)}function A(){return JSON.stringify(arguments)}function M(){this.cache=Object.create(null)}v.childContextTypes=((y={})[r]=n.object.isRequired,y),v.contextTypes=((b={})[r]=n.object,b),M.prototype.has=function(e){return e in this.cache},M.prototype.get=function(e){return this.cache[e]},M.prototype.set=function(e,t){this.cache[e]=t};var D={create:function(){return new M}},F=function(e,t){var o=t&&t.cache?t.cache:D,r=t&&t.serializer?t.serializer:A;return(t&&t.strategy?t.strategy:E)(e,{cache:o,serializer:r})},j={variadic:function(e,t){return S(e,this,P,t.cache.create(),t.serializer)},monadic:function(e,t){return S(e,this,T,t.cache.create(),t.serializer)}};F.strategies=j;var L,R,N,I=["coords","download","href","name","rel","shape","target","type","onClick"],z=["title"],U=["alt","height","name","width"],G=["alt","coords","download","href","rel","shape","target","type"],q=["controls","loop","muted","preload","src"],W=["href","target"],B=["size"],_=["dir"],H=["cite"],V=["disabled","form","name","type","value"],K=["height","width"],X=["span","width"],Y=["span","width"],Z=["value"],J=["cite"],$=["open"],Q=["title"],ee=["open"],te=["height","src","type","width"],oe=["disabled","form","name"],re=["size"],ne=["accept","action","method","name","target","onChange","onInput","onInvalid","onSubmit"],ae=["name","scrolling","src"],ie=["cols","rows"],se=["profile"],le=["size","width"],pe=["manifest"],ue=["height","name","sandbox","scrolling","src","width"],ce=["alt","height","name","sizes","src","width"],de=["accept","alt","autoCapitalize","autoCorrect","autoSave","checked","defaultChecked","defaultValue","disabled","form","height","list","max","min","multiple","name","onChange","pattern","placeholder","required","results","size","src","step","title","type","value","width"],fe=["cite"],he=["challenge","disabled","form","name"],me=["form"],ge=["type","value"],ye=["color","href","integrity","media","nonce","rel","scope","sizes","target","title","type"],be=["name"],ve=["content","name"],Ce=["high","low","max","min","optimum","value"],xe=["data","form","height","name","type","width"],we=["reversed","start","type"],ke=["disabled","label"],Oe=["disabled","label","selected","value"],Te=["form","name"],Pe=["name","type","value"],Se=["width"],Ee=["max","value"],Ae=["cite"],Me=["async","defer","integrity","nonce","src","type"],De=["defaultValue","disabled","form","multiple","name","onChange","required","size","value"],Fe=["name"],je=["media","sizes","src","type"],Le=["media","nonce","title","type"],Re=["summary","width"],Ne=["headers","height","scope","width"],Ie=["autoCapitalize","autoCorrect","cols","defaultValue","disabled","form","name","onChange","placeholder","required","rows","value","wrap"],ze=["headers","height","scope","width"],Ue=["default","kind","label","src"],Ge=["type"],qe=["controls","height","loop","muted","playsInline","poster","preload","src","width"],We=["accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseProfile","baselineShift","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","color","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","height","horizAdvX","horizOriginX","ideographic","imageRendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","viewBox","viewTarget","visibility","width","widths","wordSpacing","writingMode","x","x1","x2","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlSpace","xmlns","xmlnsXlink","y","y1","y2","yChannelSelector","z","zoomAndPan"],Be={html:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],svg:["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"]},_e={a:I,abbr:z,applet:U,area:G,audio:q,base:W,basefont:B,bdo:_,blockquote:H,button:V,canvas:K,col:X,colgroup:Y,data:Z,del:J,details:$,dfn:Q,dialog:ee,embed:te,fieldset:oe,font:re,form:ne,frame:ae,frameset:ie,head:se,hr:le,html:pe,iframe:ue,img:ce,input:de,ins:fe,keygen:he,label:me,li:ge,link:ye,map:be,meta:ve,meter:Ce,object:xe,ol:we,optgroup:ke,option:Oe,output:Te,param:Pe,pre:Se,progress:Ee,q:Ae,script:Me,select:De,slot:Fe,source:je,style:Le,table:Re,td:Ne,textarea:Ie,th:ze,track:Ue,ul:Ge,video:qe,svg:We,elements:Be,"*":["about","acceptCharset","accessKey","allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","capture","cellPadding","cellSpacing","charSet","classID","className","colSpan","contentEditable","contextMenu","crossOrigin","dangerouslySetInnerHTML","datatype","dateTime","dir","draggable","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hidden","hrefLang","htmlFor","httpEquiv","icon","id","inlist","inputMode","is","itemID","itemProp","itemRef","itemScope","itemType","keyParams","keyType","lang","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","prefix","property","radioGroup","readOnly","resource","role","rowSpan","scoped","seamless","security","spellCheck","srcDoc","srcLang","srcSet","style","suppressContentEditableWarning","tabIndex","title","typeof","unselectable","useMap","vocab","wmode"]},He=Object.freeze({a:I,abbr:z,applet:U,area:G,audio:q,base:W,basefont:B,bdo:_,blockquote:H,button:V,canvas:K,col:X,colgroup:Y,data:Z,del:J,details:$,dfn:Q,dialog:ee,embed:te,fieldset:oe,font:re,form:ne,frame:ae,frameset:ie,head:se,hr:le,html:pe,iframe:ue,img:ce,input:de,ins:fe,keygen:he,label:me,li:ge,link:ye,map:be,meta:ve,meter:Ce,object:xe,ol:we,optgroup:ke,option:Oe,output:Te,param:Pe,pre:Se,progress:Ee,q:Ae,script:Me,select:De,slot:Fe,source:je,style:Le,table:Re,td:Ne,textarea:Ie,th:ze,track:Ue,ul:Ge,video:qe,svg:We,elements:Be,default:_e}),Ve=(L=He)&&L.default||L,Ke=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=Ve,e.exports=Ve}(R={exports:{}},R.exports),R.exports),Xe=(N=Ke)&&N.__esModule&&Object.prototype.hasOwnProperty.call(N,"default")?N.default:N,Ye=["children","dangerouslySetInnerHTML","key","ref","autoFocus","defaultValue","valueLink","defaultChecked","checkedLink","innerHTML","suppressContentEditableWarning","onFocusIn","onFocusOut","className","onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onInvalid","onSubmit","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onLoad","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd","onCopyCapture","onCutCapture","onPasteCapture","onCompositionEndCapture","onCompositionStartCapture","onCompositionUpdateCapture","onKeyDownCapture","onKeyPressCapture","onKeyUpCapture","onFocusCapture","onBlurCapture","onChangeCapture","onInputCapture","onSubmitCapture","onClickCapture","onContextMenuCapture","onDoubleClickCapture","onDragCapture","onDragEndCapture","onDragEnterCapture","onDragExitCapture","onDragLeaveCapture","onDragOverCapture","onDragStartCapture","onDropCapture","onMouseDownCapture","onMouseEnterCapture","onMouseLeaveCapture","onMouseMoveCapture","onMouseOutCapture","onMouseOverCapture","onMouseUpCapture","onSelectCapture","onTouchCancelCapture","onTouchEndCapture","onTouchMoveCapture","onTouchStartCapture","onScrollCapture","onWheelCapture","onAbortCapture","onCanPlayCapture","onCanPlayThroughCapture","onDurationChangeCapture","onEmptiedCapture","onEncryptedCapture","onEndedCapture","onErrorCapture","onLoadedDataCapture","onLoadedMetadataCapture","onLoadStartCapture","onPauseCapture","onPlayCapture","onPlayingCapture","onProgressCapture","onRateChangeCapture","onSeekedCapture","onSeekingCapture","onStalledCapture","onSuspendCapture","onTimeUpdateCapture","onVolumeChangeCapture","onWaitingCapture","onLoadCapture","onAnimationStartCapture","onAnimationEndCapture","onAnimationIterationCapture","onTransitionEndCapture"];Ye.push("autocomplete","autofocus","class","for","onDblClick","onSearch","slot","srcset");var Ze=Xe["*"],Je=Xe.elements.svg,$e=Xe.elements.html,Qe=["color","height","width"],et=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[: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\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),tt=function(e){return"svg"===e||-1===$e.indexOf(e)&&-1!==Je.indexOf(e)},ot=F(function(e,t){return"string"!=typeof e||(function(e,t){var o=void 0;return o=tt(t)?Xe.svg:Xe[t]||[],-1!==Ze.indexOf(e)||-1!==o.indexOf(e)}(t,e)||function(e){return-1!==Ye.indexOf(e)}(t)||et(t.toLowerCase()))&&(!function(e){return-1!==Qe.indexOf(e)}(t)||tt(e))});var rt=function(t){return function o(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=n.rootEl,i=n.displayName,l=n.shouldClassNameUpdate,u=n.filterProps,d=void 0===u?[]:u,f=n.forwardProps,h=void 0===f?[]:f,m=n.propsAreCssOverrides,g=void 0===m?r.propsAreCssOverrides:m,y=n.withProps;return Object.assign(v,{withConfig:b}),v;function b(e){return o(r,s({},n,e))}function v(){for(var n=arguments.length,u=Array(n),f=0;f<n;f++)u[f]=arguments[f];var m=c(function(o,r){var n=function(e,t,o){if(!l)return!0;var r=!0;return o&&(l(o.props,e,o.context,t)||(r=!1)),r}(o=function e(t,o,r,n){return t.forEach(function(t){return"function"==typeof t?Object.assign(o,t(Object.assign({},o,r),n)):Array.isArray(t)?Object.assign(o,e(t,o,r,n)):Object.assign(o,t)}),Object.assign(o,r)}(m.propsToApply,{},o,r),r,this.previous);l&&(this.previous={props:o,context:r});var a=t(o,m),i=a.toForward,p=a.cssOverrides,u=a.cssProp;return this.className=n?x({styles:m.styles,props:o,cssOverrides:p,cssProp:u,context:r,displayName:m.displayName}):this.className,e.createElement(m.comp,s({ref:"innerRef"in i?void 0:o.innerRef},i,{className:this.className}))},{noWarn:!0,createElement:!1});return Object.assign(m,function(e){var t=e.comp,o=e.styles,r=e.rootEl,n=e.filterProps,a=e.forwardProps,i=e.displayName,s=e.propsToApply,l=t.comp?t.comp:t,p=t.propsToApply?[].concat(t.propsToApply,w(s)):w(s);return{styles:k(t.styles,o),comp:l,rootEl:r||O(t),forwardProps:k(t.forwardProps,a),filterProps:k(t.filterProps,n),displayName:i||"glamorous("+function(e){return"string"==typeof e?e:e.displayName||e.name||"unknown"}(t)+")",propsToApply:p}}({comp:r,styles:u,rootEl:a,filterProps:d,forwardProps:h,displayName:i,propsToApply:y}),{isGlamorousComponent:!0,propsAreCssOverrides:g,withComponent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=m.forwardProps,n=m.filterProps,a=p(m,["forwardProps","filterProps"]);return o(s({},a,{comp:e,rootEl:O(e)}),s({forwardProps:r,filterProps:n},t))()},withProps:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return o(m,{withProps:t})()},withConfig:b}),m}}}(function(e,t){var o=t.propsAreCssOverrides,r=t.rootEl,n=t.filterProps,a=t.forwardProps,i=e.css,s=e.innerRef,l=(e.theme,e.className,e.glam,p(e,["css","innerRef","theme","className","glam"]));void 0!==s&&-1!==a.indexOf("innerRef")&&(l.innerRef=s);var u={toForward:{},cssProp:i,cssOverrides:{}};return o||"string"==typeof r||0!==n.length?Object.keys(l).reduce(function(e,t){return-1!==n.indexOf(t)?e:(-1!==a.indexOf(t)||ot(r,t)?e.toForward[t]=l[t]:o&&(e.cssOverrides[t]=l[t]),e)},u):(u.toForward=l,u)});Object.assign(rt,o.reduce(function(e,t){return e[t]=rt(t),e},{})),Object.assign(rt,o.reduce(function(e,t){var o,r=(o=t).slice(0,1).toUpperCase()+o.slice(1);return e[r]=rt[t](),e[r].displayName="glamorous."+r,e[r].propsAreCssOverrides=!0,e},{})),rt.default=rt;var nt=Object.freeze({default:rt,ThemeProvider:v,withTheme:c}),at=rt;return Object.assign(at,Object.keys(nt).reduce(function(e,t){return"default"!==t&&(e[t]=nt[t]),e},{})),at});
//# sourceMappingURL=glamorous.umd.min.js.map