Comparing version 10.7.1 to 10.8.0
@@ -12,4 +12,4 @@ 'use strict'; | ||
// I have been trying to benchmark and I have seen a slow down after about 10k rules. | ||
// Since we are in a single sheet mode, user shouldn't care about this. | ||
var MAX_RULES_PER_SHEET = 10000; | ||
@@ -16,0 +16,0 @@ var defaultJss = jss.create(preset__default['default']()); |
import { create } from 'jss'; | ||
import preset from 'jss-preset-default'; | ||
// I have been trying to benchmark and I have seen a slow down after about 10k rules. | ||
// Since we are in a single sheet mode, user shouldn't care about this. | ||
var MAX_RULES_PER_SHEET = 10000; | ||
@@ -7,0 +7,0 @@ var defaultJss = create(preset()); |
@@ -50,5 +50,4 @@ (function (global, factory) { | ||
fnValues[prop] = value; | ||
} // $FlowFixMe[prop-missing] | ||
} | ||
rule[fnValuesNs] = fnValues; | ||
@@ -58,4 +57,3 @@ return style; | ||
onUpdate: function onUpdate(data, rule, sheet, options) { | ||
var styleRule = rule; // $FlowFixMe[prop-missing] | ||
var styleRule = rule; | ||
var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object | ||
@@ -77,5 +75,4 @@ // will be returned from that function. | ||
} | ||
} // $FlowFixMe[prop-missing] | ||
} | ||
var fnValues = styleRule[fnValuesNs]; // If we have a fn values map, it is a rule with function values. | ||
@@ -135,4 +132,3 @@ | ||
onCreateRule: function onCreateRule(name, decl, options) { | ||
if (!isObservable(decl)) return null; // Cast `decl` to `Observable`, since it passed the type guard. | ||
if (!isObservable(decl)) return null; | ||
var style$ = decl; | ||
@@ -207,3 +203,2 @@ var rule = jss.createRule(name, {}, options); // TODO | ||
if (typeof rule.style === 'string') { | ||
// $FlowFixMe[prop-missing] We can safely assume that rule has the style property | ||
rule.style = parse(rule.style); | ||
@@ -246,5 +241,2 @@ } | ||
this.at = at; | ||
this.rules = void 0; | ||
this.options = void 0; | ||
this.key = void 0; | ||
this.isProcessed = false; | ||
@@ -309,6 +301,3 @@ this.key = key; | ||
this.at = at; | ||
this.options = void 0; | ||
this.rule = void 0; | ||
this.isProcessed = false; | ||
this.key = void 0; | ||
this.key = key; | ||
@@ -375,5 +364,2 @@ this.options = options; | ||
* Convert nested rules to separate, remove them from original styles. | ||
* | ||
* @param {Rule} rule | ||
* @api public | ||
*/ | ||
@@ -514,5 +500,2 @@ | ||
* Handle `extend` property. | ||
* | ||
* @param {Rule} rule | ||
* @api public | ||
*/ | ||
@@ -531,8 +514,6 @@ | ||
if (value == null || value === false) { | ||
// $FlowFixMe[prop-missing] | ||
for (var key in rule[valueNs]) { | ||
rule.prop(key, null); | ||
} // $FlowFixMe[prop-missing] Flow complains because there is no indexer property in StyleRule | ||
} | ||
rule[valueNs] = null; | ||
@@ -543,9 +524,6 @@ return null; | ||
if (typeof value === 'object') { | ||
// $FlowFixMe[invalid-in-rhs] This will be an object | ||
for (var _key in value) { | ||
// $FlowFixMe[incompatible-use] This will be an object | ||
rule.prop(_key, value[_key]); | ||
} // $FlowFixMe[prop-missing] Flow complains because there is no indexer property in StyleRule | ||
} | ||
rule[valueNs] = value; | ||
@@ -569,5 +547,2 @@ } // Make sure we don't set the value in the core. | ||
* Convert nested rules to separate, remove them from original styles. | ||
* | ||
* @param {Rule} rule | ||
* @api public | ||
*/ | ||
@@ -582,3 +557,2 @@ | ||
if (rule) { | ||
rule = rule; | ||
return rule.selector; | ||
@@ -614,4 +588,3 @@ } | ||
if (prevOptions) return _extends({}, prevOptions, { | ||
index: prevOptions.index + 1 // $FlowFixMe[prop-missing] | ||
index: prevOptions.index + 1 | ||
}); | ||
@@ -656,7 +629,3 @@ var nestingLevel = rule.options.nestingLevel; | ||
// Place conditional right after the parent rule to ensure right ordering. | ||
container.addRule(prop, {}, options) // Flow expects more options but they aren't required | ||
// And flow doesn't know this will always be a StyleRule which has the addRule method | ||
// $FlowFixMe[incompatible-use] | ||
// $FlowFixMe[prop-missing] | ||
.addRule(styleRule.key, style[prop], { | ||
container.addRule(prop, {}, options).addRule(styleRule.key, style[prop], { | ||
selector: styleRule.selector | ||
@@ -680,5 +649,5 @@ }); | ||
* | ||
* @param {Object} original rule | ||
* @param {String} className class string | ||
* @return {Boolean} flag, indicating function was successfull or not | ||
* @param original rule | ||
* @param className class string | ||
* @return flag indicating function was successfull or not | ||
*/ | ||
@@ -704,4 +673,3 @@ | ||
var _ref = rule.options, | ||
parent = _ref.parent; // It is a ref to a local rule. | ||
var parent = rule.options.parent; // It is a ref to a local rule. | ||
@@ -730,5 +698,2 @@ if (className[0] === '$') { | ||
* Convert compose property to additional class, remove property from original styles. | ||
* | ||
* @param {Rule} rule | ||
* @api public | ||
*/ | ||
@@ -771,5 +736,2 @@ | ||
* Convert camel cased property names to dash separated. | ||
* | ||
* @param {Object} style | ||
* @return {Object} | ||
*/ | ||
@@ -793,4 +755,2 @@ | ||
* Allow camel cased property names by converting them back to dasherized. | ||
* | ||
* @param {Rule} rule | ||
*/ | ||
@@ -837,4 +797,2 @@ | ||
* Generated jss-plugin-default-unit CSS property units | ||
* | ||
* @type object | ||
*/ | ||
@@ -1007,5 +965,5 @@ | ||
for (var _key in obj) { | ||
newObj[_key] = obj[_key]; | ||
newObj[_key.replace(regExp, replace)] = obj[_key]; | ||
for (var key in obj) { | ||
newObj[key] = obj[key]; | ||
newObj[key.replace(regExp, replace)] = obj[key]; | ||
} | ||
@@ -2078,4 +2036,2 @@ | ||
* Add vendor prefix to a property name when needed. | ||
* | ||
* @api public | ||
*/ | ||
@@ -2169,4 +2125,4 @@ | ||
// I have been trying to benchmark and I have seen a slow down after about 10k rules. | ||
// Since we are in a single sheet mode, user shouldn't care about this. | ||
var MAX_RULES_PER_SHEET = 10000; | ||
@@ -2173,0 +2129,0 @@ var defaultJss = jss.create(create()); |
@@ -1,1 +0,1 @@ | ||
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jss")):"function"==typeof define&&define.amd?define(["exports","jss"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self).cssJss={},r.jss)}(this,(function(r,e){"use strict";var t=Date.now(),n="fnValues"+t,o="fnStyle"+ ++t;var i=function(r){var e,t=r.Symbol;return"function"==typeof t?t.observable?e=t.observable:(e=t("observable"),t.observable=e):e="@@observable",e}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),l=function(r){return r&&r[i]&&r===r[i]()},a=/;\n/,s=function(r){"string"==typeof r.style&&(r.style=function(r){for(var e={},t=r.split(a),n=0;n<t.length;n++){var o=(t[n]||"").trim();if(o){var i=o.indexOf(":");if(-1!==i){var l=o.substr(0,i).trim(),s=o.substr(i+1).trim();e[l]=s}}}return e}(r.style))};function u(){return(u=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r}).apply(this,arguments)}var f="@global",d="@global ",c=function(){function r(r,t,n){for(var o in this.type="global",this.at=f,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=r,this.options=n,this.rules=new e.RuleList(u({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=r.prototype;return t.getRule=function(r){return this.rules.get(r)},t.addRule=function(r,e,t){var n=this.rules.add(r,e,t);return n&&this.options.jss.plugins.onProcessRule(n),n},t.indexOf=function(r){return this.rules.indexOf(r)},t.toString=function(){return this.rules.toString()},r}(),p=function(){function r(r,e,t){this.type="global",this.at=f,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=r,this.options=t;var n=r.substr(d.length);this.rule=t.jss.createRule(n,e,u({},t,{parent:this}))}return r.prototype.toString=function(r){return this.rule?this.rule.toString(r):""},r}(),g=/\s*,\s*/g;function b(r,e){for(var t=r.split(g),n="",o=0;o<t.length;o++)n+=e+" "+t[o].trim(),t[o+1]&&(n+=", ");return n}function y(){return{onCreateRule:function(r,e,t){if(!r)return null;if(r===f)return new c(r,e,t);if("@"===r[0]&&r.substr(0,d.length)===d)return new p(r,e,t);var n=t.parent;return n&&("global"===n.type||n.options.parent&&"global"===n.options.parent.type)&&(t.scoped=!1),!1===t.scoped&&(t.selector=r),null},onProcessRule:function(r,e){"style"===r.type&&e&&(function(r,e){var t=r.options,n=r.style,o=n?n[f]:null;if(o){for(var i in o)e.addRule(i,o[i],u({},t,{selector:b(i,r.selector)}));delete n[f]}}(r,e),function(r,e){var t=r.options,n=r.style;for(var o in n)if("@"===o[0]&&o.substr(0,f.length)===f){var i=b(o.substr(f.length),r.selector);e.addRule(i,n[o],u({},t,{selector:i})),delete n[o]}}(r,e))}}}var m=function(r){return r&&"object"==typeof r&&!Array.isArray(r)},h="extendCurrValue"+Date.now();function v(r,e,t,n){return void 0===n&&(n={}),function(r,e,t,n){if("string"!=typeof r.extend)if(Array.isArray(r.extend))for(var o=0;o<r.extend.length;o++){var i=r.extend[o];v("string"==typeof i?u({},r,{extend:i}):r.extend[o],e,t,n)}else for(var l in r.extend)"extend"!==l?m(r.extend[l])?(l in n||(n[l]={}),v(r.extend[l],e,t,n[l])):n[l]=r.extend[l]:v(r.extend.extend,e,t,n);else{if(!t)return;var a=t.getRule(r.extend);if(!a)return;if(a===e)return;var s=a.options.parent;s&&v(s.rules.raw[r.extend],e,t,n)}}(r,e,t,n),function(r,e,t,n){for(var o in r)"extend"!==o&&(m(n[o])&&m(r[o])?v(r[o],e,t,n[o]):m(r[o])?n[o]=v(r[o],e,t):n[o]=r[o])}(r,e,t,n),n}var w=/\s*,\s*/g,x=/&/g,k=/\$([\w-]+)/g;function S(){function r(r,e){return function(t,n){var o=r.getRule(n)||e&&e.getRule(n);return o?(o=o).selector:n}}function e(r,e){for(var t=e.split(w),n=r.split(w),o="",i=0;i<t.length;i++)for(var l=t[i],a=0;a<n.length;a++){var s=n[a];o&&(o+=", "),o+=-1!==s.indexOf("&")?s.replace(x,l):l+" "+s}return o}function t(r,e,t){if(t)return u({},t,{index:t.index+1});var n=r.options.nestingLevel;n=void 0===n?1:n+1;var o=u({},r.options,{nestingLevel:n,index:e.indexOf(r)+1});return delete o.name,o}return{onProcessStyle:function(n,o,i){if("style"!==o.type)return n;var l,a,s=o,f=s.options.parent;for(var d in n){var c=-1!==d.indexOf("&"),p="@"===d[0];if(c||p){if(l=t(s,f,l),c){var g=e(d,s.selector);a||(a=r(f,i)),g=g.replace(k,a),f.addRule(g,n[d],u({},l,{selector:g}))}else p&&f.addRule(d,{},l).addRule(s.key,n[d],{selector:s.selector});delete n[d]}}return n}}}function P(r,e){if(!e)return!0;if(Array.isArray(e)){for(var t=0;t<e.length;t++){if(!P(r,e[t]))return!1}return!0}if(e.indexOf(" ")>-1)return P(r,e.split(" "));var n=r.options.parent;if("$"===e[0]){var o=n.getRule(e.substr(1));return!!o&&(o!==r&&(n.classes[r.key]+=" "+n.classes[o.key],!0))}return n.classes[r.key]+=" "+e,!0}function A(){return{onProcessStyle:function(r,e){return"composes"in r?(P(e,r.composes),delete r.composes,r):r}}}var j=/[A-Z]/g,C=/^ms-/,O={};function R(r){return"-"+r.toLowerCase()}function z(r){if(O.hasOwnProperty(r))return O[r];var e=r.replace(j,R);return O[r]=C.test(e)?"-"+e:e}function M(r){var e={};for(var t in r){e[0===t.indexOf("--")?t:z(t)]=r[t]}return r.fallbacks&&(Array.isArray(r.fallbacks)?e.fallbacks=r.fallbacks.map(M):e.fallbacks=M(r.fallbacks)),e}var W=e.hasCSSTOMSupport&&CSS?CSS.px:"px",E=e.hasCSSTOMSupport&&CSS?CSS.ms:"ms",N=e.hasCSSTOMSupport&&CSS?CSS.percent:"%";function T(r){var e=/(-[a-z])/g,t=function(r){return r[1].toUpperCase()},n={};for(var o in r)n[o]=r[o],n[o.replace(e,t)]=r[o];return n}var V=T({"animation-delay":E,"animation-duration":E,"background-position":W,"background-position-x":W,"background-position-y":W,"background-size":W,border:W,"border-bottom":W,"border-bottom-left-radius":W,"border-bottom-right-radius":W,"border-bottom-width":W,"border-left":W,"border-left-width":W,"border-radius":W,"border-right":W,"border-right-width":W,"border-top":W,"border-top-left-radius":W,"border-top-right-radius":W,"border-top-width":W,"border-width":W,"border-block":W,"border-block-end":W,"border-block-end-width":W,"border-block-start":W,"border-block-start-width":W,"border-block-width":W,"border-inline":W,"border-inline-end":W,"border-inline-end-width":W,"border-inline-start":W,"border-inline-start-width":W,"border-inline-width":W,"border-start-start-radius":W,"border-start-end-radius":W,"border-end-start-radius":W,"border-end-end-radius":W,margin:W,"margin-bottom":W,"margin-left":W,"margin-right":W,"margin-top":W,"margin-block":W,"margin-block-end":W,"margin-block-start":W,"margin-inline":W,"margin-inline-end":W,"margin-inline-start":W,padding:W,"padding-bottom":W,"padding-left":W,"padding-right":W,"padding-top":W,"padding-block":W,"padding-block-end":W,"padding-block-start":W,"padding-inline":W,"padding-inline-end":W,"padding-inline-start":W,"mask-position-x":W,"mask-position-y":W,"mask-size":W,height:W,width:W,"min-height":W,"max-height":W,"min-width":W,"max-width":W,bottom:W,left:W,top:W,right:W,inset:W,"inset-block":W,"inset-block-end":W,"inset-block-start":W,"inset-inline":W,"inset-inline-end":W,"inset-inline-start":W,"box-shadow":W,"text-shadow":W,"column-gap":W,"column-rule":W,"column-rule-width":W,"column-width":W,"font-size":W,"font-size-delta":W,"letter-spacing":W,"text-decoration-thickness":W,"text-indent":W,"text-stroke":W,"text-stroke-width":W,"word-spacing":W,motion:W,"motion-offset":W,outline:W,"outline-offset":W,"outline-width":W,perspective:W,"perspective-origin-x":N,"perspective-origin-y":N,"transform-origin":N,"transform-origin-x":N,"transform-origin-y":N,"transform-origin-z":N,"transition-delay":E,"transition-duration":E,"vertical-align":W,"flex-basis":W,"shape-margin":W,size:W,gap:W,grid:W,"grid-gap":W,"row-gap":W,"grid-row-gap":W,"grid-column-gap":W,"grid-template-rows":W,"grid-template-columns":W,"grid-auto-rows":W,"grid-auto-columns":W,"box-shadow-x":W,"box-shadow-y":W,"box-shadow-blur":W,"box-shadow-spread":W,"font-line-height":W,"text-shadow-x":W,"text-shadow-y":W,"text-shadow-blur":W});function U(r,e,t){if(null==e)return e;if(Array.isArray(e))for(var n=0;n<e.length;n++)e[n]=U(r,e[n],t);else if("object"==typeof e)if("fallbacks"===r)for(var o in e)e[o]=U(o,e[o],t);else for(var i in e)e[i]=U(r+"-"+i,e[i],t);else if("number"==typeof e&&!1===isNaN(e)){var l=t[r]||V[r];return!l||0===e&&l===W?e.toString():"function"==typeof l?l(e).toString():""+e+l}return e}function F(r){void 0===r&&(r={});var e=T(r);return{onProcessStyle:function(r,t){if("style"!==t.type)return r;for(var n in r)r[n]=U(n,r[n],e);return r},onChangeValue:function(r,t){return U(t,r,e)}}}var I={"background-size":!0,"background-position":!0,border:!0,"border-bottom":!0,"border-left":!0,"border-top":!0,"border-right":!0,"border-radius":!0,"border-image":!0,"border-width":!0,"border-style":!0,"border-color":!0,"box-shadow":!0,flex:!0,margin:!0,padding:!0,outline:!0,"transform-origin":!0,transform:!0,transition:!0},L={position:!0,size:!0},$={padding:{top:0,right:0,bottom:0,left:0},margin:{top:0,right:0,bottom:0,left:0},background:{attachment:null,color:null,image:null,position:null,repeat:null},border:{width:null,style:null,color:null},"border-top":{width:null,style:null,color:null},"border-right":{width:null,style:null,color:null},"border-bottom":{width:null,style:null,color:null},"border-left":{width:null,style:null,color:null},outline:{width:null,style:null,color:null},"list-style":{type:null,position:null,image:null},transition:{property:null,duration:null,"timing-function":null,timingFunction:null,delay:null},animation:{name:null,duration:null,"timing-function":null,timingFunction:null,delay:null,"iteration-count":null,iterationCount:null,direction:null,"fill-mode":null,fillMode:null,"play-state":null,playState:null},"box-shadow":{x:0,y:0,blur:0,spread:0,color:null,inset:null},"text-shadow":{x:0,y:0,blur:null,color:null}},D={border:{radius:"border-radius",image:"border-image",width:"border-width",style:"border-style",color:"border-color"},"border-bottom":{width:"border-bottom-width",style:"border-bottom-style",color:"border-bottom-color"},"border-top":{width:"border-top-width",style:"border-top-style",color:"border-top-color"},"border-left":{width:"border-left-width",style:"border-left-style",color:"border-left-color"},"border-right":{width:"border-right-width",style:"border-right-style",color:"border-right-color"},background:{size:"background-size",image:"background-image"},font:{style:"font-style",variant:"font-variant",weight:"font-weight",stretch:"font-stretch",size:"font-size",family:"font-family",lineHeight:"line-height","line-height":"line-height"},flex:{grow:"flex-grow",basis:"flex-basis",direction:"flex-direction",wrap:"flex-wrap",flow:"flex-flow",shrink:"flex-shrink"},align:{self:"align-self",items:"align-items",content:"align-content"},grid:{"template-columns":"grid-template-columns",templateColumns:"grid-template-columns","template-rows":"grid-template-rows",templateRows:"grid-template-rows","template-areas":"grid-template-areas",templateAreas:"grid-template-areas",template:"grid-template","auto-columns":"grid-auto-columns",autoColumns:"grid-auto-columns","auto-rows":"grid-auto-rows",autoRows:"grid-auto-rows","auto-flow":"grid-auto-flow",autoFlow:"grid-auto-flow",row:"grid-row",column:"grid-column","row-start":"grid-row-start",rowStart:"grid-row-start","row-end":"grid-row-end",rowEnd:"grid-row-end","column-start":"grid-column-start",columnStart:"grid-column-start","column-end":"grid-column-end",columnEnd:"grid-column-end",area:"grid-area",gap:"grid-gap","row-gap":"grid-row-gap",rowGap:"grid-row-gap","column-gap":"grid-column-gap",columnGap:"grid-column-gap"}};function G(r,e,t,n){return null==t[e]?r:0===r.length?[]:Array.isArray(r[0])?G(r[0],e,t,n):"object"==typeof r[0]?function(r,e,t){return r.map((function(r){return H(r,e,t,!1,!0)}))}(r,e,n):[r]}function H(r,e,t,n,o){if(!$[e]&&!D[e])return[];var i=[];if(D[e]&&(r=function(r,e,t,n){for(var o in t){var i=t[o];if(void 0!==r[o]&&(n||!e.prop(i))){var l,a=J((l={},l[i]=r[o],l),e)[i];n?e.style.fallbacks[i]=a:e.style[i]=a}delete r[o]}return r}(r,t,D[e],n)),Object.keys(r).length)for(var l in $[e])r[l]?Array.isArray(r[l])?i.push(null===L[l]?r[l]:r[l].join(" ")):i.push(r[l]):null!=$[e][l]&&i.push($[e][l]);return!i.length||o?i:[i]}function J(r,e,t){for(var n in r){var o=r[n];if(Array.isArray(o)){if(!Array.isArray(o[0])){if("fallbacks"===n){for(var i=0;i<r.fallbacks.length;i++)r.fallbacks[i]=J(r.fallbacks[i],e,!0);continue}r[n]=G(o,n,I,e),r[n].length||delete r[n]}}else if("object"==typeof o){if("fallbacks"===n){r.fallbacks=J(r.fallbacks,e,!0);continue}r[n]=H(o,n,e,t),r[n].length||delete r[n]}else""===r[n]&&delete r[n]}return r}var _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},q="object"===("undefined"==typeof window?"undefined":_(window))&&"object"===("undefined"==typeof document?"undefined":_(document))&&9===document.nodeType;function Z(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function B(r){return function(r){if(Array.isArray(r))return Z(r)}(r)||function(r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(r))return Array.from(r)}(r)||function(r,e){if(r){if("string"==typeof r)return Z(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Z(r,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var K="",Q="",X="",Y="",rr=q&&"ontouchstart"in document.documentElement;if(q){var er={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},tr=document.createElement("p").style;for(var nr in er)if(nr+"Transform"in tr){K=nr,Q=er[nr];break}"Webkit"===K&&"msHyphens"in tr&&(K="ms",Q=er.ms,Y="edge"),"Webkit"===K&&"-apple-trailing-word"in tr&&(X="apple")}var or=K,ir=Q,lr=X,ar=Y,sr=rr;var ur={noPrefill:["appearance"],supportedProperty:function(r){return"appearance"===r&&("ms"===or?"-webkit-"+r:ir+r)}},fr={noPrefill:["color-adjust"],supportedProperty:function(r){return"color-adjust"===r&&("Webkit"===or?ir+"print-"+r:r)}},dr=/[-\s]+(.)?/g;function cr(r,e){return e?e.toUpperCase():""}function pr(r){return r.replace(dr,cr)}function gr(r){return pr("-"+r)}var br,yr={noPrefill:["mask"],supportedProperty:function(r,e){if(!/^mask/.test(r))return!1;if("Webkit"===or){var t="mask-image";if(pr(t)in e)return r;if(or+gr(t)in e)return ir+r}return r}},mr={noPrefill:["text-orientation"],supportedProperty:function(r){return"text-orientation"===r&&("apple"!==lr||sr?r:ir+r)}},hr={noPrefill:["transform"],supportedProperty:function(r,e,t){return"transform"===r&&(t.transform?r:ir+r)}},vr={noPrefill:["transition"],supportedProperty:function(r,e,t){return"transition"===r&&(t.transition?r:ir+r)}},wr={noPrefill:["writing-mode"],supportedProperty:function(r){return"writing-mode"===r&&("Webkit"===or||"ms"===or&&"edge"!==ar?ir+r:r)}},xr={noPrefill:["user-select"],supportedProperty:function(r){return"user-select"===r&&("Moz"===or||"ms"===or||"apple"===lr?ir+r:r)}},kr={supportedProperty:function(r,e){return!!/^break-/.test(r)&&("Webkit"===or?"WebkitColumn"+gr(r)in e&&ir+"column-"+r:"Moz"===or&&("page"+gr(r)in e&&"page-"+r))}},Sr={supportedProperty:function(r,e){if(!/^(border|margin|padding)-inline/.test(r))return!1;if("Moz"===or)return r;var t=r.replace("-inline","");return or+gr(t)in e&&ir+t}},Pr={supportedProperty:function(r,e){return pr(r)in e&&r}},Ar={supportedProperty:function(r,e){var t=gr(r);return"-"===r[0]||"-"===r[0]&&"-"===r[1]?r:or+t in e?ir+r:"Webkit"!==or&&"Webkit"+t in e&&"-webkit-"+r}},jr={supportedProperty:function(r){return"scroll-snap"===r.substring(0,11)&&("ms"===or?""+ir+r:r)}},Cr={supportedProperty:function(r){return"overscroll-behavior"===r&&("ms"===or?ir+"scroll-chaining":r)}},Or={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Rr={supportedProperty:function(r,e){var t=Or[r];return!!t&&(or+gr(t)in e&&ir+t)}},zr={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Mr=Object.keys(zr),Wr=function(r){return ir+r},Er=[ur,fr,yr,mr,hr,vr,wr,xr,kr,Sr,Pr,Ar,jr,Cr,Rr,{supportedProperty:function(r,e,t){var n=t.multiple;if(Mr.indexOf(r)>-1){var o=zr[r];if(!Array.isArray(o))return or+gr(o)in e&&ir+o;if(!n)return!1;for(var i=0;i<o.length;i++)if(!(or+gr(o[0])in e))return!1;return o.map(Wr)}return!1}}],Nr=Er.filter((function(r){return r.supportedProperty})).map((function(r){return r.supportedProperty})),Tr=Er.filter((function(r){return r.noPrefill})).reduce((function(r,e){return r.push.apply(r,B(e.noPrefill)),r}),[]),Vr={};if(q){br=document.createElement("p");var Ur=window.getComputedStyle(document.documentElement,"");for(var Fr in Ur)isNaN(Fr)||(Vr[Ur[Fr]]=Ur[Fr]);Tr.forEach((function(r){return delete Vr[r]}))}function Ir(r,e){if(void 0===e&&(e={}),!br)return r;if(null!=Vr[r])return Vr[r];"transition"!==r&&"transform"!==r||(e[r]=r in br.style);for(var t=0;t<Nr.length&&(Vr[r]=Nr[t](r,br.style,e),!Vr[r]);t++);try{br.style[r]=""}catch(r){return!1}return Vr[r]}var Lr,$r={},Dr={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Gr=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Hr(r,e,t){if("var"===e)return"var";if("all"===e)return"all";if("all"===t)return", all";var n=e?Ir(e):", "+Ir(t);return n||(e||t)}function Jr(r,e){var t=e;if(!Lr||"content"===r)return e;if("string"!=typeof t||!isNaN(parseInt(t,10)))return t;var n=r+t;if(null!=$r[n])return $r[n];try{Lr.style[r]=t}catch(r){return $r[n]=!1,!1}if(Dr[r])t=t.replace(Gr,Hr);else if(""===Lr.style[r]&&("-ms-flex"===(t=ir+t)&&(Lr.style[r]="-ms-flexbox"),Lr.style[r]=t,""===Lr.style[r]))return $r[n]=!1,!1;return Lr.style[r]="",$r[n]=t,$r[n]}function _r(){function r(t){for(var n in t){var o=t[n];if("fallbacks"===n&&Array.isArray(o))t[n]=o.map(r);else{var i=!1,l=Ir(n);l&&l!==n&&(i=!0);var a=!1,s=Jr(l,e.toCssValue(o));s&&s!==o&&(a=!0),(i||a)&&(i&&delete t[n],t[l||n]=s||o)}}return t}return{onProcessRule:function(r){if("keyframes"===r.type){var e=r;e.at=function(r){return"-"===r[1]||"ms"===or?r:"@"+ir+"keyframes"+r.substr(10)}(e.at)}},onProcessStyle:function(e,t){return"style"!==t.type?e:r(e)},onChangeValue:function(r,t){return Jr(t,e.toCssValue(r))||r}}}q&&(Lr=document.createElement("p"));var qr,Zr,Br,Kr=e.create((void 0===qr&&(qr={}),{plugins:[{onCreateRule:function(r,t,n){if("function"!=typeof t)return null;var i=e.createRule(r,{},n);return i[o]=t,i},onProcessStyle:function(r,e){if(n in e||o in e)return r;var t={};for(var i in r){var l=r[i];"function"==typeof l&&(delete r[i],t[i]=l)}return e[n]=t,r},onUpdate:function(r,e,t,i){var l=e,a=l[o];a&&(l.style=a(r)||{});var s=l[n];if(s)for(var u in s)l.prop(u,s[u](r),i)}},(Br=qr.observable,{onCreateRule:function(r,t,n){if(!l(t))return null;var o=t,i=e.createRule(r,{},n);return o.subscribe((function(r){for(var e in r)i.prop(e,r[e],Br)})),i},onProcessRule:function(r){if(!r||"style"===r.type){var e=r,t=e.style,n=function(r){var n=t[r];if(!l(n))return"continue";delete t[r],n.subscribe({next:function(t){e.prop(r,t,Br)}})};for(var o in t)n(o)}}}),{onProcessRule:s},y(),{onProcessStyle:function(r,e,t){return"extend"in r?v(r,e,t):r},onChangeValue:function(r,e,t){if("extend"!==e)return r;if(null==r||!1===r){for(var n in t[h])t.prop(n,null);return t[h]=null,null}if("object"==typeof r){for(var o in r)t.prop(o,r[o]);t[h]=r}return null}},S(),A(),{onProcessStyle:function(r){if(Array.isArray(r)){for(var e=0;e<r.length;e++)r[e]=M(r[e]);return r}return M(r)},onChangeValue:function(r,e,t){if(0===e.indexOf("--"))return r;var n=z(e);return e===n?r:(t.prop(n,r),null)}},F(qr.defaultUnit),{onProcessStyle:function(r,e){if(!r||"style"!==e.type)return r;if(Array.isArray(r)){for(var t=0;t<r.length;t++)r[t]=J(r[t],e);return r}return J(r,e)}},_r(),(Zr=function(r,e){return r.length===e.length?r>e?1:-1:r.length-e.length},{onProcessStyle:function(r,e){if("style"!==e.type)return r;for(var t={},n=Object.keys(r).sort(Zr),o=0;o<n.length;o++)t[n[o]]=r[n[o]];return t}})]})),Qr=function(r){void 0===r&&(r=Kr);var e,t=new Map,n=0,o=function(){return(!e||e.rules.index.length>1e4)&&(e=r.createStyleSheet().attach()),e};function i(){var r=arguments,e=JSON.stringify(r),i=t.get(e);if(i)return i.className;var l=[];for(var a in r){var s=r[a];if(Array.isArray(s))for(var u=0;u<s.length;u++)l.push(s[u]);else l.push(s)}for(var f={},d=[],c=0;c<l.length;c++){var p=l[c];if(p){var g=p;if("string"==typeof p){var b=t.get(p);b&&(b.labels.length&&d.push.apply(d,b.labels),g=b.style)}g.label&&-1===d.indexOf(g.label)&&d.push(g.label),Object.assign(f,g)}}delete f.label;var y=0===d.length?"css":d.join("-"),m=y+"-"+n++;o().addRule(m,f);var h=o().classes[m],v={style:f,labels:d,className:h};return t.set(e,v),t.set(h,v),h}return i.getSheet=o,i},Xr=Qr();r.create=Qr,r.default=Xr,Object.defineProperty(r,"__esModule",{value:!0})})); | ||
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jss")):"function"==typeof define&&define.amd?define(["exports","jss"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self).cssJss={},r.jss)}(this,(function(r,e){"use strict";var t=Date.now(),n="fnValues"+t,o="fnStyle"+ ++t;var i=function(r){var e,t=r.Symbol;return"function"==typeof t?t.observable?e=t.observable:(e=t("observable"),t.observable=e):e="@@observable",e}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),l=function(r){return r&&r[i]&&r===r[i]()},a=/;\n/,u=function(r){"string"==typeof r.style&&(r.style=function(r){for(var e={},t=r.split(a),n=0;n<t.length;n++){var o=(t[n]||"").trim();if(o){var i=o.indexOf(":");if(-1!==i){var l=o.substr(0,i).trim(),u=o.substr(i+1).trim();e[l]=u}}}return e}(r.style))};function s(){return(s=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r}).apply(this,arguments)}var f="@global",d="@global ",c=function(){function r(r,t,n){for(var o in this.type="global",this.at=f,this.isProcessed=!1,this.key=r,this.options=n,this.rules=new e.RuleList(s({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=r.prototype;return t.getRule=function(r){return this.rules.get(r)},t.addRule=function(r,e,t){var n=this.rules.add(r,e,t);return n&&this.options.jss.plugins.onProcessRule(n),n},t.indexOf=function(r){return this.rules.indexOf(r)},t.toString=function(){return this.rules.toString()},r}(),p=function(){function r(r,e,t){this.type="global",this.at=f,this.isProcessed=!1,this.key=r,this.options=t;var n=r.substr(d.length);this.rule=t.jss.createRule(n,e,s({},t,{parent:this}))}return r.prototype.toString=function(r){return this.rule?this.rule.toString(r):""},r}(),g=/\s*,\s*/g;function b(r,e){for(var t=r.split(g),n="",o=0;o<t.length;o++)n+=e+" "+t[o].trim(),t[o+1]&&(n+=", ");return n}function y(){return{onCreateRule:function(r,e,t){if(!r)return null;if(r===f)return new c(r,e,t);if("@"===r[0]&&r.substr(0,d.length)===d)return new p(r,e,t);var n=t.parent;return n&&("global"===n.type||n.options.parent&&"global"===n.options.parent.type)&&(t.scoped=!1),!1===t.scoped&&(t.selector=r),null},onProcessRule:function(r,e){"style"===r.type&&e&&(function(r,e){var t=r.options,n=r.style,o=n?n[f]:null;if(o){for(var i in o)e.addRule(i,o[i],s({},t,{selector:b(i,r.selector)}));delete n[f]}}(r,e),function(r,e){var t=r.options,n=r.style;for(var o in n)if("@"===o[0]&&o.substr(0,f.length)===f){var i=b(o.substr(f.length),r.selector);e.addRule(i,n[o],s({},t,{selector:i})),delete n[o]}}(r,e))}}}var m=function(r){return r&&"object"==typeof r&&!Array.isArray(r)},h="extendCurrValue"+Date.now();function v(r,e,t,n){return void 0===n&&(n={}),function(r,e,t,n){if("string"!=typeof r.extend)if(Array.isArray(r.extend))for(var o=0;o<r.extend.length;o++){var i=r.extend[o];v("string"==typeof i?s({},r,{extend:i}):r.extend[o],e,t,n)}else for(var l in r.extend)"extend"!==l?m(r.extend[l])?(l in n||(n[l]={}),v(r.extend[l],e,t,n[l])):n[l]=r.extend[l]:v(r.extend.extend,e,t,n);else{if(!t)return;var a=t.getRule(r.extend);if(!a)return;if(a===e)return;var u=a.options.parent;u&&v(u.rules.raw[r.extend],e,t,n)}}(r,e,t,n),function(r,e,t,n){for(var o in r)"extend"!==o&&(m(n[o])&&m(r[o])?v(r[o],e,t,n[o]):m(r[o])?n[o]=v(r[o],e,t):n[o]=r[o])}(r,e,t,n),n}var w=/\s*,\s*/g,x=/&/g,k=/\$([\w-]+)/g;function S(){function r(r,e){return function(t,n){var o=r.getRule(n)||e&&e.getRule(n);return o?o.selector:n}}function e(r,e){for(var t=e.split(w),n=r.split(w),o="",i=0;i<t.length;i++)for(var l=t[i],a=0;a<n.length;a++){var u=n[a];o&&(o+=", "),o+=-1!==u.indexOf("&")?u.replace(x,l):l+" "+u}return o}function t(r,e,t){if(t)return s({},t,{index:t.index+1});var n=r.options.nestingLevel;n=void 0===n?1:n+1;var o=s({},r.options,{nestingLevel:n,index:e.indexOf(r)+1});return delete o.name,o}return{onProcessStyle:function(n,o,i){if("style"!==o.type)return n;var l,a,u=o,f=u.options.parent;for(var d in n){var c=-1!==d.indexOf("&"),p="@"===d[0];if(c||p){if(l=t(u,f,l),c){var g=e(d,u.selector);a||(a=r(f,i)),g=g.replace(k,a),f.addRule(g,n[d],s({},l,{selector:g}))}else p&&f.addRule(d,{},l).addRule(u.key,n[d],{selector:u.selector});delete n[d]}}return n}}}function P(r,e){if(!e)return!0;if(Array.isArray(e)){for(var t=0;t<e.length;t++){if(!P(r,e[t]))return!1}return!0}if(e.indexOf(" ")>-1)return P(r,e.split(" "));var n=r.options.parent;if("$"===e[0]){var o=n.getRule(e.substr(1));return!!o&&(o!==r&&(n.classes[r.key]+=" "+n.classes[o.key],!0))}return n.classes[r.key]+=" "+e,!0}function A(){return{onProcessStyle:function(r,e){return"composes"in r?(P(e,r.composes),delete r.composes,r):r}}}var j=/[A-Z]/g,C=/^ms-/,O={};function R(r){return"-"+r.toLowerCase()}function z(r){if(O.hasOwnProperty(r))return O[r];var e=r.replace(j,R);return O[r]=C.test(e)?"-"+e:e}function M(r){var e={};for(var t in r){e[0===t.indexOf("--")?t:z(t)]=r[t]}return r.fallbacks&&(Array.isArray(r.fallbacks)?e.fallbacks=r.fallbacks.map(M):e.fallbacks=M(r.fallbacks)),e}var W=e.hasCSSTOMSupport&&CSS?CSS.px:"px",E=e.hasCSSTOMSupport&&CSS?CSS.ms:"ms",N=e.hasCSSTOMSupport&&CSS?CSS.percent:"%";function T(r){var e=/(-[a-z])/g,t=function(r){return r[1].toUpperCase()},n={};for(var o in r)n[o]=r[o],n[o.replace(e,t)]=r[o];return n}var V=T({"animation-delay":E,"animation-duration":E,"background-position":W,"background-position-x":W,"background-position-y":W,"background-size":W,border:W,"border-bottom":W,"border-bottom-left-radius":W,"border-bottom-right-radius":W,"border-bottom-width":W,"border-left":W,"border-left-width":W,"border-radius":W,"border-right":W,"border-right-width":W,"border-top":W,"border-top-left-radius":W,"border-top-right-radius":W,"border-top-width":W,"border-width":W,"border-block":W,"border-block-end":W,"border-block-end-width":W,"border-block-start":W,"border-block-start-width":W,"border-block-width":W,"border-inline":W,"border-inline-end":W,"border-inline-end-width":W,"border-inline-start":W,"border-inline-start-width":W,"border-inline-width":W,"border-start-start-radius":W,"border-start-end-radius":W,"border-end-start-radius":W,"border-end-end-radius":W,margin:W,"margin-bottom":W,"margin-left":W,"margin-right":W,"margin-top":W,"margin-block":W,"margin-block-end":W,"margin-block-start":W,"margin-inline":W,"margin-inline-end":W,"margin-inline-start":W,padding:W,"padding-bottom":W,"padding-left":W,"padding-right":W,"padding-top":W,"padding-block":W,"padding-block-end":W,"padding-block-start":W,"padding-inline":W,"padding-inline-end":W,"padding-inline-start":W,"mask-position-x":W,"mask-position-y":W,"mask-size":W,height:W,width:W,"min-height":W,"max-height":W,"min-width":W,"max-width":W,bottom:W,left:W,top:W,right:W,inset:W,"inset-block":W,"inset-block-end":W,"inset-block-start":W,"inset-inline":W,"inset-inline-end":W,"inset-inline-start":W,"box-shadow":W,"text-shadow":W,"column-gap":W,"column-rule":W,"column-rule-width":W,"column-width":W,"font-size":W,"font-size-delta":W,"letter-spacing":W,"text-decoration-thickness":W,"text-indent":W,"text-stroke":W,"text-stroke-width":W,"word-spacing":W,motion:W,"motion-offset":W,outline:W,"outline-offset":W,"outline-width":W,perspective:W,"perspective-origin-x":N,"perspective-origin-y":N,"transform-origin":N,"transform-origin-x":N,"transform-origin-y":N,"transform-origin-z":N,"transition-delay":E,"transition-duration":E,"vertical-align":W,"flex-basis":W,"shape-margin":W,size:W,gap:W,grid:W,"grid-gap":W,"row-gap":W,"grid-row-gap":W,"grid-column-gap":W,"grid-template-rows":W,"grid-template-columns":W,"grid-auto-rows":W,"grid-auto-columns":W,"box-shadow-x":W,"box-shadow-y":W,"box-shadow-blur":W,"box-shadow-spread":W,"font-line-height":W,"text-shadow-x":W,"text-shadow-y":W,"text-shadow-blur":W});function U(r,e,t){if(null==e)return e;if(Array.isArray(e))for(var n=0;n<e.length;n++)e[n]=U(r,e[n],t);else if("object"==typeof e)if("fallbacks"===r)for(var o in e)e[o]=U(o,e[o],t);else for(var i in e)e[i]=U(r+"-"+i,e[i],t);else if("number"==typeof e&&!1===isNaN(e)){var l=t[r]||V[r];return!l||0===e&&l===W?e.toString():"function"==typeof l?l(e).toString():""+e+l}return e}function F(r){void 0===r&&(r={});var e=T(r);return{onProcessStyle:function(r,t){if("style"!==t.type)return r;for(var n in r)r[n]=U(n,r[n],e);return r},onChangeValue:function(r,t){return U(t,r,e)}}}var I={"background-size":!0,"background-position":!0,border:!0,"border-bottom":!0,"border-left":!0,"border-top":!0,"border-right":!0,"border-radius":!0,"border-image":!0,"border-width":!0,"border-style":!0,"border-color":!0,"box-shadow":!0,flex:!0,margin:!0,padding:!0,outline:!0,"transform-origin":!0,transform:!0,transition:!0},L={position:!0,size:!0},$={padding:{top:0,right:0,bottom:0,left:0},margin:{top:0,right:0,bottom:0,left:0},background:{attachment:null,color:null,image:null,position:null,repeat:null},border:{width:null,style:null,color:null},"border-top":{width:null,style:null,color:null},"border-right":{width:null,style:null,color:null},"border-bottom":{width:null,style:null,color:null},"border-left":{width:null,style:null,color:null},outline:{width:null,style:null,color:null},"list-style":{type:null,position:null,image:null},transition:{property:null,duration:null,"timing-function":null,timingFunction:null,delay:null},animation:{name:null,duration:null,"timing-function":null,timingFunction:null,delay:null,"iteration-count":null,iterationCount:null,direction:null,"fill-mode":null,fillMode:null,"play-state":null,playState:null},"box-shadow":{x:0,y:0,blur:0,spread:0,color:null,inset:null},"text-shadow":{x:0,y:0,blur:null,color:null}},D={border:{radius:"border-radius",image:"border-image",width:"border-width",style:"border-style",color:"border-color"},"border-bottom":{width:"border-bottom-width",style:"border-bottom-style",color:"border-bottom-color"},"border-top":{width:"border-top-width",style:"border-top-style",color:"border-top-color"},"border-left":{width:"border-left-width",style:"border-left-style",color:"border-left-color"},"border-right":{width:"border-right-width",style:"border-right-style",color:"border-right-color"},background:{size:"background-size",image:"background-image"},font:{style:"font-style",variant:"font-variant",weight:"font-weight",stretch:"font-stretch",size:"font-size",family:"font-family",lineHeight:"line-height","line-height":"line-height"},flex:{grow:"flex-grow",basis:"flex-basis",direction:"flex-direction",wrap:"flex-wrap",flow:"flex-flow",shrink:"flex-shrink"},align:{self:"align-self",items:"align-items",content:"align-content"},grid:{"template-columns":"grid-template-columns",templateColumns:"grid-template-columns","template-rows":"grid-template-rows",templateRows:"grid-template-rows","template-areas":"grid-template-areas",templateAreas:"grid-template-areas",template:"grid-template","auto-columns":"grid-auto-columns",autoColumns:"grid-auto-columns","auto-rows":"grid-auto-rows",autoRows:"grid-auto-rows","auto-flow":"grid-auto-flow",autoFlow:"grid-auto-flow",row:"grid-row",column:"grid-column","row-start":"grid-row-start",rowStart:"grid-row-start","row-end":"grid-row-end",rowEnd:"grid-row-end","column-start":"grid-column-start",columnStart:"grid-column-start","column-end":"grid-column-end",columnEnd:"grid-column-end",area:"grid-area",gap:"grid-gap","row-gap":"grid-row-gap",rowGap:"grid-row-gap","column-gap":"grid-column-gap",columnGap:"grid-column-gap"}};function G(r,e,t,n){return null==t[e]?r:0===r.length?[]:Array.isArray(r[0])?G(r[0],e,t,n):"object"==typeof r[0]?function(r,e,t){return r.map((function(r){return H(r,e,t,!1,!0)}))}(r,e,n):[r]}function H(r,e,t,n,o){if(!$[e]&&!D[e])return[];var i=[];if(D[e]&&(r=function(r,e,t,n){for(var o in t){var i=t[o];if(void 0!==r[o]&&(n||!e.prop(i))){var l,a=J((l={},l[i]=r[o],l),e)[i];n?e.style.fallbacks[i]=a:e.style[i]=a}delete r[o]}return r}(r,t,D[e],n)),Object.keys(r).length)for(var l in $[e])r[l]?Array.isArray(r[l])?i.push(null===L[l]?r[l]:r[l].join(" ")):i.push(r[l]):null!=$[e][l]&&i.push($[e][l]);return!i.length||o?i:[i]}function J(r,e,t){for(var n in r){var o=r[n];if(Array.isArray(o)){if(!Array.isArray(o[0])){if("fallbacks"===n){for(var i=0;i<r.fallbacks.length;i++)r.fallbacks[i]=J(r.fallbacks[i],e,!0);continue}r[n]=G(o,n,I,e),r[n].length||delete r[n]}}else if("object"==typeof o){if("fallbacks"===n){r.fallbacks=J(r.fallbacks,e,!0);continue}r[n]=H(o,n,e,t),r[n].length||delete r[n]}else""===r[n]&&delete r[n]}return r}var _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},q="object"===("undefined"==typeof window?"undefined":_(window))&&"object"===("undefined"==typeof document?"undefined":_(document))&&9===document.nodeType;function Z(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function B(r){return function(r){if(Array.isArray(r))return Z(r)}(r)||function(r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(r))return Array.from(r)}(r)||function(r,e){if(r){if("string"==typeof r)return Z(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Z(r,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var K="",Q="",X="",Y="",rr=q&&"ontouchstart"in document.documentElement;if(q){var er={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},tr=document.createElement("p").style;for(var nr in er)if(nr+"Transform"in tr){K=nr,Q=er[nr];break}"Webkit"===K&&"msHyphens"in tr&&(K="ms",Q=er.ms,Y="edge"),"Webkit"===K&&"-apple-trailing-word"in tr&&(X="apple")}var or=K,ir=Q,lr=X,ar=Y,ur=rr;var sr={noPrefill:["appearance"],supportedProperty:function(r){return"appearance"===r&&("ms"===or?"-webkit-"+r:ir+r)}},fr={noPrefill:["color-adjust"],supportedProperty:function(r){return"color-adjust"===r&&("Webkit"===or?ir+"print-"+r:r)}},dr=/[-\s]+(.)?/g;function cr(r,e){return e?e.toUpperCase():""}function pr(r){return r.replace(dr,cr)}function gr(r){return pr("-"+r)}var br,yr={noPrefill:["mask"],supportedProperty:function(r,e){if(!/^mask/.test(r))return!1;if("Webkit"===or){var t="mask-image";if(pr(t)in e)return r;if(or+gr(t)in e)return ir+r}return r}},mr={noPrefill:["text-orientation"],supportedProperty:function(r){return"text-orientation"===r&&("apple"!==lr||ur?r:ir+r)}},hr={noPrefill:["transform"],supportedProperty:function(r,e,t){return"transform"===r&&(t.transform?r:ir+r)}},vr={noPrefill:["transition"],supportedProperty:function(r,e,t){return"transition"===r&&(t.transition?r:ir+r)}},wr={noPrefill:["writing-mode"],supportedProperty:function(r){return"writing-mode"===r&&("Webkit"===or||"ms"===or&&"edge"!==ar?ir+r:r)}},xr={noPrefill:["user-select"],supportedProperty:function(r){return"user-select"===r&&("Moz"===or||"ms"===or||"apple"===lr?ir+r:r)}},kr={supportedProperty:function(r,e){return!!/^break-/.test(r)&&("Webkit"===or?"WebkitColumn"+gr(r)in e&&ir+"column-"+r:"Moz"===or&&("page"+gr(r)in e&&"page-"+r))}},Sr={supportedProperty:function(r,e){if(!/^(border|margin|padding)-inline/.test(r))return!1;if("Moz"===or)return r;var t=r.replace("-inline","");return or+gr(t)in e&&ir+t}},Pr={supportedProperty:function(r,e){return pr(r)in e&&r}},Ar={supportedProperty:function(r,e){var t=gr(r);return"-"===r[0]||"-"===r[0]&&"-"===r[1]?r:or+t in e?ir+r:"Webkit"!==or&&"Webkit"+t in e&&"-webkit-"+r}},jr={supportedProperty:function(r){return"scroll-snap"===r.substring(0,11)&&("ms"===or?""+ir+r:r)}},Cr={supportedProperty:function(r){return"overscroll-behavior"===r&&("ms"===or?ir+"scroll-chaining":r)}},Or={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Rr={supportedProperty:function(r,e){var t=Or[r];return!!t&&(or+gr(t)in e&&ir+t)}},zr={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Mr=Object.keys(zr),Wr=function(r){return ir+r},Er=[sr,fr,yr,mr,hr,vr,wr,xr,kr,Sr,Pr,Ar,jr,Cr,Rr,{supportedProperty:function(r,e,t){var n=t.multiple;if(Mr.indexOf(r)>-1){var o=zr[r];if(!Array.isArray(o))return or+gr(o)in e&&ir+o;if(!n)return!1;for(var i=0;i<o.length;i++)if(!(or+gr(o[0])in e))return!1;return o.map(Wr)}return!1}}],Nr=Er.filter((function(r){return r.supportedProperty})).map((function(r){return r.supportedProperty})),Tr=Er.filter((function(r){return r.noPrefill})).reduce((function(r,e){return r.push.apply(r,B(e.noPrefill)),r}),[]),Vr={};if(q){br=document.createElement("p");var Ur=window.getComputedStyle(document.documentElement,"");for(var Fr in Ur)isNaN(Fr)||(Vr[Ur[Fr]]=Ur[Fr]);Tr.forEach((function(r){return delete Vr[r]}))}function Ir(r,e){if(void 0===e&&(e={}),!br)return r;if(null!=Vr[r])return Vr[r];"transition"!==r&&"transform"!==r||(e[r]=r in br.style);for(var t=0;t<Nr.length&&(Vr[r]=Nr[t](r,br.style,e),!Vr[r]);t++);try{br.style[r]=""}catch(r){return!1}return Vr[r]}var Lr,$r={},Dr={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Gr=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Hr(r,e,t){if("var"===e)return"var";if("all"===e)return"all";if("all"===t)return", all";var n=e?Ir(e):", "+Ir(t);return n||(e||t)}function Jr(r,e){var t=e;if(!Lr||"content"===r)return e;if("string"!=typeof t||!isNaN(parseInt(t,10)))return t;var n=r+t;if(null!=$r[n])return $r[n];try{Lr.style[r]=t}catch(r){return $r[n]=!1,!1}if(Dr[r])t=t.replace(Gr,Hr);else if(""===Lr.style[r]&&("-ms-flex"===(t=ir+t)&&(Lr.style[r]="-ms-flexbox"),Lr.style[r]=t,""===Lr.style[r]))return $r[n]=!1,!1;return Lr.style[r]="",$r[n]=t,$r[n]}function _r(){function r(t){for(var n in t){var o=t[n];if("fallbacks"===n&&Array.isArray(o))t[n]=o.map(r);else{var i=!1,l=Ir(n);l&&l!==n&&(i=!0);var a=!1,u=Jr(l,e.toCssValue(o));u&&u!==o&&(a=!0),(i||a)&&(i&&delete t[n],t[l||n]=u||o)}}return t}return{onProcessRule:function(r){if("keyframes"===r.type){var e=r;e.at=function(r){return"-"===r[1]||"ms"===or?r:"@"+ir+"keyframes"+r.substr(10)}(e.at)}},onProcessStyle:function(e,t){return"style"!==t.type?e:r(e)},onChangeValue:function(r,t){return Jr(t,e.toCssValue(r))||r}}}q&&(Lr=document.createElement("p"));var qr,Zr,Br,Kr=e.create((void 0===qr&&(qr={}),{plugins:[{onCreateRule:function(r,t,n){if("function"!=typeof t)return null;var i=e.createRule(r,{},n);return i[o]=t,i},onProcessStyle:function(r,e){if(n in e||o in e)return r;var t={};for(var i in r){var l=r[i];"function"==typeof l&&(delete r[i],t[i]=l)}return e[n]=t,r},onUpdate:function(r,e,t,i){var l=e,a=l[o];a&&(l.style=a(r)||{});var u=l[n];if(u)for(var s in u)l.prop(s,u[s](r),i)}},(Br=qr.observable,{onCreateRule:function(r,t,n){if(!l(t))return null;var o=t,i=e.createRule(r,{},n);return o.subscribe((function(r){for(var e in r)i.prop(e,r[e],Br)})),i},onProcessRule:function(r){if(!r||"style"===r.type){var e=r,t=e.style,n=function(r){var n=t[r];if(!l(n))return"continue";delete t[r],n.subscribe({next:function(t){e.prop(r,t,Br)}})};for(var o in t)n(o)}}}),{onProcessRule:u},y(),{onProcessStyle:function(r,e,t){return"extend"in r?v(r,e,t):r},onChangeValue:function(r,e,t){if("extend"!==e)return r;if(null==r||!1===r){for(var n in t[h])t.prop(n,null);return t[h]=null,null}if("object"==typeof r){for(var o in r)t.prop(o,r[o]);t[h]=r}return null}},S(),A(),{onProcessStyle:function(r){if(Array.isArray(r)){for(var e=0;e<r.length;e++)r[e]=M(r[e]);return r}return M(r)},onChangeValue:function(r,e,t){if(0===e.indexOf("--"))return r;var n=z(e);return e===n?r:(t.prop(n,r),null)}},F(qr.defaultUnit),{onProcessStyle:function(r,e){if(!r||"style"!==e.type)return r;if(Array.isArray(r)){for(var t=0;t<r.length;t++)r[t]=J(r[t],e);return r}return J(r,e)}},_r(),(Zr=function(r,e){return r.length===e.length?r>e?1:-1:r.length-e.length},{onProcessStyle:function(r,e){if("style"!==e.type)return r;for(var t={},n=Object.keys(r).sort(Zr),o=0;o<n.length;o++)t[n[o]]=r[n[o]];return t}})]})),Qr=function(r){void 0===r&&(r=Kr);var e,t=new Map,n=0,o=function(){return(!e||e.rules.index.length>1e4)&&(e=r.createStyleSheet().attach()),e};function i(){var r=arguments,e=JSON.stringify(r),i=t.get(e);if(i)return i.className;var l=[];for(var a in r){var u=r[a];if(Array.isArray(u))for(var s=0;s<u.length;s++)l.push(u[s]);else l.push(u)}for(var f={},d=[],c=0;c<l.length;c++){var p=l[c];if(p){var g=p;if("string"==typeof p){var b=t.get(p);b&&(b.labels.length&&d.push.apply(d,b.labels),g=b.style)}g.label&&-1===d.indexOf(g.label)&&d.push(g.label),Object.assign(f,g)}}delete f.label;var y=0===d.length?"css":d.join("-"),m=y+"-"+n++;o().addRule(m,f);var h=o().classes[m],v={style:f,labels:d,className:h};return t.set(e,v),t.set(h,v),h}return i.getSheet=o,i},Xr=Qr();r.create=Qr,r.default=Xr,Object.defineProperty(r,"__esModule",{value:!0})})); |
{ | ||
"name": "css-jss", | ||
"description": "Implements css() interface on top of JSS", | ||
"version": "10.7.1", | ||
"version": "10.8.0", | ||
"license": "MIT", | ||
@@ -42,6 +42,6 @@ "homepage": "https://cssinjs.org/", | ||
"@babel/runtime": "^7.3.1", | ||
"jss": "10.7.1", | ||
"jss-preset-default": "10.7.1" | ||
"jss": "10.8.0", | ||
"jss-preset-default": "10.8.0" | ||
}, | ||
"gitHead": "2b54776c03d97a3bccbbcb28b63508f74103ebbc" | ||
"gitHead": "d2e1aea99b2a8a9c2d8725df1dfcd222d2504a7a" | ||
} |
@@ -11,3 +11,3 @@ # css-jss | ||
See our website [css-jss](https://cssinjs.org/css-jss?v=v10.7.1) for more information. | ||
See our website [css-jss](https://cssinjs.org/css-jss?v=v10.8.0) for more information. | ||
@@ -14,0 +14,0 @@ ## Install |
@@ -1,7 +0,3 @@ | ||
// @flow | ||
import {create as createJss} from 'jss' | ||
import preset from 'jss-preset-default' | ||
import type {Jss} from 'jss' | ||
// eslint-disable-next-line no-unused-vars | ||
import type {Css, StyleArg} from './types' | ||
@@ -14,3 +10,3 @@ // I have been trying to benchmark and I have seen a slow down after about 10k rules. | ||
const createCss = (jss: Jss = defaultJss): Css => { | ||
const createCss = (jss = defaultJss) => { | ||
const cache = new Map() | ||
@@ -27,3 +23,3 @@ let ruleIndex = 0 | ||
function css(/* :: ..._: StyleArg[] */): string { | ||
function css() { | ||
// eslint-disable-next-line prefer-rest-params | ||
@@ -30,0 +26,0 @@ const args = arguments |
@@ -1,8 +0,5 @@ | ||
// @flow | ||
import createCss from './createCss' | ||
import type {Css, Style} from './types' | ||
export type {Css, Style} | ||
export {createCss as create} | ||
const css: Css = createCss() | ||
const css = createCss() | ||
export default css |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
16
326999
5690
+ Addedjss@10.8.0(transitive)
+ Addedjss-plugin-camel-case@10.8.0(transitive)
+ Addedjss-plugin-compose@10.8.0(transitive)
+ Addedjss-plugin-default-unit@10.8.0(transitive)
+ Addedjss-plugin-expand@10.8.0(transitive)
+ Addedjss-plugin-extend@10.8.0(transitive)
+ Addedjss-plugin-global@10.8.0(transitive)
+ Addedjss-plugin-nested@10.8.0(transitive)
+ Addedjss-plugin-props-sort@10.8.0(transitive)
+ Addedjss-plugin-rule-value-function@10.8.0(transitive)
+ Addedjss-plugin-rule-value-observable@10.8.0(transitive)
+ Addedjss-plugin-template@10.8.0(transitive)
+ Addedjss-plugin-vendor-prefixer@10.8.0(transitive)
+ Addedjss-preset-default@10.8.0(transitive)
- Removedjss@10.7.1(transitive)
- Removedjss-plugin-camel-case@10.7.1(transitive)
- Removedjss-plugin-compose@10.7.1(transitive)
- Removedjss-plugin-default-unit@10.7.1(transitive)
- Removedjss-plugin-expand@10.7.1(transitive)
- Removedjss-plugin-extend@10.7.1(transitive)
- Removedjss-plugin-global@10.7.1(transitive)
- Removedjss-plugin-nested@10.7.1(transitive)
- Removedjss-plugin-props-sort@10.7.1(transitive)
- Removedjss-plugin-rule-value-function@10.7.1(transitive)
- Removedjss-plugin-rule-value-observable@10.7.1(transitive)
- Removedjss-plugin-template@10.7.1(transitive)
- Removedjss-plugin-vendor-prefixer@10.7.1(transitive)
- Removedjss-preset-default@10.7.1(transitive)
Updatedjss@10.8.0
Updatedjss-preset-default@10.8.0