Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-fela

Package Overview
Dependencies
Maintainers
2
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-fela - npm Package Compare versions

Comparing version 11.5.0-rc.0 to 11.5.0

8

package.json
{
"name": "react-fela",
"version": "11.5.0-rc.0",
"version": "11.5.0",
"description": "React bindings for Fela",

@@ -37,7 +37,7 @@ "typings": "index.d.ts",

"dependencies": {
"fela-bindings": "^11.5.0-rc.0",
"fela-dom": "^11.5.0-rc.0",
"fela-bindings": "^11.5.0",
"fela-dom": "^11.5.0",
"prop-types": "^15.5.8"
},
"gitHead": "6d457d39e69e1471bddaea8591c50745f95070d9"
"gitHead": "dc183b4df113206c2d7b6f28901e63fef16c7b8c"
}

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("Fela")):"function"==typeof define&&define.amd?define("ReactFela",["React","Fela"],t):"object"==typeof exports?exports.ReactFela=t(require("React"),require("Fela")):e.ReactFela=t(e.React,e.Fela)}(window,(function(e,t){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=15)}([function(t,r){t.exports=e},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){for(var n in e)r=t(r,e[n],n,e);return r}},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){for(var n=0,o=e.length;n<o;++n)r=t(r,e[n],n,o,e);return r}},,function(e,r){e.exports=t},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r in e)t(e[r],r,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r=0,n=e.length;r<n;++r)t(e[r],r,n,e)}},function(e,t,r){e.exports=r(13)()},function(e,t,r){"use strict";var n=r(12);e.exports=function(e,t,r){return!n(e.props,t)||!n(e.state,r)}},,,function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var u=0;u<r.length;u++)if(!n.call(t,r[u])||!o(e[r[u]],t[r[u]]))return!1;return!0}},function(e,t,r){"use strict";var n=r(14);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,u){if(u!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";r.r(t),r.d(t,"connect",(function(){return I})),r.d(t,"createComponent",(function(){return H})),r.d(t,"createComponentWithProxy",(function(){return Q})),r.d(t,"FelaComponent",(function(){return G})),r.d(t,"FelaRenderer",(function(){return rt})),r.d(t,"FelaTheme",(function(){return B})),r.d(t,"RendererContext",(function(){return T})),r.d(t,"RendererProvider",(function(){return Ke})),r.d(t,"ThemeContext",(function(){return F})),r.d(t,"ThemeProvider",(function(){return $e})),r.d(t,"renderToNodeList",(function(){return Je})),r.d(t,"useFela",(function(){return Be})),r.d(t,"withTheme",(function(){return Ve})),r.d(t,"fe",(function(){return tt}));var n=r(0),o=r(1),i=r.n(o),u=r(3),a=r.n(u),c=r(5),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e){return"function"==typeof e?e:function(){return e}}function p(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,r){return a()(t,(function(t,n){return f({},t,i()(l(n)(e,r),(function(e,r,n){return f({},e,s({},n,t[n]?Object(c.combineRules)(t[n],l(r)):l(r)))}),{}))}),{})}}var d=r(9),y=r.n(d);function v(e){var t=e.displayName||e.name;return t?"Fela"+t:"ConnectedFelaComponent"}var h=r(7),m=r.n(h),b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},O=["contextTypes","defaultProps"],R={childContextTypes:!0,propTypes:!0,getDerivedStateFromProps:!0,contextType:!0};function w(e,t){if("string"==typeof t)return e;var r=Object.getOwnPropertyNames(t).filter((function(e){return!g[e]}));return m()(r,(function(r){if(!e.hasOwnProperty(r)&&!R[r])try{var n=Object.getOwnPropertyDescriptor(t,r);n&&Object.defineProperty(e,r,n)}catch(e){}})),m()(O,(function(r){if(t[r]){var n=e[r]||{};e[r]=b({},t[r],n)}})),e}var x=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function A(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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(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)}var E={pure:!0};const T=Object(n.createContext)(),F=Object(n.createContext)();var S,N,k,M,I=(S=n.Component,N=n.createElement,k=T,M=F,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=j({},E,t);return function(t){var n=function(n){function o(){return P(this,o),_(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return C(o,n),x(o,[{key:"shouldComponentUpdate",value:function(e,t){return!r.pure||y()(this,e,t)}},{key:"render",value:function(){var r=this.props,n=r.extend,o=r._felaRules,u=A(r,["extend","_felaRules"]),a=[e];o&&a.push(o),n&&a.push(n);var c=p.apply(void 0,a);return N(k.Consumer,void 0,(function(e){return N(M.Consumer,void 0,(function(r){var n=c(j({},u,{theme:r}),e);if(t._isFelaComponent)return N(t,j({_felaRules:c},u));var o=i()(n,(function(t,n,o){return t[o]=e.renderRule(n,j({},u,{theme:r})),t}),{}),a=i()(n,(function(t,n,o){return t[o]=function(t){return n(j({theme:r},t),e)},t}),{});return N(t,j({},u,{styles:o,theme:r,rules:a}))}))}))}}]),o}(S);return n.displayName=v(t),n._isFelaComponent=!0,w(n,t)}});function L(e,t){return a()(e,(function(e,r){return t.hasOwnProperty(r)&&(e[r]=t[r]),e}),{})}var U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];if("undefined"==typeof Proxy)return r;var n=function(e){return{get:function(t,r){return"object"===U(t[r])&&t[r],e.push(r),t[r]}}},o=new Proxy({theme:t},n(r));try{return e(o),r}catch(e){return[]}}function z(e,t){return"function"==typeof e?e(t):e}function Y(e,t){return i()(t,(function(t,r,n){return-1===e.indexOf(n)&&"innerRef"!==n&&"is"!==n&&t.push(n),t}),[])}var D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function K(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function W(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function $(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return function(i){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"div",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],f=i.name?i.name:"FelaComponent",s=function(f){var s=f.children,l=f._felaRule,p=f.extend,d=f.innerRef,y=f.id,v=f.style,h=f.as,m=f.className,b=f.passThrough,g=void 0===b?[]:b,O=W(f,["children","_felaRule","extend","innerRef","id","style","as","className","passThrough"]);return e(t.Consumer,void 0,(function(t){return e(r,void 0,(function(r){if(!t)throw new Error("createComponent() can't render styles without the renderer in the context. Missing react-fela's <Provider /> at the app root?");var f=n?q(i,r):[],b=[i];l&&b.push(l),p&&("function"==typeof p?b.push(p):b.push((function(){return p})));var R=c.combineRules.apply(void 0,b),w=[].concat(K(o),K(z(a,O)),K(z(g,O)),K(n?Y(f,O):[])),x=D({},O,{theme:r,as:h,id:y});if(u._isFelaComponent)return e(u,D({_felaRule:R,passThrough:w,innerRef:d,style:v,className:m,as:h,id:y},O),s);var j=L(w,O);if(t.isNativeRenderer){var A=t.renderRule(R,x);j.style=v?[v,A]:A}else{v&&(j.style=v);var P=m?m+" ":"";j.className=P+t.renderRule(R,x)}return y&&(j.id=y),d&&(j.ref=d),e(h||u,j,s)}))}))};return s.displayName=f,s._isFelaComponent=!0,w(s,u)}}var B=function(e,t){return function(r){var n=r.children;return e(t.Consumer,void 0,n)}}(n.createElement,F),H=$(n.createElement,T,B),Q=$(n.createElement,T,B,!0),V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var G=function(e,t,r){return function(n){var o=n.children,i=n.as,u=void 0===i?"div":i,a=n.style,f=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(n,["children","as","style"]);return e(t.Consumer,void 0,(function(t){return t.devMode&&null==a&&console.warn('"FelaComponent" is being rendered without a style prop\nIf all you need is access to theme, try using "FelaTheme" or the "useFela" hook instead'),e(r,void 0,(function(r){var n=t.renderRule(Object(c.combineRules)(a),V({},f,{theme:r}));return o instanceof Function?o({className:!t.isNativeRenderer&&n,style:t.isNativeRenderer&&n,theme:r,as:u}):e(u,{className:!t.isNativeRenderer&&n,style:t.isNativeRenderer&&n},o)}))}))}}(n.createElement,T,B);function J(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return 0===e.length||0===t.length?0:e.indexOf(e.find((function(e){return null!==t.match(e)})))+1}function X(e){return e.split("{")[0].slice(9).trim()}function Z(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";return o+n+r+e+t}var ee=/-([a-z])/g,te=/^Ms/g,re={};function ne(e){return e[1].toUpperCase()}function oe(e){if(re.hasOwnProperty(e))return re[e];var t=e.replace(ee,ne).replace(te,"ms");return re[e]=t,t}function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return r+"."+e+t}function ue(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";return{type:e,className:t,selector:ie(t,o,a),declaration:r+":"+n,pseudo:o,media:i,support:u}}var ae=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function ce(e){return e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}function fe(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=void 0,u=new RegExp(ce(o)+"[.]([0-9a-z_-]+)([^{]+)?{([^:]+):([^}]+)}","gi");i=u.exec(e);){var a=i,c=ae(a,5),f=(c[0],c[1]),s=c[2],l=c[3],p=c[4],d=Z(oe(l),p,s,t,r);n[d]=ue("RULE",f,l,p,s,t,r,o)}return n}var se=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},le=/@supports[^{]+\{([\s\S]+?})\s*}/gi;function pe(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=void 0;o=le.exec(e);){var i=o,u=se(i,2),a=u[0],c=u[1],f=X(a);fe(c,t,f,r,n)}return r}var de=r(6),ye=r.n(de);function ve(e,t){return e+"{"+t+"}"}function he(e){var t=e.type,r=e.media,n=e.support,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,i=r?'[media="'+r+'"]':":not([media])",u=n?'[data-fela-support="true"]':':not([data-fela-support="true"])';return o.querySelector('[data-fela-type="'+t+'"]'+u+i)}function me(e,t,r){var n=t.type,o=t.media,i=t.support;switch(n){case"FONT":case"STATIC":case"KEYFRAME":return e[0];case"RULE":var u=e.map((function(e){return e.media})).filter((function(e){return 0!==e.length}));if(o){var a=[].concat(function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(u),[o]).sort(r),c=a.indexOf(o)+1,f=a[c];if(f)return f===o&&i?e.find((function(e){return e.media===a[a.indexOf(o)+2]})):e.find((function(e){return e.media===f}))}else{var s=u.sort(r)[0];if(!i){var l=e.find((function(e){return void 0!==e.getAttribute("data-fela-support")&&""===e.media&&"RULE"===e.getAttribute("data-fela-type")}));if(l)return l}if(s)return e.find((function(e){return e.media===s}))}}}var be,ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Oe(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function Re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments[2],n=arguments[3],o=t.head||{},i=e.type,u=e.media,a=e.support,c=t.createElement("style");for(var f in c.setAttribute("data-fela-type",i),c.type="text/css",a&&c.setAttribute("data-fela-support","true"),u&&(c.media=u),n)c.setAttribute(f,n[f]);if(void 0!==("undefined"==typeof window?"undefined":ge(window))&&window.FelaConfig)for(var s in window.FelaConfig.styleNodeAttributes)c.setAttribute(s,window.FelaConfig.styleNodeAttributes[s]);var l=o.querySelectorAll("[data-fela-type]"),p=me([].concat(Oe(l)),e,r);return p?o.insertBefore(c,p):o.appendChild(c),c}function we(e){var t=e.type,r=e.media,n=void 0===r?"":r,o=e.support;return t+n+(void 0===o?"":o)}function xe(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n=we(e);if(!t.nodes[n]){var o=he(e,r)||Re(e,r,t.sortMediaQuery,t.styleNodeAttributes);t.nodes[n]=o}return t.nodes[n]}function je(e,t){return"@supports "+e+"{"+t+"}"}function Ae(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function Pe(e,t){var r=i()(e,(function(r,n,o){var i=function(e,t){for(var r=-1,n=0;n<e.length;n++)if(t(e[n])){r=n;break}return r}(r,(function(r){return t(e[r],r)>t(n,o)}));return-1!==i?function(e,t,r){return[].concat(Ae(e.slice(0,r)),[t],Ae(e.slice(r,e.length)))}(r,o,i):[].concat(function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(r),[o])}),[]);return a()(r,(function(t,r){return t[r]=e[r],t}),{})}function _e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ce=(_e(be={},"RULE",(function(e,t){var r=t.selector,n=t.declaration,o=t.support,i=t.media,u=ve(r,n);o?i?(e.supportMediaRules[i]||(e.supportMediaRules[i]={}),e.supportMediaRules[i][o]||(e.supportMediaRules[i][o]=""),e.supportMediaRules[i][o]+=u):(e.supportRules[o]||(e.supportRules[o]=""),e.supportRules[o]+=u):i?(e.mediaRules[i]||(e.mediaRules[i]=""),e.mediaRules[i]+=u):e.rules+=u})),_e(be,"FONT",(function(e,t){var r=t.fontFace;e.fontFaces+=r})),_e(be,"KEYFRAME",(function(e,t){var r=t.keyframe;e.keyframes+=r})),_e(be,"STATIC",(function(e,t){var r=t.css,n=t.selector;e.statics+=n?ve(n,r):r})),be);var Ee={fontFaces:"FONT",statics:"STATIC",keyframes:"KEYFRAME",rules:"RULE"};function Te(e){return i()(e,(function(e,t,r){return t.length>0&&(e+=je(r,t)),e}),"")}var Fe=/^[a-z0-9_-]*$/gi;var Se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Ne(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Pe(e,(function(e){return J(t,e.pseudo)}));return i()(r,(function(e,t){var r=Ce[t.type];return r&&r(e,t),e}),{mediaRules:{},supportRules:{},supportMediaRules:{},fontFaces:"",statics:"",keyframes:"",rules:""})}(e.cache,e.ruleOrder),r=function(e){return 0===e.selectorPrefix.length||null!==e.selectorPrefix.match(Fe)?e.uniqueRuleIdentifier:-1}(e),n=i()(Ee,(function(n,o,i){return t[i].length>0&&n.push({css:t[i],rehydration:r,attributes:e.styleNodeAttributes,type:o}),n}),[]),o=Te(t.supportRules);o&&n.push({css:o,type:"RULE",rehydration:r,attributes:e.styleNodeAttributes,support:!0});var u=Object.keys(Se({},t.supportMediaRules,t.mediaRules)).sort(e.sortMediaQuery);return a()(u,(function(n,o){if(t.mediaRules[o]&&t.mediaRules[o].length>0&&n.push({css:t.mediaRules[o],type:"RULE",rehydration:r,attributes:e.styleNodeAttributes,media:o}),t.supportMediaRules[o]){var i=Te(t.supportMediaRules[o]);i.length>0&&n.push({css:i,type:"RULE",rehydration:r,attributes:e.styleNodeAttributes,support:!0,media:o})}return n}),n)}function ke(e,t,r){var n=e.selector,o=e.declaration,i=e.support,u=e.media,a=e.pseudo,c=u+i;if(t.devMode)!function(e,t){var r=Ne(e),n=t.getAttribute("media")||void 0,o=!!t.getAttribute("data-fela-support")||void 0,i=r.find((function(e){return"RULE"===e.type&&e.media===n&&e.support===o}));i&&(t.textContent=i.css)}(t,r);else try{var f=J(t.ruleOrder,a),s=r.sheet.cssRules,l=s.length;if(0===f)l=void 0===t.scoreIndex[c]?0:t.scoreIndex[c]+1;else for(var p=t.scoreIndex[c]||0,d=s.length;p<d;++p)if(s[p].score>f){l=p;break}var y=ve(n,o);if(i.length>0){var v=je(i,y);r.sheet.insertRule(v,l)}else r.sheet.insertRule(y,l);0===f&&(t.scoreIndex[c]=l),s[l].score=f}catch(e){}}function Me(e,t){e.updateSubscription||(e.scoreIndex={},e.nodes={},e.updateSubscription=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return function(r){if("CLEAR"===r.type)return ye()(e.nodes,(function(e){return e.parentNode.removeChild(e)})),e.nodes={},void(e.scoreIndex={});var n=xe(r,e,t);switch(r.type){case"KEYFRAME":-1===n.textContent.indexOf(r.keyframe)&&(n.textContent+=r.keyframe);break;case"FONT":-1===n.textContent.indexOf(r.fontFace)&&(n.textContent+=r.fontFace);break;case"STATIC":var o=r.selector?ve(r.selector,r.css):r.css;-1===n.textContent.indexOf(o)&&(n.textContent+=o);break;case"RULE":ke(r,e,n)}}}(e,t),e.subscribe(e.updateSubscription),ye()(e.cache,e._emitChange))}var Ie=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Le=/@(-webkit-|-moz-)?keyframes ([a-z_][a-z0-9-_]*)(\{.*?(?=}})}})/gi;function Ue(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0;r=Le.exec(e);){var n=r,o=Ie(n,4),i=o[0],u=(o[1],o[2]),a=o[3];t[a]?t[a].keyframe+=i:t[a]={type:"KEYFRAME",keyframe:i,name:u}}return t}var qe=/[.][a-z0-9_-]*/gi;var ze=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var Ye=r(8),De=r.n(Ye),Ke=function(e,t,r,n,o){var i=function(e){function o(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var r=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}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t));return r._renderStyle(),r}return 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)}(o,e),ze(o,[{key:"componentDidUpdate",value:function(e){this._renderStyle()}},{key:"_renderStyle",value:function(){var e=this.props,t=e.renderer,r=e.rehydrate,n=e.targetDocument;(function(e,t){if("undefined"==typeof document)return!1;var r=t||document;return e&&!e.isNativeRenderer&&r&&r.createElement})(t,n)&&(r&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.querySelectorAll("[data-fela-type]").length>0}(n)?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;Me(e,t),m()(t.querySelectorAll("[data-fela-type]"),(function(t){var r=t.getAttribute("data-fela-rehydration")||-1,n=e.uniqueRuleIdentifier||parseInt(r,10);if(-1!==n){var o=t.getAttribute("data-fela-type")||"",i=t.getAttribute("media")||"",u=t.getAttribute("data-fela-support")||"",a=t.textContent;e.uniqueRuleIdentifier=n;var c=o+i+u;if(e.nodes[c]=t,"RULE"===o){if(u?pe(a,i,e.cache,e.specificityPrefix):fe(a,i,"",e.cache,e.specificityPrefix),t.sheet&&t.sheet.cssRules){var f=i+u;m()(t.sheet.cssRules,(function(t,r){var n=t.conditionText?t.cssRules[0].selectorText:t.selectorText,o=J(e.ruleOrder,n.split(qe)[1]);0===o&&(e.scoreIndex[f]=r),t.score=o}))}}else"KEYFRAME"===o&&Ue(a,e.cache)}}))}(t,n):Me(t,n))}},{key:"render",value:function(){return r(t.Provider,{value:this.props.renderer},n(this.props.children))}}]),o}(e);return o&&ye()(o,(function(e,t){i[t]=e})),i}(n.Component,T,n.createElement,e=>n.Children.only(e),{propTypes:{renderer:De.a.object.isRequired,rehydrate:De.a.bool.isRequired},defaultProps:{rehydrate:!0}}),We=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var $e=function(e,t,r){return function(n){var o=n.theme,i=void 0===o?{}:o,u=n.overwrite,a=void 0!==u&&u,c=n.children;return t(e.Consumer,null,(function(n){return t(e.Provider,{value:!a&&n?We({},n,i):i},r(c))}))}}(F,n.createElement,e=>n.Children.only(e));function Be(e={}){const t=Object(n.useContext)(T),r=Object(n.useContext)(F)||{};if(!t)throw new Error('The "useFela" hook can only be used inside a "RendererProvider"');const o={...e,theme:r};return{renderer:t,theme:r,css:function(...e){return t.renderRule(Object(c.combineRules)(...e),o)}}}var He=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ve=function(e,t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"theme",o=function(o){return e(t,void 0,(function(t){return e(r,He({},o,Qe({},n,t)))}))};return w(o,r)}}(n.createElement,B),Ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var Je=function(e){return function(t){return Ne(t).map((function(r){var n=r.type,o=r.media,i=r.rehydration,u=r.support,a=r.css;return e("style",Ge({key:n+o},t.styleNodeAttributes,{media:o,"data-fela-rehydration":i,"data-fela-type":n,"data-fela-support":u,dangerouslySetInnerHTML:{__html:a}}))}))}}(n.createElement),Xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Ze(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function et(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var tt=function(e,t){return function(r){for(var n=arguments.length,o=Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(u){var a=u.css,c=u.key,f=u.ref,s=u.className,l=et(u,["css","key","ref","className"]);if(a)return e(t,{style:a,key:c,ref:f},(function(t){return e.apply(void 0,[r,Xe({},l,{className:s?s+" "+t.className:t.className})].concat(Ze(o)))}))}return e.apply(void 0,[r,u].concat(Ze(o)))}}(n.createElement,G);const rt=T.Consumer}])}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("Fela")):"function"==typeof define&&define.amd?define("ReactFela",["React","Fela"],t):"object"==typeof exports?exports.ReactFela=t(require("React"),require("Fela")):e.ReactFela=t(e.React,e.Fela)}(window,(function(e,t){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(t,r){t.exports=e},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){for(var n in e)r=t(r,e[n],n,e);return r}},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){for(var n=0,o=e.length;n<o;++n)r=t(r,e[n],n,o,e);return r}},function(e,r){e.exports=t},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r in e)t(e[r],r,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r=0,n=e.length;r<n;++r)t(e[r],r,n,e)}},function(e,t,r){e.exports=r(12)()},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function i(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var u=0;u<r.length;u++)if(!n.call(t,r[u])||!o(e[r[u]],t[r[u]]))return!1;return!0}e.exports=function(e,t,r){return!i(e.props,t)||!i(e.state,r)}},,,function(e,t,r){"use strict";var n=r(13);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,u){if(u!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";r.r(t),r.d(t,"connect",(function(){return I})),r.d(t,"createComponent",(function(){return H})),r.d(t,"createComponentWithProxy",(function(){return Q})),r.d(t,"FelaComponent",(function(){return G})),r.d(t,"FelaRenderer",(function(){return nt})),r.d(t,"FelaTheme",(function(){return B})),r.d(t,"RendererContext",(function(){return T})),r.d(t,"RendererProvider",(function(){return ke})),r.d(t,"ThemeContext",(function(){return F})),r.d(t,"ThemeProvider",(function(){return Ie})),r.d(t,"renderToNodeList",(function(){return Xe})),r.d(t,"useFela",(function(){return Le})),r.d(t,"withTheme",(function(){return Ye})),r.d(t,"fe",(function(){return rt}));var n=r(0),o=r(1),i=r.n(o),u=r(3),a=r.n(u),c=r(4),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e){return"function"==typeof e?e:function(){return e}}function p(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,r){return a()(t,(function(t,n){return f({},t,i()(l(n)(e,r),(function(e,r,n){return f({},e,s({},n,t[n]?Object(c.combineRules)(t[n],l(r)):l(r)))}),{}))}),{})}}var d=r(9),y=r.n(d);function v(e){var t=e.displayName||e.name;return t?"Fela"+t:"ConnectedFelaComponent"}var h=r(7),m=r.n(h),b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},O=["contextTypes","defaultProps"],R={childContextTypes:!0,propTypes:!0,getDerivedStateFromProps:!0,contextType:!0};function w(e,t){if("string"==typeof t)return e;var r=Object.getOwnPropertyNames(t).filter((function(e){return!g[e]}));return m()(r,(function(r){if(!e.hasOwnProperty(r)&&!R[r])try{var n=Object.getOwnPropertyDescriptor(t,r);n&&Object.defineProperty(e,r,n)}catch(e){}})),m()(O,(function(r){if(t[r]){var n=e[r]||{};e[r]=b({},t[r],n)}})),e}var j=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function A(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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(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)}var E={pure:!0};const T=Object(n.createContext)(),F=Object(n.createContext)();var S,N,k,M,I=(S=n.Component,N=n.createElement,k=T,M=F,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=x({},E,t);return function(t){var n=function(n){function o(){return P(this,o),_(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return C(o,n),j(o,[{key:"shouldComponentUpdate",value:function(e,t){return!r.pure||y()(this,e,t)}},{key:"render",value:function(){var r=this.props,n=r.extend,o=r._felaRules,u=A(r,["extend","_felaRules"]),a=[e];o&&a.push(o),n&&a.push(n);var c=p.apply(void 0,a);return N(k.Consumer,void 0,(function(e){return N(M.Consumer,void 0,(function(r){var n=c(x({},u,{theme:r}),e);if(t._isFelaComponent)return N(t,x({_felaRules:c},u));var o=i()(n,(function(t,n,o){return t[o]=e.renderRule(n,x({},u,{theme:r})),t}),{}),a=i()(n,(function(t,n,o){return t[o]=function(t){return n(x({theme:r},t),e)},t}),{});return N(t,x({},u,{styles:o,theme:r,rules:a}))}))}))}}]),o}(S);return n.displayName=v(t),n._isFelaComponent=!0,w(n,t)}});function L(e,t){return a()(e,(function(e,r){return t.hasOwnProperty(r)&&(e[r]=t[r]),e}),{})}var U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];if("undefined"==typeof Proxy)return r;var n=function(e){return{get:function(t,r){return"object"===U(t[r])&&t[r],e.push(r),t[r]}}},o=new Proxy({theme:t},n(r));try{return e(o),r}catch(e){return[]}}function z(e,t){return"function"==typeof e?e(t):e}function Y(e,t){return i()(t,(function(t,r,n){return-1===e.indexOf(n)&&"innerRef"!==n&&"is"!==n&&t.push(n),t}),[])}var D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function K(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function W(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function $(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return function(i){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"div",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],f=i.name?i.name:"FelaComponent",s=function(f){var s=f.children,l=f._felaRule,p=f.extend,d=f.innerRef,y=f.id,v=f.style,h=f.as,m=f.className,b=f.passThrough,g=void 0===b?[]:b,O=W(f,["children","_felaRule","extend","innerRef","id","style","as","className","passThrough"]);return e(t.Consumer,void 0,(function(t){return e(r,void 0,(function(r){if(!t)throw new Error("createComponent() can't render styles without the renderer in the context. Missing react-fela's <Provider /> at the app root?");var f=n?q(i,r):[],b=[i];l&&b.push(l),p&&("function"==typeof p?b.push(p):b.push((function(){return p})));var R=c.combineRules.apply(void 0,b),w=[].concat(K(o),K(z(a,O)),K(z(g,O)),K(n?Y(f,O):[])),j=D({},O,{theme:r,as:h,id:y});if(u._isFelaComponent)return e(u,D({_felaRule:R,passThrough:w,innerRef:d,style:v,className:m,as:h,id:y},O),s);var x=L(w,O);if(t.isNativeRenderer){var A=t.renderRule(R,j);x.style=v?[v,A]:A}else{v&&(x.style=v);var P=m?m+" ":"";x.className=P+t.renderRule(R,j)}return y&&(x.id=y),d&&(x.ref=d),e(h||u,x,s)}))}))};return s.displayName=f,s._isFelaComponent=!0,w(s,u)}}var B=function(e,t){return function(r){var n=r.children;return e(t.Consumer,void 0,n)}}(n.createElement,F),H=$(n.createElement,T,B),Q=$(n.createElement,T,B,!0),V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var G=function(e,t,r){return function(n){var o=n.children,i=n.as,u=void 0===i?"div":i,a=n.style,f=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(n,["children","as","style"]);return e(t.Consumer,void 0,(function(t){return t.devMode&&null==a&&console.warn('"FelaComponent" is being rendered without a style prop\nIf all you need is access to theme, try using "FelaTheme" or the "useFela" hook instead'),e(r,void 0,(function(r){var n=t.renderRule(Object(c.combineRules)(a),V({},f,{theme:r}));return o instanceof Function?o({className:!t.isNativeRenderer&&n,style:t.isNativeRenderer&&n,theme:r,as:u}):e(u,{className:!t.isNativeRenderer&&n,style:t.isNativeRenderer&&n},o)}))}))}}(n.createElement,T,B);function J(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return 0===e.length||0===t.length?0:e.indexOf(e.find((function(e){return null!==t.match(e)})))+1}function X(e){return e.split("{")[0].slice(9).trim()}function Z(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";return o+n+r+e+t}var ee=/-([a-z])/g,te=/^Ms/g,re={};function ne(e){return e[1].toUpperCase()}function oe(e){if(re.hasOwnProperty(e))return re[e];var t=e.replace(ee,ne).replace(te,"ms");return re[e]=t,t}function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=("."+e).repeat(n);return""+r+o+t}function ue(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";return{type:e,className:t,selector:ie(t,o,a),declaration:r+":"+n,pseudo:o,media:i,support:u}}var ae=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};var ce={};function fe(e){return ce[e]||(ce[e]=new RegExp(e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")+"[.]([0-9a-z_-]+)([.][0-9a-z_-]+){0,}([^{]+)?{([^:]+):([^}]+)}","gi")),ce[e]}function se(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=void 0,u=fe(o);i=u.exec(e);){var a=i,c=ae(a,6),f=(c[0],c[1]),s=(c[2],c[3]),l=c[4],p=c[5],d=Z(oe(l),p,s,t,r);n[d]=ue("RULE",f,l,p,s,t,r,o)}return n}var le=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},pe=/@supports[^{]+\{([\s\S]+?})\s*}/gi;function de(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=void 0;o=pe.exec(e);){var i=o,u=le(i,2),a=u[0],c=u[1],f=X(a);se(c,t,f,r,n)}return r}var ye=r(6),ve=r.n(ye);function he(e,t){return e+"{"+t+"}"}function me(e){var t=e.type,r=e.media,n=e.support,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,i=r?'[media="'+r+'"]':":not([media])",u=n?'[data-fela-support="true"]':':not([data-fela-support="true"])';return o.querySelector('[data-fela-type="'+t+'"]'+u+i)}function be(e,t,r){var n=t.type,o=t.media,i=t.support;switch(n){case"FONT":case"STATIC":case"KEYFRAME":return e[0];case"RULE":var u=e.map((function(e){return e.media})).filter((function(e){return 0!==e.length}));if(o){var a=[].concat(function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(u),[o]).sort(r),c=a.indexOf(o)+1,f=a[c];if(f)return f===o&&i?e.find((function(e){return e.media===a[a.indexOf(o)+2]})):e.find((function(e){return e.media===f}))}else{var s=u.sort(r)[0];if(!i){var l=e.find((function(e){return void 0!==e.getAttribute("data-fela-support")&&""===e.media&&"RULE"===e.getAttribute("data-fela-type")}));if(l)return l}if(s)return e.find((function(e){return e.media===s}))}}}var ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Oe(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function Re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments[2],n=arguments[3],o=t.head||{},i=e.type,u=e.media,a=e.support,c=t.createElement("style");for(var f in c.setAttribute("data-fela-type",i),c.type="text/css",a&&c.setAttribute("data-fela-support","true"),u&&(c.media=u),n)c.setAttribute(f,n[f]);if(void 0!==("undefined"==typeof window?"undefined":ge(window))&&window.FelaConfig)for(var s in window.FelaConfig.styleNodeAttributes)c.setAttribute(s,window.FelaConfig.styleNodeAttributes[s]);var l=o.querySelectorAll("[data-fela-type]"),p=be([].concat(Oe(l)),e,r);return p?o.insertBefore(c,p):o.appendChild(c),c}function we(e){var t=e.type,r=e.media,n=void 0===r?"":r,o=e.support;return t+n+(void 0===o?"":o)}function je(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n=we(e);if(!t.nodes[n]){var o=me(e,r)||Re(e,r,t.sortMediaQuery,t.styleNodeAttributes);t.nodes[n]=o}return t.nodes[n]}function xe(e,t){return"@supports "+e+"{"+t+"}"}function Ae(e,t,r){var n=e.selector,o=e.declaration,i=e.support,u=e.media,a=e.pseudo,c=u+i;try{var f=J(t.ruleOrder,a),s=r.sheet.cssRules,l=s.length;if(0===f)l=void 0===t.scoreIndex[c]?0:t.scoreIndex[c]+1;else for(var p=t.scoreIndex[c]||0,d=s.length;p<d;++p)if(s[p].score>f){l=p;break}var y=he(n,o);if(i.length>0){var v=xe(i,y);r.sheet.insertRule(v,l)}else r.sheet.insertRule(y,l);0===f&&(t.scoreIndex[c]=l),s[l].score=f}catch(e){}}function Pe(e,t){e.updateSubscription||(e.scoreIndex={},e.nodes={},e.updateSubscription=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return function(r){if("CLEAR"===r.type)return ve()(e.nodes,(function(e){return e.parentNode.removeChild(e)})),e.nodes={},void(e.scoreIndex={});var n=je(r,e,t);switch(r.type){case"KEYFRAME":-1===n.textContent.indexOf(r.keyframe)&&(n.textContent+=r.keyframe);break;case"FONT":-1===n.textContent.indexOf(r.fontFace)&&(n.textContent+=r.fontFace);break;case"STATIC":var o=r.selector?he(r.selector,r.css):r.css;-1===n.textContent.indexOf(o)&&(n.textContent+=o);break;case"RULE":Ae(r,e,n)}}}(e,t),e.subscribe(e.updateSubscription),ve()(e.cache,e._emitChange))}var _e=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Ce=/@(-webkit-|-moz-)?keyframes ([a-z_][a-z0-9-_]*)(\{.*?(?=}})}})/gi;function Ee(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0;r=Ce.exec(e);){var n=r,o=_e(n,4),i=o[0],u=(o[1],o[2]),a=o[3];t[a]?t[a].keyframe+=i:t[a]={type:"KEYFRAME",keyframe:i,name:u}}return t}var Te=/[.][a-z0-9_-]*/gi;var Fe=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var Se=r(8),Ne=r.n(Se),ke=function(e,t,r,n,o){var i=function(e){function o(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var r=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}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t));return r._renderStyle(),r}return 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)}(o,e),Fe(o,[{key:"componentDidUpdate",value:function(e){this._renderStyle()}},{key:"_renderStyle",value:function(){var e=this.props,t=e.renderer,r=e.rehydrate,n=e.targetDocument;(function(e,t){if("undefined"==typeof document)return!1;var r=t||document;return e&&!e.isNativeRenderer&&r&&r.createElement})(t,n)&&(r&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.querySelectorAll("[data-fela-type]").length>0}(n)?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;Pe(e,t),m()(t.querySelectorAll("[data-fela-type]"),(function(t){var r=t.getAttribute("data-fela-rehydration")||-1,n=e.uniqueRuleIdentifier||parseInt(r,10);if(-1!==n){var o=t.getAttribute("data-fela-type")||"",i=t.getAttribute("media")||"",u=t.getAttribute("data-fela-support")||"",a=t.textContent;e.uniqueRuleIdentifier=n;var c=o+i+u;if(e.nodes[c]=t,"RULE"===o){if(u?de(a,i,e.cache,e.specificityPrefix):se(a,i,"",e.cache,e.specificityPrefix),t.sheet&&t.sheet.cssRules){var f=i+u;m()(t.sheet.cssRules,(function(t,r){var n=t.conditionText?t.cssRules[0].selectorText:t.selectorText,o=J(e.ruleOrder,n.split(Te)[1]);0===o&&(e.scoreIndex[f]=r),t.score=o}))}}else"KEYFRAME"===o&&Ee(a,e.cache)}}))}(t,n):Pe(t,n))}},{key:"render",value:function(){return r(t.Provider,{value:this.props.renderer},n(this.props.children))}}]),o}(e);return o&&ve()(o,(function(e,t){i[t]=e})),i}(n.Component,T,n.createElement,e=>n.Children.only(e),{propTypes:{renderer:Ne.a.object.isRequired,rehydrate:Ne.a.bool.isRequired},defaultProps:{rehydrate:!0}}),Me=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var Ie=function(e,t,r){return function(n){var o=n.theme,i=void 0===o?{}:o,u=n.overwrite,a=void 0!==u&&u,c=n.children;return t(e.Consumer,null,(function(n){return t(e.Provider,{value:!a&&n?Me({},n,i):i},r(c))}))}}(F,n.createElement,e=>n.Children.only(e));function Le(e={}){const t=Object(n.useContext)(T),r=Object(n.useContext)(F)||{};if(!t)throw new Error('The "useFela" hook can only be used inside a "RendererProvider"');const o={...e,theme:r};return{renderer:t,theme:r,css:function(...e){return t.renderRule(Object(c.combineRules)(...e),o)}}}var Ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ze,Ye=function(e,t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"theme",o=function(o){return e(t,void 0,(function(t){return e(r,Ue({},o,qe({},n,t)))}))};return w(o,r)}}(n.createElement,B);function De(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function Ke(e,t){var r=i()(e,(function(r,n,o){var i=function(e,t){for(var r=-1,n=0;n<e.length;n++)if(t(e[n])){r=n;break}return r}(r,(function(r){return t(e[r],r)>t(n,o)}));return-1!==i?function(e,t,r){return[].concat(De(e.slice(0,r)),[t],De(e.slice(r,e.length)))}(r,o,i):[].concat(function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(r),[o])}),[]);return a()(r,(function(t,r){return t[r]=e[r],t}),{})}function We(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var $e=(We(ze={},"RULE",(function(e,t){var r=t.selector,n=t.declaration,o=t.support,i=t.media,u=he(r,n);o?i?(e.supportMediaRules[i]||(e.supportMediaRules[i]={}),e.supportMediaRules[i][o]||(e.supportMediaRules[i][o]=""),e.supportMediaRules[i][o]+=u):(e.supportRules[o]||(e.supportRules[o]=""),e.supportRules[o]+=u):i?(e.mediaRules[i]||(e.mediaRules[i]=""),e.mediaRules[i]+=u):e.rules+=u})),We(ze,"FONT",(function(e,t){var r=t.fontFace;e.fontFaces+=r})),We(ze,"KEYFRAME",(function(e,t){var r=t.keyframe;e.keyframes+=r})),We(ze,"STATIC",(function(e,t){var r=t.css,n=t.selector;e.statics+=n?he(n,r):r})),ze);var Be={fontFaces:"FONT",statics:"STATIC",keyframes:"KEYFRAME",rules:"RULE"};function He(e){return i()(e,(function(e,t,r){return t.length>0&&(e+=xe(r,t)),e}),"")}var Qe=/^[a-z0-9_-]*$/gi;var Ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Ge(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Ke(e,(function(e){return J(t,e.pseudo)}));return i()(r,(function(e,t){var r=$e[t.type];return r&&r(e,t),e}),{mediaRules:{},supportRules:{},supportMediaRules:{},fontFaces:"",statics:"",keyframes:"",rules:""})}(e.cache,e.ruleOrder),r=function(e){return 0===e.selectorPrefix.length||null!==e.selectorPrefix.match(Qe)?e.uniqueRuleIdentifier:-1}(e),n=i()(Be,(function(n,o,i){return t[i].length>0&&n.push({css:t[i],rehydration:r,attributes:e.styleNodeAttributes,type:o}),n}),[]),o=He(t.supportRules);o&&n.push({css:o,type:"RULE",rehydration:r,attributes:e.styleNodeAttributes,support:!0});var u=Object.keys(Ve({},t.supportMediaRules,t.mediaRules)).sort(e.sortMediaQuery);return a()(u,(function(n,o){if(t.mediaRules[o]&&t.mediaRules[o].length>0&&n.push({css:t.mediaRules[o],type:"RULE",rehydration:r,attributes:e.styleNodeAttributes,media:o}),t.supportMediaRules[o]){var i=He(t.supportMediaRules[o]);i.length>0&&n.push({css:i,type:"RULE",rehydration:r,attributes:e.styleNodeAttributes,support:!0,media:o})}return n}),n)}var Je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var Xe=function(e){return function(t){return Ge(t).map((function(r){var n=r.type,o=r.media,i=r.rehydration,u=r.support,a=r.css;return e("style",Je({key:n+o},t.styleNodeAttributes,{media:o,"data-fela-rehydration":i,"data-fela-type":n,"data-fela-support":u,dangerouslySetInnerHTML:{__html:a}}))}))}}(n.createElement),Ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function et(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function tt(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var rt=function(e,t){return function(r){for(var n=arguments.length,o=Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(u){var a=u.css,c=u.key,f=u.ref,s=u.className,l=tt(u,["css","key","ref","className"]);if(a)return e(t,{style:a,key:c,ref:f},(function(t){return e.apply(void 0,[r,Ze({},l,{className:s?s+" "+t.className:t.className})].concat(et(o)))}))}return e.apply(void 0,[r,u].concat(et(o)))}}(n.createElement,G);const nt=T.Consumer}])}));
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc