Comparing version 10.0.0-alpha.4 to 10.0.0-alpha.5
@@ -1997,3 +1997,3 @@ function _extends() { | ||
this.id = instanceCounter++; | ||
this.version = "10.0.0-alpha.4"; | ||
this.version = "10.0.0-alpha.5"; | ||
this.plugins = new PluginsRegistry(); | ||
@@ -2163,57 +2163,2 @@ this.options = { | ||
/** | ||
* Copyright (c) 2014-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
var warning$1 = function warning() {}; | ||
{ | ||
var printWarning = function printWarning(format, args) { | ||
var len = arguments.length; | ||
args = new Array(len > 2 ? len - 2 : 0); | ||
for (var key = 2; key < len; key++) { | ||
args[key - 2] = arguments[key]; | ||
} | ||
var argIndex = 0; | ||
var message = 'Warning: ' + format.replace(/%s/g, function () { | ||
return args[argIndex++]; | ||
}); | ||
if (typeof console !== 'undefined') { | ||
console.error(message); | ||
} | ||
try { | ||
// --- Welcome to debugging React --- | ||
// This error was thrown as a convenience so that you can use this stack | ||
// to find the callsite that caused this warning to fire. | ||
throw new Error(message); | ||
} catch (x) {} | ||
}; | ||
warning$1 = function warning(condition, format, args) { | ||
var len = arguments.length; | ||
args = new Array(len > 2 ? len - 2 : 0); | ||
for (var key = 2; key < len; key++) { | ||
args[key - 2] = arguments[key]; | ||
} | ||
if (format === undefined) { | ||
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); | ||
} | ||
if (!condition) { | ||
printWarning.apply(null, [format].concat(args)); | ||
} | ||
}; | ||
} | ||
var warning_1 = warning$1; | ||
/** | ||
* SheetsManager is like a WeakMap which is designed to count StyleSheet | ||
@@ -2264,3 +2209,3 @@ * instances and attach/detach automatically. | ||
// eslint-ignore-next-line no-console | ||
warning_1(false, "SheetsManager: can't find sheet to unmanage"); | ||
warning(false, "SheetsManager: can't find sheet to unmanage"); | ||
return; | ||
@@ -2267,0 +2212,0 @@ } |
@@ -14,3 +14,2 @@ 'use strict'; | ||
var isInBrowser = _interopDefault(require('is-in-browser')); | ||
var warn = _interopDefault(require('warning')); | ||
@@ -1913,3 +1912,3 @@ var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}; | ||
this.id = instanceCounter++; | ||
this.version = "10.0.0-alpha.4"; | ||
this.version = "10.0.0-alpha.5"; | ||
this.plugins = new PluginsRegistry(); | ||
@@ -2124,3 +2123,3 @@ this.options = { | ||
// eslint-ignore-next-line no-console | ||
warn(false, "SheetsManager: can't find sheet to unmanage"); | ||
warning(false, "SheetsManager: can't find sheet to unmanage"); | ||
return; | ||
@@ -2127,0 +2126,0 @@ } |
@@ -8,3 +8,2 @@ import $$observable from 'symbol-observable'; | ||
import isInBrowser from 'is-in-browser'; | ||
import warn from 'warning'; | ||
@@ -1907,3 +1906,3 @@ var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}; | ||
this.id = instanceCounter++; | ||
this.version = "10.0.0-alpha.4"; | ||
this.version = "10.0.0-alpha.5"; | ||
this.plugins = new PluginsRegistry(); | ||
@@ -2118,3 +2117,3 @@ this.options = { | ||
// eslint-ignore-next-line no-console | ||
warn(false, "SheetsManager: can't find sheet to unmanage"); | ||
warning(false, "SheetsManager: can't find sheet to unmanage"); | ||
return; | ||
@@ -2121,0 +2120,0 @@ } |
@@ -2003,3 +2003,3 @@ (function (global, factory) { | ||
this.id = instanceCounter++; | ||
this.version = "10.0.0-alpha.4"; | ||
this.version = "10.0.0-alpha.5"; | ||
this.plugins = new PluginsRegistry(); | ||
@@ -2169,57 +2169,2 @@ this.options = { | ||
/** | ||
* Copyright (c) 2014-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
var warning$1 = function warning() {}; | ||
{ | ||
var printWarning = function printWarning(format, args) { | ||
var len = arguments.length; | ||
args = new Array(len > 2 ? len - 2 : 0); | ||
for (var key = 2; key < len; key++) { | ||
args[key - 2] = arguments[key]; | ||
} | ||
var argIndex = 0; | ||
var message = 'Warning: ' + format.replace(/%s/g, function () { | ||
return args[argIndex++]; | ||
}); | ||
if (typeof console !== 'undefined') { | ||
console.error(message); | ||
} | ||
try { | ||
// --- Welcome to debugging React --- | ||
// This error was thrown as a convenience so that you can use this stack | ||
// to find the callsite that caused this warning to fire. | ||
throw new Error(message); | ||
} catch (x) {} | ||
}; | ||
warning$1 = function warning(condition, format, args) { | ||
var len = arguments.length; | ||
args = new Array(len > 2 ? len - 2 : 0); | ||
for (var key = 2; key < len; key++) { | ||
args[key - 2] = arguments[key]; | ||
} | ||
if (format === undefined) { | ||
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); | ||
} | ||
if (!condition) { | ||
printWarning.apply(null, [format].concat(args)); | ||
} | ||
}; | ||
} | ||
var warning_1 = warning$1; | ||
/** | ||
* SheetsManager is like a WeakMap which is designed to count StyleSheet | ||
@@ -2270,3 +2215,3 @@ * instances and attach/detach automatically. | ||
// eslint-ignore-next-line no-console | ||
warning_1(false, "SheetsManager: can't find sheet to unmanage"); | ||
warning(false, "SheetsManager: can't find sheet to unmanage"); | ||
return; | ||
@@ -2273,0 +2218,0 @@ } |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.jss={})}(this,function(e){"use strict";function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n="object"===("undefined"==typeof window?"undefined":t(window))&&"object"===("undefined"==typeof document?"undefined":t(document))&&9===document.nodeType;var r,s="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==s?s:"undefined"!=typeof module?module:Function("return this")();var i,o,u=("function"==typeof(o=r.Symbol)?o.observable?i=o.observable:(i=o("observable"),o.observable=i):i="@@observable",i),a=Array.isArray,h=function(e){return e&&e[u]&&e===e[u]()};function l(e){if(null==e)return e;var t=typeof e;if("string"===t||"number"===t||"function"===t)return e;if(s.CSSStyleValue&&e instanceof s.CSSStyleValue)return e;if(a(e))return e.map(l);if(h(e))return e;var n={};for(var r in e){var i=e[r];"object"!=typeof i?n[r]=i:n[r]=l(i)}return n}function p(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=l(t),s=r.plugins.onCreateRule(e,i,n);return s||(e[0],null)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function y(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var g=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function m(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=g(e[r]," ");else n=g(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function b(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function S(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,s=void 0===i?0:i,o=t.fallbacks;if(e&&s++,o)if(Array.isArray(o))for(var u=0;u<o.length;u++){var a=o[u];for(var h in a){var l=a[h];null!=l&&(r&&(r+="\n"),r+=""+b(h+": "+m(l)+";",s))}}else for(var d in o){var f=o[d];null!=f&&(r&&(r+="\n"),r+=""+b(d+": "+m(f)+";",s))}for(var c in t){var p=t[c];null!=p&&"fallbacks"!==c&&(r&&(r+="\n"),r+=""+b(c+": "+m(p)+";",s))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),b(e+" {"+r,--s)+b("}",s)):r}var R=function(e){return e},k=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,this.renderer=r?r.renderer:new i}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];if(!(!!n&&n.force)&&this.style[e]===t)return this;var r=t;n&&!1===n.process||(r=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==r||!1===r,s=e in this.style;if(i&&!s)return this;var o=i&&s;if(o?delete this.style[e]:this.style[e]=r,this.renderable)return o?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,r),this;var u=this.options.sheet;return u&&u.attached,this},e}(),x=function(a){function e(e,t,n){var r;(r=a.call(this,e,t,n)||this).selectorText=void 0,r.id=void 0,r.renderable=void 0;var i=n.selector,s=n.scoped,o=n.sheet,u=n.generateId;return i?r.selectorText=i:!1!==s&&(r.id=u(v(v(r)),o),r.selectorText="."+R(r.id)),r}y(e,a);var t=e.prototype;return t.applyTo=function(e){var t=this.toJSON();for(var n in t)this.renderer.setProperty(e,n,t[n]);return this},t.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=m(n))}return e},t.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?c({},e,{allowEmpty:!0}):e;return S(this.selectorText,this.style,n)},f(e,[{key:"selector",set:function(e){e!==this.selectorText&&(this.selectorText=e,this.renderable&&(this.renderer.setSelector(this.renderable,e)||this.renderer.replaceRule(this.renderable,this)))},get:function(){return this.selectorText}}]),e}(k),P={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new x(e,t,n)}},w={indent:1,children:!0},j=/@([\w-]+)/,C=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=(this.key=e).match(j);for(var i in this.at=r?r[1]:"unknown",this.options=n,this.rules=new K(c({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=w),!1===e.children)return this.key+" {}";var t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""},e}(),O=/@media|@supports\s+/,A={onCreateRule:function(e,t,n){return O.test(e)?new C(e,t,n):null}},I={indent:1,children:!0},T=/@keyframes\s+([\w-]+)/,V=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=e.match(T);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name;var i=(this.options=n).scoped,s=n.sheet,o=n.generateId;for(var u in this.id=!1===i?this.name:o(this,s),this.rules=new K(c({},n,{parent:this})),t)this.rules.add(u,t[u],c({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=I),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),q=/@keyframes\s+/,N=/\$([\w-]+)/,E=function(e,t,n){var r=e[t];if("string"==typeof r){var i=N.exec(r);if(!i)return;i[1]in n?e[t]=r.replace(i[0],n[i[1]]):i[1]}},M={onCreateRule:function(e,t,n){return q.test(e)?new V(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n&&("animation-name"in e&&E(e,"animation-name",n.keyframes),"animation"in e&&E(e,"animation",n.keyframes)),e}},U=function(i){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))||this).renderable=void 0,e}return y(e,i),e.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?c({},e,{allowEmpty:!0}):e;return S(this.key,this.style,n)},e}(k),G={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new U(e,t,n):null}},_=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=S(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return S(this.key,this.style,e)},e}(),B={onCreateRule:function(e,t,n){return"@font-face"===e?new _(e,t,n):null}},J=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return S(this.key,this.style,e)},e}(),z={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new J(e,t,n):null}},D=function(){function e(e,t,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),F={"@charset":!0,"@import":!0,"@namespace":!0},L=[P,A,M,G,B,z,{onCreateRule:function(e,t,n){return e in F?new D(e,t,n):null}}],$={process:!0},H={force:!0,process:!0},K=function(){function l(e){this.map={},this.raw={},this.index=[],this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var e=l.prototype;return e.add=function(e,t,n){var r=this.options,i=r.parent,s=r.sheet,o=r.jss,u=r.Renderer,a=r.generateId,h=r.scoped,l=c({classes:this.classes,parent:i,sheet:s,jss:o,Renderer:u,generateId:a,scoped:h},n);this.raw[e]=t,e in this.classes&&(l.selector="."+R(this.classes[e]));var d=p(e,t,l);if(!d)return null;this.register(d);var f=void 0===l.index?this.index.length:l.index;return this.index.splice(f,0,d),d},e.get=function(e){return this.map[e]},e.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.indexOf(e),1)},e.indexOf=function(e){return this.index.indexOf(e)},e.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},e.register=function(e){(this.map[e.key]=e)instanceof x?(this.map[e.selector]=e).id&&(this.classes[e.key]=e.id):e instanceof V&&this.keyframes&&(this.keyframes[e.name]=e.id)},e.unregister=function(e){delete this.map[e.key],e instanceof x?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof V&&delete this.keyframes[e.name]},e.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.onUpdate(t,this.get(e),n);else for(var r=0;r<this.index.length;r++)this.onUpdate(t,this.index[r],n)},e.onUpdate=function(e,t,n){void 0===n&&(n=$);var r=this.options,i=r.jss.plugins,s=r.sheet;if(t.rules instanceof l)t.rules.update(e,n);else{var o=t,u=o.style;if(i.onUpdate(e,t,s,n),n.process&&u&&u!==o.style)for(var a in i.onProcessStyle(o.style,o,s),o.style){var h=o.style[a];h!==u[a]&&o.prop(a,h,H)}}},e.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=0;i<this.index.length;i++){var s=this.index[i].toString(e);(s||r)&&(t&&(t+="\n"),t+=s)}return t},l}(),Q=function(){function e(e,t){for(var n in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=c({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),this.renderer=new t.Renderer(this),this.rules=new K(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached&&(this.renderer.detach(),this.attached=!1),this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed&&(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))):this.deployed=!1,i):null},t.insertRule=function(e){this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!this.attached||!t.renderable||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.toString=function(e){return this.rules.toString(e)},e}(),W=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=this.plugins.external.concat(this.plugins.internal).reduce(function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),X=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(t){return this.registry.filter(function(e){return e.attached}).map(function(e){return e.toString(t)}).join("\n")},f(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Y=new X,Z="2f1acc6c3a606b082e5eef5e54414ffb";null==s[Z]&&(s[Z]=0);var ee=s[Z]++,te=function(){var i=0;return function(e,t){i+=1;var n="c",r="";return t&&(n=t.options.classNamePrefix||"c",null!=t.options.jss.id&&(r+=t.options.jss.id)),""+n+ee+r+i}},ne=function(e){var t;return function(){return t||(t=e()),t}};function re(e,t){try{return"attributeStyleMap"in e?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}}function ie(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=m(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;"attributeStyleMap"in e?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(e){return!1}return!0}function se(e,t){try{"attributeStyleMap"in e?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){e.message}}function oe(e,t){return e.selectorText=t,e.selectorText===t}var ue=ne(function(){return document.querySelector("head")});function ae(e){var t=Y.registry;if(0<t.length){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;0<=n;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=ue(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var he=ne(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),le=function(e,t,n){void 0===n&&(n=e.cssRules.length);try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(e){return!1}return e.cssRules[n]},de=function(){function e(e){this.getPropertyValue=re,this.setProperty=ie,this.removeProperty=se,this.setSelector=oe,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&Y.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||document.createElement("style"),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var s=he();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){!this.element.parentNode&&this.sheet&&(!function(e,t){var n=t.insertionPoint,r=ae(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,s=i.parentNode;s&&s.insertBefore(e,i.nextSibling)}else ue().appendChild(e)}(this.element,this.sheet.options),this.hasInsertedRules&&(this.hasInsertedRules=!1,this.deploy()))},t.detach=function(){this.element.parentNode.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?e.rules.index.forEach(this.insertRule,this):this.element.textContent="\n"+e.toString()+"\n")},t.insertRule=function(e,t){var n=this.element.sheet;if("conditional"===e.type||"keyframes"===e.type){var r=e,i=le(n,r.toString({children:!1}),t);return!1!==i&&(r.rules.index.forEach(function(e,t){var n=le(i,e.toString(),t);!1!==n&&(e.renderable=n)}),i)}var s=e.toString();if(!s)return!1;var o=le(n,s,t);return!1!==o&&(this.hasInsertedRules=!0,e.renderable=o)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)},t.indexOf=function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),fe=function(){function e(){}var t=e.prototype;return t.setProperty=function(){return!0},t.getPropertyValue=function(){return""},t.removeProperty=function(){},t.setSelector=function(){return!0},t.attach=function(){},t.detach=function(){},t.deploy=function(){},t.insertRule=function(){return!1},t.deleteRule=function(){return!0},t.replaceRule=function(){return!1},t.getRules=function(){},t.indexOf=function(){return-1},e}(),ce=0,pe=function(){function e(e){this.id=ce++,this.version="10.0.0-alpha.4",this.plugins=new W,this.options={createGenerateId:te,Renderer:n?de:fe,plugins:[]},this.generateId=te();for(var t=0;t<L.length;t++)this.plugins.use(L[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId,this.generateId=e.createGenerateId()),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),(e.virtual||e.Renderer)&&(this.options.Renderer=e.Renderer||(e.virtual?fe:de)),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Y.index?0:Y.index+1);var r=new Q(e,c({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Y.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=c({},n,{jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=p(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(function(e){t.plugins.use(e)}),this},e}();var ye=function(){},ve=function(){function e(){this.sheets=[],this.refs=[],this.keys=[]}var t=e.prototype;return t.get=function(e){var t=this.keys.indexOf(e);return this.sheets[t]},t.add=function(e,t){var n=this.sheets,r=this.refs,i=this.keys,s=n.indexOf(t);return-1!==s?s:(n.push(t),r.push(0),i.push(e),n.length-1)},t.manage=function(e){var t=this.keys.indexOf(e),n=this.sheets[t];return 0===this.refs[t]&&n.attach(),this.refs[t]++,this.keys[t]||this.keys.splice(t,0,e),n},t.unmanage=function(e){var t=this.keys.indexOf(e);-1!==t?0<this.refs[t]&&(this.refs[t]--,0===this.refs[t]&&this.sheets[t].detach()):ye(!1,"SheetsManager: can't find sheet to unmanage")},f(e,[{key:"size",get:function(){return this.keys.length}}]),e}(),ge="undefined"!=typeof CSS&&CSS&&"number"in CSS,me=function(e){return new pe(e)},be=me();e.hasCSSTOMSupport=ge,e.create=me,e.default=be,e.getDynamicStyles=function e(t){var n=null;for(var r in t){var i=t[r],s=typeof i;if("function"===s)n||(n={}),n[r]=i;else if("object"===s&&null!==i&&!Array.isArray(i)){var o=e(i);o&&(n||(n={}),n[r]=o)}}return n},e.toCssValue=m,e.createRule=p,e.SheetsRegistry=X,e.SheetsManager=ve,e.RuleList=K,e.sheets=Y,e.createGenerateId=te,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.jss={})}(this,function(e){"use strict";function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n="object"===("undefined"==typeof window?"undefined":t(window))&&"object"===("undefined"==typeof document?"undefined":t(document))&&9===document.nodeType;var r,s="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==s?s:"undefined"!=typeof module?module:Function("return this")();var i,o,u=("function"==typeof(o=r.Symbol)?o.observable?i=o.observable:(i=o("observable"),o.observable=i):i="@@observable",i),a=Array.isArray,h=function(e){return e&&e[u]&&e===e[u]()};function l(e){if(null==e)return e;var t=typeof e;if("string"===t||"number"===t||"function"===t)return e;if(s.CSSStyleValue&&e instanceof s.CSSStyleValue)return e;if(a(e))return e.map(l);if(h(e))return e;var n={};for(var r in e){var i=e[r];"object"!=typeof i?n[r]=i:n[r]=l(i)}return n}function p(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=l(t),s=r.plugins.onCreateRule(e,i,n);return s||(e[0],null)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function y(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var g=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function m(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=g(e[r]," ");else n=g(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function b(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function R(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,s=void 0===i?0:i,o=t.fallbacks;if(e&&s++,o)if(Array.isArray(o))for(var u=0;u<o.length;u++){var a=o[u];for(var h in a){var l=a[h];null!=l&&(r&&(r+="\n"),r+=""+b(h+": "+m(l)+";",s))}}else for(var d in o){var f=o[d];null!=f&&(r&&(r+="\n"),r+=""+b(d+": "+m(f)+";",s))}for(var c in t){var p=t[c];null!=p&&"fallbacks"!==c&&(r&&(r+="\n"),r+=""+b(c+": "+m(p)+";",s))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),b(e+" {"+r,--s)+b("}",s)):r}var S=function(e){return e},k=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,this.renderer=r?r.renderer:new i}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];if(!(!!n&&n.force)&&this.style[e]===t)return this;var r=t;n&&!1===n.process||(r=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==r||!1===r,s=e in this.style;if(i&&!s)return this;var o=i&&s;if(o?delete this.style[e]:this.style[e]=r,this.renderable)return o?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,r),this;var u=this.options.sheet;return u&&u.attached,this},e}(),x=function(a){function e(e,t,n){var r;(r=a.call(this,e,t,n)||this).selectorText=void 0,r.id=void 0,r.renderable=void 0;var i=n.selector,s=n.scoped,o=n.sheet,u=n.generateId;return i?r.selectorText=i:!1!==s&&(r.id=u(v(v(r)),o),r.selectorText="."+S(r.id)),r}y(e,a);var t=e.prototype;return t.applyTo=function(e){var t=this.toJSON();for(var n in t)this.renderer.setProperty(e,n,t[n]);return this},t.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=m(n))}return e},t.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?c({},e,{allowEmpty:!0}):e;return R(this.selectorText,this.style,n)},f(e,[{key:"selector",set:function(e){e!==this.selectorText&&(this.selectorText=e,this.renderable&&(this.renderer.setSelector(this.renderable,e)||this.renderer.replaceRule(this.renderable,this)))},get:function(){return this.selectorText}}]),e}(k),P={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new x(e,t,n)}},w={indent:1,children:!0},j=/@([\w-]+)/,C=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=(this.key=e).match(j);for(var i in this.at=r?r[1]:"unknown",this.options=n,this.rules=new K(c({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=w),!1===e.children)return this.key+" {}";var t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""},e}(),O=/@media|@supports\s+/,A={onCreateRule:function(e,t,n){return O.test(e)?new C(e,t,n):null}},I={indent:1,children:!0},T=/@keyframes\s+([\w-]+)/,V=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=e.match(T);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name;var i=(this.options=n).scoped,s=n.sheet,o=n.generateId;for(var u in this.id=!1===i?this.name:o(this,s),this.rules=new K(c({},n,{parent:this})),t)this.rules.add(u,t[u],c({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=I),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),q=/@keyframes\s+/,N=/\$([\w-]+)/,E=function(e,t,n){var r=e[t];if("string"==typeof r){var i=N.exec(r);if(!i)return;i[1]in n?e[t]=r.replace(i[0],n[i[1]]):i[1]}},M={onCreateRule:function(e,t,n){return q.test(e)?new V(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n&&("animation-name"in e&&E(e,"animation-name",n.keyframes),"animation"in e&&E(e,"animation",n.keyframes)),e}},U=function(i){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))||this).renderable=void 0,e}return y(e,i),e.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?c({},e,{allowEmpty:!0}):e;return R(this.key,this.style,n)},e}(k),G={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new U(e,t,n):null}},_=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=R(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return R(this.key,this.style,e)},e}(),B={onCreateRule:function(e,t,n){return"@font-face"===e?new _(e,t,n):null}},J=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return R(this.key,this.style,e)},e}(),z={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new J(e,t,n):null}},D=function(){function e(e,t,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),F={"@charset":!0,"@import":!0,"@namespace":!0},L=[P,A,M,G,B,z,{onCreateRule:function(e,t,n){return e in F?new D(e,t,n):null}}],$={process:!0},H={force:!0,process:!0},K=function(){function l(e){this.map={},this.raw={},this.index=[],this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var e=l.prototype;return e.add=function(e,t,n){var r=this.options,i=r.parent,s=r.sheet,o=r.jss,u=r.Renderer,a=r.generateId,h=r.scoped,l=c({classes:this.classes,parent:i,sheet:s,jss:o,Renderer:u,generateId:a,scoped:h},n);this.raw[e]=t,e in this.classes&&(l.selector="."+S(this.classes[e]));var d=p(e,t,l);if(!d)return null;this.register(d);var f=void 0===l.index?this.index.length:l.index;return this.index.splice(f,0,d),d},e.get=function(e){return this.map[e]},e.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.indexOf(e),1)},e.indexOf=function(e){return this.index.indexOf(e)},e.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},e.register=function(e){(this.map[e.key]=e)instanceof x?(this.map[e.selector]=e).id&&(this.classes[e.key]=e.id):e instanceof V&&this.keyframes&&(this.keyframes[e.name]=e.id)},e.unregister=function(e){delete this.map[e.key],e instanceof x?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof V&&delete this.keyframes[e.name]},e.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.onUpdate(t,this.get(e),n);else for(var r=0;r<this.index.length;r++)this.onUpdate(t,this.index[r],n)},e.onUpdate=function(e,t,n){void 0===n&&(n=$);var r=this.options,i=r.jss.plugins,s=r.sheet;if(t.rules instanceof l)t.rules.update(e,n);else{var o=t,u=o.style;if(i.onUpdate(e,t,s,n),n.process&&u&&u!==o.style)for(var a in i.onProcessStyle(o.style,o,s),o.style){var h=o.style[a];h!==u[a]&&o.prop(a,h,H)}}},e.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=0;i<this.index.length;i++){var s=this.index[i].toString(e);(s||r)&&(t&&(t+="\n"),t+=s)}return t},l}(),Q=function(){function e(e,t){for(var n in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=c({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),this.renderer=new t.Renderer(this),this.rules=new K(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached&&(this.renderer.detach(),this.attached=!1),this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed&&(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))):this.deployed=!1,i):null},t.insertRule=function(e){this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!this.attached||!t.renderable||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.toString=function(e){return this.rules.toString(e)},e}(),W=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=this.plugins.external.concat(this.plugins.internal).reduce(function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),X=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(t){return this.registry.filter(function(e){return e.attached}).map(function(e){return e.toString(t)}).join("\n")},f(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Y=new X,Z="2f1acc6c3a606b082e5eef5e54414ffb";null==s[Z]&&(s[Z]=0);var ee=s[Z]++,te=function(){var i=0;return function(e,t){i+=1;var n="c",r="";return t&&(n=t.options.classNamePrefix||"c",null!=t.options.jss.id&&(r+=t.options.jss.id)),""+n+ee+r+i}},ne=function(e){var t;return function(){return t||(t=e()),t}};function re(e,t){try{return"attributeStyleMap"in e?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}}function ie(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=m(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;"attributeStyleMap"in e?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(e){return!1}return!0}function se(e,t){try{"attributeStyleMap"in e?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){e.message}}function oe(e,t){return e.selectorText=t,e.selectorText===t}var ue=ne(function(){return document.querySelector("head")});function ae(e){var t=Y.registry;if(0<t.length){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;0<=n;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=ue(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var he=ne(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),le=function(e,t,n){void 0===n&&(n=e.cssRules.length);try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(e){return!1}return e.cssRules[n]},de=function(){function e(e){this.getPropertyValue=re,this.setProperty=ie,this.removeProperty=se,this.setSelector=oe,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&Y.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||document.createElement("style"),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var s=he();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){!this.element.parentNode&&this.sheet&&(!function(e,t){var n=t.insertionPoint,r=ae(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,s=i.parentNode;s&&s.insertBefore(e,i.nextSibling)}else ue().appendChild(e)}(this.element,this.sheet.options),this.hasInsertedRules&&(this.hasInsertedRules=!1,this.deploy()))},t.detach=function(){this.element.parentNode.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?e.rules.index.forEach(this.insertRule,this):this.element.textContent="\n"+e.toString()+"\n")},t.insertRule=function(e,t){var n=this.element.sheet;if("conditional"===e.type||"keyframes"===e.type){var r=e,i=le(n,r.toString({children:!1}),t);return!1!==i&&(r.rules.index.forEach(function(e,t){var n=le(i,e.toString(),t);!1!==n&&(e.renderable=n)}),i)}var s=e.toString();if(!s)return!1;var o=le(n,s,t);return!1!==o&&(this.hasInsertedRules=!0,e.renderable=o)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)},t.indexOf=function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),fe=function(){function e(){}var t=e.prototype;return t.setProperty=function(){return!0},t.getPropertyValue=function(){return""},t.removeProperty=function(){},t.setSelector=function(){return!0},t.attach=function(){},t.detach=function(){},t.deploy=function(){},t.insertRule=function(){return!1},t.deleteRule=function(){return!0},t.replaceRule=function(){return!1},t.getRules=function(){},t.indexOf=function(){return-1},e}(),ce=0,pe=function(){function e(e){this.id=ce++,this.version="10.0.0-alpha.5",this.plugins=new W,this.options={createGenerateId:te,Renderer:n?de:fe,plugins:[]},this.generateId=te();for(var t=0;t<L.length;t++)this.plugins.use(L[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId,this.generateId=e.createGenerateId()),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),(e.virtual||e.Renderer)&&(this.options.Renderer=e.Renderer||(e.virtual?fe:de)),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Y.index?0:Y.index+1);var r=new Q(e,c({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Y.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=c({},n,{jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=p(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(function(e){t.plugins.use(e)}),this},e}();var ye=function(){function e(){this.sheets=[],this.refs=[],this.keys=[]}var t=e.prototype;return t.get=function(e){var t=this.keys.indexOf(e);return this.sheets[t]},t.add=function(e,t){var n=this.sheets,r=this.refs,i=this.keys,s=n.indexOf(t);return-1!==s?s:(n.push(t),r.push(0),i.push(e),n.length-1)},t.manage=function(e){var t=this.keys.indexOf(e),n=this.sheets[t];return 0===this.refs[t]&&n.attach(),this.refs[t]++,this.keys[t]||this.keys.splice(t,0,e),n},t.unmanage=function(e){var t=this.keys.indexOf(e);-1!==t&&0<this.refs[t]&&(this.refs[t]--,0===this.refs[t]&&this.sheets[t].detach())},f(e,[{key:"size",get:function(){return this.keys.length}}]),e}(),ve="undefined"!=typeof CSS&&CSS&&"number"in CSS,ge=function(e){return new pe(e)},me=ge();e.hasCSSTOMSupport=ve,e.create=ge,e.default=me,e.getDynamicStyles=function e(t){var n=null;for(var r in t){var i=t[r],s=typeof i;if("function"===s)n||(n={}),n[r]=i;else if("object"===s&&null!==i&&!Array.isArray(i)){var o=e(i);o&&(n||(n={}),n[r]=o)}}return n},e.toCssValue=m,e.createRule=p,e.SheetsRegistry=X,e.SheetsManager=ye,e.RuleList=K,e.sheets=Y,e.createGenerateId=te,Object.defineProperty(e,"__esModule",{value:!0})}); |
{ | ||
"name": "jss", | ||
"description": "A lib for generating Style Sheets with JavaScript.", | ||
"version": "10.0.0-alpha.4", | ||
"version": "10.0.0-alpha.5", | ||
"license": "MIT", | ||
@@ -48,3 +48,3 @@ "homepage": "https://cssinjs.org/", | ||
}, | ||
"gitHead": "4efd47a4af45de9c8784d68f3a239f9a1d29c942" | ||
"gitHead": "37ddf2a900aae0d9bdc9a559e97fe40c7a4f716a" | ||
} |
/* @flow */ | ||
import warn from 'warning' | ||
import warn from 'tiny-warning' | ||
import type StyleSheet from './StyleSheet' | ||
@@ -4,0 +4,0 @@ |
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
426481
9481