Comparing version 8.0.2 to 8.0.3
@@ -1,2 +0,2 @@ | ||
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports):"function"==typeof define&&define.amd?define(["exports"],a):a(e.emotion=e.emotion||{})}(this,function(e){"use strict";function a(e){return t(e,e.length).toString(36)}function t(e,a){for(var t=1540483477,i=a^e.length,n=e.length,o=0;n>=4;){var h=r(e,o);h=c(h,t),h=c(h^=h>>>24,t),i=c(i,t),i^=h,o+=4,n-=4}switch(n){case 3:i^=s(e,o),i=c(i^=e.charCodeAt(o+2)<<16,t);break;case 2:i=c(i^=s(e,o),t);break;case 1:i=c(i^=e.charCodeAt(o),t)}return i^=i>>>13,i=c(i,t),(i^=i>>>15)>>>0}function r(e,a){return e.charCodeAt(a++)+(e.charCodeAt(a++)<<8)+(e.charCodeAt(a++)<<16)+(e.charCodeAt(a)<<24)}function s(e,a){return e.charCodeAt(a++)+(e.charCodeAt(a++)<<8)}function c(e,a){return(65535&(e|=0))*(a|=0)+(((e>>>16)*a&65535)<<16)|0}function i(e){if(e.sheet)return e.sheet;for(var a=0;a<document.styleSheets.length;a++)if(document.styleSheets[a].ownerNode===e)return document.styleSheets[a]}function n(){var e=document.createElement("style");return e.type="text/css",e.setAttribute("data-emotion",""),e.appendChild(document.createTextNode("")),document.head.appendChild(e),e}function o(e){m.insert(e,y)}function h(e,a,t,r,s,c,i,n){switch(e){case-2:x.forEach(o),x=[];break;case 2:if(0===n){var h=t.join(","),l=h+"{"+a+"}";r.join(",")===h||""===r[0]?x.push(l):x.unshift(l)}break;case 3:var f=t.join(""),d=a;switch(f.charCodeAt(1)){case 115:case 100:case 109:x.push(f+"{"+d+"}");break;case 107:d=(f=f.substring(1))+"{"+d+"}",x.push("@-webkit-"+d),x.push("@"+d);break;default:x.push(f+d)}}}function l(e){var a=[];return e.forEach(function(e){a=Array.isArray(e)?a.concat(l(e)):a.concat(e)}),a}function f(a,t){return void 0===a||null===a||"boolean"==typeof a?"":"function"==typeof a?f.call(this,void 0===this?a():a(this.mergedProps,this.context),t):"object"==typeof a?d.call(this,a):!1===t&&void 0!==e.registered[a]?e.registered[a]:a}function d(a){if(S.has(a))return S.get(a);var t="";return Array.isArray(a)?l(a).forEach(function(e){t+=f.call(this,e,!1)},this):Object.keys(a).forEach(function(r){"object"!=typeof a[r]?void 0!==e.registered[a[r]]?t+=r+"{"+e.registered[a[r]]+"}":t+=O(r)+":"+$(r,a[r])+";":t+=r+"{"+f.call(this,a[r],!1)+"}"},this),S.set(a,t),t}function u(e){return 46===e.charCodeAt(e.length-1)}function b(e){var a=!0,t="";null==e||void 0===e.raw?(a=!1,t=f.call(this,e,!1)):t=e[0];for(var r=arguments.length,s=Array(r>1?r-1:0),c=1;c<r;c++)s[c-1]=arguments[c];return s.forEach(function(r,s){t+=f.call(this,r,u(t)),!0===a&&void 0!==e[s+1]&&(t+=e[s+1])},this),t}function k(){var t=b.apply(this,arguments),r=a(t),s="css-"+r;return void 0===e.registered[s]&&(e.registered[s]=t),void 0===e.inserted[r]&&(v("."+s,t),e.inserted[r]=!0),s}function p(a,t){var r="";return t.split(" ").forEach(function(t){void 0!==e.registered[t]?a.push(t):r+=t+" "}),r}var g={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,fontWeight:1,lineClamp:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},w=function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")},m=new(function(){function e(){w(this,e),this.isBrowser="undefined"!=typeof window,this.isSpeedy=!0,this.tags=[],this.ctr=0}return e.prototype.inject=function(){if(this.injected)throw new Error("already injected!");this.isBrowser?this.tags[0]=n():this.sheet=[],this.injected=!0},e.prototype.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},e.prototype.insert=function(e,a){if(this.isBrowser){if(this.isSpeedy){var t=i(this.tags[this.tags.length-1]);try{t.insertRule(e,t.cssRules.length)}catch(e){}}else{var r=n();this.tags.push(r),r.appendChild(document.createTextNode(e+(a||"")))}++this.ctr%65e3==0&&this.tags.push(n())}else this.sheet.push(e)},e.prototype.flush=function(){this.isBrowser?(this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0):this.sheet=[],this.injected=!1},e}());m.inject();var v=new function e(a){function t(e,a,s,o){for(var h,l,u,b,k,p=0,g=0,m=0,v=0,C=0,A=0,O=0,$=0,S=0,E=0,N=h=0,R=l=0,F=0,I=s.length,_=I-1,q="",Y="",ee="",ae="";N<I;){if(u=s.charCodeAt(N),0===g+v+m+p){if(N===_&&(0<l&&(q=q.replace(d,"")),0<q.trim().length)){switch(u){case 32:case 9:case 59:case 13:case 10:break;default:q+=s.charAt(N)}u=59}if(1===R)switch(u){case 123:case 44:R=0;break;case 9:case 13:case 10:case 32:break;default:N--,u=59}switch(u){case 123:for(h=(q=q.trim()).charCodeAt(0),$=1,S=++N;N<I;){switch(u=s.charCodeAt(N)){case 123:$++;break;case 125:$--}if(0===$)break;N++}switch(E=s.substring(S,N),0===h&&(h=(q=q.replace(f,"").trim()).charCodeAt(0)),h){case 64:switch(0<l&&(q=q.replace(d,"")),l=q.charCodeAt(1)){case 100:case 109:case 115:u=a;break;default:u=Z}if(E=t(a,u,E,l),S=E.length,0<L&&0===S&&(S=q.length),0<J&&(u=r(Z,q,F),k=n(3,E,u,a,G,W,S,l),q=u.join(""),void 0!==k&&0===(S=(E=k.trim()).length)&&(l=0,E="")),0<S)switch(l){case 115:q=q.replace(B,i);case 100:case 109:E=q+"{"+E+"}";break;case 107:E=(q=q.replace(y,"$1 $2"+(0<Q?U:"")))+"{"+E+"}",E="@"+(0<T?"-webkit-"+E+"@"+E:E);break;default:E=q+E}else E="";break;default:E=t(a,r(a,q,F),E,o)}ee+=E,E=F=l=h=R=S=0,q="",u=s.charCodeAt(++N);break;case 125:case 59:if(q=(0<l?q.replace(d,""):q).trim(),1<(S=q.length))switch(0===h&&(45===(h=q.charCodeAt(0))||96<h&&123>h)&&(S=(q=q.replace(" ",":")).length),0<J&&void 0!==(k=n(1,q,a,e,G,W,Y.length,o))&&0===(S=(q=k.trim()).length)&&(q="\0\0"),h=q.charCodeAt(0),l=q.charCodeAt(1),h+l){case 0:break;case 169:case 163:ae+=q+s.charAt(N);break;default:58!==q.charCodeAt(S-1)&&(Y+=c(q,h,l,q.charCodeAt(2)))}F=l=h=R=S=0,q="",u=s.charCodeAt(++N)}}switch(u){case 13:case 10:if(0===g+v+m+p+H)switch(O){case 41:case 39:case 34:case 64:case 126:case 62:case 42:case 43:case 47:case 45:case 58:case 44:case 59:case 123:case 125:break;default:0<h&&(R=1)}47===g&&(g=0),0<J*K&&n(0,q,a,e,G,W,Y.length,o),W=1,G++;break;case 59:case 125:if(0===g+v+m+p){W++;break}default:switch(W++,b=s.charAt(N),u){case 9:case 32:if(0===v+p)switch(C){case 44:case 58:case 9:case 32:b="";break;default:32!==u&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===v+g+p&&0<M&&(l=F=1,b="\f"+b);break;case 108:if(0===v+g+p+P&&0<h)switch(N-h){case 2:112===C&&58===s.charCodeAt(N-3)&&(P=C);case 8:111===A&&(P=A)}break;case 58:0===v+g+p&&(h=N);break;case 44:0===g+m+v+p&&(l=1,b+="\r");break;case 34:case 39:0===g&&(v=v===u?0:0===v?u:v,N===_&&(_++,I++));break;case 91:0===v+g+m&&p++;break;case 93:0===v+g+m&&p--;break;case 41:0===v+g+p&&(N===_&&(_++,I++),m--);break;case 40:if(0===v+g+p){if(0===S)switch(2*C+3*A){case 533:break;default:$=0,S=1}m++}break;case 64:0===g+m+v+p+h+E&&(E=1);break;case 42:case 47:if(!(0<v+p+m))switch(g){case 0:switch(2*u+3*s.charCodeAt(N+1)){case 235:g=47;break;case 220:g=42}break;case 42:47===u&&42===C&&(b="",g=0)}}if(0===g){if(0===M+v+p+E&&107!==o&&59!==u)switch(u){case 44:case 126:case 62:case 43:case 41:case 40:if(0===S){switch(C){case 9:case 32:case 10:case 13:b+="\0";break;default:b="\0"+b+(44===u?"":"\0")}l=1}else switch(u){case 40:S=++$;break;case 41:0==(S=--$)&&(l=1,b+="\0")}break;case 32:switch(C){case 0:case 123:case 125:case 59:case 44:case 12:case 9:case 32:case 10:case 13:break;default:0===S&&(l=1,b+="\0")}}q+=b,32!==u&&(O=u)}}A=C,C=u,N++}if(S=Y.length,0<L&&0===S&&0===ee.length&&0===a[0].length==0&&(109!==o||1===a.length&&(0<M?V:X)===a[0])&&(S=a.join(",").length+2),0<S){if(0===M&&107!==o){for(s=0,p=a.length,g=Array(p);s<p;++s){for(A="",O=0,I=(C=a[s].split(w)).length;O<I;++O)if(!(0===($=(v=C[O]).length)&&1<I)){if(N=A.charCodeAt(A.length-1),F=v.charCodeAt(0),m="",0!==O)switch(N){case 42:case 126:case 62:case 43:case 32:case 40:break;default:m=" "}switch(F){case 38:v=m+V;case 126:case 62:case 43:case 32:case 41:case 40:break;case 91:v=m+v+V;break;case 58:switch(2*v.charCodeAt(1)+3*v.charCodeAt(2)){case 530:if(0<D){v=m+v.substring(8,$-1);break}default:(1>O||1>C[O-1].length)&&(v=m+V+v)}break;case 44:m="";default:v=1<$&&0<v.indexOf(":")?m+v.replace(z,"$1"+V+"$2"):m+v+V}A+=v}g[s]=A.replace(d,"").trim()}a=g}if(u=a,0<J&&void 0!==(k=n(2,Y,u,e,G,W,S,o))&&0===(Y=k).length)return ae+Y+ee;if(Y=u.join(",")+"{"+Y+"}",0<T*P){switch(P){case 111:Y=Y.replace(j,":-moz-$1")+Y;break;case 112:Y=Y.replace(x,"::-webkit-input-$1")+Y.replace(x,"::-moz-$1")+Y.replace(x,":-ms-input-$1")+Y}P=0}}return ae+Y+ee}function r(e,a,t){var r=a.trim().split(m);a=r;var c=r.length,i=e.length;switch(i){case 0:case 1:var n=0;for(e=0===i?"":e[0]+" ";n<c;++n)a[n]=s(e,a[n],t,i).trim();break;default:var o=n=0;for(a=[];n<c;++n)for(var h=0;h<i;++h)a[o++]=s(e[h]+" ",r[n],t,i).trim()}return a}function s(e,a,t,r){var s=a.charCodeAt(0);switch(33>s&&(s=(a=a.trim()).charCodeAt(0)),s){case 38:switch(M+r){case 0:case 1:if(0===e.trim().length)break;default:return a.replace(v,"$1"+e.trim())}break;case 58:switch(a.charCodeAt(1)){case 103:if(0<D&&0<M)return a.replace(C,"$1").replace(v,"$1"+X);break;default:return e.trim()+a}default:if(0<t*M&&0<a.indexOf("\f"))return a.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+a}function c(e,a,t,r){var s=0,c=e+";";if(944==(a=2*a+3*t+4*r)){if(r=c,e=r.length,t=r.indexOf(":",9)+1,s=r.substring(0,t).trim(),e=r.substring(t,e-1).trim(),c="",45!==r.charCodeAt(9))for(r=e.split(p),t=a=0,e=r.length;a<e;t=0,++a){for(var i=r[a],n=i.split(g);i=n[t];){var o=i.charCodeAt(0);if(1===Q&&(64<o&&90>o||96<o&&123>o||95===o||45===o&&45!==i.charCodeAt(1)))switch(isNaN(parseFloat(i))+(-1!==i.indexOf("("))){case 1:switch(i){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:i+=U}}n[t++]=i}c+=(0===a?"":",")+n.join(" ")}else c+=110===r.charCodeAt(10)?e+(1===Q?U:""):e;c=s+c+";",c=0<T?"-webkit-"+c+c:c}else if(0<T)switch(a){case 969:c="-webkit-"+c.replace(R,"-webkit-$1")+c;break;case 951:c="-webkit-"+c+c;break;case 963:110===c.charCodeAt(5)&&(c="-webkit-"+c+c);break;case 978:c="-webkit-"+c+"-moz-"+c+c;break;case 1019:case 983:c="-webkit-"+c+"-moz-"+c+"-ms-"+c+c;break;case 883:45===c.charCodeAt(8)&&(c="-webkit-"+c+c);break;case 932:c="-webkit-"+c+"-ms-"+c+c;break;case 964:c="-webkit-"+c+"-ms-flex-"+c+c;break;case 1023:c="-webkit-box-pack"+(e=c.substring(c.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+c+"-ms-flex-pack"+e+c;break;case 1017:if(-1===c.indexOf("sticky",9))break;case 975:switch(s=(c=e).length-10,e=(33===c.charCodeAt(s)?c.substring(0,s):c).substring(e.indexOf(":",7)+1).trim(),a=e.charCodeAt(0)+(0|e.charCodeAt(7))){case 203:if(111>e.charCodeAt(8))break;case 115:c=c.replace(e,"-webkit-"+e)+";"+c;break;case 207:case 102:c=c.replace(e,"-webkit-"+(102<a?"inline-":"")+"box")+";"+c.replace(e,"-webkit-"+e)+";"+c.replace(e,"-ms-"+e+"box")+";"+c}c+=";";break;case 938:if(45===c.charCodeAt(5))switch(c.charCodeAt(6)){case 105:c="-webkit-"+c+"-webkit-box-"+(e=c.replace("-items",""))+"-ms-flex-"+e+c;break;case 115:c="-webkit-"+c+"-ms-flex-item-"+c.replace(I,"")+c;break;default:c="-webkit-"+c+"-ms-flex-line-pack"+c.replace("align-content","")+c}break;case 1005:b.test(c)&&(c=c.replace(u,":-webkit-")+c.replace(u,":-moz-")+c);break;case 953:0<(s=c.indexOf("-content",9))&&109===c.charCodeAt(s-3)&&45!==c.charCodeAt(s-4)&&(e=c.substring(s-3),c="width:-webkit-"+e+"width:-moz-"+e+"width:"+e);break;case 1015:if(45!==e.charCodeAt(9))break;case 962:c="-webkit-"+c+(102===c.charCodeAt(5)?"-ms-"+c:"")+c,211===t+r&&105===c.charCodeAt(13)&&0<c.indexOf("transform",10)&&(c=c.substring(0,c.indexOf(";",27)+1).replace(k,"$1-webkit-$2")+c);break;case 1e3:switch(e=c.substring(13).trim(),s=e.indexOf("-")+1,e.charCodeAt(0)+e.charCodeAt(s)){case 226:e=c.replace(N,"tb");break;case 232:e=c.replace(N,"tb-rl");break;case 220:e=c.replace(N,"lr");break;default:return c}c="-webkit-"+c+"-ms-"+e+c}return c}function i(e,a){var t=c(a,a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2));return t!==a+";"?t.replace(F,"or($1)").substring(2):"("+a+")"}function n(e,a,t,r,s,c,i,n){for(var o,h=0,f=a;h<J;++h)switch(o=q[h].call(l,e,f,t,r,s,c,i,n)){case void 0:case!1:case!0:case null:break;default:f=o}switch(f){case void 0:case!1:case!0:case null:case a:break;default:return f}}function o(e){switch(e){case void 0:case null:J=q.length=0;break;default:switch(e.constructor){case Array:for(var a=0,t=e.length;a<t;++a)o(e[a]);break;case Function:q[J++]=e;break;case Boolean:K=0|!!e}}return o}function h(e){for(var a in e){var t=e[a];switch(a){case"keyframe":Q=0|t;break;case"global":D=0|t;break;case"cascade":M=0|t;break;case"compress":_=0|t;break;case"prefix":T=0|t;break;case"semicolon":H=0|t;break;case"preserve":L=0|t}}return h}function l(a,r){if(void 0!==this&&this.constructor===l)return e(a);var s=a,c=s.charCodeAt(0);if(33>c&&(c=(s=s.trim()).charCodeAt(0)),0<Q&&(U=s.replace(A,91===c?"":"-")),c=1,1===M?X=s:V=s,s=[X],0<J){var i=n(-1,r,s,s,G,W,0,0);void 0!==i&&"string"==typeof i&&(r=i)}var o=t(Z,s,r,0);return 0<J&&void 0!==(i=n(-2,o,s,s,G,W,o.length,0))&&"string"!=typeof(o=i)&&(c=0),V=X=U="",P=0,W=G=1,0==_*c?o:o.replace(d,"").replace(O,"").replace($,"$1").replace(S,"$1").replace(E," ")}var f=/^\0+/g,d=/[\0\r\f]/g,u=/: */g,b=/zoo|gra/,k=/([,: ])(transform)/g,p=/,+\s*(?![^(]*[)])/g,g=/ +\s*(?![^(]*[)])/g,w=/ *[\0] */g,m=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,C=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,A=/\W+/g,y=/@(k\w+)\s*(\S*)\s*/,x=/::(place)/g,j=/:(read-only)/g,O=/\s+(?=[{\];=:>])/g,$=/([[}=:>])\s+/g,S=/(\{[^{]+?);(?=\})/g,E=/\s{2,}/g,z=/([^\(])(:+) */g,N=/[svh]\w+-[tblr]{2}/,R=/([\w-]+t\()/g,B=/\(\s*([^]*?)\s*\)/g,F=/([^]*?);/g,I=/-self|flex-/g,W=1,G=1,P=0,M=1,T=1,D=1,_=0,H=0,L=0,Z=[],q=[],J=0,K=0,Q=1,U="",V="",X="";return l.use=o,l.set=h,void 0!==a&&h(a),l}({keyframe:!1}),C=[],A=v.use;e.registered={},e.inserted={};var y="",x=[];v.use(h);var j=/[A-Z]|^ms/g,O=function(e){var a={};return function(t){return void 0===a[t]&&(a[t]=e(t)),a[t]}}(function(e){return e.replace(j,"-$&").toLowerCase()}),$=function(e,a){return void 0===a||null===a||"boolean"==typeof a?"":1===g[e]||isNaN(a)||0===a?a:a+"px"},S=new WeakMap;e.sheet=m,e.useStylisPlugin=function(e){C.push(e),A(null)(C)(h)},e.flush=function(){m.flush(),e.inserted={},e.registered={},m.inject()},e.css=k,e.injectGlobal=function(){var t=b.apply(void 0,arguments),r=a(t);void 0===e.inserted[r]&&(v("",t),e.inserted[r]=!0)},e.keyframes=function(){var t=b.apply(void 0,arguments),r=a(t),s="animation-"+r;return void 0===e.inserted[r]&&(v("","@keyframes "+s+"{"+t+"}"),e.inserted[r]=!0),s},e.fontFace=function(){var t=b.apply(void 0,arguments),r=a(t);void 0===e.inserted[r]&&(v("","@font-face{"+t+"}"),e.inserted[r]=!0)},e.getRegisteredStyles=p,e.merge=function(e,a){var t=[],r=p(t,e);return t.length<2?e:r+k(t,a)},e.hydrate=function(a){a.forEach(function(a){e.inserted[a]=!0})},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports):"function"==typeof define&&define.amd?define(["exports"],a):a(e.emotion=e.emotion||{})}(this,function(e){"use strict";function a(e){return t(e,e.length).toString(36)}function t(e,a){for(var t=1540483477,i=a^e.length,n=e.length,o=0;n>=4;){var h=r(e,o);h=s(h,t),h=s(h^=h>>>24,t),i=s(i,t),i^=h,o+=4,n-=4}switch(n){case 3:i^=c(e,o),i=s(i^=e.charCodeAt(o+2)<<16,t);break;case 2:i=s(i^=c(e,o),t);break;case 1:i=s(i^=e.charCodeAt(o),t)}return i^=i>>>13,i=s(i,t),(i^=i>>>15)>>>0}function r(e,a){return e.charCodeAt(a++)+(e.charCodeAt(a++)<<8)+(e.charCodeAt(a++)<<16)+(e.charCodeAt(a)<<24)}function c(e,a){return e.charCodeAt(a++)+(e.charCodeAt(a++)<<8)}function s(e,a){return(65535&(e|=0))*(a|=0)+(((e>>>16)*a&65535)<<16)|0}function i(e){if(e.sheet)return e.sheet;for(var a=0;a<document.styleSheets.length;a++)if(document.styleSheets[a].ownerNode===e)return document.styleSheets[a]}function n(){var e=document.createElement("style");return e.type="text/css",e.setAttribute("data-emotion",""),e.appendChild(document.createTextNode("")),document.head.appendChild(e),e}function o(e){A.insert(e.ruleText,O)}function h(e,a){this.selector=e,this.ruleText=a,this.children=[]}function l(e){o(e),e.children&&e.children.forEach(l)}function f(e,a){a?(E[a]||(E[a]=[]),E[a].push(e)):$.push(e),void 0!==E[e.selector]&&(E[e.selector].forEach(function(a){return e.children.push(a)}),E[e.selector]=void 0)}function d(e,a,t,r,c,s,i,n){var o=t.join(","),d=r.join(",");switch(e){case-2:$.forEach(l),Object.keys(E).forEach(function(e){E[e]&&E[e].forEach(l)}),$=[],E={};break;case 2:if(0!==n)break;f(new h(o,o+"{"+a+"}"),d);break;case 3:var u=t.join(""),b=a;switch(u.charCodeAt(1)){case 115:case 100:case 109:f(new h(o,u+"{"+b+"}"),d);break;case 107:f(new h(o,"@-webkit-"+(b=(u=u.substring(1))+"{"+b+"}")),d),f(new h(o,"@"+b),d);break;default:f(new h(o,u+b),d)}}}function u(e){var a=[];return e.forEach(function(e){a=Array.isArray(e)?a.concat(u(e)):a.concat(e)}),a}function b(a,t){return void 0===a||null===a||"boolean"==typeof a?"":"function"==typeof a?b.call(this,void 0===this?a():a(this.mergedProps,this.context),t):"object"==typeof a?k.call(this,a):!1===t&&void 0!==e.registered[a]?e.registered[a]:a}function k(a){if(R.has(a))return R.get(a);var t="";return Array.isArray(a)?u(a).forEach(function(e){t+=b.call(this,e,!1)},this):Object.keys(a).forEach(function(r){"object"!=typeof a[r]?void 0!==e.registered[a[r]]?t+=r+"{"+e.registered[a[r]]+"}":t+=z(r)+":"+N(r,a[r])+";":t+=r+"{"+b.call(this,a[r],!1)+"}"},this),R.set(a,t),t}function p(e){return 46===e.charCodeAt(e.length-1)}function g(e){var a=!0,t="";null==e||void 0===e.raw?(a=!1,t=b.call(this,e,!1)):t=e[0];for(var r=arguments.length,c=Array(r>1?r-1:0),s=1;s<r;s++)c[s-1]=arguments[s];return c.forEach(function(r,c){t+=b.call(this,r,p(t)),!0===a&&void 0!==e[c+1]&&(t+=e[c+1])},this),t}function w(){var t=g.apply(this,arguments),r=a(t),c="css-"+r;return void 0===e.registered[c]&&(e.registered[c]=t),void 0===e.inserted[r]&&(y("."+c,t),e.inserted[r]=!0),c}function v(a,t){var r="";return t.split(" ").forEach(function(t){void 0!==e.registered[t]?a.push(t):r+=t+" "}),r}var m={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,fontWeight:1,lineClamp:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},C=function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")},A=new(function(){function e(){C(this,e),this.isBrowser="undefined"!=typeof window,this.isSpeedy=!0,this.tags=[],this.ctr=0}return e.prototype.inject=function(){if(this.injected)throw new Error("already injected!");this.isBrowser?this.tags[0]=n():this.sheet=[],this.injected=!0},e.prototype.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},e.prototype.insert=function(e,a){if(this.isBrowser){if(this.isSpeedy){var t=i(this.tags[this.tags.length-1]);try{t.insertRule(e,t.cssRules.length)}catch(e){}}else{var r=n();this.tags.push(r),r.appendChild(document.createTextNode(e+(a||"")))}++this.ctr%65e3==0&&this.tags.push(n())}else this.sheet.push(e)},e.prototype.flush=function(){this.isBrowser?(this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0):this.sheet=[],this.injected=!1},e}());A.inject();var y=new function e(a){function t(e,a,c,o){for(var h,l,u,b,k,p=0,g=0,v=0,m=0,C=0,A=0,O=0,$=0,E=0,S=0,N=h=0,R=l=0,F=0,I=c.length,_=I-1,q="",Y="",ee="",ae="";N<I;){if(u=c.charCodeAt(N),0===g+m+v+p){if(N===_&&(0<l&&(q=q.replace(d,"")),0<q.trim().length)){switch(u){case 32:case 9:case 59:case 13:case 10:break;default:q+=c.charAt(N)}u=59}if(1===R)switch(u){case 123:case 44:R=0;break;case 9:case 13:case 10:case 32:break;default:N--,u=59}switch(u){case 123:for(h=(q=q.trim()).charCodeAt(0),$=1,E=++N;N<I;){switch(u=c.charCodeAt(N)){case 123:$++;break;case 125:$--}if(0===$)break;N++}switch(S=c.substring(E,N),0===h&&(h=(q=q.replace(f,"").trim()).charCodeAt(0)),h){case 64:switch(0<l&&(q=q.replace(d,"")),l=q.charCodeAt(1)){case 100:case 109:case 115:u=a;break;default:u=Z}if(S=t(a,u,S,l),E=S.length,0<L&&0===E&&(E=q.length),0<J&&(u=r(Z,q,F),k=n(3,S,u,a,W,T,E,l),q=u.join(""),void 0!==k&&0===(E=(S=k.trim()).length)&&(l=0,S="")),0<E)switch(l){case 115:q=q.replace(B,i);case 100:case 109:S=q+"{"+S+"}";break;case 107:S=(q=q.replace(y,"$1 $2"+(0<Q?U:"")))+"{"+S+"}",S="@"+(0<M?"-webkit-"+S+"@"+S:S);break;default:S=q+S}else S="";break;default:S=t(a,r(a,q,F),S,o)}ee+=S,S=F=l=h=R=E=0,q="",u=c.charCodeAt(++N);break;case 125:case 59:if(q=(0<l?q.replace(d,""):q).trim(),1<(E=q.length))switch(0===h&&(45===(h=q.charCodeAt(0))||96<h&&123>h)&&(E=(q=q.replace(" ",":")).length),0<J&&void 0!==(k=n(1,q,a,e,W,T,Y.length,o))&&0===(E=(q=k.trim()).length)&&(q="\0\0"),h=q.charCodeAt(0),l=q.charCodeAt(1),h+l){case 0:break;case 169:case 163:ae+=q+c.charAt(N);break;default:58!==q.charCodeAt(E-1)&&(Y+=s(q,h,l,q.charCodeAt(2)))}F=l=h=R=E=0,q="",u=c.charCodeAt(++N)}}switch(u){case 13:case 10:if(0===g+m+v+p+H)switch(O){case 41:case 39:case 34:case 64:case 126:case 62:case 42:case 43:case 47:case 45:case 58:case 44:case 59:case 123:case 125:break;default:0<h&&(R=1)}47===g&&(g=0),0<J*K&&n(0,q,a,e,W,T,Y.length,o),T=1,W++;break;case 59:case 125:if(0===g+m+v+p){T++;break}default:switch(T++,b=c.charAt(N),u){case 9:case 32:if(0===m+p)switch(C){case 44:case 58:case 9:case 32:b="";break;default:32!==u&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===m+g+p&&0<P&&(l=F=1,b="\f"+b);break;case 108:if(0===m+g+p+G&&0<h)switch(N-h){case 2:112===C&&58===c.charCodeAt(N-3)&&(G=C);case 8:111===A&&(G=A)}break;case 58:0===m+g+p&&(h=N);break;case 44:0===g+v+m+p&&(l=1,b+="\r");break;case 34:case 39:0===g&&(m=m===u?0:0===m?u:m,N===_&&(_++,I++));break;case 91:0===m+g+v&&p++;break;case 93:0===m+g+v&&p--;break;case 41:0===m+g+p&&(N===_&&(_++,I++),v--);break;case 40:if(0===m+g+p){if(0===E)switch(2*C+3*A){case 533:break;default:$=0,E=1}v++}break;case 64:0===g+v+m+p+h+S&&(S=1);break;case 42:case 47:if(!(0<m+p+v))switch(g){case 0:switch(2*u+3*c.charCodeAt(N+1)){case 235:g=47;break;case 220:g=42}break;case 42:47===u&&42===C&&(b="",g=0)}}if(0===g){if(0===P+m+p+S&&107!==o&&59!==u)switch(u){case 44:case 126:case 62:case 43:case 41:case 40:if(0===E){switch(C){case 9:case 32:case 10:case 13:b+="\0";break;default:b="\0"+b+(44===u?"":"\0")}l=1}else switch(u){case 40:E=++$;break;case 41:0==(E=--$)&&(l=1,b+="\0")}break;case 32:switch(C){case 0:case 123:case 125:case 59:case 44:case 12:case 9:case 32:case 10:case 13:break;default:0===E&&(l=1,b+="\0")}}q+=b,32!==u&&(O=u)}}A=C,C=u,N++}if(E=Y.length,0<L&&0===E&&0===ee.length&&0===a[0].length==0&&(109!==o||1===a.length&&(0<P?V:X)===a[0])&&(E=a.join(",").length+2),0<E){if(0===P&&107!==o){for(c=0,p=a.length,g=Array(p);c<p;++c){for(A="",O=0,I=(C=a[c].split(w)).length;O<I;++O)if(!(0===($=(m=C[O]).length)&&1<I)){if(N=A.charCodeAt(A.length-1),F=m.charCodeAt(0),v="",0!==O)switch(N){case 42:case 126:case 62:case 43:case 32:case 40:break;default:v=" "}switch(F){case 38:m=v+V;case 126:case 62:case 43:case 32:case 41:case 40:break;case 91:m=v+m+V;break;case 58:switch(2*m.charCodeAt(1)+3*m.charCodeAt(2)){case 530:if(0<D){m=v+m.substring(8,$-1);break}default:(1>O||1>C[O-1].length)&&(m=v+V+m)}break;case 44:v="";default:m=1<$&&0<m.indexOf(":")?v+m.replace(z,"$1"+V+"$2"):v+m+V}A+=m}g[c]=A.replace(d,"").trim()}a=g}if(u=a,0<J&&void 0!==(k=n(2,Y,u,e,W,T,E,o))&&0===(Y=k).length)return ae+Y+ee;if(Y=u.join(",")+"{"+Y+"}",0<M*G){switch(G){case 111:Y=Y.replace(j,":-moz-$1")+Y;break;case 112:Y=Y.replace(x,"::-webkit-input-$1")+Y.replace(x,"::-moz-$1")+Y.replace(x,":-ms-input-$1")+Y}G=0}}return ae+Y+ee}function r(e,a,t){var r=a.trim().split(v);a=r;var s=r.length,i=e.length;switch(i){case 0:case 1:var n=0;for(e=0===i?"":e[0]+" ";n<s;++n)a[n]=c(e,a[n],t,i).trim();break;default:var o=n=0;for(a=[];n<s;++n)for(var h=0;h<i;++h)a[o++]=c(e[h]+" ",r[n],t,i).trim()}return a}function c(e,a,t,r){var c=a.charCodeAt(0);switch(33>c&&(c=(a=a.trim()).charCodeAt(0)),c){case 38:switch(P+r){case 0:case 1:if(0===e.trim().length)break;default:return a.replace(m,"$1"+e.trim())}break;case 58:switch(a.charCodeAt(1)){case 103:if(0<D&&0<P)return a.replace(C,"$1").replace(m,"$1"+X);break;default:return e.trim()+a}default:if(0<t*P&&0<a.indexOf("\f"))return a.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+a}function s(e,a,t,r){var c=0,s=e+";";if(944==(a=2*a+3*t+4*r)){if(r=s,e=r.length,t=r.indexOf(":",9)+1,c=r.substring(0,t).trim(),e=r.substring(t,e-1).trim(),s="",45!==r.charCodeAt(9))for(r=e.split(p),t=a=0,e=r.length;a<e;t=0,++a){for(var i=r[a],n=i.split(g);i=n[t];){var o=i.charCodeAt(0);if(1===Q&&(64<o&&90>o||96<o&&123>o||95===o||45===o&&45!==i.charCodeAt(1)))switch(isNaN(parseFloat(i))+(-1!==i.indexOf("("))){case 1:switch(i){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:i+=U}}n[t++]=i}s+=(0===a?"":",")+n.join(" ")}else s+=110===r.charCodeAt(10)?e+(1===Q?U:""):e;s=c+s+";",s=0<M?"-webkit-"+s+s:s}else if(0<M)switch(a){case 969:s="-webkit-"+s.replace(R,"-webkit-$1")+s;break;case 951:s="-webkit-"+s+s;break;case 963:110===s.charCodeAt(5)&&(s="-webkit-"+s+s);break;case 978:s="-webkit-"+s+"-moz-"+s+s;break;case 1019:case 983:s="-webkit-"+s+"-moz-"+s+"-ms-"+s+s;break;case 883:45===s.charCodeAt(8)&&(s="-webkit-"+s+s);break;case 932:s="-webkit-"+s+"-ms-"+s+s;break;case 964:s="-webkit-"+s+"-ms-flex-"+s+s;break;case 1023:s="-webkit-box-pack"+(e=s.substring(s.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+s+"-ms-flex-pack"+e+s;break;case 1017:if(-1===s.indexOf("sticky",9))break;case 975:switch(c=(s=e).length-10,e=(33===s.charCodeAt(c)?s.substring(0,c):s).substring(e.indexOf(":",7)+1).trim(),a=e.charCodeAt(0)+(0|e.charCodeAt(7))){case 203:if(111>e.charCodeAt(8))break;case 115:s=s.replace(e,"-webkit-"+e)+";"+s;break;case 207:case 102:s=s.replace(e,"-webkit-"+(102<a?"inline-":"")+"box")+";"+s.replace(e,"-webkit-"+e)+";"+s.replace(e,"-ms-"+e+"box")+";"+s}s+=";";break;case 938:if(45===s.charCodeAt(5))switch(s.charCodeAt(6)){case 105:s="-webkit-"+s+"-webkit-box-"+(e=s.replace("-items",""))+"-ms-flex-"+e+s;break;case 115:s="-webkit-"+s+"-ms-flex-item-"+s.replace(I,"")+s;break;default:s="-webkit-"+s+"-ms-flex-line-pack"+s.replace("align-content","")+s}break;case 1005:b.test(s)&&(s=s.replace(u,":-webkit-")+s.replace(u,":-moz-")+s);break;case 953:0<(c=s.indexOf("-content",9))&&109===s.charCodeAt(c-3)&&45!==s.charCodeAt(c-4)&&(e=s.substring(c-3),s="width:-webkit-"+e+"width:-moz-"+e+"width:"+e);break;case 1015:if(45!==e.charCodeAt(9))break;case 962:s="-webkit-"+s+(102===s.charCodeAt(5)?"-ms-"+s:"")+s,211===t+r&&105===s.charCodeAt(13)&&0<s.indexOf("transform",10)&&(s=s.substring(0,s.indexOf(";",27)+1).replace(k,"$1-webkit-$2")+s);break;case 1e3:switch(e=s.substring(13).trim(),c=e.indexOf("-")+1,e.charCodeAt(0)+e.charCodeAt(c)){case 226:e=s.replace(N,"tb");break;case 232:e=s.replace(N,"tb-rl");break;case 220:e=s.replace(N,"lr");break;default:return s}s="-webkit-"+s+"-ms-"+e+s}return s}function i(e,a){var t=s(a,a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2));return t!==a+";"?t.replace(F,"or($1)").substring(2):"("+a+")"}function n(e,a,t,r,c,s,i,n){for(var o,h=0,f=a;h<J;++h)switch(o=q[h].call(l,e,f,t,r,c,s,i,n)){case void 0:case!1:case!0:case null:break;default:f=o}switch(f){case void 0:case!1:case!0:case null:case a:break;default:return f}}function o(e){switch(e){case void 0:case null:J=q.length=0;break;default:switch(e.constructor){case Array:for(var a=0,t=e.length;a<t;++a)o(e[a]);break;case Function:q[J++]=e;break;case Boolean:K=0|!!e}}return o}function h(e){for(var a in e){var t=e[a];switch(a){case"keyframe":Q=0|t;break;case"global":D=0|t;break;case"cascade":P=0|t;break;case"compress":_=0|t;break;case"prefix":M=0|t;break;case"semicolon":H=0|t;break;case"preserve":L=0|t}}return h}function l(a,r){if(void 0!==this&&this.constructor===l)return e(a);var c=a,s=c.charCodeAt(0);if(33>s&&(s=(c=c.trim()).charCodeAt(0)),0<Q&&(U=c.replace(A,91===s?"":"-")),s=1,1===P?X=c:V=c,c=[X],0<J){var i=n(-1,r,c,c,W,T,0,0);void 0!==i&&"string"==typeof i&&(r=i)}var o=t(Z,c,r,0);return 0<J&&void 0!==(i=n(-2,o,c,c,W,T,o.length,0))&&"string"!=typeof(o=i)&&(s=0),V=X=U="",G=0,T=W=1,0==_*s?o:o.replace(d,"").replace(O,"").replace($,"$1").replace(E,"$1").replace(S," ")}var f=/^\0+/g,d=/[\0\r\f]/g,u=/: */g,b=/zoo|gra/,k=/([,: ])(transform)/g,p=/,+\s*(?![^(]*[)])/g,g=/ +\s*(?![^(]*[)])/g,w=/ *[\0] */g,v=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,C=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,A=/\W+/g,y=/@(k\w+)\s*(\S*)\s*/,x=/::(place)/g,j=/:(read-only)/g,O=/\s+(?=[{\];=:>])/g,$=/([[}=:>])\s+/g,E=/(\{[^{]+?);(?=\})/g,S=/\s{2,}/g,z=/([^\(])(:+) */g,N=/[svh]\w+-[tblr]{2}/,R=/([\w-]+t\()/g,B=/\(\s*([^]*?)\s*\)/g,F=/([^]*?);/g,I=/-self|flex-/g,T=1,W=1,G=0,P=1,M=1,D=1,_=0,H=0,L=0,Z=[],q=[],J=0,K=0,Q=1,U="",V="",X="";return l.use=o,l.set=h,void 0!==a&&h(a),l}({keyframe:!1}),x=[],j=y.use;e.registered={},e.inserted={};var O="",$=[],E={};y.use(d);var S=/[A-Z]|^ms/g,z=function(e){var a={};return function(t){return void 0===a[t]&&(a[t]=e(t)),a[t]}}(function(e){return e.replace(S,"-$&").toLowerCase()}),N=function(e,a){return void 0===a||null===a||"boolean"==typeof a?"":1===m[e]||isNaN(a)||0===a?a:a+"px"},R=new WeakMap;e.sheet=A,e.useStylisPlugin=function(e){x.push(e),j(null)(x)(d)},e.flush=function(){A.flush(),e.inserted={},e.registered={},A.inject()},e.css=w,e.injectGlobal=function(){var t=g.apply(void 0,arguments),r=a(t);void 0===e.inserted[r]&&(y("",t),e.inserted[r]=!0)},e.keyframes=function(){var t=g.apply(void 0,arguments),r=a(t),c="animation-"+r;return void 0===e.inserted[r]&&(y("","@keyframes "+c+"{"+t+"}"),e.inserted[r]=!0),c},e.fontFace=function(){var t=g.apply(void 0,arguments),r=a(t);void 0===e.inserted[r]&&(y("","@font-face{"+t+"}"),e.inserted[r]=!0)},e.getRegisteredStyles=v,e.merge=function(e,a){var t=[],r=v(t,e);return t.length<2?e:r+w(t,a)},e.hydrate=function(a){a.forEach(function(a){e.inserted[a]=!0})},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=DO-NOT-USE.min.js.map |
@@ -171,13 +171,55 @@ 'use strict'; | ||
var queue = []; | ||
var orphans = {}; | ||
function insertRule(rule) { | ||
sheet.insert(rule, currentSourceMap); | ||
function insertNode(node) { | ||
sheet.insert(node.ruleText, currentSourceMap); | ||
} | ||
function insertionPlugin(context, content, selectors, parent, line, column, length, id) { | ||
function Node(selector, ruleText) { | ||
this.selector = selector; | ||
this.ruleText = ruleText; | ||
this.children = []; | ||
} | ||
function dive(node) { | ||
insertNode(node); | ||
if (node.children) { | ||
node.children.forEach(dive); | ||
} | ||
} | ||
function buildTree(node, parent) { | ||
if (parent) { | ||
if (!orphans[parent]) { | ||
orphans[parent] = []; | ||
} | ||
orphans[parent].push(node); | ||
} else { | ||
queue.push(node); | ||
} | ||
if (orphans[node.selector] !== undefined) { | ||
orphans[node.selector].forEach(function (n) { | ||
return node.children.push(n); | ||
}); | ||
orphans[node.selector] = undefined; | ||
} | ||
} | ||
function insertionPlugin(context, content, selectors, parents, line, column, length, id) { | ||
var node = void 0; | ||
var rule = selectors.join(','); | ||
var parent = parents.join(','); | ||
switch (context) { | ||
case -2: | ||
{ | ||
queue.forEach(insertRule); | ||
queue.forEach(dive); | ||
Object.keys(orphans).forEach(function (select) { | ||
if (orphans[select]) { | ||
orphans[select].forEach(dive); | ||
} | ||
}); | ||
queue = []; | ||
orphans = {}; | ||
break; | ||
@@ -188,11 +230,7 @@ } | ||
{ | ||
if (id === 0) { | ||
var joinedSelectors = selectors.join(','); | ||
var rule = joinedSelectors + '{' + content + '}'; | ||
if (parent.join(',') === joinedSelectors || parent[0] === '') { | ||
queue.push(rule); | ||
} else { | ||
queue.unshift(rule); | ||
} | ||
if (id !== 0) { | ||
break; | ||
} | ||
node = new Node(rule, rule + '{' + content + '}'); | ||
buildTree(node, parent); | ||
break; | ||
@@ -216,3 +254,4 @@ } | ||
{ | ||
queue.push(chars + '{' + child + '}'); | ||
node = new Node(rule, chars + '{' + child + '}'); | ||
buildTree(node, parent); | ||
break; | ||
@@ -225,4 +264,6 @@ } | ||
child = chars + '{' + child + '}'; | ||
queue.push('@-webkit-' + child); | ||
queue.push('@' + child); | ||
node = new Node(rule, '@-webkit-' + child); | ||
buildTree(node, parent); | ||
node = new Node(rule, '@' + child); | ||
buildTree(node, parent); | ||
break; | ||
@@ -232,3 +273,5 @@ } | ||
{ | ||
queue.push(chars + child); | ||
node = new Node(rule, chars + child); | ||
buildTree(node, parent); | ||
break; | ||
} | ||
@@ -356,4 +399,6 @@ } | ||
var styles = createStyles.apply(this, arguments); | ||
var hash = emotionUtils.hashString(styles); | ||
var cls = 'css-' + hash; | ||
if (exports.registered[cls] === undefined) { | ||
@@ -360,0 +405,0 @@ exports.registered[cls] = styles; |
@@ -167,13 +167,55 @@ import { Stylis, hashString, memoize, unitless } from 'emotion-utils'; | ||
var queue = []; | ||
var orphans = {}; | ||
function insertRule(rule) { | ||
sheet.insert(rule, currentSourceMap); | ||
function insertNode(node) { | ||
sheet.insert(node.ruleText, currentSourceMap); | ||
} | ||
function insertionPlugin(context, content, selectors, parent, line, column, length, id) { | ||
function Node(selector, ruleText) { | ||
this.selector = selector; | ||
this.ruleText = ruleText; | ||
this.children = []; | ||
} | ||
function dive(node) { | ||
insertNode(node); | ||
if (node.children) { | ||
node.children.forEach(dive); | ||
} | ||
} | ||
function buildTree(node, parent) { | ||
if (parent) { | ||
if (!orphans[parent]) { | ||
orphans[parent] = []; | ||
} | ||
orphans[parent].push(node); | ||
} else { | ||
queue.push(node); | ||
} | ||
if (orphans[node.selector] !== undefined) { | ||
orphans[node.selector].forEach(function (n) { | ||
return node.children.push(n); | ||
}); | ||
orphans[node.selector] = undefined; | ||
} | ||
} | ||
function insertionPlugin(context, content, selectors, parents, line, column, length, id) { | ||
var node = void 0; | ||
var rule = selectors.join(','); | ||
var parent = parents.join(','); | ||
switch (context) { | ||
case -2: | ||
{ | ||
queue.forEach(insertRule); | ||
queue.forEach(dive); | ||
Object.keys(orphans).forEach(function (select) { | ||
if (orphans[select]) { | ||
orphans[select].forEach(dive); | ||
} | ||
}); | ||
queue = []; | ||
orphans = {}; | ||
break; | ||
@@ -184,11 +226,7 @@ } | ||
{ | ||
if (id === 0) { | ||
var joinedSelectors = selectors.join(','); | ||
var rule = joinedSelectors + '{' + content + '}'; | ||
if (parent.join(',') === joinedSelectors || parent[0] === '') { | ||
queue.push(rule); | ||
} else { | ||
queue.unshift(rule); | ||
} | ||
if (id !== 0) { | ||
break; | ||
} | ||
node = new Node(rule, rule + '{' + content + '}'); | ||
buildTree(node, parent); | ||
break; | ||
@@ -212,3 +250,4 @@ } | ||
{ | ||
queue.push(chars + '{' + child + '}'); | ||
node = new Node(rule, chars + '{' + child + '}'); | ||
buildTree(node, parent); | ||
break; | ||
@@ -221,4 +260,6 @@ } | ||
child = chars + '{' + child + '}'; | ||
queue.push('@-webkit-' + child); | ||
queue.push('@' + child); | ||
node = new Node(rule, '@-webkit-' + child); | ||
buildTree(node, parent); | ||
node = new Node(rule, '@' + child); | ||
buildTree(node, parent); | ||
break; | ||
@@ -228,3 +269,5 @@ } | ||
{ | ||
queue.push(chars + child); | ||
node = new Node(rule, chars + child); | ||
buildTree(node, parent); | ||
break; | ||
} | ||
@@ -352,4 +395,6 @@ } | ||
var styles = createStyles.apply(this, arguments); | ||
var hash = hashString(styles); | ||
var cls = 'css-' + hash; | ||
if (registered[cls] === undefined) { | ||
@@ -356,0 +401,0 @@ registered[cls] = styles; |
{ | ||
"name": "emotion", | ||
"version": "8.0.2", | ||
"version": "8.0.3", | ||
"description": "The Next Generation of CSS-in-JS.", | ||
@@ -23,3 +23,3 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"babel-plugin-emotion": "^8.0.2-11", | ||
"babel-plugin-emotion": "^8.0.3", | ||
"emotion-utils": "^8.0.2-7" | ||
@@ -26,0 +26,0 @@ }, |
@@ -37,7 +37,37 @@ import { hashString, Stylis, memoize, unitless } from 'emotion-utils' | ||
let queue = [] | ||
let orphans = {} | ||
function insertRule(rule) { | ||
sheet.insert(rule, currentSourceMap) | ||
function insertNode(node) { | ||
sheet.insert(node.ruleText, currentSourceMap) | ||
} | ||
function Node(selector, ruleText) { | ||
this.selector = selector | ||
this.ruleText = ruleText | ||
this.children = [] | ||
} | ||
function dive(node) { | ||
insertNode(node) | ||
if (node.children) { | ||
node.children.forEach(dive) | ||
} | ||
} | ||
function buildTree(node, parent) { | ||
if (parent) { | ||
if (!orphans[parent]) { | ||
orphans[parent] = [] | ||
} | ||
orphans[parent].push(node) | ||
} else { | ||
queue.push(node) | ||
} | ||
if (orphans[node.selector] !== undefined) { | ||
orphans[node.selector].forEach(n => node.children.push(n)) | ||
orphans[node.selector] = undefined | ||
} | ||
} | ||
function insertionPlugin( | ||
@@ -47,3 +77,3 @@ context, | ||
selectors, | ||
parent, | ||
parents, | ||
line, | ||
@@ -54,6 +84,16 @@ column, | ||
) { | ||
let node | ||
let rule = selectors.join(',') | ||
let parent = parents.join(',') | ||
switch (context) { | ||
case -2: { | ||
queue.forEach(insertRule) | ||
queue.forEach(dive) | ||
Object.keys(orphans).forEach(select => { | ||
if (orphans[select]) { | ||
orphans[select].forEach(dive) | ||
} | ||
}) | ||
queue = [] | ||
orphans = {} | ||
break | ||
@@ -63,11 +103,7 @@ } | ||
case 2: { | ||
if (id === 0) { | ||
const joinedSelectors = selectors.join(',') | ||
const rule = `${joinedSelectors}{${content}}` | ||
if (parent.join(',') === joinedSelectors || parent[0] === '') { | ||
queue.push(rule) | ||
} else { | ||
queue.unshift(rule) | ||
} | ||
if (id !== 0) { | ||
break | ||
} | ||
node = new Node(rule, `${rule}{${content}}`) | ||
buildTree(node, parent) | ||
break | ||
@@ -89,3 +125,4 @@ } | ||
case 109: { | ||
queue.push(chars + '{' + child + '}') | ||
node = new Node(rule, chars + '{' + child + '}') | ||
buildTree(node, parent) | ||
break | ||
@@ -97,8 +134,12 @@ } | ||
child = chars + '{' + child + '}' | ||
queue.push('@-webkit-' + child) | ||
queue.push('@' + child) | ||
node = new Node(rule, '@-webkit-' + child) | ||
buildTree(node, parent) | ||
node = new Node(rule, '@' + child) | ||
buildTree(node, parent) | ||
break | ||
} | ||
default: { | ||
queue.push(chars + child) | ||
node = new Node(rule, chars + child) | ||
buildTree(node, parent) | ||
break | ||
} | ||
@@ -247,4 +288,6 @@ } | ||
const styles = createStyles.apply(this, arguments) | ||
const hash = hashString(styles) | ||
const cls = `css-${hash}` | ||
if (registered[cls] === undefined) { | ||
@@ -251,0 +294,0 @@ registered[cls] = styles |
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
148521
1259
Updatedbabel-plugin-emotion@^8.0.3