styled-components
Advanced tools
Comparing version 6.0.0-beta.9 to 6.0.0-beta.10
import React from 'react'; | ||
import StyleSheet from '../sheet'; | ||
import { Stringifier } from '../types'; | ||
export declare type IStyleSheetContext = StyleSheet | void; | ||
import { ShouldForwardProp, Stringifier } from '../types'; | ||
export declare type IStyleSheetContext = { | ||
shouldForwardProp?: ShouldForwardProp<'web'>; | ||
styleSheet?: StyleSheet; | ||
}; | ||
export declare const StyleSheetContext: React.Context<IStyleSheetContext>; | ||
@@ -12,2 +15,3 @@ export declare const StyleSheetConsumer: React.Consumer<IStyleSheetContext>; | ||
export declare const mainStylis: Stringifier; | ||
export declare function useShouldForwardProp(): ShouldForwardProp<"web"> | undefined; | ||
export declare function useStyleSheet(): StyleSheet; | ||
@@ -36,2 +40,17 @@ export declare function useStylis(): Stringifier; | ||
/** | ||
* Starting in v6, styled-components no longer does its own prop validation | ||
* and recommends use of transient props "$prop" to pass style-only props to | ||
* components. If for some reason you are not able to use transient props, a | ||
* prop validation function can be provided via `StyleSheetManager`, such as | ||
* `@emotion/is-prop-valid`. | ||
* | ||
* When the return value is `true`, props will be forwarded to the DOM/underlying | ||
* component. If return value is `false`, the prop will be discarded after styles | ||
* are calculated. | ||
* | ||
* Manually composing `styled.{element}.withConfig({shouldForwardProp})` will | ||
* override this default. | ||
*/ | ||
shouldForwardProp?: IStyleSheetContext['shouldForwardProp']; | ||
/** | ||
* An array of plugins to be run by stylis (style processor) during compilation. | ||
@@ -38,0 +57,0 @@ * Check out [what's available on npm*](https://www.npmjs.com/search?q=keywords%3Astylis). |
@@ -35,3 +35,2 @@ 'use strict'; | ||
references[refName].forEach(function (referencePath) { | ||
// eslint-disable-next-line no-param-reassign | ||
referencePath.node.name = id.name; | ||
@@ -38,0 +37,0 @@ }); |
@@ -26,3 +26,2 @@ import { __rest, __assign } from 'tslib'; | ||
references[refName].forEach(function (referencePath) { | ||
// eslint-disable-next-line no-param-reassign | ||
referencePath.node.name = id.name; | ||
@@ -29,0 +28,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).styled=t(e.React)}(this,function(e){"use strict";var t="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",r="active",n="data-styled-version",o="6.0.0-beta.9",s="/*!sc*/\n",a="undefined"!=typeof window&&"HTMLElement"in window,i=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),c={},u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,s=t.length;o<s;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var f=Object.freeze([]),p=Object.freeze({});function h(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var d=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)if((o<<=1)<0)throw h(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var s=n;s<o;s++)this.groupSizes[s]=0}var a=this.indexOfGroup(e+1);if(Array.isArray(t)){s=0;for(var i=t.length;s<i;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)}else this.tag.insertRule(a,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,a=n;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(s);return t},e}(),g=new Map,m=new Map,v=1,y=function(e){if(g.has(e))return g.get(e);for(;m.has(v);)v++;var t=v++;return g.set(e,t),m.set(t,e),t},S=function(e,t){g.set(e,t),m.set(t,e)},b="style[".concat(t,"][").concat(n,'="').concat(o,'"]'),w=new RegExp("^".concat(t,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),C=function(e,t,r){for(var n,o=r.split(","),s=0,a=o.length;s<a;s++)(n=o[s])&&e.registerName(t,n)},x=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(s),o=[],a=0,i=n.length;a<i;a++){var c=n[a].trim();if(c){var u=c.match(w);if(u){var l=0|parseInt(u[1],10),f=u[2];0!==l&&(S(f,l),C(e,f,u[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(c)}}};function I(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var P=function(e){var s=document.head,a=e||s,i=document.createElement("style"),c=function(e){for(var r=e.childNodes,n=r.length;n>=0;n--){var o=r[n];if(o&&1===o.nodeType&&o.hasAttribute(t))return o}}(a),u=void 0!==c?c.nextSibling:null;i.setAttribute(t,r),i.setAttribute(n,o);var l=I();return l&&i.setAttribute("nonce",l),a.insertBefore(i,u),i},A=function(){function e(e){var t=this.element=P(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}throw h(17)}(t),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),E=function(){function e(e){var t=this.element=P(e);this.nodes=t.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),_=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),R=a,$={isServer:!a,useCSSOMInjection:!i},j=function(){function e(e,n,o){void 0===e&&(e=p),void 0===n&&(n={}),this.options=u(u({},$),e),this.gs=n,this.names=new Map(o),this.server=!!e.isServer,!this.server&&a&&R&&(R=!1,function(e){for(var n=document.querySelectorAll(b),o=0,s=n.length;o<s;o++){var a=n[o];a&&a.getAttribute(t)!==r&&(x(e,a),a.parentNode&&a.parentNode.removeChild(a))}}(this))}return e.registerId=function(e){return y(e)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(u(u({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,r=e.target;return e.isServer?new _(r):t?new A(r):new E(r)}(this.options),new d(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(y(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(y(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(y(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e.prototype.toString=function(){return function(e){for(var r=e.getTag(),n=r.length,o="",a=function(n){var a=function(e){return m.get(e)}(n);if(void 0===a)return"continue";var i=e.names.get(a),c=r.getGroup(n);if(void 0===i||0===c.length)return"continue";var u="".concat(t,".g").concat(n,'[id="').concat(a,'"]'),l="";void 0!==i&&i.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),o+="".concat(c).concat(u,'{content:"').concat(l,'"}').concat(s)},i=0;i<n;i++)a(i);return o}(this)},e}(),O="-ms-",k="-moz-",N="-webkit-",T="comm",D="rule",z="decl",G="@keyframes",B=Math.abs,F=String.fromCharCode,M=Object.assign;function L(e){return e.trim()}function W(e,t){return(e=t.exec(e))?e[0]:e}function Y(e,t,r){return e.replace(t,r)}function H(e,t){return e.indexOf(t)}function q(e,t){return 0|e.charCodeAt(t)}function V(e,t,r){return e.slice(t,r)}function U(e){return e.length}function Z(e){return e.length}function J(e,t){return t.push(e),e}var K=1,Q=1,X=0,ee=0,te=0,re="";function ne(e,t,r,n,o,s,a){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:K,column:Q,length:a,return:""}}function oe(e,t){return M(ne("",null,null,"",null,null,0),e,{length:-e.length},t)}function se(){return te=ee<X?q(re,ee++):0,Q++,10===te&&(Q=1,K++),te}function ae(){return q(re,ee)}function ie(){return ee}function ce(e,t){return V(re,e,t)}function ue(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function le(e){return L(ce(ee-1,he(91===e?e+2:40===e?e+1:e)))}function fe(e){for(;(te=ae())&&te<33;)se();return ue(e)>2||ue(te)>3?"":" "}function pe(e,t){for(;--t&&se()&&!(te<48||te>102||te>57&&te<65||te>70&&te<97););return ce(e,ie()+(t<6&&32==ae()&&32==se()))}function he(e){for(;se();)switch(te){case e:return ee;case 34:case 39:34!==e&&39!==e&&he(te);break;case 40:41===e&&he(e);break;case 92:se()}return ee}function de(e,t){for(;se()&&e+te!==57&&(e+te!==84||47!==ae()););return"/*"+ce(t,ee-1)+"*"+F(47===e?e:se())}function ge(e){for(;!ue(ae());)se();return ce(e,ee)}function me(e){return function(e){return re="",e}(ve("",null,null,null,[""],e=function(e){return K=Q=1,X=U(re=e),ee=0,[]}(e),0,[0],e))}function ve(e,t,r,n,o,s,a,i,c){for(var u=0,l=0,f=a,p=0,h=0,d=0,g=1,m=1,v=1,y=0,S="",b=o,w=s,C=n,x=S;m;)switch(d=y,y=se()){case 40:if(108!=d&&58==q(x,f-1)){-1!=H(x+=Y(le(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:x+=le(y);break;case 9:case 10:case 13:case 32:x+=fe(d);break;case 92:x+=pe(ie()-1,7);continue;case 47:switch(ae()){case 42:case 47:J(Se(de(se(),ie()),t,r),c);break;default:x+="/"}break;case 123*g:i[u++]=U(x)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+l:h>0&&U(x)-f&&J(h>32?be(x+";",n,r,f-1):be(Y(x," ","")+";",n,r,f-2),c);break;case 59:x+=";";default:if(J(C=ye(x,t,r,u,l,o,i,S,b=[],w=[],f),s),123===y)if(0===l)ve(x,t,C,C,b,s,f,i,w);else switch(99===p&&110===q(x,3)?100:p){case 100:case 109:case 115:ve(e,C,C,n&&J(ye(e,C,C,0,0,o,i,S,o,b=[],f),w),o,w,f,i,n?b:w);break;default:ve(x,C,C,C,[""],w,0,i,w)}}u=l=h=0,g=v=1,S=x="",f=a;break;case 58:f=1+U(x),h=d;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==(te=ee>0?q(re,--ee):0,Q--,10===te&&(Q=1,K--),te))continue;switch(x+=F(y),y*g){case 38:v=l>0?1:(x+="\f",-1);break;case 44:i[u++]=(U(x)-1)*v,v=1;break;case 64:45===ae()&&(x+=le(se())),p=ae(),l=f=U(S=x+=ge(ie())),y++;break;case 45:45===d&&2==U(x)&&(g=0)}}return s}function ye(e,t,r,n,o,s,a,i,c,u,l){for(var f=o-1,p=0===o?s:[""],h=Z(p),d=0,g=0,m=0;d<n;++d)for(var v=0,y=V(e,f+1,f=B(g=a[d])),S=e;v<h;++v)(S=L(g>0?p[v]+" "+y:Y(y,/&\f/g,p[v])))&&(c[m++]=S);return ne(e,t,r,0===o?D:i,c,u,l)}function Se(e,t,r){return ne(e,t,r,T,F(te),V(e,2,-2),0)}function be(e,t,r,n){return ne(e,t,r,z,V(e,0,n),V(e,n+1,-1),n)}function we(e,t,r){switch(function(e,t){return 45^q(e,0)?(((t<<2^q(e,0))<<2^q(e,1))<<2^q(e,2))<<2^q(e,3):0}(e,t)){case 5103:return N+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+e+e;case 4789:return k+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return N+e+k+e+O+e+e;case 5936:switch(q(e,t+11)){case 114:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return N+e+O+e+e;case 6165:return N+e+O+"flex-"+e+e;case 5187:return N+e+Y(e,/(\w+).+(:[^]+)/,N+"box-$1$2"+O+"flex-$1$2")+e;case 5443:return N+e+O+"flex-item-"+Y(e,/flex-|-self/g,"")+(W(e,/flex-|baseline/)?"":O+"grid-row-"+Y(e,/flex-|-self/g,""))+e;case 4675:return N+e+O+"flex-line-pack"+Y(e,/align-content|flex-|-self/g,"")+e;case 5548:return N+e+O+Y(e,"shrink","negative")+e;case 5292:return N+e+O+Y(e,"basis","preferred-size")+e;case 6060:return N+"box-"+Y(e,"-grow","")+N+e+O+Y(e,"grow","positive")+e;case 4554:return N+Y(e,/([^-])(transform)/g,"$1"+N+"$2")+e;case 6187:return Y(Y(Y(e,/(zoom-|grab)/,N+"$1"),/(image-set)/,N+"$1"),e,"")+e;case 5495:case 3959:return Y(e,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return Y(Y(e,/(.+:)(flex-)?(.*)/,N+"box-pack:$3"+O+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+N+e+e;case 4200:if(!W(e,/flex-|baseline/))return O+"grid-column-align"+V(e,t)+e;break;case 2592:case 3360:return O+Y(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,W(e.props,/grid-\w+-end/)})?~H(e+(r=r[t].value),"span")?e:O+Y(e,"-start","")+e+O+"grid-row-span:"+(~H(r,"span")?W(r,/\d+/):+W(r,/\d+/)-+W(e,/\d+/))+";":O+Y(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return W(e.props,/grid-\w+-start/)})?e:O+Y(Y(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Y(e,/(.+)-inline(.+)/,N+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(U(e)-1-t>6)switch(q(e,t+1)){case 109:if(45!==q(e,t+4))break;case 102:return Y(e,/(.+:)(.+)-([^]+)/,"$1"+N+"$2-$3$1"+k+(108==q(e,t+3)?"$3":"$2-$3"))+e;case 115:return~H(e,"stretch")?we(Y(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Y(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,o,s,a,i){return O+r+":"+n+i+(o?O+r+"-span:"+(s?a:+a-+n)+i:"")+e});case 4949:if(121===q(e,t+6))return Y(e,":",":"+N)+e;break;case 6444:switch(q(e,45===q(e,14)?18:11)){case 120:return Y(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+N+(45===q(e,14)?"inline-":"")+"box$3$1"+N+"$2$3$1"+O+"$2box$3")+e;case 100:return Y(e,":",":"+O)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Y(e,"scroll-","scroll-snap-")+e}return e}function Ce(e,t){for(var r="",n=Z(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function xe(e,t,r,n){switch(e.type){case"@import":case z:return e.return=e.return||e.value;case T:return"";case G:return e.return=e.value+"{"+Ce(e.children,n)+"}";case D:e.value=e.props.join(",")}return U(r=Ce(e.children,n))?e.return=e.value+"{"+r+"}":""}function Ie(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case z:return void(e.return=we(e.value,e.length,r));case G:return Ce([oe(e,{value:Y(e.value,"@","@"+N)})],n);case D:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(W(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ce([oe(e,{props:[Y(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Ce([oe(e,{props:[Y(t,/:(plac\w+)/,":"+N+"input-$1")]}),oe(e,{props:[Y(t,/:(plac\w+)/,":-moz-$1")]}),oe(e,{props:[Y(t,/:(plac\w+)/,O+"input-$1")]})],n)}return""})}}var Pe=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Ae=function(e){return Pe(5381,e)},Ee=/^\s*\/\/.*$/gm,_e=[":","[",".","#"];function Re(e){var t,r,n,o,s=void 0===e?p:e,a=s.options,i=void 0===a?p:a,c=s.plugins,u=void 0===c?f:c,l=function(e,n,s){return 0===n&&_e.includes(s[r.length])||s.match(o)?e:".".concat(t)},d=function(e){if(e.type===D&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(n,l)}},g=function(e,s,a,c){void 0===s&&(s=""),void 0===a&&(a=""),void 0===c&&(c="&");var l=e.replace(Ee,"");t=c,r=s,n=new RegExp("\\".concat(r,"\\b"),"g"),o=new RegExp("(\\".concat(r,"\\b){2,}"));var f,p,h=u.slice();return(i.prefix||void 0===i.prefix)&&h.unshift(Ie),h.push(d,xe),f=me(i.namespace||a||s?"".concat(i.namespace?i.namespace+" ":"").concat(a," ").concat(s," { ").concat(l," }"):l),p=function(e){var t=Z(e);return function(r,n,o,s){for(var a="",i=0;i<t;i++)a+=e[i](r,n,o,s)||"";return a}}(h),f.map(function(e,t){return p(e,t,f,p)}).filter(Boolean)};return g.hash=u.length?u.reduce(function(e,t){return t.name||h(15),Pe(e,t.name)},5381).toString():"",g}var $e=e.createContext(void 0),je=$e.Consumer,Oe=e.createContext(void 0),ke=new j,Ne=Re();function Te(){return e.useContext($e)||ke}function De(){return e.useContext(Oe)||Ne}function ze(t){var r=e.useState(t.stylisPlugins),n=r[0],o=r[1],s=Te(),a=e.useMemo(function(){var e=s;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e},[t.disableCSSOMInjection,t.sheet,t.target]),i=e.useMemo(function(){return Re({options:{namespace:t.namespace,prefix:!t.disableVendorPrefixes},plugins:n})},[t.disableVendorPrefixes,t.namespace,n]);return e.useEffect(function(){(function(e,t,r,n){var o=void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),c=0;c<s.length;c++){var u=s[c];if(!i(u))return!1;if(!1===(o=void 0)||void 0===o&&e[u]!==t[u])return!1}return!0})(n,t.stylisPlugins)||o(t.stylisPlugins)},[t.stylisPlugins]),e.createElement($e.Provider,{value:a},e.createElement(Oe.Provider,{value:i},t.children))}var Ge=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=Ne);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){throw h(12,String(r.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Ne),this.name+e.hash},e}(),Be={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Fe(e){return e.displayName||e.name||"Component"}var Me=/[A-Z]/,Le=/[A-Z]/g,We=/^ms-/,Ye=function(e){return"-".concat(e.toLowerCase())};function He(e){return Me.test(e)&&!e.startsWith("--")?e.replace(Le,Ye).replace(We,"-ms-"):e}function qe(e){return"function"==typeof e}function Ve(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function Ue(e){return"object"==typeof e&&"styledComponentId"in e}var Ze=function(e){return null==e||!1===e||""===e},Je=function(e,t){var r,n=[];for(var o in e)e.hasOwnProperty(o)&&!Ze(e[o])&&(Array.isArray(e[o])&&e[o].isCss||qe(e[o])?n.push("".concat(He(o),":"),e[o],";"):Ve(e[o])?n.push.apply(n,Je(e[o],o)):n.push("".concat(He(o),": ").concat(null==(r=e[o])||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||o in Be?String(r).trim():"".concat(r,"px"),";")));return t?l(l(["".concat(t," {")],n,!0),["}"],!1):n};function Ke(e,t,r,n){if(Array.isArray(e)){for(var o=[],s=0,a=e.length,i=void 0;s<a;s+=1)0!==(i=Ke(e[s],t,r,n)).length&&o.push.apply(o,i);return o}return Ze(e)?[]:Ue(e)?[".".concat(e.styledComponentId)]:qe(e)?"function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t?[e]:Ke(i=e(t),t,r,n):e instanceof Ge?r?(e.inject(r,n),[e.getName(n)]):[e]:Ve(e)?Je(e):[e.toString()];var c}function Qe(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(qe(r)&&!Ue(r))return!1}return!0}var Xe=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Qe(e),j.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,r,n){var o=n(Ke(this.rules,t,r,n).join(""),""),s=this.componentId+e;r.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&&j.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)},e}(),et=e.createContext(void 0),tt=et.Consumer;function rt(e,t,r){return void 0===r&&(r=p),e.theme!==r.theme&&e.theme||t||r.theme}var nt=/(a)(d)/gi,ot=function(e){return String.fromCharCode(e+(e>25?39:97))};function st(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=ot(t%52)+r;return(ot(t%52)+r).replace(nt,"$1-$2")}function at(e){return st(Ae(e)>>>0)}function it(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var ct,ut=function(e){return Object.assign(e,{isCss:!0})};function lt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(qe(e)||Ve(e)){var n=e;return ut(Ke(it(f,l([n],t,!0))))}var o=e;return 0===t.length&&1===o.length&&"string"==typeof o[0]?Ke(o):ut(Ke(it(o,t)))}var ft="function"==typeof Symbol&&Symbol.for,pt=ft?Symbol.for("react.memo"):60115,ht=ft?Symbol.for("react.forward_ref"):60112,dt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vt=((ct={})[ht]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ct[pt]=mt,ct);function yt(e){return("type"in(t=e)&&t.type.$$typeof)===pt?mt:"$$typeof"in e?vt[e.$$typeof]:dt;var t}var St=Object.defineProperty,bt=Object.getOwnPropertyNames,wt=Object.getOwnPropertySymbols,Ct=Object.getOwnPropertyDescriptor,xt=Object.getPrototypeOf,It=Object.prototype;function Pt(e,t,r){if("string"!=typeof t){if(It){var n=xt(t);n&&n!==It&&Pt(e,n,r)}var o=bt(t);wt&&(o=o.concat(wt(t)));for(var s=yt(e),a=yt(t),i=0;i<o.length;++i){var c=o[i];if(!(c in gt||r&&r[c]||a&&c in a||s&&c in s)){var u=Ct(t,c);try{St(e,c,u)}catch(e){}}}}return e}var At=function(){function r(){var r=this;this._emitSheetCSS=function(){var e=r.instance.toString(),s=I(),a=[s&&'nonce="'.concat(s,'"'),"".concat(t,'="true"'),"".concat(n,'="').concat(o,'"')].filter(Boolean).join(" ");return"<style ".concat(a,">").concat(e,"</style>")},this.getStyleTags=function(){if(r.sealed)throw h(2);return r._emitSheetCSS()},this.getStyleElement=function(){var s;if(r.sealed)throw h(2);var a=((s={})[t]="",s[n]=o,s.dangerouslySetInnerHTML={__html:r.instance.toString()},s),i=I();return i&&(a.nonce=i),[e.createElement("style",u({},a,{key:"sc-0-0"}))]},this.seal=function(){r.sealed=!0},this.instance=new j({isServer:!0}),this.sealed=!1}return r.prototype.collectStyles=function(t){if(this.sealed)throw h(2);return e.createElement(ze,{sheet:this.instance},t)},r.prototype.interleaveWithNodeStream=function(e){throw h(3)},r}(),Et=/*#__PURE__*/Object.freeze({__proto__:null,createGlobalStyle:function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=lt.apply(void 0,l([t],r,!1)),s="sc-global-".concat(at(JSON.stringify(o))),a=new Xe(o,s),i=function(t){var r=Te(),n=De(),o=e.useContext(et),i=e.useRef(r.allocateGSInstance(s)).current;return r.server&&f(i,t,r,o,n),(e.useInsertionEffect||e.useLayoutEffect)(function(){if(!r.server)return f(i,t,r,o,n),function(){return a.removeStyles(i,r)}},[i,t,r,o,n]),null};function f(e,t,r,n,o){if(a.isStatic)a.renderStyles(e,c,r,o);else{var s=u(u({},t),{theme:rt(t,n,i.defaultProps)});a.renderStyles(e,s,r,o)}}return e.memo(i)},css:lt,isStyledComponent:Ue,keyframes:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=lt.apply(void 0,l([e],t,!1)).join(""),o=at(n);return new Ge(o,n)},ServerStyleSheet:At,StyleSheetConsumer:je,StyleSheetContext:$e,StyleSheetManager:ze,ThemeConsumer:tt,ThemeContext:et,ThemeProvider:function(t){var r=e.useContext(et),n=e.useMemo(function(){return function(e,t){if(!e)throw h(14);if(qe(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw h(8);return t?u(u({},t),e):e}(t.theme,r)},[t.theme,r]);return t.children?e.createElement(et.Provider,{value:n},t.children):null},useTheme:function(){return e.useContext(et)},version:o,withTheme:function(t){var r=e.forwardRef(function(r,n){var o=rt(r,e.useContext(et),t.defaultProps);return e.createElement(t,u({},r,{theme:o,ref:n}))});return r.displayName="WithTheme(".concat(Fe(t),")"),Pt(r,t)},__PRIVATE__:{StyleSheet:j,mainSheet:ke}}),_t=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","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","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Rt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,$t=/(^-|-$)/g;function jt(e){return e.replace(Rt,"-").replace($t,"")}function Ot(e){return"string"==typeof e&&!0}function kt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(" ")}function Nt(e,t,r){if(void 0===r&&(r=!1),!r&&!Ve(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Nt(e[n],t[n]);else if(Ve(t))for(var n in t)e[n]=Nt(e[n],t[n]);return e}var Tt=Ae(o),Dt=function(){function e(e,t,r){this.names=[],this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&Qe(e),this.componentId=t,this.baseHash=Pe(Tt,t),this.baseStyle=r,j.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.componentId;if(this.names.length=0,this.baseStyle&&this.names.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))this.names.push(this.staticRulesId);else{var o=Ke(this.rules,e,t,r).join(""),s=st(Pe(this.baseHash,o)>>>0);if(!t.hasNameForId(n,s)){var a=r(o,".".concat(s),void 0,n);t.insertRules(n,s,a)}this.names.push(s),this.staticRulesId=s}else{for(var i=this.rules.length,c=Pe(this.baseHash,r.hash),u="",l=0;l<i;l++){var f=this.rules[l];if("string"==typeof f)u+=f;else if(f){var p=Ke(f,e,t,r),h=Array.isArray(p)?p.join(""):p;c=Pe(c,h),u+=h}}if(u){var d=st(c>>>0);if(!t.hasNameForId(n,d)){var g=r(u,".".concat(d),void 0,n);t.insertRules(n,d,g)}this.names.push(d)}}return this.names.join(" ")},e}(),zt={};function Gt(t,r,n){var s=Ue(t),a=t,i=!Ot(t),c=r.attrs,l=void 0===c?f:c,h=r.componentId,d=void 0===h?function(e,t){var r="string"!=typeof e?"sc":jt(e);zt[r]=(zt[r]||0)+1;var n="".concat(r,"-").concat(at(o+r+zt[r]));return t?"".concat(t,"-").concat(n):n}(r.displayName,r.parentComponentId):h,g=r.displayName,m=void 0===g?function(e){return Ot(e)?"styled.".concat(e):"Styled(".concat(Fe(e),")")}(t):g,v=r.displayName&&r.componentId?"".concat(jt(r.displayName),"-").concat(r.componentId):r.componentId||d,y=s&&a.attrs?a.attrs.concat(l).filter(Boolean):l,S=r.shouldForwardProp;if(s&&a.shouldForwardProp){var b=a.shouldForwardProp;if(r.shouldForwardProp){var w=r.shouldForwardProp;S=function(e,t){return b(e,t)&&w(e,t)}}else S=b}var C=new Dt(n,v,s?a.componentStyle:void 0),x=C.isStatic&&0===l.length;function I(t,r){return function(t,r,n,o){var s=t.attrs,a=t.componentStyle,i=t.defaultProps,c=t.foldedComponentIds,l=t.shouldForwardProp,f=t.styledComponentId,h=t.target,d=rt(r,e.useContext(et),i)||p,g=s.reduce(function(e,t){var r="function"==typeof t?t(e):t;for(var n in r)e[n]="className"===n?kt(e[n],r[n]):"style"===n?u(u({},e[n]),r[n]):r[n];return e},u(u({},r),{theme:d})),m=function(e,t,r,n){var o=Te(),s=De();return e.generateAndInjectStyles(t?p:r,o,s)}(a,o,g),v=n,y=g.as||h,S=Ot(y),b={};for(var w in g)void 0===g[w]||"$"===w[0]||"as"===w||"theme"===w||("forwardedAs"===w?b.as=g.forwardedAs:l&&!l(w,y)||(b[w]=g[w]));return b[S&&-1===_t.indexOf(y)?"class":"className"]=c.concat(f,m!==f?m:"",g.className||"").filter(Boolean).join(" "),b.ref=v,e.createElement(y,b)}(P,t,r,x)}I.displayName=m;var P=e.forwardRef(I);return P.attrs=y,P.componentStyle=C,P.displayName=m,P.shouldForwardProp=S,P.foldedComponentIds=s?a.foldedComponentIds.concat(a.styledComponentId):f,P.styledComponentId=v,P.target=s?a.target:t,Object.defineProperty(P,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,o=t;n<o.length;n++)Nt(e,o[n],!0);return e}({},a.defaultProps,e):e}}),P.toString=function(){return".".concat(P.styledComponentId)},i&&Pt(P,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),P}function Bt(e,t,r){if(void 0===r&&(r=p),!t)throw h(1,t);var n=function(n){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];return e(t,r,lt.apply(void 0,l([n],o,!1)))};return n.attrs=function(n){return Bt(e,t,u(u({},r),{attrs:Array.prototype.concat(r.attrs,n).filter(Boolean)}))},n.withConfig=function(n){return Bt(e,t,u(u({},r),n))},n}var Ft=function(e){return Bt(Gt,e)},Mt=Ft;for(var Lt in _t.forEach(function(e){Mt[e]=Ft(e)}),Et)Mt[Lt]=Et[Lt];return Mt}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).styled=t(e.React)}(this,function(e){"use strict";var t="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",r="active",n="data-styled-version",o="6.0.0-beta.10",s="/*!sc*/\n",a="undefined"!=typeof window&&"HTMLElement"in window,i=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),c={},u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,s=t.length;o<s;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var f=Object.freeze([]),p=Object.freeze({});function h(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var d=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)if((o<<=1)<0)throw h(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var s=n;s<o;s++)this.groupSizes[s]=0}var a=this.indexOfGroup(e+1);if(Array.isArray(t)){s=0;for(var i=t.length;s<i;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)}else this.tag.insertRule(a,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,a=n;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(s);return t},e}(),v=new Map,g=new Map,m=1,y=function(e){if(v.has(e))return v.get(e);for(;g.has(m);)m++;var t=m++;return v.set(e,t),g.set(t,e),t},S=function(e,t){v.set(e,t),g.set(t,e)},b="style[".concat(t,"][").concat(n,'="').concat(o,'"]'),w=new RegExp("^".concat(t,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),C=function(e,t,r){for(var n,o=r.split(","),s=0,a=o.length;s<a;s++)(n=o[s])&&e.registerName(t,n)},x=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(s),o=[],a=0,i=n.length;a<i;a++){var c=n[a].trim();if(c){var u=c.match(w);if(u){var l=0|parseInt(u[1],10),f=u[2];0!==l&&(S(f,l),C(e,f,u[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(c)}}};function I(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var P=function(e){var s=document.head,a=e||s,i=document.createElement("style"),c=function(e){for(var r=e.childNodes,n=r.length;n>=0;n--){var o=r[n];if(o&&1===o.nodeType&&o.hasAttribute(t))return o}}(a),u=void 0!==c?c.nextSibling:null;i.setAttribute(t,r),i.setAttribute(n,o);var l=I();return l&&i.setAttribute("nonce",l),a.insertBefore(i,u),i},A=function(){function e(e){var t=this.element=P(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}throw h(17)}(t),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),E=function(){function e(e){var t=this.element=P(e);this.nodes=t.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),_=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),R=a,$={isServer:!a,useCSSOMInjection:!i},j=function(){function e(e,n,o){void 0===e&&(e=p),void 0===n&&(n={}),this.options=u(u({},$),e),this.gs=n,this.names=new Map(o),this.server=!!e.isServer,!this.server&&a&&R&&(R=!1,function(e){for(var n=document.querySelectorAll(b),o=0,s=n.length;o<s;o++){var a=n[o];a&&a.getAttribute(t)!==r&&(x(e,a),a.parentNode&&a.parentNode.removeChild(a))}}(this))}return e.registerId=function(e){return y(e)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(u(u({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,r=e.target;return e.isServer?new _(r):t?new A(r):new E(r)}(this.options),new d(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(y(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(y(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(y(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e.prototype.toString=function(){return function(e){for(var r=e.getTag(),n=r.length,o="",a=function(n){var a=function(e){return g.get(e)}(n);if(void 0===a)return"continue";var i=e.names.get(a),c=r.getGroup(n);if(void 0===i||0===c.length)return"continue";var u="".concat(t,".g").concat(n,'[id="').concat(a,'"]'),l="";void 0!==i&&i.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),o+="".concat(c).concat(u,'{content:"').concat(l,'"}').concat(s)},i=0;i<n;i++)a(i);return o}(this)},e}(),O="-ms-",k="-moz-",N="-webkit-",T="comm",D="rule",z="decl",F="@keyframes",G=Math.abs,B=String.fromCharCode,M=Object.assign;function L(e){return e.trim()}function W(e,t){return(e=t.exec(e))?e[0]:e}function Y(e,t,r){return e.replace(t,r)}function H(e,t){return e.indexOf(t)}function q(e,t){return 0|e.charCodeAt(t)}function V(e,t,r){return e.slice(t,r)}function U(e){return e.length}function Z(e){return e.length}function J(e,t){return t.push(e),e}var K=1,Q=1,X=0,ee=0,te=0,re="";function ne(e,t,r,n,o,s,a){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:K,column:Q,length:a,return:""}}function oe(e,t){return M(ne("",null,null,"",null,null,0),e,{length:-e.length},t)}function se(){return te=ee<X?q(re,ee++):0,Q++,10===te&&(Q=1,K++),te}function ae(){return q(re,ee)}function ie(){return ee}function ce(e,t){return V(re,e,t)}function ue(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function le(e){return L(ce(ee-1,he(91===e?e+2:40===e?e+1:e)))}function fe(e){for(;(te=ae())&&te<33;)se();return ue(e)>2||ue(te)>3?"":" "}function pe(e,t){for(;--t&&se()&&!(te<48||te>102||te>57&&te<65||te>70&&te<97););return ce(e,ie()+(t<6&&32==ae()&&32==se()))}function he(e){for(;se();)switch(te){case e:return ee;case 34:case 39:34!==e&&39!==e&&he(te);break;case 40:41===e&&he(e);break;case 92:se()}return ee}function de(e,t){for(;se()&&e+te!==57&&(e+te!==84||47!==ae()););return"/*"+ce(t,ee-1)+"*"+B(47===e?e:se())}function ve(e){for(;!ue(ae());)se();return ce(e,ee)}function ge(e){return function(e){return re="",e}(me("",null,null,null,[""],e=function(e){return K=Q=1,X=U(re=e),ee=0,[]}(e),0,[0],e))}function me(e,t,r,n,o,s,a,i,c){for(var u=0,l=0,f=a,p=0,h=0,d=0,v=1,g=1,m=1,y=0,S="",b=o,w=s,C=n,x=S;g;)switch(d=y,y=se()){case 40:if(108!=d&&58==q(x,f-1)){-1!=H(x+=Y(le(y),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:x+=le(y);break;case 9:case 10:case 13:case 32:x+=fe(d);break;case 92:x+=pe(ie()-1,7);continue;case 47:switch(ae()){case 42:case 47:J(Se(de(se(),ie()),t,r),c);break;default:x+="/"}break;case 123*v:i[u++]=U(x)*m;case 125*v:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+l:h>0&&U(x)-f&&J(h>32?be(x+";",n,r,f-1):be(Y(x," ","")+";",n,r,f-2),c);break;case 59:x+=";";default:if(J(C=ye(x,t,r,u,l,o,i,S,b=[],w=[],f),s),123===y)if(0===l)me(x,t,C,C,b,s,f,i,w);else switch(99===p&&110===q(x,3)?100:p){case 100:case 109:case 115:me(e,C,C,n&&J(ye(e,C,C,0,0,o,i,S,o,b=[],f),w),o,w,f,i,n?b:w);break;default:me(x,C,C,C,[""],w,0,i,w)}}u=l=h=0,v=m=1,S=x="",f=a;break;case 58:f=1+U(x),h=d;default:if(v<1)if(123==y)--v;else if(125==y&&0==v++&&125==(te=ee>0?q(re,--ee):0,Q--,10===te&&(Q=1,K--),te))continue;switch(x+=B(y),y*v){case 38:m=l>0?1:(x+="\f",-1);break;case 44:i[u++]=(U(x)-1)*m,m=1;break;case 64:45===ae()&&(x+=le(se())),p=ae(),l=f=U(S=x+=ve(ie())),y++;break;case 45:45===d&&2==U(x)&&(v=0)}}return s}function ye(e,t,r,n,o,s,a,i,c,u,l){for(var f=o-1,p=0===o?s:[""],h=Z(p),d=0,v=0,g=0;d<n;++d)for(var m=0,y=V(e,f+1,f=G(v=a[d])),S=e;m<h;++m)(S=L(v>0?p[m]+" "+y:Y(y,/&\f/g,p[m])))&&(c[g++]=S);return ne(e,t,r,0===o?D:i,c,u,l)}function Se(e,t,r){return ne(e,t,r,T,B(te),V(e,2,-2),0)}function be(e,t,r,n){return ne(e,t,r,z,V(e,0,n),V(e,n+1,-1),n)}function we(e,t,r){switch(function(e,t){return 45^q(e,0)?(((t<<2^q(e,0))<<2^q(e,1))<<2^q(e,2))<<2^q(e,3):0}(e,t)){case 5103:return N+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+e+e;case 4789:return k+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return N+e+k+e+O+e+e;case 5936:switch(q(e,t+11)){case 114:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return N+e+O+e+e;case 6165:return N+e+O+"flex-"+e+e;case 5187:return N+e+Y(e,/(\w+).+(:[^]+)/,N+"box-$1$2"+O+"flex-$1$2")+e;case 5443:return N+e+O+"flex-item-"+Y(e,/flex-|-self/g,"")+(W(e,/flex-|baseline/)?"":O+"grid-row-"+Y(e,/flex-|-self/g,""))+e;case 4675:return N+e+O+"flex-line-pack"+Y(e,/align-content|flex-|-self/g,"")+e;case 5548:return N+e+O+Y(e,"shrink","negative")+e;case 5292:return N+e+O+Y(e,"basis","preferred-size")+e;case 6060:return N+"box-"+Y(e,"-grow","")+N+e+O+Y(e,"grow","positive")+e;case 4554:return N+Y(e,/([^-])(transform)/g,"$1"+N+"$2")+e;case 6187:return Y(Y(Y(e,/(zoom-|grab)/,N+"$1"),/(image-set)/,N+"$1"),e,"")+e;case 5495:case 3959:return Y(e,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return Y(Y(e,/(.+:)(flex-)?(.*)/,N+"box-pack:$3"+O+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+N+e+e;case 4200:if(!W(e,/flex-|baseline/))return O+"grid-column-align"+V(e,t)+e;break;case 2592:case 3360:return O+Y(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,W(e.props,/grid-\w+-end/)})?~H(e+(r=r[t].value),"span")?e:O+Y(e,"-start","")+e+O+"grid-row-span:"+(~H(r,"span")?W(r,/\d+/):+W(r,/\d+/)-+W(e,/\d+/))+";":O+Y(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return W(e.props,/grid-\w+-start/)})?e:O+Y(Y(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Y(e,/(.+)-inline(.+)/,N+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(U(e)-1-t>6)switch(q(e,t+1)){case 109:if(45!==q(e,t+4))break;case 102:return Y(e,/(.+:)(.+)-([^]+)/,"$1"+N+"$2-$3$1"+k+(108==q(e,t+3)?"$3":"$2-$3"))+e;case 115:return~H(e,"stretch")?we(Y(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Y(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,o,s,a,i){return O+r+":"+n+i+(o?O+r+"-span:"+(s?a:+a-+n)+i:"")+e});case 4949:if(121===q(e,t+6))return Y(e,":",":"+N)+e;break;case 6444:switch(q(e,45===q(e,14)?18:11)){case 120:return Y(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+N+(45===q(e,14)?"inline-":"")+"box$3$1"+N+"$2$3$1"+O+"$2box$3")+e;case 100:return Y(e,":",":"+O)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Y(e,"scroll-","scroll-snap-")+e}return e}function Ce(e,t){for(var r="",n=Z(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function xe(e,t,r,n){switch(e.type){case"@import":case z:return e.return=e.return||e.value;case T:return"";case F:return e.return=e.value+"{"+Ce(e.children,n)+"}";case D:e.value=e.props.join(",")}return U(r=Ce(e.children,n))?e.return=e.value+"{"+r+"}":""}function Ie(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case z:return void(e.return=we(e.value,e.length,r));case F:return Ce([oe(e,{value:Y(e.value,"@","@"+N)})],n);case D:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(W(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ce([oe(e,{props:[Y(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Ce([oe(e,{props:[Y(t,/:(plac\w+)/,":"+N+"input-$1")]}),oe(e,{props:[Y(t,/:(plac\w+)/,":-moz-$1")]}),oe(e,{props:[Y(t,/:(plac\w+)/,O+"input-$1")]})],n)}return""})}}var Pe=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Ae=function(e){return Pe(5381,e)},Ee=/^\s*\/\/.*$/gm,_e=[":","[",".","#"];function Re(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&(e.children=Re(e.children,t)),e})}function $e(e){var t,r,n,o,s=void 0===e?p:e,a=s.options,i=void 0===a?p:a,c=s.plugins,u=void 0===c?f:c,l=function(e,n,s){return 0===n&&_e.includes(s[r.length])||s.match(o)?e:".".concat(t)},d=function(e){if(e.type===D&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(n,l)}},v=function(e,s,a,c){void 0===s&&(s=""),void 0===a&&(a=""),void 0===c&&(c="&");var l=e.replace(Ee,"");t=c,r=s,n=new RegExp("\\".concat(r,"\\b"),"g"),o=new RegExp("(\\".concat(r,"\\b){2,}"));var f=u.slice();(i.prefix||void 0===i.prefix)&&f.unshift(Ie),f.push(d,xe);var p,h,v=ge(a||s?"".concat(a," ").concat(s," { ").concat(l," }"):l);return i.namespace&&(v=Re(v,i.namespace)),p=v,h=function(e){var t=Z(e);return function(r,n,o,s){for(var a="",i=0;i<t;i++)a+=e[i](r,n,o,s)||"";return a}}(f),p.map(function(e,t){return h(e,t,p,h)}).filter(Boolean)};return v.hash=u.length?u.reduce(function(e,t){return t.name||h(15),Pe(e,t.name)},5381).toString():"",v}var je=e.createContext({shouldForwardProp:void 0,styleSheet:void 0}),Oe=je.Consumer,ke=e.createContext(void 0),Ne=new j,Te=$e();function De(){return e.useContext(je).styleSheet||Ne}function ze(){return e.useContext(ke)||Te}function Fe(t){var r=e.useState(t.stylisPlugins),n=r[0],o=r[1],s=De(),a=e.useMemo(function(){var e=s;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e},[t.disableCSSOMInjection,t.sheet,t.target]),i=e.useMemo(function(){return $e({options:{namespace:t.namespace,prefix:!t.disableVendorPrefixes},plugins:n})},[t.disableVendorPrefixes,t.namespace,n]);return e.useEffect(function(){(function(e,t,r,n){var o=void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),c=0;c<s.length;c++){var u=s[c];if(!i(u))return!1;if(!1===(o=void 0)||void 0===o&&e[u]!==t[u])return!1}return!0})(n,t.stylisPlugins)||o(t.stylisPlugins)},[t.stylisPlugins]),e.createElement(je.Provider,{value:{shouldForwardProp:t.shouldForwardProp,styleSheet:a}},e.createElement(ke.Provider,{value:i},t.children))}var Ge=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=Te);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){throw h(12,String(r.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Te),this.name+e.hash},e}(),Be={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Me(e){return e.displayName||e.name||"Component"}var Le=/[A-Z]/,We=/[A-Z]/g,Ye=/^ms-/,He=function(e){return"-".concat(e.toLowerCase())};function qe(e){return Le.test(e)&&!e.startsWith("--")?e.replace(We,He).replace(Ye,"-ms-"):e}function Ve(e){return"function"==typeof e}function Ue(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function Ze(e){return"object"==typeof e&&"styledComponentId"in e}var Je=function(e){return null==e||!1===e||""===e},Ke=function(e,t){var r,n=[];for(var o in e)e.hasOwnProperty(o)&&!Je(e[o])&&(Array.isArray(e[o])&&e[o].isCss||Ve(e[o])?n.push("".concat(qe(o),":"),e[o],";"):Ue(e[o])?n.push.apply(n,Ke(e[o],o)):n.push("".concat(qe(o),": ").concat(null==(r=e[o])||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||o in Be?String(r).trim():"".concat(r,"px"),";")));return t?l(l(["".concat(t," {")],n,!0),["}"],!1):n};function Qe(e,t,r,n){if(Array.isArray(e)){for(var o=[],s=0,a=e.length,i=void 0;s<a;s+=1)0!==(i=Qe(e[s],t,r,n)).length&&o.push.apply(o,i);return o}return Je(e)?[]:Ze(e)?[".".concat(e.styledComponentId)]:Ve(e)?"function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t?[e]:Qe(i=e(t),t,r,n):e instanceof Ge?r?(e.inject(r,n),[e.getName(n)]):[e]:Ue(e)?Ke(e):[e.toString()];var c}function Xe(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Ve(r)&&!Ze(r))return!1}return!0}var et=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Xe(e),j.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,r,n){var o=n(Qe(this.rules,t,r,n).join(""),""),s=this.componentId+e;r.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&&j.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)},e}(),tt=e.createContext(void 0),rt=tt.Consumer;function nt(e,t,r){return void 0===r&&(r=p),e.theme!==r.theme&&e.theme||t||r.theme}var ot=/(a)(d)/gi,st=function(e){return String.fromCharCode(e+(e>25?39:97))};function at(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=st(t%52)+r;return(st(t%52)+r).replace(ot,"$1-$2")}function it(e){return at(Ae(e)>>>0)}function ct(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var ut,lt=function(e){return Object.assign(e,{isCss:!0})};function ft(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Ve(e)||Ue(e)){var n=e;return lt(Qe(ct(f,l([n],t,!0))))}var o=e;return 0===t.length&&1===o.length&&"string"==typeof o[0]?Qe(o):lt(Qe(ct(o,t)))}var pt="function"==typeof Symbol&&Symbol.for,ht=pt?Symbol.for("react.memo"):60115,dt=pt?Symbol.for("react.forward_ref"):60112,vt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yt=((ut={})[dt]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ut[ht]=mt,ut);function St(e){return("type"in(t=e)&&t.type.$$typeof)===ht?mt:"$$typeof"in e?yt[e.$$typeof]:vt;var t}var bt=Object.defineProperty,wt=Object.getOwnPropertyNames,Ct=Object.getOwnPropertySymbols,xt=Object.getOwnPropertyDescriptor,It=Object.getPrototypeOf,Pt=Object.prototype;function At(e,t,r){if("string"!=typeof t){if(Pt){var n=It(t);n&&n!==Pt&&At(e,n,r)}var o=wt(t);Ct&&(o=o.concat(Ct(t)));for(var s=St(e),a=St(t),i=0;i<o.length;++i){var c=o[i];if(!(c in gt||r&&r[c]||a&&c in a||s&&c in s)){var u=xt(t,c);try{bt(e,c,u)}catch(e){}}}}return e}var Et=function(){function r(){var r=this;this._emitSheetCSS=function(){var e=r.instance.toString(),s=I(),a=[s&&'nonce="'.concat(s,'"'),"".concat(t,'="true"'),"".concat(n,'="').concat(o,'"')].filter(Boolean).join(" ");return"<style ".concat(a,">").concat(e,"</style>")},this.getStyleTags=function(){if(r.sealed)throw h(2);return r._emitSheetCSS()},this.getStyleElement=function(){var s;if(r.sealed)throw h(2);var a=((s={})[t]="",s[n]=o,s.dangerouslySetInnerHTML={__html:r.instance.toString()},s),i=I();return i&&(a.nonce=i),[e.createElement("style",u({},a,{key:"sc-0-0"}))]},this.seal=function(){r.sealed=!0},this.instance=new j({isServer:!0}),this.sealed=!1}return r.prototype.collectStyles=function(t){if(this.sealed)throw h(2);return e.createElement(Fe,{sheet:this.instance},t)},r.prototype.interleaveWithNodeStream=function(e){throw h(3)},r}(),_t=/*#__PURE__*/Object.freeze({__proto__:null,createGlobalStyle:function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=ft.apply(void 0,l([t],r,!1)),s="sc-global-".concat(it(JSON.stringify(o))),a=new et(o,s),i=function(t){var r=De(),n=ze(),o=e.useContext(tt),i=e.useRef(r.allocateGSInstance(s)).current;return r.server&&f(i,t,r,o,n),(e.useInsertionEffect||e.useLayoutEffect)(function(){if(!r.server)return f(i,t,r,o,n),function(){return a.removeStyles(i,r)}},[i,t,r,o,n]),null};function f(e,t,r,n,o){if(a.isStatic)a.renderStyles(e,c,r,o);else{var s=u(u({},t),{theme:nt(t,n,i.defaultProps)});a.renderStyles(e,s,r,o)}}return e.memo(i)},css:ft,isStyledComponent:Ze,keyframes:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=ft.apply(void 0,l([e],t,!1)).join(""),o=it(n);return new Ge(o,n)},ServerStyleSheet:Et,StyleSheetConsumer:Oe,StyleSheetContext:je,StyleSheetManager:Fe,ThemeConsumer:rt,ThemeContext:tt,ThemeProvider:function(t){var r=e.useContext(tt),n=e.useMemo(function(){return function(e,t){if(!e)throw h(14);if(Ve(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw h(8);return t?u(u({},t),e):e}(t.theme,r)},[t.theme,r]);return t.children?e.createElement(tt.Provider,{value:n},t.children):null},useTheme:function(){return e.useContext(tt)},version:o,withTheme:function(t){var r=e.forwardRef(function(r,n){var o=nt(r,e.useContext(tt),t.defaultProps);return e.createElement(t,u({},r,{theme:o,ref:n}))});return r.displayName="WithTheme(".concat(Me(t),")"),At(r,t)},__PRIVATE__:{StyleSheet:j,mainSheet:Ne}}),Rt=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","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","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],$t=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,jt=/(^-|-$)/g;function Ot(e){return e.replace($t,"-").replace(jt,"")}function kt(e){return"string"==typeof e&&!0}function Nt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(" ")}function Tt(e,t,r){if(void 0===r&&(r=!1),!r&&!Ue(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Tt(e[n],t[n]);else if(Ue(t))for(var n in t)e[n]=Tt(e[n],t[n]);return e}var Dt=Ae(o),zt=function(){function e(e,t,r){this.names=[],this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&Xe(e),this.componentId=t,this.baseHash=Pe(Dt,t),this.baseStyle=r,j.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.componentId;if(this.names.length=0,this.baseStyle&&this.names.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))this.names.push(this.staticRulesId);else{var o=Qe(this.rules,e,t,r).join(""),s=at(Pe(this.baseHash,o)>>>0);if(!t.hasNameForId(n,s)){var a=r(o,".".concat(s),void 0,n);t.insertRules(n,s,a)}this.names.push(s),this.staticRulesId=s}else{for(var i=this.rules.length,c=Pe(this.baseHash,r.hash),u="",l=0;l<i;l++){var f=this.rules[l];if("string"==typeof f)u+=f;else if(f){var p=Qe(f,e,t,r),h=Array.isArray(p)?p.join(""):p;c=Pe(c,h),u+=h}}if(u){var d=at(c>>>0);if(!t.hasNameForId(n,d)){var v=r(u,".".concat(d),void 0,n);t.insertRules(n,d,v)}this.names.push(d)}}return this.names.join(" ")},e}(),Ft={};function Gt(t,r,n){var s=Ze(t),a=t,i=!kt(t),c=r.attrs,l=void 0===c?f:c,h=r.componentId,d=void 0===h?function(e,t){var r="string"!=typeof e?"sc":Ot(e);Ft[r]=(Ft[r]||0)+1;var n="".concat(r,"-").concat(it(o+r+Ft[r]));return t?"".concat(t,"-").concat(n):n}(r.displayName,r.parentComponentId):h,v=r.displayName,g=void 0===v?function(e){return kt(e)?"styled.".concat(e):"Styled(".concat(Me(e),")")}(t):v,m=r.displayName&&r.componentId?"".concat(Ot(r.displayName),"-").concat(r.componentId):r.componentId||d,y=s&&a.attrs?a.attrs.concat(l).filter(Boolean):l,S=r.shouldForwardProp;if(s&&a.shouldForwardProp){var b=a.shouldForwardProp;if(r.shouldForwardProp){var w=r.shouldForwardProp;S=function(e,t){return b(e,t)&&w(e,t)}}else S=b}var C=new zt(n,m,s?a.componentStyle:void 0),x=C.isStatic&&0===l.length;function I(t,r){return function(t,r,n,o){var s=t.attrs,a=t.componentStyle,i=t.defaultProps,c=t.foldedComponentIds,l=t.styledComponentId,f=t.target,h=e.useContext(je).shouldForwardProp,d=t.shouldForwardProp||h,v=nt(r,e.useContext(tt),i)||p,g=s.reduce(function(e,t){var r="function"==typeof t?t(e):t;for(var n in r)e[n]="className"===n?Nt(e[n],r[n]):"style"===n?u(u({},e[n]),r[n]):r[n];return e},u(u({},r),{theme:v})),m=function(e,t,r,n){var o=De(),s=ze();return e.generateAndInjectStyles(t?p:r,o,s)}(a,o,g),y=n,S=g.as||f,b=kt(S),w={};for(var C in g)void 0===g[C]||"$"===C[0]||"as"===C||"theme"===C||("forwardedAs"===C?w.as=g.forwardedAs:d&&!d(C,S)||(w[C]=g[C]));return w[b&&-1===Rt.indexOf(S)?"class":"className"]=c.concat(l,m!==l?m:"",g.className||"").filter(Boolean).join(" "),w.ref=y,e.createElement(S,w)}(P,t,r,x)}I.displayName=g;var P=e.forwardRef(I);return P.attrs=y,P.componentStyle=C,P.displayName=g,P.shouldForwardProp=S,P.foldedComponentIds=s?a.foldedComponentIds.concat(a.styledComponentId):f,P.styledComponentId=m,P.target=s?a.target:t,Object.defineProperty(P,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,o=t;n<o.length;n++)Tt(e,o[n],!0);return e}({},a.defaultProps,e):e}}),P.toString=function(){return".".concat(P.styledComponentId)},i&&At(P,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),P}function Bt(e,t,r){if(void 0===r&&(r=p),!t)throw h(1,t);var n=function(n){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];return e(t,r,ft.apply(void 0,l([n],o,!1)))};return n.attrs=function(n){return Bt(e,t,u(u({},r),{attrs:Array.prototype.concat(r.attrs,n).filter(Boolean)}))},n.withConfig=function(n){return Bt(e,t,u(u({},r),n))},n}var Mt=function(e){return Bt(Gt,e)},Lt=Mt;for(var Wt in Rt.forEach(function(e){Lt[e]=Mt(e)}),_t)Lt[Wt]=_t[Wt];return Lt}); | ||
//# sourceMappingURL=styled-components.min.js.map |
@@ -53,3 +53,3 @@ import React from 'react'; | ||
} | ||
export declare type Interpolation<Props extends object> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | OmitSignatures<IStyledComponent<'web', any, any>> | Interpolation<Props>[]; | ||
export declare type Interpolation<Props extends object> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | IStyledComponent<'web', any, any> | Interpolation<Props>[]; | ||
export declare type AttrsArg<Props extends object> = (Omit<ExecutionProps, keyof Props> & Props) | ((props: Omit<ExecutionContext, keyof Props> & Props) => Partial<Props>); | ||
@@ -102,7 +102,2 @@ export declare type Attrs = object | ((...args: any) => object); | ||
/** | ||
* Remove the function call signature, keeping the additional properties. | ||
* https://stackoverflow.com/a/62502740/347386 | ||
*/ | ||
declare type OmitSignatures<T> = Pick<T, keyof T>; | ||
/** | ||
* This type forms the signature for a forwardRef-enabled component that accepts | ||
@@ -113,3 +108,3 @@ * the "as" prop to dynamically change the underlying rendered JSX. The interface will | ||
*/ | ||
export interface PolymorphicComponent<R extends Runtime, P extends object, FallbackComponent extends StyledTarget<R>> extends OmitSignatures<React.ForwardRefExoticComponent<P>> { | ||
export interface PolymorphicComponent<R extends Runtime, P extends object, FallbackComponent extends StyledTarget<R>> extends React.ForwardRefExoticComponent<object> { | ||
<E extends StyledTarget<R> = FallbackComponent>(props: PolymorphicComponentProps<R, E, P>): React.ReactElement | null; | ||
@@ -122,3 +117,3 @@ } | ||
export interface IStyledComponentFactory<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = object> { | ||
<Props extends object = object, Statics extends object = object>(target: Target, options: StyledOptions<R, OuterProps>, rules: RuleSet<OuterProps & Props>): IStyledComponent<R, Target, OuterProps & Props> & OuterStatics & Statics; | ||
<Props extends object = object, Statics extends object = object>(target: Target, options: StyledOptions<R, OuterProps & Props>, rules: RuleSet<OuterProps & Props>): IStyledComponent<R, Target, OuterProps & Props> & OuterStatics & Statics; | ||
} | ||
@@ -125,0 +120,0 @@ export interface IInlineStyleConstructor<Props extends object> { |
import React from 'react'; | ||
import StyleSheet from '../sheet'; | ||
import { Stringifier } from '../types'; | ||
export declare type IStyleSheetContext = StyleSheet | void; | ||
import { ShouldForwardProp, Stringifier } from '../types'; | ||
export declare type IStyleSheetContext = { | ||
shouldForwardProp?: ShouldForwardProp<'web'>; | ||
styleSheet?: StyleSheet; | ||
}; | ||
export declare const StyleSheetContext: React.Context<IStyleSheetContext>; | ||
@@ -12,2 +15,3 @@ export declare const StyleSheetConsumer: React.Consumer<IStyleSheetContext>; | ||
export declare const mainStylis: Stringifier; | ||
export declare function useShouldForwardProp(): ShouldForwardProp<"web"> | undefined; | ||
export declare function useStyleSheet(): StyleSheet; | ||
@@ -36,2 +40,17 @@ export declare function useStylis(): Stringifier; | ||
/** | ||
* Starting in v6, styled-components no longer does its own prop validation | ||
* and recommends use of transient props "$prop" to pass style-only props to | ||
* components. If for some reason you are not able to use transient props, a | ||
* prop validation function can be provided via `StyleSheetManager`, such as | ||
* `@emotion/is-prop-valid`. | ||
* | ||
* When the return value is `true`, props will be forwarded to the DOM/underlying | ||
* component. If return value is `false`, the prop will be discarded after styles | ||
* are calculated. | ||
* | ||
* Manually composing `styled.{element}.withConfig({shouldForwardProp})` will | ||
* override this default. | ||
*/ | ||
shouldForwardProp?: IStyleSheetContext['shouldForwardProp']; | ||
/** | ||
* An array of plugins to be run by stylis (style processor) during compilation. | ||
@@ -38,0 +57,0 @@ * Check out [what's available on npm*](https://www.npmjs.com/search?q=keywords%3Astylis). |
@@ -78,7 +78,7 @@ 'use strict'; | ||
var SC_ATTR = (typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR)) || | ||
var SC_ATTR = (typeof process !== 'undefined' && typeof process.env !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR)) || | ||
'data-styled'; | ||
var SC_ATTR_ACTIVE = 'active'; | ||
var SC_ATTR_VERSION = 'data-styled-version'; | ||
var SC_VERSION = "6.0.0-beta.9"; | ||
var SC_VERSION = "6.0.0-beta.10"; | ||
var SPLITTER = '/*!sc*/\n'; | ||
@@ -89,2 +89,3 @@ var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window; | ||
: typeof process !== 'undefined' && | ||
typeof process.env !== 'undefined' && | ||
typeof process.env.REACT_APP_SC_DISABLE_SPEEDY !== 'undefined' && | ||
@@ -96,2 +97,3 @@ process.env.REACT_APP_SC_DISABLE_SPEEDY !== '' | ||
: typeof process !== 'undefined' && | ||
typeof process.env !== 'undefined' && | ||
typeof process.env.SC_DISABLE_SPEEDY !== 'undefined' && | ||
@@ -245,3 +247,2 @@ process.env.SC_DISABLE_SPEEDY !== '' | ||
for (var i = 0, l = names.length; i < l; i++) { | ||
// eslint-disable-next-line | ||
if ((name = names[i])) { | ||
@@ -556,2 +557,23 @@ sheet.registerName(id, name); | ||
} | ||
/** | ||
* Takes an element and recurses through it's rules added the namespace to the start of each selector. | ||
* Takes into account media queries by recursing through child rules if they are present. | ||
*/ | ||
function recursivelySetNamepace(compiled, namespace) { | ||
return compiled.map(function (rule) { | ||
if (rule.type === 'rule') { | ||
// add the namespace to the start | ||
rule.value = "".concat(namespace, " ").concat(rule.value); | ||
// add the namespace after each comma for subsequent selectors. | ||
rule.value = rule.value.replaceAll(',', ",".concat(namespace, " ")); | ||
rule.props = rule.props.map(function (prop) { | ||
return "".concat(namespace, " ").concat(prop); | ||
}); | ||
} | ||
if (Array.isArray(rule.children)) { | ||
rule.children = recursivelySetNamepace(rule.children, namespace); | ||
} | ||
return rule; | ||
}); | ||
} | ||
function createStylisInstance(_a) { | ||
@@ -614,5 +636,7 @@ var _b = _a === void 0 ? EMPTY_OBJECT : _a, _c = _b.options, options = _c === void 0 ? EMPTY_OBJECT : _c, _d = _b.plugins, plugins = _d === void 0 ? EMPTY_ARRAY : _d; | ||
middlewares.push(selfReferenceReplacementPlugin, stylis.stringify); | ||
return serialize(stylis.compile(options.namespace || prefix || selector | ||
? "".concat(options.namespace ? options.namespace + ' ' : '').concat(prefix, " ").concat(selector, " { ").concat(flatCSS, " }") | ||
: flatCSS), stylis.middleware(middlewares)); | ||
var compiled = stylis.compile(prefix || selector ? "".concat(prefix, " ").concat(selector, " { ").concat(flatCSS, " }") : flatCSS); | ||
if (options.namespace) { | ||
compiled = recursivelySetNamepace(compiled, options.namespace); | ||
} | ||
return serialize(compiled, stylis.middleware(middlewares)); | ||
}; | ||
@@ -632,3 +656,6 @@ stringifyRules.hash = plugins.length | ||
var StyleSheetContext = React__default.default.createContext(undefined); | ||
var StyleSheetContext = React__default.default.createContext({ | ||
shouldForwardProp: undefined, | ||
styleSheet: undefined, | ||
}); | ||
StyleSheetContext.Consumer; | ||
@@ -783,4 +810,4 @@ var StylisContext = React__default.default.createContext(undefined); | ||
!(result instanceof Keyframes) && | ||
!isPlainObject(result)) { | ||
// eslint-disable-next-line no-console | ||
!isPlainObject(result) && | ||
result !== null) { | ||
console.error("".concat(getComponentName(chunkFn), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")); | ||
@@ -1018,3 +1045,2 @@ } | ||
if (process.env.NODE_ENV !== 'production' && themeProp === undefined) { | ||
// eslint-disable-next-line no-console | ||
console.warn("[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"".concat(getComponentName(Component), "\"")); | ||
@@ -1072,3 +1098,2 @@ } | ||
else if (process.env.NODE_ENV !== 'production' && node.type !== 'comment') { | ||
/* eslint-disable no-console */ | ||
console.warn("Node of type ".concat(node.type, " not supported as an inline style")); | ||
@@ -1147,3 +1172,2 @@ } | ||
var key; | ||
/* eslint-disable guard-for-in */ | ||
for (key in resolvedAttrDef) { | ||
@@ -1153,3 +1177,2 @@ // @ts-expect-error bad types | ||
} | ||
/* eslint-enable guard-for-in */ | ||
}); | ||
@@ -1170,3 +1193,2 @@ return [context, resolvedAttrs]; | ||
var propsForElement = {}; | ||
// eslint-disable-next-line guard-for-in | ||
for (var key in computedProps) { | ||
@@ -1201,3 +1223,2 @@ if (key[0] === '$' || key === 'as') | ||
: attrs; | ||
// eslint-disable-next-line prefer-destructuring | ||
var shouldForwardProp = options.shouldForwardProp; | ||
@@ -1215,3 +1236,2 @@ if (isTargetStyledComp && styledComponentTarget.shouldForwardProp) { | ||
else { | ||
// eslint-disable-next-line prefer-destructuring | ||
shouldForwardProp = shouldForwardPropFn_1; | ||
@@ -1221,3 +1241,2 @@ } | ||
var forwardRef = function (props, ref) { | ||
// eslint-disable-next-line react-hooks/rules-of-hooks | ||
return useStyledComponentImpl(WrappedStyledComponent, props, ref); | ||
@@ -1262,3 +1281,2 @@ }; | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
var reactNative = require('react-native'); | ||
@@ -1265,0 +1283,0 @@ var InlineStyle = makeInlineStyleClass(reactNative.StyleSheet); |
import { __spreadArray, __assign } from 'tslib'; | ||
import React, { useContext, useMemo, createElement } from 'react'; | ||
import 'shallowequal'; | ||
import { prefixer, stringify, middleware, compile, RULESET } from 'stylis'; | ||
import { prefixer, stringify, compile, middleware, RULESET } from 'stylis'; | ||
import unitless from '@emotion/unitless'; | ||
@@ -68,7 +68,7 @@ import transformDeclPairs from 'css-to-react-native'; | ||
var SC_ATTR = (typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR)) || | ||
var SC_ATTR = (typeof process !== 'undefined' && typeof process.env !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR)) || | ||
'data-styled'; | ||
var SC_ATTR_ACTIVE = 'active'; | ||
var SC_ATTR_VERSION = 'data-styled-version'; | ||
var SC_VERSION = "6.0.0-beta.9"; | ||
var SC_VERSION = "6.0.0-beta.10"; | ||
var SPLITTER = '/*!sc*/\n'; | ||
@@ -79,2 +79,3 @@ var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window; | ||
: typeof process !== 'undefined' && | ||
typeof process.env !== 'undefined' && | ||
typeof process.env.REACT_APP_SC_DISABLE_SPEEDY !== 'undefined' && | ||
@@ -86,2 +87,3 @@ process.env.REACT_APP_SC_DISABLE_SPEEDY !== '' | ||
: typeof process !== 'undefined' && | ||
typeof process.env !== 'undefined' && | ||
typeof process.env.SC_DISABLE_SPEEDY !== 'undefined' && | ||
@@ -235,3 +237,2 @@ process.env.SC_DISABLE_SPEEDY !== '' | ||
for (var i = 0, l = names.length; i < l; i++) { | ||
// eslint-disable-next-line | ||
if ((name = names[i])) { | ||
@@ -546,2 +547,23 @@ sheet.registerName(id, name); | ||
} | ||
/** | ||
* Takes an element and recurses through it's rules added the namespace to the start of each selector. | ||
* Takes into account media queries by recursing through child rules if they are present. | ||
*/ | ||
function recursivelySetNamepace(compiled, namespace) { | ||
return compiled.map(function (rule) { | ||
if (rule.type === 'rule') { | ||
// add the namespace to the start | ||
rule.value = "".concat(namespace, " ").concat(rule.value); | ||
// add the namespace after each comma for subsequent selectors. | ||
rule.value = rule.value.replaceAll(',', ",".concat(namespace, " ")); | ||
rule.props = rule.props.map(function (prop) { | ||
return "".concat(namespace, " ").concat(prop); | ||
}); | ||
} | ||
if (Array.isArray(rule.children)) { | ||
rule.children = recursivelySetNamepace(rule.children, namespace); | ||
} | ||
return rule; | ||
}); | ||
} | ||
function createStylisInstance(_a) { | ||
@@ -604,5 +626,7 @@ var _b = _a === void 0 ? EMPTY_OBJECT : _a, _c = _b.options, options = _c === void 0 ? EMPTY_OBJECT : _c, _d = _b.plugins, plugins = _d === void 0 ? EMPTY_ARRAY : _d; | ||
middlewares.push(selfReferenceReplacementPlugin, stringify); | ||
return serialize(compile(options.namespace || prefix || selector | ||
? "".concat(options.namespace ? options.namespace + ' ' : '').concat(prefix, " ").concat(selector, " { ").concat(flatCSS, " }") | ||
: flatCSS), middleware(middlewares)); | ||
var compiled = compile(prefix || selector ? "".concat(prefix, " ").concat(selector, " { ").concat(flatCSS, " }") : flatCSS); | ||
if (options.namespace) { | ||
compiled = recursivelySetNamepace(compiled, options.namespace); | ||
} | ||
return serialize(compiled, middleware(middlewares)); | ||
}; | ||
@@ -622,3 +646,6 @@ stringifyRules.hash = plugins.length | ||
var StyleSheetContext = React.createContext(undefined); | ||
var StyleSheetContext = React.createContext({ | ||
shouldForwardProp: undefined, | ||
styleSheet: undefined, | ||
}); | ||
StyleSheetContext.Consumer; | ||
@@ -773,4 +800,4 @@ var StylisContext = React.createContext(undefined); | ||
!(result instanceof Keyframes) && | ||
!isPlainObject(result)) { | ||
// eslint-disable-next-line no-console | ||
!isPlainObject(result) && | ||
result !== null) { | ||
console.error("".concat(getComponentName(chunkFn), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")); | ||
@@ -1008,3 +1035,2 @@ } | ||
if (process.env.NODE_ENV !== 'production' && themeProp === undefined) { | ||
// eslint-disable-next-line no-console | ||
console.warn("[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"".concat(getComponentName(Component), "\"")); | ||
@@ -1062,3 +1088,2 @@ } | ||
else if (process.env.NODE_ENV !== 'production' && node.type !== 'comment') { | ||
/* eslint-disable no-console */ | ||
console.warn("Node of type ".concat(node.type, " not supported as an inline style")); | ||
@@ -1137,3 +1162,2 @@ } | ||
var key; | ||
/* eslint-disable guard-for-in */ | ||
for (key in resolvedAttrDef) { | ||
@@ -1143,3 +1167,2 @@ // @ts-expect-error bad types | ||
} | ||
/* eslint-enable guard-for-in */ | ||
}); | ||
@@ -1160,3 +1183,2 @@ return [context, resolvedAttrs]; | ||
var propsForElement = {}; | ||
// eslint-disable-next-line guard-for-in | ||
for (var key in computedProps) { | ||
@@ -1191,3 +1213,2 @@ if (key[0] === '$' || key === 'as') | ||
: attrs; | ||
// eslint-disable-next-line prefer-destructuring | ||
var shouldForwardProp = options.shouldForwardProp; | ||
@@ -1205,3 +1226,2 @@ if (isTargetStyledComp && styledComponentTarget.shouldForwardProp) { | ||
else { | ||
// eslint-disable-next-line prefer-destructuring | ||
shouldForwardProp = shouldForwardPropFn_1; | ||
@@ -1211,3 +1231,2 @@ } | ||
var forwardRef = function (props, ref) { | ||
// eslint-disable-next-line react-hooks/rules-of-hooks | ||
return useStyledComponentImpl(WrappedStyledComponent, props, ref); | ||
@@ -1252,3 +1271,2 @@ }; | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
var reactNative = require('react-native'); | ||
@@ -1255,0 +1273,0 @@ var InlineStyle = makeInlineStyleClass(reactNative.StyleSheet); |
@@ -53,3 +53,3 @@ import React from 'react'; | ||
} | ||
export declare type Interpolation<Props extends object> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | OmitSignatures<IStyledComponent<'web', any, any>> | Interpolation<Props>[]; | ||
export declare type Interpolation<Props extends object> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | IStyledComponent<'web', any, any> | Interpolation<Props>[]; | ||
export declare type AttrsArg<Props extends object> = (Omit<ExecutionProps, keyof Props> & Props) | ((props: Omit<ExecutionContext, keyof Props> & Props) => Partial<Props>); | ||
@@ -102,7 +102,2 @@ export declare type Attrs = object | ((...args: any) => object); | ||
/** | ||
* Remove the function call signature, keeping the additional properties. | ||
* https://stackoverflow.com/a/62502740/347386 | ||
*/ | ||
declare type OmitSignatures<T> = Pick<T, keyof T>; | ||
/** | ||
* This type forms the signature for a forwardRef-enabled component that accepts | ||
@@ -113,3 +108,3 @@ * the "as" prop to dynamically change the underlying rendered JSX. The interface will | ||
*/ | ||
export interface PolymorphicComponent<R extends Runtime, P extends object, FallbackComponent extends StyledTarget<R>> extends OmitSignatures<React.ForwardRefExoticComponent<P>> { | ||
export interface PolymorphicComponent<R extends Runtime, P extends object, FallbackComponent extends StyledTarget<R>> extends React.ForwardRefExoticComponent<object> { | ||
<E extends StyledTarget<R> = FallbackComponent>(props: PolymorphicComponentProps<R, E, P>): React.ReactElement | null; | ||
@@ -122,3 +117,3 @@ } | ||
export interface IStyledComponentFactory<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = object> { | ||
<Props extends object = object, Statics extends object = object>(target: Target, options: StyledOptions<R, OuterProps>, rules: RuleSet<OuterProps & Props>): IStyledComponent<R, Target, OuterProps & Props> & OuterStatics & Statics; | ||
<Props extends object = object, Statics extends object = object>(target: Target, options: StyledOptions<R, OuterProps & Props>, rules: RuleSet<OuterProps & Props>): IStyledComponent<R, Target, OuterProps & Props> & OuterStatics & Statics; | ||
} | ||
@@ -125,0 +120,0 @@ export interface IInlineStyleConstructor<Props extends object> { |
{ | ||
"name": "styled-components", | ||
"version": "6.0.0-beta.9", | ||
"version": "6.0.0-beta.10", | ||
"description": "Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress", | ||
@@ -26,4 +26,2 @@ "types": "dist/index.d.ts", | ||
"test:integration": "jest -c jest.config.integration.js --runInBand --forceExit", | ||
"format": "eslint ./**/*.js --fix", | ||
"lint": "eslint src", | ||
"lint:size": "bundlewatch", | ||
@@ -116,5 +114,2 @@ "prettier": "prettier src/** --write", | ||
"@types/stylis": "^4.0.2", | ||
"@typescript-eslint/eslint-plugin": "^5.47.0", | ||
"@typescript-eslint/parser": "^5.47.0", | ||
"babel-eslint": "^10.0.1", | ||
"babel-jest": "^29.3.1", | ||
@@ -126,7 +121,2 @@ "babel-plugin-add-module-exports": "^1.0.4", | ||
"bundlewatch": "^0.3.3", | ||
"eslint": "^8.30.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-react": "^7.31.11", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"jest": "^29.3.1", | ||
@@ -133,0 +123,0 @@ "jest-environment-jsdom": "^29.3.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
2020684
42
156
14215
224