bootstrap
Version:
The most popular front-end framework for developing responsive, mobile first projects on the web.
1,544 lines (1,265 loc) • 964 kB
JavaScript
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.autoprefixer=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function() {
var Autoprefixer, Browsers, Prefixes, autoprefixer, infoCache, isPlainObject, postcss,
__slice = [].slice,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
postcss = require('postcss');
Browsers = require('./browsers');
Prefixes = require('./prefixes');
infoCache = null;
isPlainObject = function(obj) {
return Object.prototype.toString.apply(obj) === '[object Object]';
};
autoprefixer = function() {
var browsers, options, prefixes, reqs;
reqs = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
if (reqs.length === 1 && isPlainObject(reqs[0])) {
options = reqs[0];
reqs = void 0;
} else if (reqs.length === 0 || (reqs.length === 1 && (reqs[0] == null))) {
reqs = void 0;
} else if (reqs.length <= 2 && (reqs[0] instanceof Array || (reqs[0] == null))) {
options = reqs[1];
reqs = reqs[0];
} else if (typeof reqs[reqs.length - 1] === 'object') {
options = reqs.pop();
}
if ((options != null ? options.browsers : void 0) != null) {
reqs = options.browsers;
} else if (reqs) {
if (typeof console !== "undefined" && console !== null) {
console.warn('autoprefixer: autoprefixer(browsers) is deprecated ' + 'and will be removed in 3.1. ' + 'Use autoprefixer({ browsers: browsers }).');
}
}
if (reqs == null) {
reqs = autoprefixer["default"];
}
browsers = new Browsers(autoprefixer.data.browsers, reqs);
prefixes = new Prefixes(autoprefixer.data.prefixes, browsers, options);
return new Autoprefixer(prefixes, autoprefixer.data, options);
};
autoprefixer.data = {
browsers: require('../data/browsers'),
prefixes: require('../data/prefixes')
};
Autoprefixer = (function() {
function Autoprefixer(prefixes, data, options) {
this.prefixes = prefixes;
this.data = data;
this.options = options != null ? options : {};
this.postcss = __bind(this.postcss, this);
this.browsers = this.prefixes.browsers.selected;
}
Autoprefixer.prototype.process = function(str, options) {
if (options == null) {
options = {};
}
return this.processor().process(str, options);
};
Autoprefixer.prototype.postcss = function(css) {
if (this.options.remove !== false) {
this.prefixes.processor.remove(css);
}
return this.prefixes.processor.add(css);
};
Autoprefixer.prototype.info = function() {
infoCache || (infoCache = require('./info'));
return infoCache(this.prefixes);
};
Autoprefixer.prototype.processor = function() {
return this.processorCache || (this.processorCache = postcss(this.postcss));
};
return Autoprefixer;
})();
autoprefixer["default"] = ['> 1%', 'last 2 versions', 'Firefox ESR', 'Opera 12.1'];
autoprefixer.loadDefault = function() {
return this.defaultCache || (this.defaultCache = autoprefixer({
browsers: this["default"]
}));
};
autoprefixer.process = function(str, options) {
if (options == null) {
options = {};
}
return this.loadDefault().process(str, options);
};
autoprefixer.postcss = function(css) {
return autoprefixer.loadDefault().postcss(css);
};
autoprefixer.info = function() {
return this.loadDefault().info();
};
module.exports = autoprefixer;
}).call(this);
},{"../data/browsers":2,"../data/prefixes":3,"./browsers":4,"./info":33,"./prefixes":38,"postcss":92}],2:[function(require,module,exports){
(function() {
var convert, data, intervals, major, name, names, normalize, _ref;
names = ['firefox', 'chrome', 'safari', 'ios_saf', 'opera', 'ie', 'bb', 'android'];
major = ['firefox', 'chrome', 'safari', 'ios_saf', 'opera', 'android', 'ie', 'ie_mob'];
normalize = function(array) {
return array.reverse().filter(function(i) {
return i;
});
};
intervals = function(array) {
var i, interval, result, splited, sub, _i, _len;
result = [];
for (_i = 0, _len = array.length; _i < _len; _i++) {
interval = array[_i];
splited = interval.split('-');
splited = splited.sort().reverse();
sub = (function() {
var _j, _len1, _results;
_results = [];
for (_j = 0, _len1 = splited.length; _j < _len1; _j++) {
i = splited[_j];
_results.push([i, interval, splited.length]);
}
return _results;
})();
result = result.concat(sub);
}
return result;
};
convert = function(name, data) {
var future, result, versions;
future = normalize(data.versions.slice(-3));
versions = intervals(normalize(data.versions.slice(0, -3)));
result = {};
result.prefix = name === 'opera' ? '-o-' : "-" + data.prefix + "-";
if (major.indexOf(name) === -1) {
result.minor = true;
}
if (future.length) {
result.future = future;
}
result.versions = versions.map(function(i) {
return i[0];
});
result.popularity = versions.map(function(i) {
return data.usage_global[i[1]] / i[2];
});
return result;
};
module.exports = {};
_ref = require('caniuse-db/data').agents;
for (name in _ref) {
data = _ref[name];
module.exports[name] = convert(name, data);
}
}).call(this);
},{"caniuse-db/data":51}],3:[function(require,module,exports){
(function() {
var browsers, feature, map, prefix, textDecoration,
__slice = [].slice;
browsers = require('./browsers');
feature = function(data, opts, callback) {
var browser, interval, match, need, sorted, support, version, versions, _i, _len, _ref, _ref1, _ref2;
if (!callback) {
_ref = [opts, {}], callback = _ref[0], opts = _ref[1];
}
match = opts.full ? /y\sx($|\s)/ : /\sx($|\s)/;
need = [];
_ref1 = data.stats;
for (browser in _ref1) {
versions = _ref1[browser];
for (interval in versions) {
support = versions[interval];
_ref2 = interval.split('-');
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
version = _ref2[_i];
if (browsers[browser] && support.match(match)) {
version = version.replace(/\.0$/, '');
need.push(browser + ' ' + version);
}
}
}
}
sorted = need.sort(function(a, b) {
a = a.split(' ');
b = b.split(' ');
if (a[0] > b[0]) {
return 1;
} else if (a[0] < b[0]) {
return -1;
} else {
return parseFloat(a[1]) - parseFloat(b[1]);
}
});
return callback(sorted);
};
map = function(browsers, callback) {
var browser, name, version, _i, _len, _ref, _results;
_results = [];
for (_i = 0, _len = browsers.length; _i < _len; _i++) {
browser = browsers[_i];
_ref = browser.split(' '), name = _ref[0], version = _ref[1];
version = parseFloat(version);
_results.push(callback(browser, name, version));
}
return _results;
};
prefix = function() {
var data, name, names, _i, _j, _len, _results;
names = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), data = arguments[_i++];
_results = [];
for (_j = 0, _len = names.length; _j < _len; _j++) {
name = names[_j];
_results.push(module.exports[name] = data);
}
return _results;
};
module.exports = {};
feature(require('caniuse-db/features-json/border-radius'), function(browsers) {
return prefix('border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius', {
mistakes: ['-ms-'],
browsers: browsers,
transition: true
});
});
feature(require('caniuse-db/features-json/css-boxshadow'), function(browsers) {
return prefix('box-shadow', {
browsers: browsers,
transition: true
});
});
feature(require('caniuse-db/features-json/css-animation'), function(browsers) {
return prefix('animation', 'animation-name', 'animation-duration', 'animation-delay', 'animation-direction', 'animation-fill-mode', 'animation-iteration-count', 'animation-play-state', 'animation-timing-function', '@keyframes', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-transitions'), function(browsers) {
return prefix('transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function', {
mistakes: ['-ms-'],
browsers: browsers
});
});
feature(require('caniuse-db/features-json/transforms2d'), function(browsers) {
return prefix('transform', 'transform-origin', {
browsers: browsers,
transition: true
});
});
feature(require('caniuse-db/features-json/transforms3d'), function(browsers) {
prefix('perspective', 'perspective-origin', {
browsers: browsers,
transition: true
});
return prefix('transform-style', 'backface-visibility', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-gradients'), function(browsers) {
browsers = map(browsers, function(browser, name, version) {
if (name === 'android' && version < 4 || name === 'ios_saf' && version < 5 || name === 'safari' && version < 5.1) {
return browser + ' old';
} else {
return browser;
}
});
return prefix('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', {
props: ['background', 'background-image', 'border-image'],
mistakes: ['-ms-'],
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css3-boxsizing'), function(browsers) {
return prefix('box-sizing', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-filters'), function(browsers) {
return prefix('filter', {
browsers: browsers,
transition: true
});
});
feature(require('caniuse-db/features-json/multicolumn'), function(browsers) {
prefix('columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', {
browsers: browsers,
transition: true
});
return prefix('column-count', 'column-rule-style', 'column-span', 'column-fill', 'break-before', 'break-after', 'break-inside', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/user-select-none'), function(browsers) {
return prefix('user-select', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/flexbox'), function(browsers) {
browsers = map(browsers, function(browser, name, version) {
if (name === 'safari' && version < 6.1) {
return browser + ' 2009';
} else if (name === 'ios_saf' && version < 7) {
return browser + ' 2009';
} else if (name === 'chrome' && version < 21) {
return browser + ' 2009';
} else if (name === 'android' && version < 4.4) {
return browser + ' 2009';
} else {
return browser;
}
});
prefix('display-flex', 'inline-flex', {
props: ['display'],
browsers: browsers
});
prefix('flex', 'flex-grow', 'flex-shrink', 'flex-basis', {
transition: true,
browsers: browsers
});
return prefix('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/calc'), function(browsers) {
return prefix('calc', {
props: ['*'],
browsers: browsers
});
});
feature(require('caniuse-db/features-json/background-img-opts'), function(browsers) {
return prefix('background-clip', 'background-origin', 'background-size', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/font-feature'), function(browsers) {
return prefix('font-feature-settings', 'font-variant-ligatures', 'font-language-override', 'font-kerning', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/border-image'), function(browsers) {
return prefix('border-image', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-selection'), function(browsers) {
return prefix('::selection', {
selector: true,
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-placeholder'), function(browsers) {
browsers = map(browsers, function(browser, name, version) {
if (name === 'firefox' && version <= 18) {
return browser + ' old';
} else {
return browser;
}
});
return prefix('::placeholder', {
selector: true,
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-hyphens'), function(browsers) {
return prefix('hyphens', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/fullscreen'), function(browsers) {
return prefix(':fullscreen', {
selector: true,
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css3-tabsize'), function(browsers) {
return prefix('tab-size', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/intrinsic-width'), function(browsers) {
return prefix('max-content', 'min-content', 'fit-content', 'fill-available', {
props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height'],
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css3-cursors-newer'), function(browsers) {
prefix('zoom-in', 'zoom-out', {
props: ['cursor'],
browsers: browsers.concat(['chrome 3'])
});
return prefix('grab', 'grabbing', {
props: ['cursor'],
browsers: browsers.concat(['firefox 24', 'firefox 25', 'firefox 26'])
});
});
feature(require('caniuse-db/features-json/css-sticky'), function(browsers) {
return prefix('sticky', {
props: ['position'],
browsers: browsers
});
});
feature(require('caniuse-db/features-json/pointer'), function(browsers) {
return prefix('touch-action', {
browsers: browsers
});
});
textDecoration = require('caniuse-db/features-json/text-decoration');
feature(textDecoration, function(browsers) {
return prefix('text-decoration-style', {
browsers: browsers
});
});
feature(textDecoration, {
full: true
}, function(browsers) {
return prefix('text-decoration-line', 'text-decoration-color', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/text-size-adjust'), function(browsers) {
return prefix('text-size-adjust', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-masks'), function(browsers) {
return prefix('clip-path', 'mask', 'mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-position', 'mask-repeat', 'mask-size', {
browsers: browsers
});
});
feature(require('caniuse-db/features-json/css-boxdecorationbreak'), function(brwsrs) {
return prefix('box-decoration-break', {
browsers: brwsrs
});
});
}).call(this);
},{"./browsers":2,"caniuse-db/features-json/background-img-opts":52,"caniuse-db/features-json/border-image":53,"caniuse-db/features-json/border-radius":54,"caniuse-db/features-json/calc":55,"caniuse-db/features-json/css-animation":56,"caniuse-db/features-json/css-boxdecorationbreak":57,"caniuse-db/features-json/css-boxshadow":58,"caniuse-db/features-json/css-filters":59,"caniuse-db/features-json/css-gradients":60,"caniuse-db/features-json/css-hyphens":61,"caniuse-db/features-json/css-masks":62,"caniuse-db/features-json/css-placeholder":63,"caniuse-db/features-json/css-selection":64,"caniuse-db/features-json/css-sticky":65,"caniuse-db/features-json/css-transitions":66,"caniuse-db/features-json/css3-boxsizing":67,"caniuse-db/features-json/css3-cursors-newer":68,"caniuse-db/features-json/css3-tabsize":69,"caniuse-db/features-json/flexbox":70,"caniuse-db/features-json/font-feature":71,"caniuse-db/features-json/fullscreen":72,"caniuse-db/features-json/intrinsic-width":73,"caniuse-db/features-json/multicolumn":74,"caniuse-db/features-json/pointer":75,"caniuse-db/features-json/text-decoration":76,"caniuse-db/features-json/text-size-adjust":77,"caniuse-db/features-json/transforms2d":78,"caniuse-db/features-json/transforms3d":79,"caniuse-db/features-json/user-select-none":80}],4:[function(require,module,exports){
(function() {
var Browsers, utils;
utils = require('./utils');
Browsers = (function() {
Browsers.prefixes = function() {
var data, i, name;
if (this.prefixesCache) {
return this.prefixesCache;
}
data = require('../data/browsers');
return this.prefixesCache = utils.uniq((function() {
var _results;
_results = [];
for (name in data) {
i = data[name];
_results.push(i.prefix);
}
return _results;
})()).sort(function(a, b) {
return b.length - a.length;
});
};
Browsers.withPrefix = function(value) {
if (!this.prefixesRegexp) {
this.prefixesRegexp = RegExp("" + (this.prefixes().join('|')));
}
return this.prefixesRegexp.test(value);
};
function Browsers(data, requirements) {
this.data = data;
this.selected = this.parse(requirements);
}
Browsers.prototype.parse = function(requirements) {
var selected;
if (!(requirements instanceof Array)) {
requirements = [requirements];
}
selected = [];
requirements.map((function(_this) {
return function(req) {
var i, match, name, _ref;
_ref = _this.requirements;
for (name in _ref) {
i = _ref[name];
if (match = req.match(i.regexp)) {
selected = selected.concat(i.select.apply(_this, match.slice(1)));
return;
}
}
return utils.error("Unknown browser requirement `" + req + "`");
};
})(this));
return utils.uniq(selected);
};
Browsers.prototype.aliases = {
fx: 'firefox',
ff: 'firefox',
ios: 'ios_saf',
explorer: 'ie',
blackberry: 'bb',
explorermobile: 'ie_mob',
operamini: 'op_mini',
operamobile: 'op_mob',
chromeandroid: 'and_chr',
firefoxandroid: 'and_ff'
};
Browsers.prototype.requirements = {
none: {
regexp: /^none$/i,
select: function() {
if (typeof console !== "undefined" && console !== null) {
console.warn("autoprefixer(\'none\') is deprecated and will be " + 'removed in 3.1. ' + 'Use autoprefixer({ browsers: [] })');
}
return [];
}
},
lastVersions: {
regexp: /^last (\d+) versions?$/i,
select: function(versions) {
return this.browsers(function(data) {
if (data.minor) {
return [];
} else {
return data.versions.slice(0, versions);
}
});
}
},
lastByBrowser: {
regexp: /^last (\d+) (\w+) versions?$/i,
select: function(versions, browser) {
var data;
data = this.byName(browser);
return data.versions.slice(0, versions).map(function(v) {
return "" + data.name + " " + v;
});
}
},
globalStatistics: {
regexp: /^> (\d+(\.\d+)?)%$/,
select: function(popularity) {
return this.browsers(function(data) {
if (data.minor) {
return [];
} else {
return data.versions.filter(function(version, i) {
return data.popularity[i] > popularity;
});
}
});
}
},
newerThan: {
regexp: /^(\w+) (>=?)\s*([\d\.]+)/,
select: function(browser, sign, version) {
var data, filter;
data = this.byName(browser);
version = parseFloat(version);
if (sign === '>') {
filter = function(v) {
return v > version;
};
} else if (sign === '>=') {
filter = function(v) {
return v >= version;
};
}
return data.versions.filter(filter).map(function(v) {
return "" + data.name + " " + v;
});
}
},
olderThan: {
regexp: /^(\w+) (<=?)\s*([\d\.]+)/,
select: function(browser, sign, version) {
var data, filter;
data = this.byName(browser);
version = parseFloat(version);
if (sign === '<') {
filter = function(v) {
return v < version;
};
} else if (sign === '<=') {
filter = function(v) {
return v <= version;
};
}
return data.versions.filter(filter).map(function(v) {
return "" + data.name + " " + v;
});
}
},
esr: {
regexp: /^(firefox|ff|fx) esr$/i,
select: function() {
return ['firefox 31'];
}
},
direct: {
regexp: /^(\w+) ([\d\.]+)$/,
select: function(browser, version) {
var data, first, last;
data = this.byName(browser);
version = parseFloat(version);
last = data.future ? data.future[0] : data.versions[0];
first = data.versions[data.versions.length - 1];
if (version > last) {
version = last;
} else if (version < first) {
version = first;
}
return ["" + data.name + " " + version];
}
}
};
Browsers.prototype.browsers = function(criteria) {
var browser, data, selected, versions, _ref;
selected = [];
_ref = this.data;
for (browser in _ref) {
data = _ref[browser];
versions = criteria(data).map(function(version) {
return "" + browser + " " + version;
});
selected = selected.concat(versions);
}
return selected;
};
Browsers.prototype.prefix = function(browser) {
var name, version, _ref;
_ref = browser.split(' '), name = _ref[0], version = _ref[1];
if (name === 'opera' && parseFloat(version) >= 15) {
return '-webkit-';
} else {
return this.data[name].prefix;
}
};
Browsers.prototype.isSelected = function(browser) {
return this.selected.indexOf(browser) !== -1;
};
Browsers.prototype.byName = function(name) {
var data;
name = name.toLowerCase();
name = this.aliases[name] || name;
data = this.data[name];
if (!data) {
utils.error("Unknown browser " + browser);
}
data.name = name;
return data;
};
return Browsers;
})();
module.exports = Browsers;
}).call(this);
},{"../data/browsers":2,"./utils":42}],5:[function(require,module,exports){
(function() {
var Browsers, Declaration, Prefixer, utils, vendor,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Prefixer = require('./prefixer');
Browsers = require('./browsers');
vendor = require('postcss/lib/vendor');
utils = require('./utils');
Declaration = (function(_super) {
__extends(Declaration, _super);
function Declaration() {
return Declaration.__super__.constructor.apply(this, arguments);
}
Declaration.prototype.check = function(decl) {
return true;
};
Declaration.prototype.prefixed = function(prop, prefix) {
return prefix + prop;
};
Declaration.prototype.normalize = function(prop) {
return prop;
};
Declaration.prototype.otherPrefixes = function(value, prefix) {
var other, _i, _len, _ref;
_ref = Browsers.prefixes();
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
other = _ref[_i];
if (other === prefix) {
continue;
}
if (value.indexOf(other) !== -1) {
return true;
}
}
return false;
};
Declaration.prototype.set = function(decl, prefix) {
decl.prop = this.prefixed(decl.prop, prefix);
return decl;
};
Declaration.prototype.needCascade = function(decl) {
return decl._autoprefixerCascade || (decl._autoprefixerCascade = this.all.options.cascade !== false && decl.before.indexOf("\n") !== -1);
};
Declaration.prototype.maxPrefixed = function(prefixes, decl) {
var max, prefix, _i, _len;
if (decl._autoprefixerMax) {
return decl._autoprefixerMax;
}
max = 0;
for (_i = 0, _len = prefixes.length; _i < _len; _i++) {
prefix = prefixes[_i];
prefix = utils.removeNote(prefix);
if (prefix.length > max) {
max = prefix.length;
}
}
return decl._autoprefixerMax = max;
};
Declaration.prototype.calcBefore = function(prefixes, decl, prefix) {
var before, diff, i, max, _i;
if (prefix == null) {
prefix = '';
}
before = decl.before;
max = this.maxPrefixed(prefixes, decl);
diff = max - utils.removeNote(prefix).length;
for (i = _i = 0; 0 <= diff ? _i < diff : _i > diff; i = 0 <= diff ? ++_i : --_i) {
before += ' ';
}
return before;
};
Declaration.prototype.restoreBefore = function(decl) {
var lines, min;
lines = decl.before.split("\n");
min = lines[lines.length - 1];
this.all.group(decl).up(function(prefixed) {
var array, last;
array = prefixed.before.split("\n");
last = array[array.length - 1];
if (last.length < min.length) {
return min = last;
}
});
lines[lines.length - 1] = min;
return decl.before = lines.join("\n");
};
Declaration.prototype.insert = function(decl, prefix, prefixes) {
var cloned;
cloned = this.set(this.clone(decl), prefix);
if (!cloned) {
return;
}
if (this.needCascade(decl)) {
cloned.before = this.calcBefore(prefixes, decl, prefix);
}
return decl.parent.insertBefore(decl, cloned);
};
Declaration.prototype.add = function(decl, prefix, prefixes) {
var already, prefixed;
prefixed = this.prefixed(decl.prop, prefix);
already = this.all.group(decl).up(function(i) {
return i.prop === prefixed;
});
already || (already = this.all.group(decl).down(function(i) {
return i.prop === prefixed;
}));
if (already || this.otherPrefixes(decl.value, prefix)) {
return;
}
return this.insert(decl, prefix, prefixes);
};
Declaration.prototype.process = function(decl) {
var prefixes;
if (this.needCascade(decl)) {
prefixes = Declaration.__super__.process.apply(this, arguments);
if (prefixes != null ? prefixes.length : void 0) {
this.restoreBefore(decl);
return decl.before = this.calcBefore(prefixes, decl);
}
} else {
return Declaration.__super__.process.apply(this, arguments);
}
};
Declaration.prototype.old = function(prop, prefix) {
return [this.prefixed(prop, prefix)];
};
return Declaration;
})(Prefixer);
module.exports = Declaration;
}).call(this);
},{"./browsers":4,"./prefixer":37,"./utils":42,"postcss/lib/vendor":98}],6:[function(require,module,exports){
(function() {
var AlignContent, Declaration, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
AlignContent = (function(_super) {
__extends(AlignContent, _super);
function AlignContent() {
return AlignContent.__super__.constructor.apply(this, arguments);
}
AlignContent.names = ['align-content', 'flex-line-pack'];
AlignContent.oldValues = {
'flex-end': 'end',
'flex-start': 'start',
'space-between': 'justify',
'space-around': 'distribute'
};
AlignContent.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return prefix + 'flex-line-pack';
} else {
return AlignContent.__super__.prefixed.apply(this, arguments);
}
};
AlignContent.prototype.normalize = function(prop) {
return 'align-content';
};
AlignContent.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2012) {
decl.value = AlignContent.oldValues[decl.value] || decl.value;
return AlignContent.__super__.set.call(this, decl, prefix);
} else if (spec === 'final') {
return AlignContent.__super__.set.apply(this, arguments);
}
};
return AlignContent;
})(Declaration);
module.exports = AlignContent;
}).call(this);
},{"../declaration":5,"./flex-spec":22}],7:[function(require,module,exports){
(function() {
var AlignItems, Declaration, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
AlignItems = (function(_super) {
__extends(AlignItems, _super);
function AlignItems() {
return AlignItems.__super__.constructor.apply(this, arguments);
}
AlignItems.names = ['align-items', 'flex-align', 'box-align'];
AlignItems.oldValues = {
'flex-end': 'end',
'flex-start': 'start'
};
AlignItems.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return prefix + 'box-align';
} else if (spec === 2012) {
return prefix + 'flex-align';
} else {
return AlignItems.__super__.prefixed.apply(this, arguments);
}
};
AlignItems.prototype.normalize = function(prop) {
return 'align-items';
};
AlignItems.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2009 || spec === 2012) {
decl.value = AlignItems.oldValues[decl.value] || decl.value;
return AlignItems.__super__.set.call(this, decl, prefix);
} else {
return AlignItems.__super__.set.apply(this, arguments);
}
};
return AlignItems;
})(Declaration);
module.exports = AlignItems;
}).call(this);
},{"../declaration":5,"./flex-spec":22}],8:[function(require,module,exports){
(function() {
var AlignSelf, Declaration, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
AlignSelf = (function(_super) {
__extends(AlignSelf, _super);
function AlignSelf() {
return AlignSelf.__super__.constructor.apply(this, arguments);
}
AlignSelf.names = ['align-self', 'flex-item-align'];
AlignSelf.oldValues = {
'flex-end': 'end',
'flex-start': 'start'
};
AlignSelf.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return prefix + 'flex-item-align';
} else {
return AlignSelf.__super__.prefixed.apply(this, arguments);
}
};
AlignSelf.prototype.normalize = function(prop) {
return 'align-self';
};
AlignSelf.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2012) {
decl.value = AlignSelf.oldValues[decl.value] || decl.value;
return AlignSelf.__super__.set.call(this, decl, prefix);
} else if (spec === 'final') {
return AlignSelf.__super__.set.apply(this, arguments);
}
};
return AlignSelf;
})(Declaration);
module.exports = AlignSelf;
}).call(this);
},{"../declaration":5,"./flex-spec":22}],9:[function(require,module,exports){
(function() {
var BackgroundSize, Declaration,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
BackgroundSize = (function(_super) {
__extends(BackgroundSize, _super);
function BackgroundSize() {
return BackgroundSize.__super__.constructor.apply(this, arguments);
}
BackgroundSize.names = ['background-size'];
BackgroundSize.prototype.set = function(decl, prefix) {
var value;
value = decl.value.toLowerCase();
if (prefix === '-webkit-' && value.indexOf(' ') === -1 && value !== 'contain' && value !== 'cover') {
decl.value = decl.value + ' ' + decl.value;
}
return BackgroundSize.__super__.set.call(this, decl, prefix);
};
return BackgroundSize;
})(Declaration);
module.exports = BackgroundSize;
}).call(this);
},{"../declaration":5}],10:[function(require,module,exports){
(function() {
var BorderImage, Declaration,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
BorderImage = (function(_super) {
__extends(BorderImage, _super);
function BorderImage() {
return BorderImage.__super__.constructor.apply(this, arguments);
}
BorderImage.names = ['border-image'];
BorderImage.prototype.set = function(decl, prefix) {
decl.value = decl.value.replace(/\s+fill(\s)/, '$1');
return BorderImage.__super__.set.call(this, decl, prefix);
};
return BorderImage;
})(Declaration);
module.exports = BorderImage;
}).call(this);
},{"../declaration":5}],11:[function(require,module,exports){
(function() {
var BorderRadius, Declaration,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
BorderRadius = (function(_super) {
var hor, mozilla, normal, ver, _i, _j, _len, _len1, _ref, _ref1;
__extends(BorderRadius, _super);
function BorderRadius() {
return BorderRadius.__super__.constructor.apply(this, arguments);
}
BorderRadius.names = ['border-radius'];
BorderRadius.toMozilla = {};
BorderRadius.toNormal = {};
_ref = ['top', 'bottom'];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
ver = _ref[_i];
_ref1 = ['left', 'right'];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
hor = _ref1[_j];
normal = "border-" + ver + "-" + hor + "-radius";
mozilla = "border-radius-" + ver + hor;
BorderRadius.names.push(normal);
BorderRadius.names.push(mozilla);
BorderRadius.toMozilla[normal] = mozilla;
BorderRadius.toNormal[mozilla] = normal;
}
}
BorderRadius.prototype.prefixed = function(prop, prefix) {
if (prefix === '-moz-') {
return prefix + (BorderRadius.toMozilla[prop] || prop);
} else {
return BorderRadius.__super__.prefixed.apply(this, arguments);
}
};
BorderRadius.prototype.normalize = function(prop) {
return BorderRadius.toNormal[prop] || prop;
};
return BorderRadius;
})(Declaration);
module.exports = BorderRadius;
}).call(this);
},{"../declaration":5}],12:[function(require,module,exports){
(function() {
var BreakInside, Declaration,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
BreakInside = (function(_super) {
__extends(BreakInside, _super);
function BreakInside() {
return BreakInside.__super__.constructor.apply(this, arguments);
}
BreakInside.names = ['break-inside', 'page-break-inside', 'column-break-inside'];
BreakInside.prototype.prefixed = function(prop, prefix) {
if (prefix === '-webkit-') {
return prefix + 'column-break-inside';
} else if (prefix === '-moz-') {
return 'page-break-inside';
} else {
return BreakInside.__super__.prefixed.apply(this, arguments);
}
};
BreakInside.prototype.normalize = function() {
return 'break-inside';
};
BreakInside.prototype.set = function(decl, prefix) {
if (decl.value === 'avoid-column' || decl.value === 'avoid-page') {
decl.value = 'avoid';
}
return BreakInside.__super__.set.apply(this, arguments);
};
BreakInside.prototype.insert = function(decl, prefix, prefixes) {
if (decl.value === 'avoid-region') {
} else if (decl.value === 'avoid-page' && prefix === '-webkit-') {
} else {
return BreakInside.__super__.insert.apply(this, arguments);
}
};
return BreakInside;
})(Declaration);
module.exports = BreakInside;
}).call(this);
},{"../declaration":5}],13:[function(require,module,exports){
(function() {
var DisplayFlex, OldDisplayFlex, OldValue, Value, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
OldValue = require('../old-value');
Value = require('../value');
OldDisplayFlex = (function(_super) {
__extends(OldDisplayFlex, _super);
function OldDisplayFlex(name) {
this.name = name;
}
OldDisplayFlex.prototype.check = function(value) {
return value === this.name;
};
return OldDisplayFlex;
})(OldValue);
DisplayFlex = (function(_super) {
__extends(DisplayFlex, _super);
DisplayFlex.names = ['display-flex', 'inline-flex'];
function DisplayFlex(name, prefixes) {
DisplayFlex.__super__.constructor.apply(this, arguments);
if (name === 'display-flex') {
this.name = 'flex';
}
}
DisplayFlex.prototype.check = function(decl) {
return decl.value === this.name;
};
DisplayFlex.prototype.prefixed = function(prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
return prefix + (spec === 2009 ? this.name === 'flex' ? 'box' : 'inline-box' : spec === 2012 ? this.name === 'flex' ? 'flexbox' : 'inline-flexbox' : spec === 'final' ? this.name : void 0);
};
DisplayFlex.prototype.replace = function(string, prefix) {
return this.prefixed(prefix);
};
DisplayFlex.prototype.old = function(prefix) {
var prefixed;
prefixed = this.prefixed(prefix);
if (prefixed) {
return new OldValue(prefixed);
}
};
return DisplayFlex;
})(Value);
module.exports = DisplayFlex;
}).call(this);
},{"../old-value":36,"../value":43,"./flex-spec":22}],14:[function(require,module,exports){
(function() {
var FillAvailable, OldValue, Value,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
OldValue = require('../old-value');
Value = require('../value');
FillAvailable = (function(_super) {
__extends(FillAvailable, _super);
function FillAvailable() {
return FillAvailable.__super__.constructor.apply(this, arguments);
}
FillAvailable.names = ['fill-available'];
FillAvailable.prototype.replace = function(string, prefix) {
if (prefix === '-moz-') {
return string.replace(this.regexp(), '$1-moz-available$3');
} else {
return FillAvailable.__super__.replace.apply(this, arguments);
}
};
FillAvailable.prototype.old = function(prefix) {
if (prefix === '-moz-') {
return new OldValue('-moz-available');
} else {
return FillAvailable.__super__.old.apply(this, arguments);
}
};
return FillAvailable;
})(Value);
module.exports = FillAvailable;
}).call(this);
},{"../old-value":36,"../value":43}],15:[function(require,module,exports){
(function() {
var FilterValue, Value,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Value = require('../value');
FilterValue = (function(_super) {
__extends(FilterValue, _super);
function FilterValue() {
return FilterValue.__super__.constructor.apply(this, arguments);
}
FilterValue.names = ['filter'];
FilterValue.prototype.replace = function(value, prefix) {
if (prefix === '-webkit-') {
if (value.indexOf('-webkit-filter') === -1) {
return FilterValue.__super__.replace.apply(this, arguments) + ', ' + value;
} else {
return value;
}
} else {
return FilterValue.__super__.replace.apply(this, arguments);
}
};
return FilterValue;
})(Value);
module.exports = FilterValue;
}).call(this);
},{"../value":43}],16:[function(require,module,exports){
(function() {
var Declaration, Filter,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
Filter = (function(_super) {
__extends(Filter, _super);
function Filter() {
return Filter.__super__.constructor.apply(this, arguments);
}
Filter.names = ['filter'];
Filter.prototype.check = function(decl) {
var v;
v = decl.value;
return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1 && v.indexOf('data:image/svg+xml') === -1;
};
return Filter;
})(Declaration);
module.exports = Filter;
}).call(this);
},{"../declaration":5}],17:[function(require,module,exports){
(function() {
var Declaration, FlexBasis, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
FlexBasis = (function(_super) {
__extends(FlexBasis, _super);
function FlexBasis() {
return FlexBasis.__super__.constructor.apply(this, arguments);
}
FlexBasis.names = ['flex-basis', 'flex-preferred-size'];
FlexBasis.prototype.normalize = function() {
return 'flex-basis';
};
FlexBasis.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return prefix + 'flex-preferred-size';
} else {
return FlexBasis.__super__.prefixed.apply(this, arguments);
}
};
FlexBasis.prototype.set = function(decl, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012 || spec === 'final') {
return FlexBasis.__super__.set.apply(this, arguments);
}
};
return FlexBasis;
})(Declaration);
module.exports = FlexBasis;
}).call(this);
},{"../declaration":5,"./flex-spec":22}],18:[function(require,module,exports){
(function() {
var Declaration, FlexDirection, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
FlexDirection = (function(_super) {
__extends(FlexDirection, _super);
function FlexDirection() {
return FlexDirection.__super__.constructor.apply(this, arguments);
}
FlexDirection.names = ['flex-direction', 'box-direction', 'box-orient'];
FlexDirection.prototype.normalize = function(prop) {
return 'flex-direction';
};
FlexDirection.prototype.insert = function(decl, prefix, prefixes) {
var already, cloned, dir, orient, spec, value, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
already = decl.parent.some(function(i) {
return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
});
if (already) {
return;
}
value = decl.value;
orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
cloned = this.clone(decl);
cloned.prop = prefix + 'box-orient';
cloned.value = orient;
if (this.needCascade(decl)) {
cloned.before = this.calcBefore(prefixes, decl, prefix);
}
decl.parent.insertBefore(decl, cloned);
cloned = this.clone(decl);
cloned.prop = prefix + 'box-direction';
cloned.value = dir;
if (this.needCascade(decl)) {
cloned.before = this.calcBefore(prefixes, decl, prefix);
}
return decl.parent.insertBefore(decl, cloned);
} else {
return FlexDirection.__super__.insert.apply(this, arguments);
}
};
FlexDirection.prototype.old = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return [prefix + 'box-orient', prefix + 'box-direction'];
} else {
return FlexDirection.__super__.old.apply(this, arguments);
}
};
return FlexDirection;
})(Declaration);
module.exports = FlexDirection;
}).call(this);
},{"../declaration":5,"./flex-spec":22}],19:[function(require,module,exports){
(function() {
var Declaration, FlexFlow, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = pare