(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.autoprefixer = f()}})(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 b[0]) { return 1; } else if (a[0] < b[0]) { return -1; } else { d = parseFloat(a[1]) - parseFloat(b[1]); if (d > 0) { return 1; } else if (d < 0) { return -1; } else { return 0; } } }); }; feature = function(data, opts, callback) { var browser, match, need, ref, ref1, support, version, versions; if (!callback) { ref = [opts, {}], callback = ref[0], opts = ref[1]; } match = opts.match || /\sx($|\s)/; need = []; ref1 = data.stats; for (browser in ref1) { versions = ref1[browser]; for (version in versions) { support = versions[version]; if (support.match(match)) { need.push(browser + ' ' + version); } } } return callback(sort(need)); }; result = {}; prefix = function() { var data, i, j, k, len, name, names, results; names = 2 <= arguments.length ? slice.call(arguments, 0, j = arguments.length - 1) : (j = 0, []), data = arguments[j++]; results = []; for (k = 0, len = names.length; k < len; k++) { name = names[k]; result[name] = {}; results.push((function() { var results1; results1 = []; for (i in data) { results1.push(result[name][i] = data[i]); } return results1; })()); } return results; }; add = function() { var data, j, k, len, name, names, results; names = 2 <= arguments.length ? slice.call(arguments, 0, j = arguments.length - 1) : (j = 0, []), data = arguments[j++]; results = []; for (k = 0, len = names.length; k < len; k++) { name = names[k]; results.push(result[name].browsers = sort(result[name].browsers.concat(data.browsers))); } return results; }; module.exports = result; feature(require('caniuse-db/features-json/border-radius.json'), function(browsers) { return prefix('border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius', { mistakes: ['-khtml-', '-ms-', '-o-'], browsers: browsers }); }); feature(require('caniuse-db/features-json/css-boxshadow.json'), function(browsers) { return prefix('box-shadow', { mistakes: ['-khtml-'], browsers: browsers }); }); feature(require('caniuse-db/features-json/css-animation.json'), 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', { mistakes: ['-khtml-', '-ms-'], browsers: browsers }); }); feature(require('caniuse-db/features-json/css-transitions.json'), function(browsers) { return prefix('transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function', { mistakes: ['-khtml-', '-ms-'], browsers: browsers }); }); feature(require('caniuse-db/features-json/transforms2d.json'), function(browsers) { return prefix('transform', 'transform-origin', { browsers: browsers }); }); transforms3d = require('caniuse-db/features-json/transforms3d.json'); feature(transforms3d, function(browsers) { prefix('perspective', 'perspective-origin', { browsers: browsers }); return prefix('transform-style', { mistakes: ['-ms-', '-o-'], browsers: browsers }); }); feature(transforms3d, { match: /y\sx|y\s#2/ }, function(browsers) { return prefix('backface-visibility', { mistakes: ['-ms-', '-o-'], browsers: browsers }); }); gradients = require('caniuse-db/features-json/css-gradients.json'); feature(gradients, { match: /y\sx/ }, function(browsers) { return prefix('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', { props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'], mistakes: ['-ms-'], browsers: browsers }); }); feature(gradients, { match: /a\sx/ }, function(browsers) { browsers = browsers.map(function(i) { if (/op/.test(i)) { return i; } else { return i + " old"; } }); return add('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', { browsers: browsers }); }); feature(require('caniuse-db/features-json/css3-boxsizing.json'), function(browsers) { return prefix('box-sizing', { browsers: browsers }); }); feature(require('caniuse-db/features-json/css-filters.json'), function(browsers) { return prefix('filter', { browsers: browsers }); }); filterFunction = require('caniuse-db/features-json/css-filter-function.json'); feature(filterFunction, function(browsers) { return prefix('filter-function', { props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'], browsers: browsers }); }); backdropFilter = require('caniuse-db/features-json/css-backdrop-filter.json'); feature(backdropFilter, function(browsers) { return prefix('backdrop-filter', { browsers: browsers }); }); elementFunction = require('caniuse-db/features-json/css-element-function.json'); feature(elementFunction, function(browsers) { return prefix('element', { props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'], browsers: browsers }); }); feature(require('caniuse-db/features-json/multicolumn.json'), function(browsers) { prefix('columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', { browsers: browsers }); return prefix('column-count', 'column-rule-style', 'column-span', 'column-fill', 'break-before', 'break-after', 'break-inside', { browsers: browsers }); }); userSelectNone = require('caniuse-db/features-json/user-select-none.json'); feature(userSelectNone, function(browsers) { return prefix('user-select', { mistakes: ['-khtml-'], browsers: browsers }); }); flexbox = require('caniuse-db/features-json/flexbox.json'); feature(flexbox, { match: /a\sx/ }, function(browsers) { browsers = browsers.map(function(i) { if (/ie|firefox/.test(i)) { return i; } else { return i + " 2009"; } }); prefix('display-flex', 'inline-flex', { props: ['display'], browsers: browsers }); prefix('flex', 'flex-grow', 'flex-shrink', 'flex-basis', { browsers: browsers }); return prefix('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', { browsers: browsers }); }); feature(flexbox, { match: /y\sx/ }, function(browsers) { add('display-flex', 'inline-flex', { browsers: browsers }); add('flex', 'flex-grow', 'flex-shrink', 'flex-basis', { browsers: browsers }); return add('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', { browsers: browsers }); }); feature(require('caniuse-db/features-json/calc.json'), function(browsers) { return prefix('calc', { props: ['*'], browsers: browsers }); }); bckgrndImgOpts = require('caniuse-db/features-json/background-img-opts.json'); feature(bckgrndImgOpts, function(browsers) { return prefix('background-clip', 'background-origin', 'background-size', { browsers: browsers }); }); feature(require('caniuse-db/features-json/font-feature.json'), 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.json'), function(browsers) { return prefix('border-image', { browsers: browsers }); }); feature(require('caniuse-db/features-json/css-selection.json'), function(browsers) { return prefix('::selection', { selector: true, browsers: browsers }); }); feature(require('caniuse-db/features-json/css-placeholder.json'), function(browsers) { browsers = browsers.map(function(i) { var name, ref, version; ref = i.split(' '), name = ref[0], version = ref[1]; if (name === 'firefox' && parseFloat(version) <= 18) { return i + ' old'; } else { return i; } }); return prefix('::placeholder', { selector: true, browsers: browsers }); }); feature(require('caniuse-db/features-json/css-hyphens.json'), function(browsers) { return prefix('hyphens', { browsers: browsers }); }); fullscreen = require('caniuse-db/features-json/fullscreen.json'); feature(fullscreen, function(browsers) { return prefix(':fullscreen', { selector: true, browsers: browsers }); }); feature(fullscreen, { match: /x(\s#2|$)/ }, function(browsers) { return prefix('::backdrop', { selector: true, browsers: browsers }); }); feature(require('caniuse-db/features-json/css3-tabsize.json'), function(browsers) { return prefix('tab-size', { browsers: browsers }); }); feature(require('caniuse-db/features-json/intrinsic-width.json'), function(browsers) { return prefix('max-content', 'min-content', 'fit-content', 'fill', 'fill-available', { props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size'], browsers: browsers }); }); cursorsNewer = require('caniuse-db/features-json/css3-cursors-newer.json'); feature(cursorsNewer, function(browsers) { return prefix('zoom-in', 'zoom-out', { props: ['cursor'], browsers: browsers }); }); cursorsGrab = require('caniuse-db/features-json/css3-cursors-grab.json'); feature(cursorsGrab, function(browsers) { return prefix('grab', 'grabbing', { props: ['cursor'], browsers: browsers }); }); feature(require('caniuse-db/features-json/css-sticky.json'), function(browsers) { return prefix('sticky', { props: ['position'], browsers: browsers }); }); feature(require('caniuse-db/features-json/pointer.json'), function(browsers) { return prefix('touch-action', { browsers: browsers }); }); decoration = require('caniuse-db/features-json/text-decoration.json'); feature(decoration, function(browsers) { return prefix('text-decoration-style', 'text-decoration-color', 'text-decoration-line', { browsers: browsers }); }); feature(decoration, { match: /x.*#3/ }, function(browsers) { return prefix('text-decoration-skip', { browsers: browsers }); }); textSizeAdjust = require('caniuse-db/features-json/text-size-adjust.json'); feature(textSizeAdjust, function(browsers) { return prefix('text-size-adjust', { browsers: browsers }); }); feature(require('caniuse-db/features-json/css-masks.json'), function(browsers) { prefix('mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-repeat', 'mask-border-repeat', 'mask-border-source', { browsers: browsers }); return prefix('clip-path', 'mask', 'mask-position', 'mask-size', 'mask-border', 'mask-border-outset', 'mask-border-width', 'mask-border-slice', { browsers: browsers }); }); boxdecorbreak = require('caniuse-db/features-json/css-boxdecorationbreak.json'); feature(boxdecorbreak, function(browsers) { return prefix('box-decoration-break', { browsers: browsers }); }); feature(require('caniuse-db/features-json/object-fit.json'), function(browsers) { return prefix('object-fit', 'object-position', { browsers: browsers }); }); feature(require('caniuse-db/features-json/css-shapes.json'), function(browsers) { return prefix('shape-margin', 'shape-outside', 'shape-image-threshold', { browsers: browsers }); }); feature(require('caniuse-db/features-json/text-overflow.json'), function(browsers) { return prefix('text-overflow', { browsers: browsers }); }); devdaptation = require('caniuse-db/features-json/css-deviceadaptation.json'); feature(devdaptation, function(browsers) { return prefix('@viewport', { browsers: browsers }); }); resolution = require('caniuse-db/features-json/css-media-resolution.json'); feature(resolution, { match: /( x($| )|a #3)/ }, function(browsers) { return prefix('@resolution', { browsers: browsers }); }); textAlignLast = require('caniuse-db/features-json/css-text-align-last.json'); feature(textAlignLast, function(browsers) { return prefix('text-align-last', { browsers: browsers }); }); crispedges = require('caniuse-db/features-json/css-crisp-edges.json'); feature(crispedges, { match: /y x|a x #1/ }, function(browsers) { return prefix('pixelated', { props: ['image-rendering'], browsers: browsers }); }); feature(crispedges, { match: /a x #2/ }, function(browsers) { return prefix('image-rendering', { browsers: browsers }); }); logicalProps = require('caniuse-db/features-json/css-logical-props.json'); feature(logicalProps, function(browsers) { return prefix('border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', { browsers: browsers }); }); feature(logicalProps, { match: /x\s#2/ }, function(browsers) { return prefix('border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', { browsers: browsers }); }); feature(require('caniuse-db/features-json/css-appearance.json'), function(browsers) { return prefix('appearance', { browsers: browsers }); }); feature(require('caniuse-db/features-json/css-snappoints.json'), function(browsers) { return prefix('scroll-snap-type', 'scroll-snap-coordinate', 'scroll-snap-destination', 'scroll-snap-points-x', 'scroll-snap-points-y', { browsers: browsers }); }); feature(require('caniuse-db/features-json/css-regions.json'), function(browsers) { return prefix('flow-into', 'flow-from', 'region-fragment', { browsers: browsers }); }); feature(require('caniuse-db/features-json/css-image-set.json'), function(browsers) { return prefix('image-set', { props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'], browsers: browsers }); }); writingMode = require('caniuse-db/features-json/css-writing-mode.json'); feature(writingMode, { match: /a|x/ }, function(browsers) { return prefix('writing-mode', { browsers: browsers }); }); feature(require('caniuse-db/features-json/css-cross-fade.json'), function(browsers) { return prefix('cross-fade', { props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'], browsers: browsers }); }); readOnly = require('caniuse-db/features-json/css-read-only-write.json'); feature(readOnly, function(browsers) { return prefix(':read-only', ':read-write', { selector: true, browsers: browsers }); }); feature(require('caniuse-db/features-json/text-emphasis.json'), function(browsers) { return prefix('text-emphasis', 'text-emphasis-position', 'text-emphasis-style', 'text-emphasis-color', { browsers: browsers }); }); grid = require('caniuse-db/features-json/css-grid.json'); feature(grid, function(browsers) { prefix('display-grid', 'inline-grid', { props: ['display'], browsers: browsers }); return prefix('grid-template-columns', 'grid-template-rows', 'grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end', 'grid-row', 'grid-column', { browsers: browsers }); }); feature(grid, { match: /a x/ }, function(browsers) { return prefix('justify-items', 'grid-row-align', { browsers: browsers }); }); textSpacing = require('caniuse-db/features-json/css-text-spacing.json'); feature(textSpacing, function(browsers) { return prefix('text-spacing', { browsers: browsers }); }); feature(require('caniuse-db/features-json/css-any-link.json'), function(browsers) { return prefix(':any-link', { selector: true, browsers: browsers }); }); }).call(this); },{"caniuse-db/features-json/background-img-opts.json":67,"caniuse-db/features-json/border-image.json":68,"caniuse-db/features-json/border-radius.json":69,"caniuse-db/features-json/calc.json":70,"caniuse-db/features-json/css-animation.json":71,"caniuse-db/features-json/css-any-link.json":72,"caniuse-db/features-json/css-appearance.json":73,"caniuse-db/features-json/css-backdrop-filter.json":74,"caniuse-db/features-json/css-boxdecorationbreak.json":75,"caniuse-db/features-json/css-boxshadow.json":76,"caniuse-db/features-json/css-crisp-edges.json":77,"caniuse-db/features-json/css-cross-fade.json":78,"caniuse-db/features-json/css-deviceadaptation.json":79,"caniuse-db/features-json/css-element-function.json":80,"caniuse-db/features-json/css-filter-function.json":82,"caniuse-db/features-json/css-filters.json":83,"caniuse-db/features-json/css-gradients.json":84,"caniuse-db/features-json/css-grid.json":85,"caniuse-db/features-json/css-hyphens.json":86,"caniuse-db/features-json/css-image-set.json":87,"caniuse-db/features-json/css-logical-props.json":88,"caniuse-db/features-json/css-masks.json":89,"caniuse-db/features-json/css-media-resolution.json":90,"caniuse-db/features-json/css-placeholder.json":91,"caniuse-db/features-json/css-read-only-write.json":92,"caniuse-db/features-json/css-regions.json":93,"caniuse-db/features-json/css-selection.json":94,"caniuse-db/features-json/css-shapes.json":95,"caniuse-db/features-json/css-snappoints.json":96,"caniuse-db/features-json/css-sticky.json":97,"caniuse-db/features-json/css-text-align-last.json":98,"caniuse-db/features-json/css-text-spacing.json":99,"caniuse-db/features-json/css-transitions.json":100,"caniuse-db/features-json/css-writing-mode.json":101,"caniuse-db/features-json/css3-boxsizing.json":102,"caniuse-db/features-json/css3-cursors-grab.json":103,"caniuse-db/features-json/css3-cursors-newer.json":104,"caniuse-db/features-json/css3-tabsize.json":105,"caniuse-db/features-json/flexbox.json":106,"caniuse-db/features-json/font-feature.json":107,"caniuse-db/features-json/fullscreen.json":108,"caniuse-db/features-json/intrinsic-width.json":109,"caniuse-db/features-json/multicolumn.json":110,"caniuse-db/features-json/object-fit.json":111,"caniuse-db/features-json/pointer.json":112,"caniuse-db/features-json/text-decoration.json":113,"caniuse-db/features-json/text-emphasis.json":114,"caniuse-db/features-json/text-overflow.json":115,"caniuse-db/features-json/text-size-adjust.json":116,"caniuse-db/features-json/transforms2d.json":117,"caniuse-db/features-json/transforms3d.json":118,"caniuse-db/features-json/user-select-none.json":119}],2:[function(require,module,exports){ (function() { var AtRule, Prefixer, extend = 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; }, hasProp = {}.hasOwnProperty; Prefixer = require('./prefixer'); AtRule = (function(superClass) { extend(AtRule, superClass); function AtRule() { return AtRule.__super__.constructor.apply(this, arguments); } AtRule.prototype.add = function(rule, prefix) { var already, cloned, prefixed; prefixed = prefix + rule.name; already = rule.parent.some(function(i) { return i.name === prefixed && i.params === rule.params; }); if (already) { return; } cloned = this.clone(rule, { name: prefixed }); return rule.parent.insertBefore(rule, cloned); }; AtRule.prototype.process = function(node) { var j, len, parent, prefix, ref, results; parent = this.parentPrefix(node); ref = this.prefixes; results = []; for (j = 0, len = ref.length; j < len; j++) { prefix = ref[j]; if (parent && parent !== prefix) { continue; } results.push(this.add(node, prefix)); } return results; }; return AtRule; })(Prefixer); module.exports = AtRule; }).call(this); },{"./prefixer":51}],3:[function(require,module,exports){ (function() { var Browsers, Prefixes, browserslist, cache, isPlainObject, postcss, timeCapsule, slice = [].slice; browserslist = require('browserslist'); postcss = require('postcss'); Browsers = require('./browsers'); Prefixes = require('./prefixes'); isPlainObject = function(obj) { return Object.prototype.toString.apply(obj) === '[object Object]'; }; cache = {}; timeCapsule = function(result, prefixes) { if (prefixes.browsers.selected.length === 0) { return; } if (prefixes.add.selectors.length > 0) { return; } if (Object.keys(prefixes.add).length > 2) { return; } return result.warn('Greetings, space traveller. ' + 'We are in the golden age of prefix-less CSS, ' + 'where Autoprefixer is no longer needed for your stylesheet.'); }; module.exports = postcss.plugin('autoprefixer', function() { var loadPrefixes, options, plugin, 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(); } options || (options = {}); if (options.browsers != null) { reqs = options.browsers; } loadPrefixes = function(opts) { var browsers, key, stats; stats = options.stats; browsers = new Browsers(module.exports.data.browsers, reqs, opts, stats); key = browsers.selected.join(', ') + JSON.stringify(options); return cache[key] || (cache[key] = new Prefixes(module.exports.data.prefixes, browsers, options)); }; plugin = function(css, result) { var prefixes, ref; prefixes = loadPrefixes({ from: (ref = css.source) != null ? ref.input.file : void 0 }); timeCapsule(result, prefixes); if (options.remove !== false) { prefixes.processor.remove(css); } if (options.add !== false) { return prefixes.processor.add(css, result); } }; plugin.options = options; plugin.info = function(opts) { return require('./info')(loadPrefixes(opts)); }; return plugin; }); module.exports.data = { browsers: require('caniuse-db/data.json').agents, prefixes: require('../data/prefixes') }; module.exports.defaults = browserslist.defaults; module.exports.info = function() { return module.exports().info(); }; }).call(this); },{"../data/prefixes":1,"./browsers":5,"./info":48,"./prefixes":52,"browserslist":64,"caniuse-db/data.json":66,"postcss":147}],4:[function(require,module,exports){ (function() { var brackets, last; last = function(array) { return array[array.length - 1]; }; brackets = { parse: function(str) { var current, j, len, stack, sym; current = ['']; stack = [current]; for (j = 0, len = str.length; j < len; j++) { sym = str[j]; if (sym === '(') { current = ['']; last(stack).push(current); stack.push(current); } else if (sym === ')') { stack.pop(); current = last(stack); current.push(''); } else { current[current.length - 1] += sym; } } return stack[0]; }, stringify: function(ast) { var i, j, len, result; result = ''; for (j = 0, len = ast.length; j < len; j++) { i = ast[j]; if (typeof i === 'object') { result += '(' + brackets.stringify(i) + ')'; } else { result += i; } } return result; } }; module.exports = brackets; }).call(this); },{}],5:[function(require,module,exports){ (function() { var Browsers, browserslist, utils; browserslist = require('browserslist'); utils = require('./utils'); Browsers = (function() { Browsers.prefixes = function() { var data, i, name; if (this.prefixesCache) { return this.prefixesCache; } data = require('caniuse-db/data.json').agents; 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(data1, requirements, options, stats) { this.data = data1; this.options = options; this.stats = stats; this.selected = this.parse(requirements); } Browsers.prototype.parse = function(requirements) { var ref; return browserslist(requirements, { path: (ref = this.options) != null ? ref.from : void 0, stats: this.stats }); }; Browsers.prototype.browsers = function(criteria) { var browser, data, ref, selected, versions; 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 data, name, prefix, ref, version; ref = browser.split(' '), name = ref[0], version = ref[1]; data = this.data[name]; if (data.prefix_exceptions) { prefix = data.prefix_exceptions[version]; } prefix || (prefix = data.prefix); return '-' + prefix + '-'; }; Browsers.prototype.isSelected = function(browser) { return this.selected.indexOf(browser) !== -1; }; return Browsers; })(); module.exports = Browsers; }).call(this); },{"./utils":58,"browserslist":64,"caniuse-db/data.json":66}],6:[function(require,module,exports){ (function() { var Browsers, Declaration, Prefixer, utils, vendor, extend = 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; }, hasProp = {}.hasOwnProperty; Prefixer = require('./prefixer'); Browsers = require('./browsers'); vendor = require('postcss/lib/vendor'); utils = require('./utils'); Declaration = (function(superClass) { extend(Declaration, superClass); 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 j, len, other, ref; ref = Browsers.prefixes(); for (j = 0, len = ref.length; j < len; j++) { other = ref[j]; 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.raw('before').indexOf('\n') !== -1); }; Declaration.prototype.maxPrefixed = function(prefixes, decl) { var j, len, max, prefix; if (decl._autoprefixerMax) { return decl._autoprefixerMax; } max = 0; for (j = 0, len = prefixes.length; j < len; j++) { prefix = prefixes[j]; 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, j, max, ref; if (prefix == null) { prefix = ''; } before = decl.raw('before'); max = this.maxPrefixed(prefixes, decl); diff = max - utils.removeNote(prefix).length; for (i = j = 0, ref = diff; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { before += ' '; } return before; }; Declaration.prototype.restoreBefore = function(decl) { var lines, min; lines = decl.raw('before').split("\n"); min = lines[lines.length - 1]; this.all.group(decl).up(function(prefixed) { var array, last; array = prefixed.raw('before').split("\n"); last = array[array.length - 1]; if (last.length < min.length) { return min = last; } }); lines[lines.length - 1] = min; return decl.raws.before = lines.join("\n"); }; Declaration.prototype.insert = function(decl, prefix, prefixes) { var already, cloned; cloned = this.set(this.clone(decl), prefix); if (!cloned) { return; } already = decl.parent.some(function(i) { return i.prop === cloned.prop && i.value === cloned.value; }); if (already) { return; } if (this.needCascade(decl)) { cloned.raws.before = this.calcBefore(prefixes, decl, prefix); } return decl.parent.insertBefore(decl, cloned); }; Declaration.prototype.isAlready = function(decl, prefixed) { var already; 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; })); return already; }; Declaration.prototype.add = function(decl, prefix, prefixes) { var prefixed; prefixed = this.prefixed(decl.prop, prefix); if (this.isAlready(decl, prefixed) || 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.raws.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":5,"./prefixer":51,"./utils":58,"postcss/lib/vendor":157}],7:[function(require,module,exports){ (function() { var AlignContent, Declaration, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); AlignContent = (function(superClass) { extend(AlignContent, superClass); 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 ref, spec; 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":6,"./flex-spec":26}],8:[function(require,module,exports){ (function() { var AlignItems, Declaration, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); AlignItems = (function(superClass) { extend(AlignItems, superClass); 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 ref, spec; 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":6,"./flex-spec":26}],9:[function(require,module,exports){ (function() { var AlignSelf, Declaration, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); AlignSelf = (function(superClass) { extend(AlignSelf, superClass); 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 ref, spec; 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":6,"./flex-spec":26}],10:[function(require,module,exports){ (function() { var BackgroundSize, Declaration, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); BackgroundSize = (function(superClass) { extend(BackgroundSize, superClass); 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":6}],11:[function(require,module,exports){ (function() { var BlockLogical, Declaration, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); BlockLogical = (function(superClass) { extend(BlockLogical, superClass); function BlockLogical() { return BlockLogical.__super__.constructor.apply(this, arguments); } BlockLogical.names = ['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', 'border-before', 'border-after', 'margin-before', 'margin-after', 'padding-before', 'padding-after']; BlockLogical.prototype.prefixed = function(prop, prefix) { return prefix + (prop.indexOf('-start') !== -1 ? prop.replace('-block-start', '-before') : prop.replace('-block-end', '-after')); }; BlockLogical.prototype.normalize = function(prop) { if (prop.indexOf('-before') !== -1) { return prop.replace('-before', '-block-start'); } else { return prop.replace('-after', '-block-end'); } }; return BlockLogical; })(Declaration); module.exports = BlockLogical; }).call(this); },{"../declaration":6}],12:[function(require,module,exports){ (function() { var BorderImage, Declaration, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); BorderImage = (function(superClass) { extend(BorderImage, superClass); 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":6}],13:[function(require,module,exports){ (function() { var BorderRadius, Declaration, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); BorderRadius = (function(superClass) { var hor, i, j, len, len1, mozilla, normal, ref, ref1, ver; extend(BorderRadius, superClass); 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":6}],14:[function(require,module,exports){ (function() { var BreakProps, Declaration, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); BreakProps = (function(superClass) { extend(BreakProps, superClass); function BreakProps() { return BreakProps.__super__.constructor.apply(this, arguments); } BreakProps.names = ['break-inside', 'page-break-inside', 'column-break-inside', 'break-before', 'page-break-before', 'column-break-before', 'break-after', 'page-break-after', 'column-break-after']; BreakProps.prototype.prefixed = function(prop, prefix) { if (prefix === '-webkit-') { return '-webkit-column-' + prop; } else if (prefix === '-moz-') { return 'page-' + prop; } else { return BreakProps.__super__.prefixed.apply(this, arguments); } }; BreakProps.prototype.normalize = function(prop) { if (prop.indexOf('inside') !== -1) { return 'break-inside'; } else if (prop.indexOf('before') !== -1) { return 'break-before'; } else if (prop.indexOf('after') !== -1) { return 'break-after'; } }; BreakProps.prototype.set = function(decl, prefix) { var v; v = decl.value; if (decl.prop === 'break-inside' && v === 'avoid-column' || v === 'avoid-page') { decl.value = 'avoid'; } return BreakProps.__super__.set.apply(this, arguments); }; BreakProps.prototype.insert = function(decl, prefix, prefixes) { if (decl.prop !== 'break-inside') { return BreakProps.__super__.insert.apply(this, arguments); } else if (decl.value === 'avoid-region') { } else if (decl.value === 'avoid-page' && prefix === '-webkit-') { } else { return BreakProps.__super__.insert.apply(this, arguments); } }; return BreakProps; })(Declaration); module.exports = BreakProps; }).call(this); },{"../declaration":6}],15:[function(require,module,exports){ (function() { var CrossFade, OldValue, Value, list, utils, extend = 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; }, hasProp = {}.hasOwnProperty; OldValue = require('../old-value'); Value = require('../value'); utils = require('../utils'); list = require('postcss/lib/list'); CrossFade = (function(superClass) { extend(CrossFade, superClass); function CrossFade() { return CrossFade.__super__.constructor.apply(this, arguments); } CrossFade.names = ['cross-fade']; CrossFade.prototype.replace = function(string, prefix) { return list.space(string).map((function(_this) { return function(value) { var after, args, close, match; if (value.slice(0, +_this.name.length + 1 || 9e9) !== _this.name + '(') { return value; } close = value.lastIndexOf(')'); after = value.slice(close + 1); args = value.slice(_this.name.length + 1, +(close - 1) + 1 || 9e9); if (prefix === '-webkit-') { match = args.match(/\d*.?\d+%?/); if (match) { args = args.slice(match[0].length).trim(); args += ', ' + match[0]; } else { args += ', 0.5'; } } return prefix + _this.name + '(' + args + ')' + after; }; })(this)).join(' '); }; return CrossFade; })(Value); module.exports = CrossFade; }).call(this); },{"../old-value":50,"../utils":58,"../value":59,"postcss/lib/list":142}],16:[function(require,module,exports){ (function() { var DisplayFlex, OldValue, Value, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); OldValue = require('../old-value'); Value = require('../value'); DisplayFlex = (function(superClass) { extend(DisplayFlex, superClass); 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.prop === 'display' && decl.value === this.name; }; DisplayFlex.prototype.prefixed = function(prefix) { var ref, spec; 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(this.name, prefixed); } }; return DisplayFlex; })(Value); module.exports = DisplayFlex; }).call(this); },{"../old-value":50,"../value":59,"./flex-spec":26}],17:[function(require,module,exports){ (function() { var DisplayGrid, OldValue, Value, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); OldValue = require('../old-value'); Value = require('../value'); DisplayGrid = (function(superClass) { extend(DisplayGrid, superClass); DisplayGrid.names = ['display-grid', 'inline-grid']; function DisplayGrid(name, prefixes) { DisplayGrid.__super__.constructor.apply(this, arguments); if (name === 'display-grid') { this.name = 'grid'; } } DisplayGrid.prototype.check = function(decl) { return decl.prop === 'display' && decl.value === this.name; }; return DisplayGrid; })(Value); module.exports = DisplayGrid; }).call(this); },{"../old-value":50,"../value":59,"./flex-spec":26}],18:[function(require,module,exports){ (function() { var Fill, OldValue, Value, extend = 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; }, hasProp = {}.hasOwnProperty; OldValue = require('../old-value'); Value = require('../value'); Fill = (function(superClass) { extend(Fill, superClass); function Fill() { return Fill.__super__.constructor.apply(this, arguments); } Fill.names = ['fill', 'fill-available']; Fill.prototype.replace = function(string, prefix) { if (prefix === '-moz-') { return string.replace(this.regexp(), '$1-moz-available$3'); } else if (prefix === '-webkit-') { return string.replace(this.regexp(), '$1-webkit-fill-available$3'); } else { return Fill.__super__.replace.apply(this, arguments); } }; Fill.prototype.old = function(prefix) { if (prefix === '-moz-') { return new OldValue(this.name, '-moz-available'); } else if (prefix === '-webkit-') { return new OldValue(this.name, '-webkit-fill-available'); } else { return Fill.__super__.old.apply(this, arguments); } }; return Fill; })(Value); module.exports = Fill; }).call(this); },{"../old-value":50,"../value":59}],19:[function(require,module,exports){ (function() { var FilterValue, OldFilterValue, OldValue, Value, utils, extend = 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; }, hasProp = {}.hasOwnProperty; OldValue = require('../old-value'); Value = require('../value'); utils = require('../utils'); OldFilterValue = (function(superClass) { extend(OldFilterValue, superClass); function OldFilterValue() { return OldFilterValue.__super__.constructor.apply(this, arguments); } OldFilterValue.prototype.clean = function(decl) { return decl.value = utils.editList(decl.value, (function(_this) { return function(props) { if (props.every(function(i) { return i.indexOf(_this.unprefixed) !== 0; })) { return props; } return props.filter(function(i) { return i.indexOf(_this.prefixed) === -1; }); }; })(this)); }; return OldFilterValue; })(OldValue); FilterValue = (function(superClass) { extend(FilterValue, superClass); FilterValue.names = ['filter', 'filter-function']; function FilterValue(name, prefixes) { FilterValue.__super__.constructor.apply(this, arguments); if (name === 'filter-function') { this.name = 'filter'; } } FilterValue.prototype.replace = function(value, prefix) { if (prefix === '-webkit-' && value.indexOf('filter(') === -1) { 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); } }; FilterValue.prototype.old = function(prefix) { return new OldFilterValue(this.name, prefix + this.name); }; return FilterValue; })(Value); module.exports = FilterValue; }).call(this); },{"../old-value":50,"../utils":58,"../value":59}],20:[function(require,module,exports){ (function() { var Declaration, Filter, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); Filter = (function(superClass) { extend(Filter, superClass); 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":6}],21:[function(require,module,exports){ (function() { var Declaration, FlexBasis, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); FlexBasis = (function(superClass) { extend(FlexBasis, superClass); 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 ref, spec; 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 ref, spec; 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":6,"./flex-spec":26}],22:[function(require,module,exports){ (function() { var Declaration, FlexDirection, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); FlexDirection = (function(superClass) { extend(FlexDirection, superClass); 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, ref, spec, value; 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.raws.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.raws.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 ref, spec; 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":6,"./flex-spec":26}],23:[function(require,module,exports){ (function() { var Declaration, FlexFlow, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); FlexFlow = (function(superClass) { extend(FlexFlow, superClass); function FlexFlow() { return FlexFlow.__super__.constructor.apply(this, arguments); } FlexFlow.names = ['flex-flow']; FlexFlow.prototype.set = function(decl, prefix) { var ref, spec; ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2012) { return FlexFlow.__super__.set.apply(this, arguments); } else if (spec === 'final') { return FlexFlow.__super__.set.apply(this, arguments); } }; return FlexFlow; })(Declaration); module.exports = FlexFlow; }).call(this); },{"../declaration":6,"./flex-spec":26}],24:[function(require,module,exports){ (function() { var Declaration, Flex, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); Flex = (function(superClass) { extend(Flex, superClass); function Flex() { return Flex.__super__.constructor.apply(this, arguments); } Flex.names = ['flex-grow', 'flex-positive']; Flex.prototype.normalize = function() { return 'flex'; }; Flex.prototype.prefixed = function(prop, prefix) { var ref, spec; ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2009) { return prefix + 'box-flex'; } else if (spec === 2012) { return prefix + 'flex-positive'; } else { return Flex.__super__.prefixed.apply(this, arguments); } }; return Flex; })(Declaration); module.exports = Flex; }).call(this); },{"../declaration":6,"./flex-spec":26}],25:[function(require,module,exports){ (function() { var Declaration, FlexShrink, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); FlexShrink = (function(superClass) { extend(FlexShrink, superClass); function FlexShrink() { return FlexShrink.__super__.constructor.apply(this, arguments); } FlexShrink.names = ['flex-shrink', 'flex-negative']; FlexShrink.prototype.normalize = function() { return 'flex-shrink'; }; FlexShrink.prototype.prefixed = function(prop, prefix) { var ref, spec; ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2012) { return prefix + 'flex-negative'; } else { return FlexShrink.__super__.prefixed.apply(this, arguments); } }; FlexShrink.prototype.set = function(decl, prefix) { var ref, spec; ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2012 || spec === 'final') { return FlexShrink.__super__.set.apply(this, arguments); } }; return FlexShrink; })(Declaration); module.exports = FlexShrink; }).call(this); },{"../declaration":6,"./flex-spec":26}],26:[function(require,module,exports){ (function() { module.exports = function(prefix) { var spec; spec = prefix === '-webkit- 2009' || prefix === '-moz-' ? 2009 : prefix === '-ms-' ? 2012 : prefix === '-webkit-' ? 'final' : void 0; if (prefix === '-webkit- 2009') { prefix = '-webkit-'; } return [spec, prefix]; }; }).call(this); },{}],27:[function(require,module,exports){ (function() { var FlexValues, OldValue, Value, extend = 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; }, hasProp = {}.hasOwnProperty; OldValue = require('../old-value'); Value = require('../value'); FlexValues = (function(superClass) { extend(FlexValues, superClass); function FlexValues() { return FlexValues.__super__.constructor.apply(this, arguments); } FlexValues.names = ['flex', 'flex-grow', 'flex-shrink', 'flex-basis']; FlexValues.prototype.prefixed = function(prefix) { return this.all.prefixed(this.name, prefix); }; FlexValues.prototype.replace = function(string, prefix) { return string.replace(this.regexp(), '$1' + this.prefixed(prefix) + '$3'); }; FlexValues.prototype.old = function(prefix) { return new OldValue(this.name, this.prefixed(prefix)); }; return FlexValues; })(Value); module.exports = FlexValues; }).call(this); },{"../old-value":50,"../value":59}],28:[function(require,module,exports){ (function() { var Declaration, FlexWrap, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); FlexWrap = (function(superClass) { extend(FlexWrap, superClass); function FlexWrap() { return FlexWrap.__super__.constructor.apply(this, arguments); } FlexWrap.names = ['flex-wrap']; FlexWrap.prototype.set = function(decl, prefix) { var spec; spec = flexSpec(prefix)[0]; if (spec !== 2009) { return FlexWrap.__super__.set.apply(this, arguments); } }; return FlexWrap; })(Declaration); module.exports = FlexWrap; }).call(this); },{"../declaration":6,"./flex-spec":26}],29:[function(require,module,exports){ (function() { var Declaration, Flex, flexSpec, list, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); list = require('postcss/lib/list'); Flex = (function(superClass) { extend(Flex, superClass); function Flex() { return Flex.__super__.constructor.apply(this, arguments); } Flex.names = ['flex', 'box-flex']; Flex.oldValues = { 'auto': '1', 'none': '0' }; Flex.prototype.prefixed = function(prop, prefix) { var ref, spec; ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2009) { return prefix + 'box-flex'; } else { return Flex.__super__.prefixed.apply(this, arguments); } }; Flex.prototype.normalize = function() { return 'flex'; }; Flex.prototype.set = function(decl, prefix) { var spec; spec = flexSpec(prefix)[0]; if (spec === 2009) { decl.value = list.space(decl.value)[0]; decl.value = Flex.oldValues[decl.value] || decl.value; return Flex.__super__.set.call(this, decl, prefix); } else { return Flex.__super__.set.apply(this, arguments); } }; return Flex; })(Declaration); module.exports = Flex; }).call(this); },{"../declaration":6,"./flex-spec":26,"postcss/lib/list":142}],30:[function(require,module,exports){ (function() { var Fullscreen, Selector, extend = 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; }, hasProp = {}.hasOwnProperty; Selector = require('../selector'); Fullscreen = (function(superClass) { extend(Fullscreen, superClass); function Fullscreen() { return Fullscreen.__super__.constructor.apply(this, arguments); } Fullscreen.names = [':fullscreen']; Fullscreen.prototype.prefixed = function(prefix) { if ('-webkit-' === prefix) { return ':-webkit-full-screen'; } else if ('-moz-' === prefix) { return ':-moz-full-screen'; } else { return ":" + prefix + "fullscreen"; } }; return Fullscreen; })(Selector); module.exports = Fullscreen; }).call(this); },{"../selector":55}],31:[function(require,module,exports){ (function() { var Gradient, OldValue, Value, isDirection, list, parser, range, utils, extend = 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; }, hasProp = {}.hasOwnProperty, slice = [].slice; OldValue = require('../old-value'); Value = require('../value'); utils = require('../utils'); parser = require('postcss-value-parser'); range = require('normalize-range'); list = require('postcss/lib/list'); isDirection = /top|left|right|bottom/gi; Gradient = (function(superClass) { extend(Gradient, superClass); function Gradient() { return Gradient.__super__.constructor.apply(this, arguments); } Gradient.names = ['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient']; Gradient.prototype.replace = function(string, prefix) { var ast, changes, j, len, node, ref; ast = parser(string); ref = ast.nodes; for (j = 0, len = ref.length; j < len; j++) { node = ref[j]; if (node.type === 'function' && node.value === this.name) { node.nodes = this.newDirection(node.nodes); node.nodes = this.normalize(node.nodes); if (prefix === '-webkit- old') { changes = this.oldWebkit(node); if (!changes) { return; } } else { node.nodes = this.convertDirection(node.nodes); node.value = prefix + node.value; } } } return ast.toString(); }; Gradient.prototype.directions = { top: 'bottom', left: 'right', bottom: 'top', right: 'left' }; Gradient.prototype.oldDirections = { 'top': 'left bottom, left top', 'left': 'right top, left top', 'bottom': 'left top, left bottom', 'right': 'left top, right top', 'top right': 'left bottom, right top', 'top left': 'right bottom, left top', 'right top': 'left bottom, right top', 'right bottom': 'left top, right bottom', 'bottom right': 'left top, right bottom', 'bottom left': 'right top, left bottom', 'left top': 'right bottom, left top', 'left bottom': 'right top, left bottom' }; Gradient.prototype.replaceFirst = function() { var params, prefix, words; params = arguments[0], words = 2 <= arguments.length ? slice.call(arguments, 1) : []; prefix = words.map(function(i) { if (i === ' ') { return { type: 'space', value: i }; } else { return { type: 'word', value: i }; } }); return prefix.concat(params.slice(1)); }; Gradient.prototype.normalizeUnit = function(str, full) { var deg, num; num = parseFloat(str); deg = (num / full) * 360; return deg + "deg"; }; Gradient.prototype.normalize = function(nodes) { var num; if (!nodes[0]) { return nodes; } if (/-?\d+(.\d+)?grad/.test(nodes[0].value)) { nodes[0].value = this.normalizeUnit(nodes[0].value, 400); } else if (/-?\d+(.\d+)?rad/.test(nodes[0].value)) { nodes[0].value = this.normalizeUnit(nodes[0].value, 2 * Math.PI); } else if (/-?\d+(.\d+)?turn/.test(nodes[0].value)) { nodes[0].value = this.normalizeUnit(nodes[0].value, 1); } else if (nodes[0].value.indexOf('deg') !== -1) { num = parseFloat(nodes[0].value); num = range.wrap(0, 360, num); nodes[0].value = num + "deg"; } if (nodes[0].value === '0deg') { nodes = this.replaceFirst(nodes, 'to', ' ', 'top'); } else if (nodes[0].value === '90deg') { nodes = this.replaceFirst(nodes, 'to', ' ', 'right'); } else if (nodes[0].value === '180deg') { nodes = this.replaceFirst(nodes, 'to', ' ', 'bottom'); } else if (nodes[0].value === '270deg') { nodes = this.replaceFirst(nodes, 'to', ' ', 'left'); } return nodes; }; Gradient.prototype.newDirection = function(params) { var i, j, ref; if (params[0].value === 'to') { return params; } if (!isDirection.test(params[0].value)) { return params; } params.unshift({ type: 'word', value: 'to' }, { type: 'space', value: ' ' }); for (i = j = 2, ref = params.length; 2 <= ref ? j < ref : j > ref; i = 2 <= ref ? ++j : --j) { if (params[i].type === 'div') { break; } if (params[i].type === 'word') { params[i].value = this.revertDirection(params[i].value); } } return params; }; Gradient.prototype.convertDirection = function(params) { if (params.length > 0) { if (params[0].value === 'to') { this.fixDirection(params); } else if (params[0].value.indexOf('deg') !== -1) { this.fixAngle(params); } else if (params[2].value === 'at') { this.fixRadial(params); } } return params; }; Gradient.prototype.fixDirection = function(params) { var i, j, ref, results; params.splice(0, 2); results = []; for (i = j = 0, ref = params.length; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { if (params[i].type === 'div') { break; } if (params[i].type === 'word') { results.push(params[i].value = this.revertDirection(params[i].value)); } else { results.push(void 0); } } return results; }; Gradient.prototype.fixAngle = function(params) { var first; first = params[0].value; first = parseFloat(first); first = Math.abs(450 - first) % 360; first = this.roundFloat(first, 3); return params[0].value = first + "deg"; }; Gradient.prototype.fixRadial = function(params) { var first, i, j, ref, second; first = params[0]; second = []; for (i = j = 4, ref = params.length; 4 <= ref ? j < ref : j > ref; i = 4 <= ref ? ++j : --j) { if (params[i].type === 'div') { break; } else { second.push(params[i]); } } return params.splice.apply(params, [0, i].concat(slice.call(second), [params[i + 2]], [first])); }; Gradient.prototype.revertDirection = function(word) { return this.directions[word.toLowerCase()] || word; }; Gradient.prototype.roundFloat = function(float, digits) { return parseFloat(float.toFixed(digits)); }; Gradient.prototype.oldWebkit = function(node) { var i, j, k, len, len1, nodes, param, params, string; nodes = node.nodes; string = parser.stringify(node.nodes); if (this.name !== 'linear-gradient') { return false; } if (nodes[0] && nodes[0].value.indexOf('deg') !== -1) { return false; } if (string.indexOf('px') !== -1) { return false; } if (string.indexOf('-corner') !== -1) { return false; } if (string.indexOf('-side') !== -1) { return false; } params = [[]]; for (j = 0, len = nodes.length; j < len; j++) { i = nodes[j]; params[params.length - 1].push(i); if (i.type === 'div' && i.value === ',') { params.push([]); } } this.oldDirection(params); this.colorStops(params); node.nodes = []; for (k = 0, len1 = params.length; k < len1; k++) { param = params[k]; node.nodes = node.nodes.concat(param); } node.nodes.unshift({ type: 'word', value: 'linear' }, this.cloneDiv(node.nodes)); node.value = '-webkit-gradient'; return true; }; Gradient.prototype.oldDirection = function(params) { var div, j, len, node, old, ref, words; div = this.cloneDiv(params[0]); if (params[0][0].value !== 'to') { return params.unshift([ { type: 'word', value: this.oldDirections.bottom }, div ]); } else { words = []; ref = params[0].slice(2); for (j = 0, len = ref.length; j < len; j++) { node = ref[j]; if (node.type === 'word') { words.push(node.value.toLowerCase()); } } words = words.join(' '); old = this.oldDirections[words] || words; return params[0] = [ { type: 'word', value: old }, div ]; } }; Gradient.prototype.cloneDiv = function(params) { var i, j, len; for (j = 0, len = params.length; j < len; j++) { i = params[j]; if (i.type === 'div' && i.value === ',') { return i; } } return { type: 'div', value: ',', after: ' ' }; }; Gradient.prototype.colorStops = function(params) { var color, div, i, j, len, param, pos, results, stop; results = []; for (i = j = 0, len = params.length; j < len; i = ++j) { param = params[i]; if (i === 0) { continue; } color = parser.stringify(param[0]); if (param[1] && param[1].type === 'word') { pos = param[1].value; } else if (param[2] && param[2].type === 'word') { pos = param[2].value; } stop = i === 1 && (!pos || pos === '0%') ? "from(" + color + ")" : i === params.length - 1 && (!pos || pos === '100%') ? "to(" + color + ")" : pos ? "color-stop(" + pos + ", " + color + ")" : "color-stop(" + color + ")"; div = param[param.length - 1]; params[i] = [ { type: 'word', value: stop } ]; if (div.type === 'div' && div.value === ',') { results.push(params[i].push(div)); } else { results.push(void 0); } } return results; }; Gradient.prototype.old = function(prefix) { var regexp, string, type; if (prefix === '-webkit-') { type = this.name === 'linear-gradient' ? 'linear' : 'radial'; string = '-gradient'; regexp = utils.regexp("-webkit-(" + type + "-gradient|gradient\\(\\s*" + type + ")", false); return new OldValue(this.name, prefix + this.name, string, regexp); } else { return Gradient.__super__.old.apply(this, arguments); } }; Gradient.prototype.add = function(decl, prefix) { var p; p = decl.prop; if (p.indexOf('mask') !== -1) { if (prefix === '-webkit-' || prefix === '-webkit- old') { return Gradient.__super__.add.apply(this, arguments); } } else if (p === 'list-style' || p === 'list-style-image' || p === 'content') { if (prefix === '-webkit-' || prefix === '-webkit- old') { return Gradient.__super__.add.apply(this, arguments); } } else { return Gradient.__super__.add.apply(this, arguments); } }; return Gradient; })(Value); module.exports = Gradient; }).call(this); },{"../old-value":50,"../utils":58,"../value":59,"normalize-range":127,"postcss-value-parser":130,"postcss/lib/list":142}],32:[function(require,module,exports){ (function() { var Declaration, GridEnd, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); GridEnd = (function(superClass) { extend(GridEnd, superClass); function GridEnd() { return GridEnd.__super__.constructor.apply(this, arguments); } GridEnd.names = ['grid-row-end', 'grid-column-end', 'grid-row-span', 'grid-column-span']; GridEnd.prototype.check = function(decl) { return decl.value.indexOf('span') !== -1; }; GridEnd.prototype.normalize = function(prop) { return prop.replace(/(-span|-end)/, ''); }; GridEnd.prototype.prefixed = function(prop, prefix) { if (prefix === '-ms-') { return prefix + prop.replace('-end', '-span'); } else { return GridEnd.__super__.prefixed.call(this, prop, prefix); } }; GridEnd.prototype.set = function(decl, prefix) { if (prefix === '-ms-') { decl.value = decl.value.replace(/span\s/i, ''); } return GridEnd.__super__.set.call(this, decl, prefix); }; return GridEnd; })(Declaration); module.exports = GridEnd; }).call(this); },{"../declaration":6}],33:[function(require,module,exports){ (function() { var Declaration, GridRowAlign, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); GridRowAlign = (function(superClass) { extend(GridRowAlign, superClass); function GridRowAlign() { return GridRowAlign.__super__.constructor.apply(this, arguments); } GridRowAlign.names = ['grid-row-align']; GridRowAlign.prototype.check = function(decl) { return decl.value.indexOf('flex-') === -1 && decl.value !== 'baseline'; }; GridRowAlign.prototype.prefixed = function(prop, prefix) { return prefix + 'grid-row-align'; }; GridRowAlign.prototype.normalize = function(prop) { return 'align-self'; }; return GridRowAlign; })(Declaration); module.exports = GridRowAlign; }).call(this); },{"../declaration":6}],34:[function(require,module,exports){ (function() { var Declaration, GridStart, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); GridStart = (function(superClass) { extend(GridStart, superClass); function GridStart() { return GridStart.__super__.constructor.apply(this, arguments); } GridStart.names = ['grid-row-start', 'grid-column-start', 'grid-row', 'grid-column']; GridStart.prototype.check = function(decl) { return decl.value.indexOf('/') === -1 || decl.value.indexOf('span') !== -1; }; GridStart.prototype.normalize = function(prop) { return prop.replace('-start', ''); }; GridStart.prototype.prefixed = function(prop, prefix) { if (prefix === '-ms-') { return prefix + prop.replace('-start', ''); } else { return GridStart.__super__.prefixed.call(this, prop, prefix); } }; GridStart.prototype.insert = function(decl, prefix, prefixes) { var parts; parts = this.splitValue(decl, prefix); if (parts.length === 2) { decl.cloneBefore({ prop: '-ms-' + decl.prop + '-span', value: parts[1] }); } return GridStart.__super__.insert.call(this, decl, prefix, prefixes); }; GridStart.prototype.set = function(decl, prefix) { var parts; parts = this.splitValue(decl, prefix); if (parts.length === 2) { decl.value = parts[0]; } return GridStart.__super__.set.call(this, decl, prefix); }; GridStart.prototype.splitValue = function(decl, prefix) { var parts; if (prefix === '-ms-' && decl.prop.indexOf('-start') === -1) { parts = decl.value.split(/\s*\/\s*span\s+/); if (parts.length === 2) { return parts; } } return false; }; return GridStart; })(Declaration); module.exports = GridStart; }).call(this); },{"../declaration":6}],35:[function(require,module,exports){ (function() { var Declaration, GridTemplate, parser, extend = 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; }, hasProp = {}.hasOwnProperty; parser = require('postcss-value-parser'); Declaration = require('../declaration'); GridTemplate = (function(superClass) { extend(GridTemplate, superClass); function GridTemplate() { return GridTemplate.__super__.constructor.apply(this, arguments); } GridTemplate.names = ['grid-template-rows', 'grid-template-columns', 'grid-rows', 'grid-columns']; GridTemplate.prototype.prefixed = function(prop, prefix) { if (prefix === '-ms-') { return prefix + prop.replace('template-', ''); } else { return GridTemplate.__super__.prefixed.call(this, prop, prefix); } }; GridTemplate.prototype.normalize = function(prop) { return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1'); }; GridTemplate.prototype.walkRepeat = function(node) { var count, first, fixed, i, j, len, ref; fixed = []; ref = node.nodes; for (j = 0, len = ref.length; j < len; j++) { i = ref[j]; if (i.nodes) { this.walkRepeat(i); } fixed.push(i); if (i.type === 'function' && i.value === 'repeat') { first = i.nodes.shift(); if (first) { count = first.value; i.nodes.shift(); i.value = ''; fixed.push({ type: 'word', value: "[" + count + "]" }); } } } return node.nodes = fixed; }; GridTemplate.prototype.changeRepeat = function(value) { var ast; ast = parser(value); this.walkRepeat(ast); return ast.toString(); }; GridTemplate.prototype.set = function(decl, prefix) { if (prefix === '-ms-' && decl.value.indexOf('repeat(') !== -1) { decl.value = this.changeRepeat(decl.value); } return GridTemplate.__super__.set.call(this, decl, prefix); }; return GridTemplate; })(Declaration); module.exports = GridTemplate; }).call(this); },{"../declaration":6,"postcss-value-parser":130}],36:[function(require,module,exports){ (function() { var Declaration, ImageRendering, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); ImageRendering = (function(superClass) { extend(ImageRendering, superClass); function ImageRendering() { return ImageRendering.__super__.constructor.apply(this, arguments); } ImageRendering.names = ['image-rendering', 'interpolation-mode']; ImageRendering.prototype.check = function(decl) { return decl.value === 'pixelated'; }; ImageRendering.prototype.prefixed = function(prop, prefix) { if (prefix === '-ms-') { return '-ms-interpolation-mode'; } else { return ImageRendering.__super__.prefixed.apply(this, arguments); } }; ImageRendering.prototype.set = function(decl, prefix) { if (prefix === '-ms-') { decl.prop = '-ms-interpolation-mode'; decl.value = 'nearest-neighbor'; return decl; } else { return ImageRendering.__super__.set.apply(this, arguments); } }; ImageRendering.prototype.normalize = function(prop) { return 'image-rendering'; }; ImageRendering.prototype.process = function(node, result) { return ImageRendering.__super__.process.apply(this, arguments); }; return ImageRendering; })(Declaration); module.exports = ImageRendering; }).call(this); },{"../declaration":6}],37:[function(require,module,exports){ (function() { var ImageSet, Value, list, extend = 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; }, hasProp = {}.hasOwnProperty; list = require('postcss/lib/list'); Value = require('../value'); ImageSet = (function(superClass) { extend(ImageSet, superClass); function ImageSet() { return ImageSet.__super__.constructor.apply(this, arguments); } ImageSet.names = ['image-set']; ImageSet.prototype.replace = function(string, prefix) { if (prefix === '-webkit-') { return ImageSet.__super__.replace.apply(this, arguments).replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi, 'url($1)$2'); } else { return ImageSet.__super__.replace.apply(this, arguments); } }; return ImageSet; })(Value); module.exports = ImageSet; }).call(this); },{"../value":59,"postcss/lib/list":142}],38:[function(require,module,exports){ (function() { var Declaration, InlineLogical, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); InlineLogical = (function(superClass) { extend(InlineLogical, superClass); function InlineLogical() { return InlineLogical.__super__.constructor.apply(this, arguments); } InlineLogical.names = ['border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', 'border-start', 'border-end', 'margin-start', 'margin-end', 'padding-start', 'padding-end']; InlineLogical.prototype.prefixed = function(prop, prefix) { return prefix + prop.replace('-inline', ''); }; InlineLogical.prototype.normalize = function(prop) { return prop.replace(/(margin|padding|border)-(start|end)/, '$1-inline-$2'); }; return InlineLogical; })(Declaration); module.exports = InlineLogical; }).call(this); },{"../declaration":6}],39:[function(require,module,exports){ (function() { var Declaration, JustifyContent, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); JustifyContent = (function(superClass) { extend(JustifyContent, superClass); function JustifyContent() { return JustifyContent.__super__.constructor.apply(this, arguments); } JustifyContent.names = ['justify-content', 'flex-pack', 'box-pack']; JustifyContent.oldValues = { 'flex-end': 'end', 'flex-start': 'start', 'space-between': 'justify', 'space-around': 'distribute' }; JustifyContent.prototype.prefixed = function(prop, prefix) { var ref, spec; ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2009) { return prefix + 'box-pack'; } else if (spec === 2012) { return prefix + 'flex-pack'; } else { return JustifyContent.__super__.prefixed.apply(this, arguments); } }; JustifyContent.prototype.normalize = function(prop) { return 'justify-content'; }; JustifyContent.prototype.set = function(decl, prefix) { var spec, value; spec = flexSpec(prefix)[0]; if (spec === 2009 || spec === 2012) { value = JustifyContent.oldValues[decl.value] || decl.value; decl.value = value; if (spec !== 2009 || value !== 'distribute') { return JustifyContent.__super__.set.call(this, decl, prefix); } } else if (spec === 'final') { return JustifyContent.__super__.set.apply(this, arguments); } }; return JustifyContent; })(Declaration); module.exports = JustifyContent; }).call(this); },{"../declaration":6,"./flex-spec":26}],40:[function(require,module,exports){ (function() { var Declaration, JustifyItems, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); JustifyItems = (function(superClass) { extend(JustifyItems, superClass); function JustifyItems() { return JustifyItems.__super__.constructor.apply(this, arguments); } JustifyItems.names = ['justify-items', 'grid-column-align']; JustifyItems.prototype.prefixed = function(prop, prefix) { return prefix + (prefix === '-ms-' ? 'grid-column-align' : prop); }; JustifyItems.prototype.normalize = function(prop) { return 'justify-items'; }; return JustifyItems; })(Declaration); module.exports = JustifyItems; }).call(this); },{"../declaration":6}],41:[function(require,module,exports){ (function() { var Declaration, MaskBorder, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); MaskBorder = (function(superClass) { extend(MaskBorder, superClass); function MaskBorder() { return MaskBorder.__super__.constructor.apply(this, arguments); } MaskBorder.names = ['mask-border', 'mask-border-source', 'mask-border-slice', 'mask-border-width', 'mask-border-outset', 'mask-border-repeat', 'mask-box-image', 'mask-box-image-source', 'mask-box-image-slice', 'mask-box-image-width', 'mask-box-image-outset', 'mask-box-image-repeat']; MaskBorder.prototype.normalize = function() { return this.name.replace('box-image', 'border'); }; MaskBorder.prototype.prefixed = function(prop, prefix) { if (prefix === '-webkit-') { return MaskBorder.__super__.prefixed.apply(this, arguments).replace('border', 'box-image'); } else { return MaskBorder.__super__.prefixed.apply(this, arguments); } }; return MaskBorder; })(Declaration); module.exports = MaskBorder; }).call(this); },{"../declaration":6}],42:[function(require,module,exports){ (function() { var Declaration, Order, flexSpec, extend = 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; }, hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); Order = (function(superClass) { extend(Order, superClass); function Order() { return Order.__super__.constructor.apply(this, arguments); } Order.names = ['order', 'flex-order', 'box-ordinal-group']; Order.prototype.prefixed = function(prop, prefix) { var ref, spec; ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2009) { return prefix + 'box-ordinal-group'; } else if (spec === 2012) { return prefix + 'flex-order'; } else { return Order.__super__.prefixed.apply(this, arguments); } }; Order.prototype.normalize = function(prop) { return 'order'; }; Order.prototype.set = function(decl, prefix) { var spec; spec = flexSpec(prefix)[0]; if (spec === 2009) { decl.value = (parseInt(decl.value) + 1).toString(); return Order.__super__.set.call(this, decl, prefix); } else { return Order.__super__.set.apply(this, arguments); } }; return Order; })(Declaration); module.exports = Order; }).call(this); },{"../declaration":6,"./flex-spec":26}],43:[function(require,module,exports){ (function() { var OldValue, Pixelated, Value, extend = 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; }, hasProp = {}.hasOwnProperty; OldValue = require('../old-value'); Value = require('../value'); Pixelated = (function(superClass) { extend(Pixelated, superClass); function Pixelated() { return Pixelated.__super__.constructor.apply(this, arguments); } Pixelated.names = ['pixelated']; Pixelated.prototype.replace = function(string, prefix) { if (prefix === '-webkit-') { return string.replace(this.regexp(), '$1-webkit-optimize-contrast'); } else if (prefix === '-moz-') { return string.replace(this.regexp(), '$1-moz-crisp-edges'); } else { return Pixelated.__super__.replace.apply(this, arguments); } }; Pixelated.prototype.old = function(prefix) { if (prefix === '-webkit-') { return new OldValue(this.name, '-webkit-optimize-contrast'); } else if (prefix === '-moz-') { return new OldValue(this.name, '-moz-crisp-edges'); } else { return Pixelated.__super__.old.apply(this, arguments); } }; return Pixelated; })(Value); module.exports = Pixelated; }).call(this); },{"../old-value":50,"../value":59}],44:[function(require,module,exports){ (function() { var Placeholder, Selector, extend = 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; }, hasProp = {}.hasOwnProperty; Selector = require('../selector'); Placeholder = (function(superClass) { extend(Placeholder, superClass); function Placeholder() { return Placeholder.__super__.constructor.apply(this, arguments); } Placeholder.names = [':placeholder-shown', '::placeholder']; Placeholder.prototype.possible = function() { return Placeholder.__super__.possible.apply(this, arguments).concat('-moz- old'); }; Placeholder.prototype.prefixed = function(prefix) { if ('-webkit-' === prefix) { return '::-webkit-input-placeholder'; } else if ('-ms-' === prefix) { return ':-ms-input-placeholder'; } else if ('-moz- old' === prefix) { return ':-moz-placeholder'; } else { return "::" + prefix + "placeholder"; } }; return Placeholder; })(Selector); module.exports = Placeholder; }).call(this); },{"../selector":55}],45:[function(require,module,exports){ (function() { var Declaration, TextEmphasisPosition, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); TextEmphasisPosition = (function(superClass) { extend(TextEmphasisPosition, superClass); function TextEmphasisPosition() { return TextEmphasisPosition.__super__.constructor.apply(this, arguments); } TextEmphasisPosition.names = ['text-emphasis-position']; TextEmphasisPosition.prototype.set = function(decl, prefix) { if (prefix === '-webkit-') { decl.value = decl.value.replace(/\s*(right|left)\s*/i, ''); return TextEmphasisPosition.__super__.set.call(this, decl, prefix); } else { return TextEmphasisPosition.__super__.set.apply(this, arguments); } }; return TextEmphasisPosition; })(Declaration); module.exports = TextEmphasisPosition; }).call(this); },{"../declaration":6}],46:[function(require,module,exports){ (function() { var Declaration, TransformDecl, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); TransformDecl = (function(superClass) { extend(TransformDecl, superClass); function TransformDecl() { return TransformDecl.__super__.constructor.apply(this, arguments); } TransformDecl.names = ['transform', 'transform-origin']; TransformDecl.functions3d = ['matrix3d', 'translate3d', 'translateZ', 'scale3d', 'scaleZ', 'rotate3d', 'rotateX', 'rotateY', 'perspective']; TransformDecl.prototype.keyframeParents = function(decl) { var parent; parent = decl.parent; while (parent) { if (parent.type === 'atrule' && parent.name === 'keyframes') { return true; } parent = parent.parent; } return false; }; TransformDecl.prototype.contain3d = function(decl) { var func, i, len, ref; if (decl.prop === 'transform-origin') { return false; } ref = TransformDecl.functions3d; for (i = 0, len = ref.length; i < len; i++) { func = ref[i]; if (decl.value.indexOf(func + "(") !== -1) { return true; } } return false; }; TransformDecl.prototype.set = function(decl, prefix) { decl = TransformDecl.__super__.set.apply(this, arguments); if (prefix === '-ms-') { decl.value = decl.value.replace(/rotateZ/gi, 'rotate'); } return decl; }; TransformDecl.prototype.insert = function(decl, prefix, prefixes) { if (prefix === '-ms-') { if (!this.contain3d(decl) && !this.keyframeParents(decl)) { return TransformDecl.__super__.insert.apply(this, arguments); } } else if (prefix === '-o-') { if (!this.contain3d(decl)) { return TransformDecl.__super__.insert.apply(this, arguments); } } else { return TransformDecl.__super__.insert.apply(this, arguments); } }; return TransformDecl; })(Declaration); module.exports = TransformDecl; }).call(this); },{"../declaration":6}],47:[function(require,module,exports){ (function() { var Declaration, WritingMode, extend = 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; }, hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); WritingMode = (function(superClass) { extend(WritingMode, superClass); function WritingMode() { return WritingMode.__super__.constructor.apply(this, arguments); } WritingMode.names = ['writing-mode']; WritingMode.msValues = { 'horizontal-tb': 'lr-tb', 'vertical-rl': 'tb-rl', 'vertical-lr': 'tb-lr' }; WritingMode.prototype.set = function(decl, prefix) { if (prefix === '-ms-') { decl.value = WritingMode.msValues[decl.value] || decl.value; return WritingMode.__super__.set.call(this, decl, prefix); } else { return WritingMode.__super__.set.apply(this, arguments); } }; return WritingMode; })(Declaration); module.exports = WritingMode; }).call(this); },{"../declaration":6}],48:[function(require,module,exports){ (function() { var browserslist, capitalize, names, prefix; browserslist = require('browserslist'); capitalize = function(str) { return str.slice(0, 1).toUpperCase() + str.slice(1); }; names = { ie: 'IE', ie_mob: 'IE Mobile', ios_saf: 'iOS', op_mini: 'Opera Mini', op_mob: 'Opera Mobile', and_chr: 'Chrome for Android', and_ff: 'Firefox for Android', and_uc: 'UC for Android' }; prefix = function(name, prefixes) { var out; out = ' ' + name + ': '; out += prefixes.map(function(i) { return i.replace(/^-(.*)-$/g, '$1'); }).join(', '); out += "\n"; return out; }; module.exports = function(prefixes) { var atrules, browser, coverage, data, j, k, l, len, len1, len2, list, name, out, props, ref, ref1, ref2, ref3, ref4, ref5, round, selector, selectors, string, value, values, version, versions; if (prefixes.browsers.selected.length === 0) { return "No browsers selected"; } versions = []; ref = prefixes.browsers.selected; for (j = 0, len = ref.length; j < len; j++) { browser = ref[j]; ref1 = browser.split(' '), name = ref1[0], version = ref1[1]; name = names[name] || capitalize(name); if (versions[name]) { versions[name].push(version); } else { versions[name] = [version]; } } out = "Browsers:\n"; for (browser in versions) { list = versions[browser]; list = list.sort(function(a, b) { return parseFloat(b) - parseFloat(a); }); out += ' ' + browser + ': ' + list.join(', ') + "\n"; } coverage = browserslist.coverage(prefixes.browsers.selected); round = Math.round(coverage * 100) / 100.0; out += "\nThese browsers account for " + round + "% of all users globally\n"; atrules = ''; ref2 = prefixes.add; for (name in ref2) { data = ref2[name]; if (name[0] === '@' && data.prefixes) { atrules += prefix(name, data.prefixes); } } if (atrules !== '') { out += "\nAt-Rules:\n" + atrules; } selectors = ''; ref3 = prefixes.add.selectors; for (k = 0, len1 = ref3.length; k < len1; k++) { selector = ref3[k]; if (selector.prefixes) { selectors += prefix(selector.name, selector.prefixes); } } if (selectors !== '') { out += "\nSelectors:\n" + selectors; } values = ''; props = ''; ref4 = prefixes.add; for (name in ref4) { data = ref4[name]; if (name[0] !== '@' && data.prefixes) { props += prefix(name, data.prefixes); } if (!data.values) { continue; } ref5 = data.values; for (l = 0, len2 = ref5.length; l < len2; l++) { value = ref5[l]; string = prefix(value.name, value.prefixes); if (values.indexOf(string) === -1) { values += string; } } } if (props !== '') { out += "\nProperties:\n" + props; } if (values !== '') { out += "\nValues:\n" + values; } if (atrules === '' && selectors === '' && props === '' && values === '') { out += '\nAwesome! Your browsers don\'t require any vendor prefixes.' + '\nNow you can remove Autoprefixer from build steps.'; } return out; }; }).call(this); },{"browserslist":64}],49:[function(require,module,exports){ (function() { var OldSelector; OldSelector = (function() { function OldSelector(selector, prefix1) { var i, len, prefix, ref; this.prefix = prefix1; this.prefixed = selector.prefixed(this.prefix); this.regexp = selector.regexp(this.prefix); this.prefixeds = []; ref = selector.possible(); for (i = 0, len = ref.length; i < len; i++) { prefix = ref[i]; this.prefixeds.push([selector.prefixed(prefix), selector.regexp(prefix)]); } this.unprefixed = selector.name; this.nameRegexp = selector.regexp(); } OldSelector.prototype.isHack = function(rule) { var before, i, index, len, ref, ref1, regexp, rules, some, string; index = rule.parent.index(rule) + 1; rules = rule.parent.nodes; while (index < rules.length) { before = rules[index].selector; if (!before) { return true; } if (before.indexOf(this.unprefixed) !== -1 && before.match(this.nameRegexp)) { return false; } some = false; ref = this.prefixeds; for (i = 0, len = ref.length; i < len; i++) { ref1 = ref[i], string = ref1[0], regexp = ref1[1]; if (before.indexOf(string) !== -1 && before.match(regexp)) { some = true; break; } } if (!some) { return true; } index += 1; } return true; }; OldSelector.prototype.check = function(rule) { if (rule.selector.indexOf(this.prefixed) === -1) { return false; } if (!rule.selector.match(this.regexp)) { return false; } if (this.isHack(rule)) { return false; } return true; }; return OldSelector; })(); module.exports = OldSelector; }).call(this); },{}],50:[function(require,module,exports){ (function() { var OldValue, utils; utils = require('./utils'); OldValue = (function() { function OldValue(unprefixed, prefixed, string, regexp) { this.unprefixed = unprefixed; this.prefixed = prefixed; this.string = string; this.regexp = regexp; this.regexp || (this.regexp = utils.regexp(this.prefixed)); this.string || (this.string = this.prefixed); } OldValue.prototype.check = function(value) { if (value.indexOf(this.string) !== -1) { return !!value.match(this.regexp); } else { return false; } }; return OldValue; })(); module.exports = OldValue; }).call(this); },{"./utils":58}],51:[function(require,module,exports){ (function() { var Browsers, Prefixer, clone, utils, vendor, hasProp = {}.hasOwnProperty; Browsers = require('./browsers'); utils = require('./utils'); vendor = require('postcss/lib/vendor'); clone = function(obj, parent) { var cloned, i, value; cloned = new obj.constructor(); for (i in obj) { if (!hasProp.call(obj, i)) continue; value = obj[i]; if (i === 'parent' && typeof value === 'object') { if (parent) { cloned[i] = parent; } } else if (i === 'source') { cloned[i] = value; } else if (i === null) { cloned[i] = value; } else if (value instanceof Array) { cloned[i] = value.map(function(i) { return clone(i, cloned); }); } else if (i !== '_autoprefixerPrefix' && i !== '_autoprefixerValues') { if (typeof value === 'object' && value !== null) { value = clone(value, cloned); } cloned[i] = value; } } return cloned; }; Prefixer = (function() { Prefixer.hack = function(klass) { var j, len, name, ref, results; this.hacks || (this.hacks = {}); ref = klass.names; results = []; for (j = 0, len = ref.length; j < len; j++) { name = ref[j]; results.push(this.hacks[name] = klass); } return results; }; Prefixer.load = function(name, prefixes, all) { var klass, ref; klass = (ref = this.hacks) != null ? ref[name] : void 0; if (klass) { return new klass(name, prefixes, all); } else { return new this(name, prefixes, all); } }; Prefixer.clone = function(node, overrides) { var cloned, name; cloned = clone(node); for (name in overrides) { cloned[name] = overrides[name]; } return cloned; }; function Prefixer(name1, prefixes1, all1) { this.name = name1; this.prefixes = prefixes1; this.all = all1; } Prefixer.prototype.parentPrefix = function(node) { var prefix; prefix = node._autoprefixerPrefix != null ? node._autoprefixerPrefix : node.type === 'decl' && node.prop[0] === '-' ? vendor.prefix(node.prop) : node.type === 'root' ? false : node.type === 'rule' && node.selector.indexOf(':-') !== -1 && /:(-\w+-)/.test(node.selector) ? node.selector.match(/:(-\w+-)/)[1] : node.type === 'atrule' && node.name[0] === '-' ? vendor.prefix(node.name) : this.parentPrefix(node.parent); if (Browsers.prefixes().indexOf(prefix) === -1) { prefix = false; } return node._autoprefixerPrefix = prefix; }; Prefixer.prototype.process = function(node) { var added, j, k, len, len1, parent, prefix, prefixes, ref; if (!this.check(node)) { return; } parent = this.parentPrefix(node); prefixes = []; ref = this.prefixes; for (j = 0, len = ref.length; j < len; j++) { prefix = ref[j]; if (parent && parent !== utils.removeNote(prefix)) { continue; } prefixes.push(prefix); } added = []; for (k = 0, len1 = prefixes.length; k < len1; k++) { prefix = prefixes[k]; if (this.add(node, prefix, added.concat([prefix]))) { added.push(prefix); } } return added; }; Prefixer.prototype.clone = function(node, overrides) { return Prefixer.clone(node, overrides); }; return Prefixer; })(); module.exports = Prefixer; }).call(this); },{"./browsers":5,"./utils":58,"postcss/lib/vendor":157}],52:[function(require,module,exports){ (function() { var AtRule, Browsers, Declaration, Prefixes, Processor, Resolution, Selector, Supports, Transition, Value, declsCache, utils, vendor; Declaration = require('./declaration'); Resolution = require('./resolution'); Transition = require('./transition'); Processor = require('./processor'); Supports = require('./supports'); Browsers = require('./browsers'); Selector = require('./selector'); AtRule = require('./at-rule'); Value = require('./value'); utils = require('./utils'); vendor = require('postcss/lib/vendor'); Selector.hack(require('./hacks/fullscreen')); Selector.hack(require('./hacks/placeholder')); Declaration.hack(require('./hacks/flex')); Declaration.hack(require('./hacks/order')); Declaration.hack(require('./hacks/filter')); Declaration.hack(require('./hacks/grid-end')); Declaration.hack(require('./hacks/flex-flow')); Declaration.hack(require('./hacks/flex-grow')); Declaration.hack(require('./hacks/flex-wrap')); Declaration.hack(require('./hacks/grid-start')); Declaration.hack(require('./hacks/align-self')); Declaration.hack(require('./hacks/flex-basis')); Declaration.hack(require('./hacks/mask-border')); Declaration.hack(require('./hacks/align-items')); Declaration.hack(require('./hacks/flex-shrink')); Declaration.hack(require('./hacks/break-props')); Declaration.hack(require('./hacks/writing-mode')); Declaration.hack(require('./hacks/border-image')); Declaration.hack(require('./hacks/justify-items')); Declaration.hack(require('./hacks/align-content')); Declaration.hack(require('./hacks/border-radius')); Declaration.hack(require('./hacks/block-logical')); Declaration.hack(require('./hacks/grid-template')); Declaration.hack(require('./hacks/inline-logical')); Declaration.hack(require('./hacks/grid-row-align')); Declaration.hack(require('./hacks/transform-decl')); Declaration.hack(require('./hacks/flex-direction')); Declaration.hack(require('./hacks/image-rendering')); Declaration.hack(require('./hacks/justify-content')); Declaration.hack(require('./hacks/background-size')); Declaration.hack(require('./hacks/text-emphasis-position')); Value.hack(require('./hacks/fill')); Value.hack(require('./hacks/gradient')); Value.hack(require('./hacks/pixelated')); Value.hack(require('./hacks/image-set')); Value.hack(require('./hacks/cross-fade')); Value.hack(require('./hacks/flex-values')); Value.hack(require('./hacks/display-flex')); Value.hack(require('./hacks/display-grid')); Value.hack(require('./hacks/filter-value')); declsCache = {}; Prefixes = (function() { function Prefixes(data1, browsers, options) { var ref; this.data = data1; this.browsers = browsers; this.options = options != null ? options : {}; ref = this.preprocess(this.select(this.data)), this.add = ref[0], this.remove = ref[1]; this.transition = new Transition(this); this.processor = new Processor(this); } Prefixes.prototype.cleaner = function() { var empty; if (!this.cleanerCache) { if (this.browsers.selected.length) { empty = new Browsers(this.browsers.data, []); this.cleanerCache = new Prefixes(this.data, empty, this.options); } else { return this; } } return this.cleanerCache; }; Prefixes.prototype.select = function(list) { var add, all, data, name, notes, selected; selected = { add: {}, remove: {} }; for (name in list) { data = list[name]; add = data.browsers.map(function(i) { var params; params = i.split(' '); return { browser: params[0] + ' ' + params[1], note: params[2] }; }); notes = add.filter(function(i) { return i.note; }).map((function(_this) { return function(i) { return _this.browsers.prefix(i.browser) + ' ' + i.note; }; })(this)); notes = utils.uniq(notes); add = add.filter((function(_this) { return function(i) { return _this.browsers.isSelected(i.browser); }; })(this)).map((function(_this) { return function(i) { var prefix; prefix = _this.browsers.prefix(i.browser); if (i.note) { return prefix + ' ' + i.note; } else { return prefix; } }; })(this)); add = this.sort(utils.uniq(add)); if (this.options.flexbox === 'no-2009') { add = add.filter(function(i) { return i.indexOf('2009') === -1; }); } all = data.browsers.map((function(_this) { return function(i) { return _this.browsers.prefix(i); }; })(this)); if (data.mistakes) { all = all.concat(data.mistakes); } all = all.concat(notes); all = utils.uniq(all); if (add.length) { selected.add[name] = add; if (add.length < all.length) { selected.remove[name] = all.filter(function(i) { return add.indexOf(i) === -1; }); } } else { selected.remove[name] = all; } } return selected; }; Prefixes.prototype.sort = function(prefixes) { return prefixes.sort(function(a, b) { var aLength, bLength; aLength = utils.removeNote(a).length; bLength = utils.removeNote(b).length; if (aLength === bLength) { return b.length - a.length; } else { return bLength - aLength; } }); }; Prefixes.prototype.preprocess = function(selected) { var a, add, j, k, l, len, len1, len2, len3, len4, len5, len6, m, n, name, o, old, olds, p, prefix, prefixed, prefixes, prop, props, ref, ref1, ref2, ref3, remove, selector, value, values; add = { selectors: [], '@supports': new Supports(Prefixes, this) }; ref = selected.add; for (name in ref) { prefixes = ref[name]; if (name === '@keyframes' || name === '@viewport') { add[name] = new AtRule(name, prefixes, this); } else if (name === '@resolution') { add[name] = new Resolution(name, prefixes, this); } else if (this.data[name].selector) { add.selectors.push(Selector.load(name, prefixes, this)); } else { props = this.data[name].props; if (props) { value = Value.load(name, prefixes, this); for (j = 0, len = props.length; j < len; j++) { prop = props[j]; if (!add[prop]) { add[prop] = { values: [] }; } add[prop].values.push(value); } } else { values = ((ref1 = add[name]) != null ? ref1.values : void 0) || []; add[name] = Declaration.load(name, prefixes, this); add[name].values = values; } } } remove = { selectors: [] }; ref2 = selected.remove; for (name in ref2) { prefixes = ref2[name]; if (this.data[name].selector) { selector = Selector.load(name, prefixes); for (k = 0, len1 = prefixes.length; k < len1; k++) { prefix = prefixes[k]; remove.selectors.push(selector.old(prefix)); } } else if (name === '@keyframes' || name === '@viewport') { for (l = 0, len2 = prefixes.length; l < len2; l++) { prefix = prefixes[l]; prefixed = '@' + prefix + name.slice(1); remove[prefixed] = { remove: true }; } } else if (name === '@resolution') { remove[name] = new Resolution(name, prefixes, this); } else { props = this.data[name].props; if (props) { value = Value.load(name, [], this); for (m = 0, len3 = prefixes.length; m < len3; m++) { prefix = prefixes[m]; old = value.old(prefix); if (old) { for (n = 0, len4 = props.length; n < len4; n++) { prop = props[n]; if (!remove[prop]) { remove[prop] = {}; } if (!remove[prop].values) { remove[prop].values = []; } remove[prop].values.push(old); } } } } else { for (o = 0, len5 = prefixes.length; o < len5; o++) { prefix = prefixes[o]; prop = vendor.unprefixed(name); olds = this.decl(name).old(name, prefix); if (name === 'align-self') { a = (ref3 = add[name]) != null ? ref3.prefixes : void 0; if (a) { if (prefix === '-webkit- 2009' && a.indexOf('-webkit-') !== -1) { continue; } else if (prefix === '-webkit-' && a.indexOf('-webkit- 2009') !== -1) { continue; } } } for (p = 0, len6 = olds.length; p < len6; p++) { prefixed = olds[p]; if (!remove[prefixed]) { remove[prefixed] = {}; } remove[prefixed].remove = true; } } } } } return [add, remove]; }; Prefixes.prototype.decl = function(prop) { var decl; decl = declsCache[prop]; if (decl) { return decl; } else { return declsCache[prop] = Declaration.load(prop); } }; Prefixes.prototype.unprefixed = function(prop) { return this.normalize(vendor.unprefixed(prop)); }; Prefixes.prototype.normalize = function(prop) { return this.decl(prop).normalize(prop); }; Prefixes.prototype.prefixed = function(prop, prefix) { prop = vendor.unprefixed(prop); return this.decl(prop).prefixed(prop, prefix); }; Prefixes.prototype.values = function(type, prop) { var data, global, ref, ref1, values; data = this[type]; global = (ref = data['*']) != null ? ref.values : void 0; values = (ref1 = data[prop]) != null ? ref1.values : void 0; if (global && values) { return utils.uniq(global.concat(values)); } else { return global || values || []; } }; Prefixes.prototype.group = function(decl) { var checker, index, length, rule, unprefixed; rule = decl.parent; index = rule.index(decl); length = rule.nodes.length; unprefixed = this.unprefixed(decl.prop); checker = (function(_this) { return function(step, callback) { var other; index += step; while (index >= 0 && index < length) { other = rule.nodes[index]; if (other.type === 'decl') { if (step === -1 && other.prop === unprefixed) { if (!Browsers.withPrefix(other.value)) { break; } } if (_this.unprefixed(other.prop) !== unprefixed) { break; } else if (callback(other) === true) { return true; } if (step === +1 && other.prop === unprefixed) { if (!Browsers.withPrefix(other.value)) { break; } } } index += step; } return false; }; })(this); return { up: function(callback) { return checker(-1, callback); }, down: function(callback) { return checker(+1, callback); } }; }; return Prefixes; })(); module.exports = Prefixes; }).call(this); },{"./at-rule":2,"./browsers":5,"./declaration":6,"./hacks/align-content":7,"./hacks/align-items":8,"./hacks/align-self":9,"./hacks/background-size":10,"./hacks/block-logical":11,"./hacks/border-image":12,"./hacks/border-radius":13,"./hacks/break-props":14,"./hacks/cross-fade":15,"./hacks/display-flex":16,"./hacks/display-grid":17,"./hacks/fill":18,"./hacks/filter":20,"./hacks/filter-value":19,"./hacks/flex":29,"./hacks/flex-basis":21,"./hacks/flex-direction":22,"./hacks/flex-flow":23,"./hacks/flex-grow":24,"./hacks/flex-shrink":25,"./hacks/flex-values":27,"./hacks/flex-wrap":28,"./hacks/fullscreen":30,"./hacks/gradient":31,"./hacks/grid-end":32,"./hacks/grid-row-align":33,"./hacks/grid-start":34,"./hacks/grid-template":35,"./hacks/image-rendering":36,"./hacks/image-set":37,"./hacks/inline-logical":38,"./hacks/justify-content":39,"./hacks/justify-items":40,"./hacks/mask-border":41,"./hacks/order":42,"./hacks/pixelated":43,"./hacks/placeholder":44,"./hacks/text-emphasis-position":45,"./hacks/transform-decl":46,"./hacks/writing-mode":47,"./processor":53,"./resolution":54,"./selector":55,"./supports":56,"./transition":57,"./utils":58,"./value":59,"postcss/lib/vendor":157}],53:[function(require,module,exports){ (function() { var OLD_DIRECTION, Processor, Value, utils, vendor; vendor = require('postcss/lib/vendor'); Value = require('./value'); utils = require('./utils'); OLD_DIRECTION = /(^|[^-])(linear|radial)-gradient\(\s*(top|left|right|bottom)/i; Processor = (function() { function Processor(prefixes) { this.prefixes = prefixes; } Processor.prototype.add = function(css, result) { var keyframes, resolution, supports, viewport; resolution = this.prefixes.add['@resolution']; keyframes = this.prefixes.add['@keyframes']; viewport = this.prefixes.add['@viewport']; supports = this.prefixes.add['@supports']; css.walkAtRules((function(_this) { return function(rule) { if (rule.name === 'keyframes') { if (!_this.disabled(rule)) { return keyframes != null ? keyframes.process(rule) : void 0; } } else if (rule.name === 'viewport') { if (!_this.disabled(rule)) { return viewport != null ? viewport.process(rule) : void 0; } } else if (rule.name === 'supports') { if (_this.prefixes.options.supports !== false && !_this.disabled(rule)) { return supports.process(rule); } } else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) { if (!_this.disabled(rule)) { return resolution != null ? resolution.process(rule) : void 0; } } }; })(this)); css.walkRules((function(_this) { return function(rule) { var j, len, ref, results, selector; if (_this.disabled(rule)) { return; } ref = _this.prefixes.add.selectors; results = []; for (j = 0, len = ref.length; j < len; j++) { selector = ref[j]; results.push(selector.process(rule, result)); } return results; }; })(this)); css.walkDecls((function(_this) { return function(decl) { var display, prefixer; if (_this.disabled(decl)) { return; } if (decl.prop === 'display' && decl.value === 'box') { result.warn('You should write display: flex by final spec ' + 'instead of display: box', { node: decl }); return; } if (decl.value.indexOf('linear-gradient') !== -1) { if (OLD_DIRECTION.test(decl.value)) { result.warn('Gradient has outdated direction syntax. ' + 'New syntax is like `to left` instead of `right`.', { node: decl }); } } if (decl.prop === 'text-emphasis-position') { if (decl.value === 'under' || decl.value === 'over') { result.warn('You should use 2 values for text-emphasis-position ' + 'For example, `under left` instead of just `under`.', { node: decl }); } } if (decl.value.indexOf('fill-available') !== -1) { result.warn('Replace fill-available to fill, ' + 'because spec had been changed', { node: decl }); } if (_this.prefixes.options.flexbox !== false) { if (decl.prop === 'grid-row-end' && decl.value.indexOf('span') === -1) { result.warn('IE supports only grid-row-end with span. ' + 'You should add grid: false option to Autoprefixer ' + 'and use some JS grid polyfill for full spec support', { node: decl }); } if (decl.prop === 'grid-row') { if (decl.value.indexOf('/') !== -1 && decl.value.indexOf('span') === -1) { result.warn('IE supports only grid-row with / and span. ' + 'You should add grid: false option to Autoprefixer ' + 'and use some JS grid polyfill for full spec support', { node: decl }); } } } if (decl.prop === 'transition' || decl.prop === 'transition-property') { return _this.prefixes.transition.add(decl, result); } else if (decl.prop === 'align-self') { display = _this.displayType(decl); if (display !== 'grid' && _this.prefixes.options.flexbox !== false) { prefixer = _this.prefixes.add['align-self']; if (prefixer && prefixer.prefixes) { prefixer.process(decl); } } if (display !== 'flex' && _this.prefixes.options.grid !== false) { prefixer = _this.prefixes.add['grid-row-align']; if (prefixer && prefixer.prefixes) { return prefixer.process(decl); } } } else { prefixer = _this.prefixes.add[decl.prop]; if (prefixer && prefixer.prefixes) { return prefixer.process(decl); } } }; })(this)); return css.walkDecls((function(_this) { return function(decl) { var j, len, ref, unprefixed, value; if (_this.disabled(decl)) { return; } unprefixed = _this.prefixes.unprefixed(decl.prop); ref = _this.prefixes.values('add', unprefixed); for (j = 0, len = ref.length; j < len; j++) { value = ref[j]; value.process(decl, result); } return Value.save(_this.prefixes, decl); }; })(this)); }; Processor.prototype.remove = function(css) { var checker, j, len, ref, resolution; resolution = this.prefixes.remove['@resolution']; css.walkAtRules((function(_this) { return function(rule, i) { if (_this.prefixes.remove['@' + rule.name]) { if (!_this.disabled(rule)) { return rule.parent.removeChild(i); } } else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) { return resolution != null ? resolution.clean(rule) : void 0; } }; })(this)); ref = this.prefixes.remove.selectors; for (j = 0, len = ref.length; j < len; j++) { checker = ref[j]; css.walkRules((function(_this) { return function(rule, i) { if (checker.check(rule)) { if (!_this.disabled(rule)) { return rule.parent.removeChild(i); } } }; })(this)); } return css.walkDecls((function(_this) { return function(decl, i) { var k, len1, notHack, ref1, ref2, rule, unprefixed; if (_this.disabled(decl)) { return; } rule = decl.parent; unprefixed = _this.prefixes.unprefixed(decl.prop); if (decl.prop === 'transition' || decl.prop === 'transition-property') { _this.prefixes.transition.remove(decl); } if ((ref1 = _this.prefixes.remove[decl.prop]) != null ? ref1.remove : void 0) { notHack = _this.prefixes.group(decl).down(function(other) { return _this.prefixes.normalize(other.prop) === unprefixed; }); if (notHack && !_this.withHackValue(decl)) { if (decl.raw('before').indexOf("\n") > -1) { _this.reduceSpaces(decl); } rule.removeChild(i); return; } } ref2 = _this.prefixes.values('remove', unprefixed); for (k = 0, len1 = ref2.length; k < len1; k++) { checker = ref2[k]; if (checker.check(decl.value)) { unprefixed = checker.unprefixed; notHack = _this.prefixes.group(decl).down(function(other) { return other.value.indexOf(unprefixed) !== -1; }); if (notHack) { rule.removeChild(i); return; } else if (checker.clean) { checker.clean(decl); return; } } } }; })(this)); }; Processor.prototype.withHackValue = function(decl) { return decl.prop === '-webkit-background-clip' && decl.value === 'text'; }; Processor.prototype.disabled = function(node) { var other, status; if (this.prefixes.options.grid === false && node.type === 'decl') { if (node.prop === 'display' && node.value.indexOf('grid') !== -1) { return true; } if (node.prop.indexOf('grid') !== -1 || node.prop === 'justify-items') { return true; } } if (this.prefixes.options.flexbox === false && node.type === 'decl') { if (node.prop === 'display' && node.value.indexOf('flex') !== -1) { return true; } other = ['order', 'justify-content', 'align-items', 'align-content']; if (node.prop.indexOf('flex') !== -1 || other.indexOf(node.prop) !== -1) { return true; } } if (node._autoprefixerDisabled != null) { return node._autoprefixerDisabled; } else if (node.nodes) { status = void 0; node.each(function(i) { if (i.type !== 'comment') { return; } if (/(!\s*)?autoprefixer:\s*off/i.test(i.text)) { status = false; return false; } else if (/(!\s*)?autoprefixer:\s*on/i.test(i.text)) { status = true; return false; } }); return node._autoprefixerDisabled = status != null ? !status : node.parent ? this.disabled(node.parent) : false; } else if (node.parent) { return node._autoprefixerDisabled = this.disabled(node.parent); } else { return false; } }; Processor.prototype.reduceSpaces = function(decl) { var diff, parts, prevMin, stop; stop = false; this.prefixes.group(decl).up(function(other) { return stop = true; }); if (stop) { return; } parts = decl.raw('before').split("\n"); prevMin = parts[parts.length - 1].length; diff = false; return this.prefixes.group(decl).down(function(other) { var last; parts = other.raw('before').split("\n"); last = parts.length - 1; if (parts[last].length > prevMin) { if (diff === false) { diff = parts[last].length - prevMin; } parts[last] = parts[last].slice(0, -diff); return other.raws.before = parts.join("\n"); } }); }; Processor.prototype.displayType = function(decl) { var i, j, len, ref; ref = decl.parent.nodes; for (j = 0, len = ref.length; j < len; j++) { i = ref[j]; if (i.prop === 'display') { if (i.value.indexOf('flex') !== -1) { return 'flex'; } else if (i.value.indexOf('grid') !== -1) { return 'grid'; } } } return false; }; return Processor; })(); module.exports = Processor; }).call(this); },{"./utils":58,"./value":59,"postcss/lib/vendor":157}],54:[function(require,module,exports){ (function() { var Prefixer, Resolution, n2f, regexp, split, utils, extend = 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; }, hasProp = {}.hasOwnProperty; Prefixer = require('./prefixer'); utils = require('./utils'); n2f = require('num2fraction'); regexp = /(min|max)-resolution\s*:\s*\d*\.?\d+(dppx|dpi)/gi; split = /(min|max)-resolution(\s*:\s*)(\d*\.?\d+)(dppx|dpi)/i; Resolution = (function(superClass) { extend(Resolution, superClass); function Resolution() { return Resolution.__super__.constructor.apply(this, arguments); } Resolution.prototype.prefixName = function(prefix, name) { return name = prefix === '-moz-' ? name + '--moz-device-pixel-ratio' : prefix + name + '-device-pixel-ratio'; }; Resolution.prototype.prefixQuery = function(prefix, name, colon, value, units) { if (units === 'dpi') { value = Number(value / 96); } if (prefix === '-o-') { value = n2f(value); } return this.prefixName(prefix, name) + colon + value; }; Resolution.prototype.clean = function(rule) { var j, len, prefix, ref; if (!this.bad) { this.bad = []; ref = this.prefixes; for (j = 0, len = ref.length; j < len; j++) { prefix = ref[j]; this.bad.push(this.prefixName(prefix, 'min')); this.bad.push(this.prefixName(prefix, 'max')); } } return rule.params = utils.editList(rule.params, (function(_this) { return function(queries) { return queries.filter(function(query) { return _this.bad.every(function(i) { return query.indexOf(i) === -1; }); }); }; })(this)); }; Resolution.prototype.process = function(rule) { var parent, prefixes; parent = this.parentPrefix(rule); prefixes = parent ? [parent] : this.prefixes; return rule.params = utils.editList(rule.params, (function(_this) { return function(origin, prefixed) { var j, k, len, len1, prefix, processed, query; for (j = 0, len = origin.length; j < len; j++) { query = origin[j]; if (query.indexOf('min-resolution') === -1 && query.indexOf('max-resolution') === -1) { prefixed.push(query); continue; } for (k = 0, len1 = prefixes.length; k < len1; k++) { prefix = prefixes[k]; if (prefix === '-moz-' && rule.params.indexOf('dpi') !== -1) { continue; } else { processed = query.replace(regexp, function(str) { var parts; parts = str.match(split); return _this.prefixQuery(prefix, parts[1], parts[2], parts[3], parts[4]); }); prefixed.push(processed); } } prefixed.push(query); } return utils.uniq(prefixed); }; })(this)); }; return Resolution; })(Prefixer); module.exports = Resolution; }).call(this); },{"./prefixer":51,"./utils":58,"num2fraction":128}],55:[function(require,module,exports){ (function() { var Browsers, OldSelector, Prefixer, Selector, utils, extend = 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; }, hasProp = {}.hasOwnProperty; OldSelector = require('./old-selector'); Prefixer = require('./prefixer'); Browsers = require('./browsers'); utils = require('./utils'); Selector = (function(superClass) { extend(Selector, superClass); function Selector(name1, prefixes, all) { this.name = name1; this.prefixes = prefixes; this.all = all; this.regexpCache = {}; } Selector.prototype.check = function(rule) { if (rule.selector.indexOf(this.name) !== -1) { return !!rule.selector.match(this.regexp()); } else { return false; } }; Selector.prototype.prefixed = function(prefix) { return this.name.replace(/^([^\w]*)/, '$1' + prefix); }; Selector.prototype.regexp = function(prefix) { var name; if (this.regexpCache[prefix]) { return this.regexpCache[prefix]; } name = prefix ? this.prefixed(prefix) : this.name; return this.regexpCache[prefix] = RegExp("(^|[^:\"'=])" + (utils.escapeRegexp(name)), "gi"); }; Selector.prototype.possible = function() { return Browsers.prefixes(); }; Selector.prototype.prefixeds = function(rule) { var i, len, prefix, prefixeds, ref; if (rule._autoprefixerPrefixeds) { return rule._autoprefixerPrefixeds; } prefixeds = {}; ref = this.possible(); for (i = 0, len = ref.length; i < len; i++) { prefix = ref[i]; prefixeds[prefix] = this.replace(rule.selector, prefix); } return rule._autoprefixerPrefixeds = prefixeds; }; Selector.prototype.already = function(rule, prefixeds, prefix) { var before, index, key, prefixed, some; index = rule.parent.index(rule) - 1; while (index >= 0) { before = rule.parent.nodes[index]; if (before.type !== 'rule') { return false; } some = false; for (key in prefixeds) { prefixed = prefixeds[key]; if (before.selector === prefixed) { if (prefix === key) { return true; } else { some = true; break; } } } if (!some) { return false; } index -= 1; } return false; }; Selector.prototype.replace = function(selector, prefix) { return selector.replace(this.regexp(), '$1' + this.prefixed(prefix)); }; Selector.prototype.add = function(rule, prefix) { var cloned, prefixeds; prefixeds = this.prefixeds(rule); if (this.already(rule, prefixeds, prefix)) { return; } cloned = this.clone(rule, { selector: prefixeds[prefix] }); return rule.parent.insertBefore(rule, cloned); }; Selector.prototype.old = function(prefix) { return new OldSelector(this, prefix); }; return Selector; })(Prefixer); module.exports = Selector; }).call(this); },{"./browsers":5,"./old-selector":49,"./prefixer":51,"./utils":58}],56:[function(require,module,exports){ (function() { var Browsers, Supports, Value, brackets, browser, data, postcss, ref, support, supported, utils, version, versions; Browsers = require('./browsers'); brackets = require('./brackets'); Value = require('./value'); utils = require('./utils'); postcss = require('postcss'); supported = []; data = require('caniuse-db/features-json/css-featurequeries.json'); ref = data.stats; for (browser in ref) { versions = ref[browser]; for (version in versions) { support = versions[version]; if (/y/.test(support)) { supported.push(browser + ' ' + version); } } } Supports = (function() { function Supports(Prefixes, all1) { this.Prefixes = Prefixes; this.all = all1; } Supports.prototype.prefixer = function() { var browsers, filtered; if (this.prefixerCache) { return this.prefixerCache; } filtered = this.all.browsers.selected.filter((function(_this) { return function(i) { return supported.indexOf(i) !== -1; }; })(this)); browsers = new Browsers(this.all.browsers.data, filtered, this.all.options); return this.prefixerCache = new this.Prefixes(this.all.data, browsers, this.all.options); }; Supports.prototype.parse = function(str) { var prop, ref1, value; ref1 = str.split(':'), prop = ref1[0], value = ref1[1]; value || (value = ''); return [prop.trim(), value.trim()]; }; Supports.prototype.virtual = function(str) { var prop, ref1, rule, value; ref1 = this.parse(str), prop = ref1[0], value = ref1[1]; rule = postcss.parse('a{}').first; rule.append({ prop: prop, value: value, raws: { before: '' } }); return rule; }; Supports.prototype.prefixed = function(str) { var decl, j, k, len, len1, prefixer, prop, ref1, ref2, rule, value; rule = this.virtual(str); prop = rule.first.prop; prefixer = this.prefixer().add[prop]; if (prefixer != null) { if (typeof prefixer.process === "function") { prefixer.process(rule.first); } } ref1 = rule.nodes; for (j = 0, len = ref1.length; j < len; j++) { decl = ref1[j]; ref2 = this.prefixer().values('add', prop); for (k = 0, len1 = ref2.length; k < len1; k++) { value = ref2[k]; value.process(decl); } Value.save(this.all, decl); } return rule.nodes; }; Supports.prototype.isNot = function(node) { return typeof node === 'string' && /not\s*/i.test(node); }; Supports.prototype.isOr = function(node) { return typeof node === 'string' && /\s*or\s*/i.test(node); }; Supports.prototype.isProp = function(node) { return typeof node === 'object' && node.length === 1 && typeof node[0] === 'string'; }; Supports.prototype.isHack = function(all, unprefixed) { var check; check = new RegExp('(\\(|\\s)' + utils.escapeRegexp(unprefixed) + ':'); return !check.test(all); }; Supports.prototype.toRemove = function(str, all) { var checker, j, len, prop, ref1, ref2, ref3, unprefixed, value; ref1 = this.parse(str), prop = ref1[0], value = ref1[1]; unprefixed = this.all.unprefixed(prop); if (((ref2 = this.all.cleaner().remove[prop]) != null ? ref2.remove : void 0) && !this.isHack(all, unprefixed)) { return true; } ref3 = this.all.cleaner().values('remove', unprefixed); for (j = 0, len = ref3.length; j < len; j++) { checker = ref3[j]; if (checker.check(value)) { return true; } } return false; }; Supports.prototype.remove = function(nodes, all) { var i; i = 0; while (i < nodes.length) { if (!this.isNot(nodes[i - 1]) && this.isProp(nodes[i]) && this.isOr(nodes[i + 1])) { if (this.toRemove(nodes[i][0], all)) { nodes.splice(i, 2); } else { i += 2; } } else { if (typeof nodes[i] === 'object') { nodes[i] = this.remove(nodes[i], all); } i += 1; } } return nodes; }; Supports.prototype.cleanBrackets = function(nodes) { return nodes.map((function(_this) { return function(i) { if (typeof i === 'object') { if (i.length === 1 && typeof i[0] === 'object') { return _this.cleanBrackets(i[0]); } else { return _this.cleanBrackets(i); } } else { return i; } }; })(this)); }; Supports.prototype.convert = function(progress) { var i, j, len, result; result = ['']; for (j = 0, len = progress.length; j < len; j++) { i = progress[j]; result.push([i.prop + ": " + i.value]); result.push(' or '); } result[result.length - 1] = ''; return result; }; Supports.prototype.normalize = function(nodes) { if (typeof nodes === 'object') { nodes = nodes.filter(function(i) { return i !== ''; }); if (typeof nodes[0] === 'string' && nodes[0].indexOf(':') !== -1) { return [brackets.stringify(nodes)]; } else { return nodes.map((function(_this) { return function(i) { return _this.normalize(i); }; })(this)); } } else { return nodes; } }; Supports.prototype.add = function(nodes, all) { return nodes.map((function(_this) { return function(i) { var prefixed; if (_this.isProp(i)) { prefixed = _this.prefixed(i[0]); if (prefixed.length > 1) { return _this.convert(prefixed); } else { return i; } } else if (typeof i === 'object') { return _this.add(i, all); } else { return i; } }; })(this)); }; Supports.prototype.process = function(rule) { var ast; ast = brackets.parse(rule.params); ast = this.normalize(ast); ast = this.remove(ast, rule.params); ast = this.add(ast, rule.params); ast = this.cleanBrackets(ast); return rule.params = brackets.stringify(ast); }; return Supports; })(); module.exports = Supports; }).call(this); },{"./brackets":4,"./browsers":5,"./utils":58,"./value":59,"caniuse-db/features-json/css-featurequeries.json":81,"postcss":147}],57:[function(require,module,exports){ (function() { var Transition, list, parser, vendor; parser = require('postcss-value-parser'); vendor = require('postcss/lib/vendor'); list = require('postcss/lib/list'); Transition = (function() { function Transition(prefixes) { this.prefixes = prefixes; } Transition.prototype.props = ['transition', 'transition-property']; Transition.prototype.add = function(decl, result) { var added, declPrefixes, j, k, l, len, len1, len2, names, operaClean, param, params, prefix, prefixValue, prefixed, prefixer, prop, ref, ref1, value, webkitClean; declPrefixes = ((ref = this.prefixes.add[decl.prop]) != null ? ref.prefixes : void 0) || []; params = this.parse(decl.value); names = params.map((function(_this) { return function(i) { return _this.findProp(i); }; })(this)); added = []; if (names.some(function(i) { return i[0] === '-'; })) { return; } for (j = 0, len = params.length; j < len; j++) { param = params[j]; prop = this.findProp(param); if (prop[0] === '-') { continue; } prefixer = this.prefixes.add[prop]; if (!(prefixer != null ? prefixer.prefixes : void 0)) { continue; } ref1 = prefixer.prefixes; for (k = 0, len1 = ref1.length; k < len1; k++) { prefix = ref1[k]; prefixed = this.prefixes.prefixed(prop, prefix); if (prefixed !== '-ms-transform' && names.indexOf(prefixed) === -1) { if (!this.disabled(prop, prefix)) { added.push(this.clone(prop, prefixed, param)); } } } } params = params.concat(added); value = this.stringify(params); webkitClean = this.stringify(this.cleanFromUnprefixed(params, '-webkit-')); if (declPrefixes.indexOf('-webkit-') !== -1) { this.cloneBefore(decl, '-webkit-' + decl.prop, webkitClean); } this.cloneBefore(decl, decl.prop, webkitClean); if (declPrefixes.indexOf('-o-') !== -1) { operaClean = this.stringify(this.cleanFromUnprefixed(params, '-o-')); this.cloneBefore(decl, '-o-' + decl.prop, operaClean); } for (l = 0, len2 = declPrefixes.length; l < len2; l++) { prefix = declPrefixes[l]; if (prefix !== '-webkit-' && prefix !== '-o-') { prefixValue = this.stringify(this.cleanOtherPrefixes(params, prefix)); this.cloneBefore(decl, prefix + decl.prop, prefixValue); } } if (value !== decl.value && !this.already(decl, decl.prop, value)) { this.checkForWarning(result, decl); decl.cloneBefore(); return decl.value = value; } }; Transition.prototype.findProp = function(param) { var i, j, len, prop, token; prop = param[0].value; if (/^\d/.test(prop)) { for (i = j = 0, len = param.length; j < len; i = ++j) { token = param[i]; if (i !== 0 && token.type === 'word') { return token.value; } } } return prop; }; Transition.prototype.already = function(decl, prop, value) { return decl.parent.some(function(i) { return i.prop === prop && i.value === value; }); }; Transition.prototype.cloneBefore = function(decl, prop, value) { if (!this.already(decl, prop, value)) { return decl.cloneBefore({ prop: prop, value: value }); } }; Transition.prototype.checkForWarning = function(result, decl) { if (decl.prop === 'transition-property') { return decl.parent.each(function(i) { if (i.type !== 'decl') { return; } if (i.prop.indexOf('transition-') !== 0) { return; } if (i.prop === 'transition-property') { return; } if (list.comma(i.value).length > 1) { decl.warn(result, 'Replace transition-property to transition, ' + 'because Autoprefixer could not support ' + 'any cases of transition-property ' + 'and other transition-*'); } return false; }); } }; Transition.prototype.remove = function(decl) { var double, params, smaller, value; params = this.parse(decl.value); params = params.filter((function(_this) { return function(i) { var ref; return !((ref = _this.prefixes.remove[_this.findProp(i)]) != null ? ref.remove : void 0); }; })(this)); value = this.stringify(params); if (decl.value === value) { return; } if (params.length === 0) { decl.remove(); return; } double = decl.parent.some(function(i) { return i.prop === decl.prop && i.value === value; }); smaller = decl.parent.some(function(i) { return i !== decl && i.prop === decl.prop && i.value.length > value.length; }); if (double || smaller) { return decl.remove(); } else { return decl.value = value; } }; Transition.prototype.parse = function(value) { var ast, j, len, node, param, ref, result; ast = parser(value); result = []; param = []; ref = ast.nodes; for (j = 0, len = ref.length; j < len; j++) { node = ref[j]; param.push(node); if (node.type === 'div' && node.value === ',') { result.push(param); param = []; } } result.push(param); return result.filter(function(i) { return i.length > 0; }); }; Transition.prototype.stringify = function(params) { var j, len, nodes, param; if (params.length === 0) { return ''; } nodes = []; for (j = 0, len = params.length; j < len; j++) { param = params[j]; if (param[param.length - 1].type !== 'div') { param.push(this.div(params)); } nodes = nodes.concat(param); } if (nodes[0].type === 'div') { nodes = nodes.slice(1); } if (nodes[nodes.length - 1].type === 'div') { nodes = nodes.slice(0, -1); } return parser.stringify({ nodes: nodes }); }; Transition.prototype.clone = function(origin, name, param) { var changed, i, j, len, result; result = []; changed = false; for (j = 0, len = param.length; j < len; j++) { i = param[j]; if (!changed && i.type === 'word' && i.value === origin) { result.push({ type: 'word', value: name }); changed = true; } else { result.push(i); } } return result; }; Transition.prototype.div = function(params) { var j, k, len, len1, node, param; for (j = 0, len = params.length; j < len; j++) { param = params[j]; for (k = 0, len1 = param.length; k < len1; k++) { node = param[k]; if (node.type === 'div' && node.value === ',') { return node; } } } return { type: 'div', value: ',', after: ' ' }; }; Transition.prototype.cleanOtherPrefixes = function(params, prefix) { return params.filter((function(_this) { return function(param) { var current; current = vendor.prefix(_this.findProp(param)); return current === '' || current === prefix; }; })(this)); }; Transition.prototype.cleanFromUnprefixed = function(params, prefix) { var j, len, p, param, prop, remove, result; result = []; remove = params.map((function(_this) { return function(i) { return _this.findProp(i); }; })(this)).filter(function(i) { return i.slice(0, prefix.length) === prefix; }).map((function(_this) { return function(i) { return _this.prefixes.unprefixed(i); }; })(this)); for (j = 0, len = params.length; j < len; j++) { param = params[j]; prop = this.findProp(param); p = vendor.prefix(prop); if (remove.indexOf(prop) === -1 && (p === prefix || p === '')) { result.push(param); } } return result; }; Transition.prototype.disabled = function(prop, prefix) { var other; other = ['order', 'justify-content', 'align-self', 'align-content']; if (prop.indexOf('flex') !== -1 || other.indexOf(prop) !== -1) { if (this.prefixes.options.flexbox === false) { return true; } else if (this.prefixes.options.flexbox === 'no-2009') { return prefix.indexOf('2009') !== -1; } } }; return Transition; })(); module.exports = Transition; }).call(this); },{"postcss-value-parser":130,"postcss/lib/list":142,"postcss/lib/vendor":157}],58:[function(require,module,exports){ (function() { var list; list = require('postcss/lib/list'); module.exports = { error: function(text) { var err; err = new Error(text); err.autoprefixer = true; throw err; }, uniq: function(array) { var filtered, i, j, len; filtered = []; for (j = 0, len = array.length; j < len; j++) { i = array[j]; if (filtered.indexOf(i) === -1) { filtered.push(i); } } return filtered; }, removeNote: function(string) { if (string.indexOf(' ') === -1) { return string; } else { return string.split(' ')[0]; } }, escapeRegexp: function(string) { return string.replace(/[.?*+\^\$\[\]\\(){}|\-]/g, '\\$&'); }, regexp: function(word, escape) { if (escape == null) { escape = true; } if (escape) { word = this.escapeRegexp(word); } return RegExp("(^|[\\s,(])(" + word + "($|[\\s(,]))", "gi"); }, editList: function(value, callback) { var changed, join, origin; origin = list.comma(value); changed = callback(origin, []); if (origin === changed) { return value; } else { join = value.match(/,\s*/); join = join ? join[0] : ', '; return changed.join(join); } } }; }).call(this); },{"postcss/lib/list":142}],59:[function(require,module,exports){ (function() { var OldValue, Prefixer, Value, utils, vendor, extend = 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; }, hasProp = {}.hasOwnProperty; Prefixer = require('./prefixer'); OldValue = require('./old-value'); utils = require('./utils'); vendor = require('postcss/lib/vendor'); Value = (function(superClass) { extend(Value, superClass); function Value() { return Value.__super__.constructor.apply(this, arguments); } Value.save = function(prefixes, decl) { var already, cloned, prefix, prefixed, prop, propPrefix, ref, results, rule, trimmed, value; prop = decl.prop; ref = decl._autoprefixerValues; results = []; for (prefix in ref) { value = ref[prefix]; if (value === decl.value) { continue; } propPrefix = vendor.prefix(prop); if (propPrefix === prefix) { results.push(decl.value = value); } else if (propPrefix === '-pie-') { continue; } else { prefixed = prefixes.prefixed(prop, prefix); rule = decl.parent; if (rule.every(function(i) { return i.prop !== prefixed; })) { trimmed = value.replace(/\s+/, ' '); already = rule.some(function(i) { return i.prop === decl.prop && i.value.replace(/\s+/, ' ') === trimmed; }); if (!already) { cloned = this.clone(decl, { value: value }); results.push(decl.parent.insertBefore(decl, cloned)); } else { results.push(void 0); } } else { results.push(void 0); } } } return results; }; Value.prototype.check = function(decl) { var value; value = decl.value; if (value.indexOf(this.name) !== -1) { return !!value.match(this.regexp()); } else { return false; } }; Value.prototype.regexp = function() { return this.regexpCache || (this.regexpCache = utils.regexp(this.name)); }; Value.prototype.replace = function(string, prefix) { return string.replace(this.regexp(), '$1' + prefix + '$2'); }; Value.prototype.value = function(decl) { if (decl.raws.value && decl.raws.value.value === decl.value) { return decl.raws.value.raw; } else { return decl.value; } }; Value.prototype.add = function(decl, prefix) { var value; decl._autoprefixerValues || (decl._autoprefixerValues = {}); value = decl._autoprefixerValues[prefix] || this.value(decl); value = this.replace(value, prefix); if (value) { return decl._autoprefixerValues[prefix] = value; } }; Value.prototype.old = function(prefix) { return new OldValue(this.name, prefix + this.name); }; return Value; })(Prefixer); module.exports = Value; }).call(this); },{"./old-value":50,"./prefixer":51,"./utils":58,"postcss/lib/vendor":157}],60:[function(require,module,exports){ 'use strict'; module.exports = function () { return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; }; },{}],61:[function(require,module,exports){ 'use strict'; function assembleStyles () { var styles = { modifiers: { reset: [0, 0], bold: [1, 22], // 21 isn't widely supported and 22 does the same thing dim: [2, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, colors: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], gray: [90, 39] }, bgColors: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49] } }; // fix humans styles.colors.grey = styles.colors.gray; Object.keys(styles).forEach(function (groupName) { var group = styles[groupName]; Object.keys(group).forEach(function (styleName) { var style = group[styleName]; styles[styleName] = group[styleName] = { open: '\u001b[' + style[0] + 'm', close: '\u001b[' + style[1] + 'm' }; }); Object.defineProperty(styles, groupName, { value: group, enumerable: false }); }); return styles; } Object.defineProperty(module, 'exports', { enumerable: true, get: assembleStyles }); },{}],62:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength exports.toByteArray = toByteArray exports.fromByteArray = fromByteArray var lookup = [] var revLookup = [] var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' for (var i = 0, len = code.length; i < len; ++i) { lookup[i] = code[i] revLookup[code.charCodeAt(i)] = i } revLookup['-'.charCodeAt(0)] = 62 revLookup['_'.charCodeAt(0)] = 63 function placeHoldersCount (b64) { var len = b64.length if (len % 4 > 0) { throw new Error('Invalid string. Length must be a multiple of 4') } // the number of equal signs (place holders) // if there are two placeholders, than the two characters before it // represent one byte // if there is only one, then the three characters before it represent 2 bytes // this is just a cheap hack to not do indexOf twice return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0 } function byteLength (b64) { // base64 is 4/3 + up to two characters of the original data return b64.length * 3 / 4 - placeHoldersCount(b64) } function toByteArray (b64) { var i, j, l, tmp, placeHolders, arr var len = b64.length placeHolders = placeHoldersCount(b64) arr = new Arr(len * 3 / 4 - placeHolders) // if there are placeholders, only get up to the last complete 4 chars l = placeHolders > 0 ? len - 4 : len var L = 0 for (i = 0, j = 0; i < l; i += 4, j += 3) { tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] arr[L++] = (tmp >> 16) & 0xFF arr[L++] = (tmp >> 8) & 0xFF arr[L++] = tmp & 0xFF } if (placeHolders === 2) { tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) arr[L++] = tmp & 0xFF } else if (placeHolders === 1) { tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) arr[L++] = (tmp >> 8) & 0xFF arr[L++] = tmp & 0xFF } return arr } function tripletToBase64 (num) { return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] } function encodeChunk (uint8, start, end) { var tmp var output = [] for (var i = start; i < end; i += 3) { tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) output.push(tripletToBase64(tmp)) } return output.join('') } function fromByteArray (uint8) { var tmp var len = uint8.length var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes var output = '' var parts = [] var maxChunkLength = 16383 // must be multiple of 3 // go through the array every three bytes, we'll deal with trailing stuff later for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) } // pad the end with zeros, but make sure to not forget the extra bytes if (extraBytes === 1) { tmp = uint8[len - 1] output += lookup[tmp >> 2] output += lookup[(tmp << 4) & 0x3F] output += '==' } else if (extraBytes === 2) { tmp = (uint8[len - 2] << 8) + (uint8[len - 1]) output += lookup[tmp >> 10] output += lookup[(tmp >> 4) & 0x3F] output += lookup[(tmp << 2) & 0x3F] output += '=' } parts.push(output) return parts.join('') } },{}],63:[function(require,module,exports){ },{}],64:[function(require,module,exports){ (function (process){ var caniuse = require('caniuse-db/data.json').agents; var path = require('path'); var fs = require('fs'); var FLOAT = /^\d+(\.\d+)?$/; function uniq(array) { var filtered = []; for ( var i = 0; i < array.length; i++ ) { if ( filtered.indexOf(array[i]) === -1 ) filtered.push(array[i]); } return filtered; } function BrowserslistError(message) { this.name = 'BrowserslistError'; this.message = message || ''; if ( Error.captureStackTrace ) { Error.captureStackTrace(this, BrowserslistError); } } BrowserslistError.prototype = Error.prototype; function error(name) { var obj = new BrowserslistError(name); obj.browserslist = true; throw obj; } // Helpers var normalize = function (versions) { return versions.filter(function (version) { return typeof version === 'string'; }); }; var fillUsage = function (result, name, data) { for ( var i in data ) { result[name + ' ' + i] = data[i]; } }; // Return array of browsers by selection queries: // // browserslist('IE >= 10, IE 8') //=> ['ie 11', 'ie 10', 'ie 8'] var browserslist = function (selections, opts) { if ( typeof opts === 'undefined' ) opts = { }; if ( typeof selections === 'undefined' || selections === null ) { if ( process.env.BROWSERSLIST ) { selections = process.env.BROWSERSLIST; } else if ( opts.config || process.env.BROWSERSLIST_CONFIG ) { var file = opts.config || process.env.BROWSERSLIST_CONFIG; if ( fs.existsSync(file) && fs.statSync(file).isFile() ) { selections = browserslist.parseConfig( fs.readFileSync(file) ); } else { error('Can\'t read ' + file + ' config'); } } else { var config = browserslist.readConfig(opts.path); if ( config !== false ) { selections = config; } else { selections = browserslist.defaults; } } } if ( typeof selections === 'string' ) { selections = selections.split(/,\s*/); } if ( opts.stats || process.env.BROWSERSLIST_STATS ) { browserslist.usage.custom = { }; var stats = opts.stats || process.env.BROWSERSLIST_STATS; if ( typeof stats === 'string' ) { try { stats = JSON.parse(fs.readFileSync(stats)); } catch (e) { error('Can\'t read ' + stats); } } if ( 'dataByBrowser' in stats ) { // Allow to use the data as-is from the caniuse.com website stats = stats.dataByBrowser; } for ( var browser in stats ) { fillUsage(browserslist.usage.custom, browser, stats[browser]); } } var result = []; var exclude, query, match, array, used; selections.forEach(function (selection) { if ( selection.trim() === '' ) return; exclude = false; used = false; if ( selection.indexOf('not ') === 0 ) { selection = selection.slice(4); exclude = true; } for ( var i in browserslist.queries ) { query = browserslist.queries[i]; match = selection.match(query.regexp); if ( match ) { array = query.select.apply(browserslist, match.slice(1)); if ( exclude ) { result = result.filter(function (j) { return array.indexOf(j) === -1; }); } else { result = result.concat(array); } used = true; break; } } if ( !used ) { error('Unknown browser query `' + selection + '`'); } }); result = uniq(result); return result.filter(function (i) { var version = i.split(' ')[1]; if ( version === '0' ) { var name = i.split(' ')[0]; return !result.some(function (j) { return j !== i && j.split(' ')[0] === name; }); } else { return true; } }).sort(function (name1, name2) { name1 = name1.split(' '); name2 = name2.split(' '); if ( name1[0] === name2[0] ) { if ( FLOAT.test(name1[1]) && FLOAT.test(name2[1]) ) { var d = parseFloat(name2[1]) - parseFloat(name1[1]); if ( d > 0 ) { return 1; } else if ( d < 0 ) { return -1; } else { return 0; } } else { return name2[1].localeCompare(name1[1]); } } else { return name1[0].localeCompare(name2[0]); } }); }; var normalizeVersion = function (data, version) { if ( data.versions.indexOf(version) !== -1 ) { return version; } else { return browserslist.versionAliases[data.name][version]; } }; var loadCountryStatistics = function (country) { if (!browserslist.usage[country]) { var usage = { }; var data = require( 'caniuse-db/region-usage-json/' + country + '.json'); for ( var i in data.data ) { fillUsage(usage, i, data.data[i]); } browserslist.usage[country] = usage; } }; // Will be filled by Can I Use data below browserslist.data = { }; browserslist.usage = { global: { }, custom: null }; // Default browsers query browserslist.defaults = [ '> 1%', 'last 2 versions', 'Firefox ESR' ]; // What browsers will be used in `last n version` query browserslist.major = ['safari', 'opera', 'ios_saf', 'ie_mob', 'ie', 'edge', 'firefox', 'chrome']; // Browser names aliases browserslist.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', ucandroid: 'and_uc' }; // Aliases to work with joined versions like `ios_saf 7.0-7.1` browserslist.versionAliases = { }; // Get browser data by alias or case insensitive name browserslist.byName = function (name) { name = name.toLowerCase(); name = browserslist.aliases[name] || name; return browserslist.data[name]; }; // Get browser data by alias or case insensitive name and throw error // on unknown browser browserslist.checkName = function (name) { var data = browserslist.byName(name); if ( !data ) error('Unknown browser ' + name); return data; }; // Find config, read file and parse it browserslist.readConfig = function (from) { if ( from === false ) return false; if ( !fs.readFileSync || !fs.existsSync || !fs.statSync ) return false; if ( typeof from === 'undefined' ) from = '.'; var dirs = path.resolve(from).split(path.sep); var config; while ( dirs.length ) { config = dirs.concat(['browserslist']).join(path.sep); if ( fs.existsSync(config) && fs.statSync(config).isFile() ) { return browserslist.parseConfig( fs.readFileSync(config) ); } dirs.pop(); } return false; }; // Return browsers market coverage browserslist.coverage = function (browsers, country) { if (country && country !== 'global') { country = country.toUpperCase(); loadCountryStatistics(country); } else { country = 'global'; // Default value } return browsers.reduce(function (all, i) { var usage = browserslist.usage[country][i]; if (usage === undefined) { // Sometimes, Caniuse consolidates country usage data into a single // "version 0" entry. This is usually when there is only 1 version. usage = browserslist.usage[country][i.replace(/ [\d.]+$/, ' 0')]; } return all + (usage || 0); }, 0); }; // Return array of queries from config content browserslist.parseConfig = function (string) { return string.toString() .replace(/#[^\n]*/g, '') .split(/\n/) .map(function (i) { return i.trim(); }).filter(function (i) { return i !== ''; }); }; browserslist.queries = { lastVersions: { regexp: /^last\s+(\d+)\s+versions?$/i, select: function (versions) { var selected = []; browserslist.major.forEach(function (name) { var data = browserslist.byName(name); if ( !data ) return; var array = data.released.slice(-versions); array = array.map(function (v) { return data.name + ' ' + v; }); selected = selected.concat(array); }); return selected; } }, lastByBrowser: { regexp: /^last\s+(\d+)\s+(\w+)\s+versions?$/i, select: function (versions, name) { var data = browserslist.checkName(name); return data.released.slice(-versions).map(function (v) { return data.name + ' ' + v; }); } }, globalStatistics: { regexp: /^>\s*(\d*\.?\d+)%$/, select: function (popularity) { popularity = parseFloat(popularity); var result = []; for ( var version in browserslist.usage.global ) { if ( browserslist.usage.global[version] > popularity ) { result.push(version); } } return result; } }, customStatistics: { regexp: /^>\s*(\d*\.?\d+)%\s+in\s+my\s+stats$/, select: function (popularity) { popularity = parseFloat(popularity); var result = []; var usage = browserslist.usage.custom; if ( !usage ) { error('Custom usage statistics was not provided'); } for ( var version in usage ) { if ( usage[version] > popularity ) { result.push(version); } } return result; } }, countryStatistics: { regexp: /^>\s*(\d*\.?\d+)%\s+in\s+(\w\w)$/, select: function (popularity, country) { popularity = parseFloat(popularity); country = country.toUpperCase(); var result = []; loadCountryStatistics(country); var usage = browserslist.usage[country]; for ( var version in usage ) { if ( usage[version] > popularity ) { result.push(version); } } return result; } }, range: { regexp: /^(\w+)\s+([\d\.]+)\s*-\s*([\d\.]+)$/i, select: function (name, from, to) { var data = browserslist.checkName(name); from = parseFloat(normalizeVersion(data, from) || from); to = parseFloat(normalizeVersion(data, to) || to); var filter = function (v) { var parsed = parseFloat(v); return parsed >= from && parsed <= to; }; return data.released.filter(filter).map(function (v) { return data.name + ' ' + v; }); } }, versions: { regexp: /^(\w+)\s*(>=?|<=?)\s*([\d\.]+)$/, select: function (name, sign, version) { var data = browserslist.checkName(name); var alias = normalizeVersion(data, version); if ( alias ) { version = alias; } version = parseFloat(version); var filter; if ( sign === '>' ) { filter = function (v) { return parseFloat(v) > version; }; } else if ( sign === '>=' ) { filter = function (v) { return parseFloat(v) >= version; }; } else if ( sign === '<' ) { filter = function (v) { return parseFloat(v) < version; }; } else if ( sign === '<=' ) { filter = function (v) { return parseFloat(v) <= version; }; } return data.released.filter(filter).map(function (v) { return data.name + ' ' + v; }); } }, esr: { regexp: /^(firefox|ff|fx)\s+esr$/i, select: function () { return ['firefox 45']; } }, opMini: { regexp: /(operamini|op_mini)\s+all/i, select: function () { return ['op_mini all']; } }, direct: { regexp: /^(\w+)\s+(tp|[\d\.]+)$/i, select: function (name, version) { if ( /tp/i.test(version) ) version = 'TP'; var data = browserslist.checkName(name); var alias = normalizeVersion(data, version); if ( alias ) { version = alias; } else { if ( version.indexOf('.') === -1 ) { alias = version + '.0'; } else if ( /\.0$/.test(version) ) { alias = version.replace(/\.0$/, ''); } alias = normalizeVersion(data, alias); if ( alias ) { version = alias; } else { error('Unknown version ' + version + ' of ' + name); } } return [data.name + ' ' + version]; } }, defaults: { regexp: /^defaults$/i, select: function () { return browserslist(browserslist.defaults); } } }; // Get and convert Can I Use data (function () { for ( var name in caniuse ) { browserslist.data[name] = { name: name, versions: normalize(caniuse[name].versions), released: normalize(caniuse[name].versions.slice(0, -3)) }; fillUsage(browserslist.usage.global, name, caniuse[name].usage_global); browserslist.versionAliases[name] = { }; for ( var i = 0; i < caniuse[name].versions.length; i++ ) { if ( !caniuse[name].versions[i] ) continue; var full = caniuse[name].versions[i]; if ( full.indexOf('-') !== -1 ) { var interval = full.split('-'); for ( var j = 0; j < interval.length; j++ ) { browserslist.versionAliases[name][interval[j]] = full; } } } } }()); module.exports = browserslist; }).call(this,require('_process')) },{"_process":160,"caniuse-db/data.json":66,"fs":63,"path":129}],65:[function(require,module,exports){ (function (global){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ /* eslint-disable no-proto */ 'use strict' var base64 = require('base64-js') var ieee754 = require('ieee754') var isArray = require('isarray') exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer exports.INSPECT_MAX_BYTES = 50 /** * If `Buffer.TYPED_ARRAY_SUPPORT`: * === true Use Uint8Array implementation (fastest) * === false Use Object implementation (most compatible, even IE6) * * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, * Opera 11.6+, iOS 4.2+. * * Due to various browser bugs, sometimes the Object implementation will be used even * when the browser supports typed arrays. * * Note: * * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. * * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. * * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of * incorrect length in some situations. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they * get the Object implementation, which is slower but behaves correctly. */ Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport() /* * Export kMaxLength after typed array support is determined. */ exports.kMaxLength = kMaxLength() function typedArraySupport () { try { var arr = new Uint8Array(1) arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} return arr.foo() === 42 && // typed array instances can be augmented typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` } catch (e) { return false } } function kMaxLength () { return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff } function createBuffer (that, length) { if (kMaxLength() < length) { throw new RangeError('Invalid typed array length') } if (Buffer.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = new Uint8Array(length) that.__proto__ = Buffer.prototype } else { // Fallback: Return an object instance of the Buffer class if (that === null) { that = new Buffer(length) } that.length = length } return that } /** * The Buffer constructor returns instances of `Uint8Array` that have their * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of * `Uint8Array`, so the returned instances will have all the node `Buffer` methods * and the `Uint8Array` methods. Square bracket notation works as expected -- it * returns a single octet. * * The `Uint8Array` prototype remains unmodified. */ function Buffer (arg, encodingOrOffset, length) { if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { return new Buffer(arg, encodingOrOffset, length) } // Common case. if (typeof arg === 'number') { if (typeof encodingOrOffset === 'string') { throw new Error( 'If encoding is specified then the first argument must be a string' ) } return allocUnsafe(this, arg) } return from(this, arg, encodingOrOffset, length) } Buffer.poolSize = 8192 // not used by this implementation // TODO: Legacy, not needed anymore. Remove in next major version. Buffer._augment = function (arr) { arr.__proto__ = Buffer.prototype return arr } function from (that, value, encodingOrOffset, length) { if (typeof value === 'number') { throw new TypeError('"value" argument must not be a number') } if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { return fromArrayBuffer(that, value, encodingOrOffset, length) } if (typeof value === 'string') { return fromString(that, value, encodingOrOffset) } return fromObject(that, value) } /** * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError * if value is a number. * Buffer.from(str[, encoding]) * Buffer.from(array) * Buffer.from(buffer) * Buffer.from(arrayBuffer[, byteOffset[, length]]) **/ Buffer.from = function (value, encodingOrOffset, length) { return from(null, value, encodingOrOffset, length) } if (Buffer.TYPED_ARRAY_SUPPORT) { Buffer.prototype.__proto__ = Uint8Array.prototype Buffer.__proto__ = Uint8Array if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) { // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 Object.defineProperty(Buffer, Symbol.species, { value: null, configurable: true }) } } function assertSize (size) { if (typeof size !== 'number') { throw new TypeError('"size" argument must be a number') } else if (size < 0) { throw new RangeError('"size" argument must not be negative') } } function alloc (that, size, fill, encoding) { assertSize(size) if (size <= 0) { return createBuffer(that, size) } if (fill !== undefined) { // Only pay attention to encoding if it's a string. This // prevents accidentally sending in a number that would // be interpretted as a start offset. return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill) } return createBuffer(that, size) } /** * Creates a new filled Buffer instance. * alloc(size[, fill[, encoding]]) **/ Buffer.alloc = function (size, fill, encoding) { return alloc(null, size, fill, encoding) } function allocUnsafe (that, size) { assertSize(size) that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) if (!Buffer.TYPED_ARRAY_SUPPORT) { for (var i = 0; i < size; ++i) { that[i] = 0 } } return that } /** * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. * */ Buffer.allocUnsafe = function (size) { return allocUnsafe(null, size) } /** * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. */ Buffer.allocUnsafeSlow = function (size) { return allocUnsafe(null, size) } function fromString (that, string, encoding) { if (typeof encoding !== 'string' || encoding === '') { encoding = 'utf8' } if (!Buffer.isEncoding(encoding)) { throw new TypeError('"encoding" must be a valid string encoding') } var length = byteLength(string, encoding) | 0 that = createBuffer(that, length) var actual = that.write(string, encoding) if (actual !== length) { // Writing a hex string, for example, that contains invalid characters will // cause everything after the first invalid character to be ignored. (e.g. // 'abxxcd' will be treated as 'ab') that = that.slice(0, actual) } return that } function fromArrayLike (that, array) { var length = array.length < 0 ? 0 : checked(array.length) | 0 that = createBuffer(that, length) for (var i = 0; i < length; i += 1) { that[i] = array[i] & 255 } return that } function fromArrayBuffer (that, array, byteOffset, length) { array.byteLength // this throws if `array` is not a valid ArrayBuffer if (byteOffset < 0 || array.byteLength < byteOffset) { throw new RangeError('\'offset\' is out of bounds') } if (array.byteLength < byteOffset + (length || 0)) { throw new RangeError('\'length\' is out of bounds') } if (byteOffset === undefined && length === undefined) { array = new Uint8Array(array) } else if (length === undefined) { array = new Uint8Array(array, byteOffset) } else { array = new Uint8Array(array, byteOffset, length) } if (Buffer.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = array that.__proto__ = Buffer.prototype } else { // Fallback: Return an object instance of the Buffer class that = fromArrayLike(that, array) } return that } function fromObject (that, obj) { if (Buffer.isBuffer(obj)) { var len = checked(obj.length) | 0 that = createBuffer(that, len) if (that.length === 0) { return that } obj.copy(that, 0, 0, len) return that } if (obj) { if ((typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer) || 'length' in obj) { if (typeof obj.length !== 'number' || isnan(obj.length)) { return createBuffer(that, 0) } return fromArrayLike(that, obj) } if (obj.type === 'Buffer' && isArray(obj.data)) { return fromArrayLike(that, obj.data) } } throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') } function checked (length) { // Note: cannot use `length < kMaxLength()` here because that fails when // length is NaN (which is otherwise coerced to zero.) if (length >= kMaxLength()) { throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes') } return length | 0 } function SlowBuffer (length) { if (+length != length) { // eslint-disable-line eqeqeq length = 0 } return Buffer.alloc(+length) } Buffer.isBuffer = function isBuffer (b) { return !!(b != null && b._isBuffer) } Buffer.compare = function compare (a, b) { if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { throw new TypeError('Arguments must be Buffers') } if (a === b) return 0 var x = a.length var y = b.length for (var i = 0, len = Math.min(x, y); i < len; ++i) { if (a[i] !== b[i]) { x = a[i] y = b[i] break } } if (x < y) return -1 if (y < x) return 1 return 0 } Buffer.isEncoding = function isEncoding (encoding) { switch (String(encoding).toLowerCase()) { case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'latin1': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return true default: return false } } Buffer.concat = function concat (list, length) { if (!isArray(list)) { throw new TypeError('"list" argument must be an Array of Buffers') } if (list.length === 0) { return Buffer.alloc(0) } var i if (length === undefined) { length = 0 for (i = 0; i < list.length; ++i) { length += list[i].length } } var buffer = Buffer.allocUnsafe(length) var pos = 0 for (i = 0; i < list.length; ++i) { var buf = list[i] if (!Buffer.isBuffer(buf)) { throw new TypeError('"list" argument must be an Array of Buffers') } buf.copy(buffer, pos) pos += buf.length } return buffer } function byteLength (string, encoding) { if (Buffer.isBuffer(string)) { return string.length } if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { return string.byteLength } if (typeof string !== 'string') { string = '' + string } var len = string.length if (len === 0) return 0 // Use a for loop to avoid recursion var loweredCase = false for (;;) { switch (encoding) { case 'ascii': case 'latin1': case 'binary': return len case 'utf8': case 'utf-8': case undefined: return utf8ToBytes(string).length case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return len * 2 case 'hex': return len >>> 1 case 'base64': return base64ToBytes(string).length default: if (loweredCase) return utf8ToBytes(string).length // assume utf8 encoding = ('' + encoding).toLowerCase() loweredCase = true } } } Buffer.byteLength = byteLength function slowToString (encoding, start, end) { var loweredCase = false // No need to verify that "this.length <= MAX_UINT32" since it's a read-only // property of a typed array. // This behaves neither like String nor Uint8Array in that we set start/end // to their upper/lower bounds if the value passed is out of range. // undefined is handled specially as per ECMA-262 6th Edition, // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. if (start === undefined || start < 0) { start = 0 } // Return early if start > this.length. Done here to prevent potential uint32 // coercion fail below. if (start > this.length) { return '' } if (end === undefined || end > this.length) { end = this.length } if (end <= 0) { return '' } // Force coersion to uint32. This will also coerce falsey/NaN values to 0. end >>>= 0 start >>>= 0 if (end <= start) { return '' } if (!encoding) encoding = 'utf8' while (true) { switch (encoding) { case 'hex': return hexSlice(this, start, end) case 'utf8': case 'utf-8': return utf8Slice(this, start, end) case 'ascii': return asciiSlice(this, start, end) case 'latin1': case 'binary': return latin1Slice(this, start, end) case 'base64': return base64Slice(this, start, end) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return utf16leSlice(this, start, end) default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) encoding = (encoding + '').toLowerCase() loweredCase = true } } } // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect // Buffer instances. Buffer.prototype._isBuffer = true function swap (b, n, m) { var i = b[n] b[n] = b[m] b[m] = i } Buffer.prototype.swap16 = function swap16 () { var len = this.length if (len % 2 !== 0) { throw new RangeError('Buffer size must be a multiple of 16-bits') } for (var i = 0; i < len; i += 2) { swap(this, i, i + 1) } return this } Buffer.prototype.swap32 = function swap32 () { var len = this.length if (len % 4 !== 0) { throw new RangeError('Buffer size must be a multiple of 32-bits') } for (var i = 0; i < len; i += 4) { swap(this, i, i + 3) swap(this, i + 1, i + 2) } return this } Buffer.prototype.swap64 = function swap64 () { var len = this.length if (len % 8 !== 0) { throw new RangeError('Buffer size must be a multiple of 64-bits') } for (var i = 0; i < len; i += 8) { swap(this, i, i + 7) swap(this, i + 1, i + 6) swap(this, i + 2, i + 5) swap(this, i + 3, i + 4) } return this } Buffer.prototype.toString = function toString () { var length = this.length | 0 if (length === 0) return '' if (arguments.length === 0) return utf8Slice(this, 0, length) return slowToString.apply(this, arguments) } Buffer.prototype.equals = function equals (b) { if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') if (this === b) return true return Buffer.compare(this, b) === 0 } Buffer.prototype.inspect = function inspect () { var str = '' var max = exports.INSPECT_MAX_BYTES if (this.length > 0) { str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') if (this.length > max) str += ' ... ' } return '' } Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { if (!Buffer.isBuffer(target)) { throw new TypeError('Argument must be a Buffer') } if (start === undefined) { start = 0 } if (end === undefined) { end = target ? target.length : 0 } if (thisStart === undefined) { thisStart = 0 } if (thisEnd === undefined) { thisEnd = this.length } if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { throw new RangeError('out of range index') } if (thisStart >= thisEnd && start >= end) { return 0 } if (thisStart >= thisEnd) { return -1 } if (start >= end) { return 1 } start >>>= 0 end >>>= 0 thisStart >>>= 0 thisEnd >>>= 0 if (this === target) return 0 var x = thisEnd - thisStart var y = end - start var len = Math.min(x, y) var thisCopy = this.slice(thisStart, thisEnd) var targetCopy = target.slice(start, end) for (var i = 0; i < len; ++i) { if (thisCopy[i] !== targetCopy[i]) { x = thisCopy[i] y = targetCopy[i] break } } if (x < y) return -1 if (y < x) return 1 return 0 } // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, // OR the last index of `val` in `buffer` at offset <= `byteOffset`. // // Arguments: // - buffer - a Buffer to search // - val - a string, Buffer, or number // - byteOffset - an index into `buffer`; will be clamped to an int32 // - encoding - an optional encoding, relevant is val is a string // - dir - true for indexOf, false for lastIndexOf function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { // Empty buffer means no match if (buffer.length === 0) return -1 // Normalize byteOffset if (typeof byteOffset === 'string') { encoding = byteOffset byteOffset = 0 } else if (byteOffset > 0x7fffffff) { byteOffset = 0x7fffffff } else if (byteOffset < -0x80000000) { byteOffset = -0x80000000 } byteOffset = +byteOffset // Coerce to Number. if (isNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : (buffer.length - 1) } // Normalize byteOffset: negative offsets start from the end of the buffer if (byteOffset < 0) byteOffset = buffer.length + byteOffset if (byteOffset >= buffer.length) { if (dir) return -1 else byteOffset = buffer.length - 1 } else if (byteOffset < 0) { if (dir) byteOffset = 0 else return -1 } // Normalize val if (typeof val === 'string') { val = Buffer.from(val, encoding) } // Finally, search either indexOf (if dir is true) or lastIndexOf if (Buffer.isBuffer(val)) { // Special case: looking for empty string/buffer always fails if (val.length === 0) { return -1 } return arrayIndexOf(buffer, val, byteOffset, encoding, dir) } else if (typeof val === 'number') { val = val & 0xFF // Search for a byte value [0-255] if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') { if (dir) { return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) } else { return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) } } return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) } throw new TypeError('val must be string, number or Buffer') } function arrayIndexOf (arr, val, byteOffset, encoding, dir) { var indexSize = 1 var arrLength = arr.length var valLength = val.length if (encoding !== undefined) { encoding = String(encoding).toLowerCase() if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { if (arr.length < 2 || val.length < 2) { return -1 } indexSize = 2 arrLength /= 2 valLength /= 2 byteOffset /= 2 } } function read (buf, i) { if (indexSize === 1) { return buf[i] } else { return buf.readUInt16BE(i * indexSize) } } var i if (dir) { var foundIndex = -1 for (i = byteOffset; i < arrLength; i++) { if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { if (foundIndex === -1) foundIndex = i if (i - foundIndex + 1 === valLength) return foundIndex * indexSize } else { if (foundIndex !== -1) i -= i - foundIndex foundIndex = -1 } } } else { if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength for (i = byteOffset; i >= 0; i--) { var found = true for (var j = 0; j < valLength; j++) { if (read(arr, i + j) !== read(val, j)) { found = false break } } if (found) return i } } return -1 } Buffer.prototype.includes = function includes (val, byteOffset, encoding) { return this.indexOf(val, byteOffset, encoding) !== -1 } Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, true) } Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, false) } function hexWrite (buf, string, offset, length) { offset = Number(offset) || 0 var remaining = buf.length - offset if (!length) { length = remaining } else { length = Number(length) if (length > remaining) { length = remaining } } // must be an even number of digits var strLen = string.length if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') if (length > strLen / 2) { length = strLen / 2 } for (var i = 0; i < length; ++i) { var parsed = parseInt(string.substr(i * 2, 2), 16) if (isNaN(parsed)) return i buf[offset + i] = parsed } return i } function utf8Write (buf, string, offset, length) { return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) } function asciiWrite (buf, string, offset, length) { return blitBuffer(asciiToBytes(string), buf, offset, length) } function latin1Write (buf, string, offset, length) { return asciiWrite(buf, string, offset, length) } function base64Write (buf, string, offset, length) { return blitBuffer(base64ToBytes(string), buf, offset, length) } function ucs2Write (buf, string, offset, length) { return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) } Buffer.prototype.write = function write (string, offset, length, encoding) { // Buffer#write(string) if (offset === undefined) { encoding = 'utf8' length = this.length offset = 0 // Buffer#write(string, encoding) } else if (length === undefined && typeof offset === 'string') { encoding = offset length = this.length offset = 0 // Buffer#write(string, offset[, length][, encoding]) } else if (isFinite(offset)) { offset = offset | 0 if (isFinite(length)) { length = length | 0 if (encoding === undefined) encoding = 'utf8' } else { encoding = length length = undefined } // legacy write(string, encoding, offset, length) - remove in v0.13 } else { throw new Error( 'Buffer.write(string, encoding, offset[, length]) is no longer supported' ) } var remaining = this.length - offset if (length === undefined || length > remaining) length = remaining if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { throw new RangeError('Attempt to write outside buffer bounds') } if (!encoding) encoding = 'utf8' var loweredCase = false for (;;) { switch (encoding) { case 'hex': return hexWrite(this, string, offset, length) case 'utf8': case 'utf-8': return utf8Write(this, string, offset, length) case 'ascii': return asciiWrite(this, string, offset, length) case 'latin1': case 'binary': return latin1Write(this, string, offset, length) case 'base64': // Warning: maxLength not taken into account in base64Write return base64Write(this, string, offset, length) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return ucs2Write(this, string, offset, length) default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) encoding = ('' + encoding).toLowerCase() loweredCase = true } } } Buffer.prototype.toJSON = function toJSON () { return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) } } function base64Slice (buf, start, end) { if (start === 0 && end === buf.length) { return base64.fromByteArray(buf) } else { return base64.fromByteArray(buf.slice(start, end)) } } function utf8Slice (buf, start, end) { end = Math.min(buf.length, end) var res = [] var i = start while (i < end) { var firstByte = buf[i] var codePoint = null var bytesPerSequence = (firstByte > 0xEF) ? 4 : (firstByte > 0xDF) ? 3 : (firstByte > 0xBF) ? 2 : 1 if (i + bytesPerSequence <= end) { var secondByte, thirdByte, fourthByte, tempCodePoint switch (bytesPerSequence) { case 1: if (firstByte < 0x80) { codePoint = firstByte } break case 2: secondByte = buf[i + 1] if ((secondByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) if (tempCodePoint > 0x7F) { codePoint = tempCodePoint } } break case 3: secondByte = buf[i + 1] thirdByte = buf[i + 2] if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { codePoint = tempCodePoint } } break case 4: secondByte = buf[i + 1] thirdByte = buf[i + 2] fourthByte = buf[i + 3] if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { codePoint = tempCodePoint } } } } if (codePoint === null) { // we did not generate a valid codePoint so insert a // replacement char (U+FFFD) and advance only 1 byte codePoint = 0xFFFD bytesPerSequence = 1 } else if (codePoint > 0xFFFF) { // encode to utf16 (surrogate pair dance) codePoint -= 0x10000 res.push(codePoint >>> 10 & 0x3FF | 0xD800) codePoint = 0xDC00 | codePoint & 0x3FF } res.push(codePoint) i += bytesPerSequence } return decodeCodePointsArray(res) } // Based on http://stackoverflow.com/a/22747272/680742, the browser with // the lowest limit is Chrome, with 0x10000 args. // We go 1 magnitude less, for safety var MAX_ARGUMENTS_LENGTH = 0x1000 function decodeCodePointsArray (codePoints) { var len = codePoints.length if (len <= MAX_ARGUMENTS_LENGTH) { return String.fromCharCode.apply(String, codePoints) // avoid extra slice() } // Decode in chunks to avoid "call stack size exceeded". var res = '' var i = 0 while (i < len) { res += String.fromCharCode.apply( String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) ) } return res } function asciiSlice (buf, start, end) { var ret = '' end = Math.min(buf.length, end) for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i] & 0x7F) } return ret } function latin1Slice (buf, start, end) { var ret = '' end = Math.min(buf.length, end) for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i]) } return ret } function hexSlice (buf, start, end) { var len = buf.length if (!start || start < 0) start = 0 if (!end || end < 0 || end > len) end = len var out = '' for (var i = start; i < end; ++i) { out += toHex(buf[i]) } return out } function utf16leSlice (buf, start, end) { var bytes = buf.slice(start, end) var res = '' for (var i = 0; i < bytes.length; i += 2) { res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) } return res } Buffer.prototype.slice = function slice (start, end) { var len = this.length start = ~~start end = end === undefined ? len : ~~end if (start < 0) { start += len if (start < 0) start = 0 } else if (start > len) { start = len } if (end < 0) { end += len if (end < 0) end = 0 } else if (end > len) { end = len } if (end < start) end = start var newBuf if (Buffer.TYPED_ARRAY_SUPPORT) { newBuf = this.subarray(start, end) newBuf.__proto__ = Buffer.prototype } else { var sliceLen = end - start newBuf = new Buffer(sliceLen, undefined) for (var i = 0; i < sliceLen; ++i) { newBuf[i] = this[i + start] } } return newBuf } /* * Need to make sure that buffer isn't trying to write out of bounds. */ function checkOffset (offset, ext, length) { if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') } Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) checkOffset(offset, byteLength, this.length) var val = this[offset] var mul = 1 var i = 0 while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul } return val } Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) { checkOffset(offset, byteLength, this.length) } var val = this[offset + --byteLength] var mul = 1 while (byteLength > 0 && (mul *= 0x100)) { val += this[offset + --byteLength] * mul } return val } Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { if (!noAssert) checkOffset(offset, 1, this.length) return this[offset] } Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) return this[offset] | (this[offset + 1] << 8) } Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) return (this[offset] << 8) | this[offset + 1] } Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return ((this[offset]) | (this[offset + 1] << 8) | (this[offset + 2] << 16)) + (this[offset + 3] * 0x1000000) } Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset] * 0x1000000) + ((this[offset + 1] << 16) | (this[offset + 2] << 8) | this[offset + 3]) } Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) checkOffset(offset, byteLength, this.length) var val = this[offset] var mul = 1 var i = 0 while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul } mul *= 0x80 if (val >= mul) val -= Math.pow(2, 8 * byteLength) return val } Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) checkOffset(offset, byteLength, this.length) var i = byteLength var mul = 1 var val = this[offset + --i] while (i > 0 && (mul *= 0x100)) { val += this[offset + --i] * mul } mul *= 0x80 if (val >= mul) val -= Math.pow(2, 8 * byteLength) return val } Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { if (!noAssert) checkOffset(offset, 1, this.length) if (!(this[offset] & 0x80)) return (this[offset]) return ((0xff - this[offset] + 1) * -1) } Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) var val = this[offset] | (this[offset + 1] << 8) return (val & 0x8000) ? val | 0xFFFF0000 : val } Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) var val = this[offset + 1] | (this[offset] << 8) return (val & 0x8000) ? val | 0xFFFF0000 : val } Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset]) | (this[offset + 1] << 8) | (this[offset + 2] << 16) | (this[offset + 3] << 24) } Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset] << 24) | (this[offset + 1] << 16) | (this[offset + 2] << 8) | (this[offset + 3]) } Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return ieee754.read(this, offset, true, 23, 4) } Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return ieee754.read(this, offset, false, 23, 4) } Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { if (!noAssert) checkOffset(offset, 8, this.length) return ieee754.read(this, offset, true, 52, 8) } Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { if (!noAssert) checkOffset(offset, 8, this.length) return ieee754.read(this, offset, false, 52, 8) } function checkInt (buf, value, offset, ext, max, min) { if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') if (offset + ext > buf.length) throw new RangeError('Index out of range') } Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1 checkInt(this, value, offset, byteLength, maxBytes, 0) } var mul = 1 var i = 0 this[offset] = value & 0xFF while (++i < byteLength && (mul *= 0x100)) { this[offset + i] = (value / mul) & 0xFF } return offset + byteLength } Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1 checkInt(this, value, offset, byteLength, maxBytes, 0) } var i = byteLength - 1 var mul = 1 this[offset + i] = value & 0xFF while (--i >= 0 && (mul *= 0x100)) { this[offset + i] = (value / mul) & 0xFF } return offset + byteLength } Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) this[offset] = (value & 0xff) return offset + 1 } function objectWriteUInt16 (buf, value, offset, littleEndian) { if (value < 0) value = 0xffff + value + 1 for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> (littleEndian ? i : 1 - i) * 8 } } Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff) this[offset + 1] = (value >>> 8) } else { objectWriteUInt16(this, value, offset, true) } return offset + 2 } Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8) this[offset + 1] = (value & 0xff) } else { objectWriteUInt16(this, value, offset, false) } return offset + 2 } function objectWriteUInt32 (buf, value, offset, littleEndian) { if (value < 0) value = 0xffffffff + value + 1 for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff } } Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset + 3] = (value >>> 24) this[offset + 2] = (value >>> 16) this[offset + 1] = (value >>> 8) this[offset] = (value & 0xff) } else { objectWriteUInt32(this, value, offset, true) } return offset + 4 } Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24) this[offset + 1] = (value >>> 16) this[offset + 2] = (value >>> 8) this[offset + 3] = (value & 0xff) } else { objectWriteUInt32(this, value, offset, false) } return offset + 4 } Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1) checkInt(this, value, offset, byteLength, limit - 1, -limit) } var i = 0 var mul = 1 var sub = 0 this[offset] = value & 0xFF while (++i < byteLength && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { sub = 1 } this[offset + i] = ((value / mul) >> 0) - sub & 0xFF } return offset + byteLength } Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1) checkInt(this, value, offset, byteLength, limit - 1, -limit) } var i = byteLength - 1 var mul = 1 var sub = 0 this[offset + i] = value & 0xFF while (--i >= 0 && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { sub = 1 } this[offset + i] = ((value / mul) >> 0) - sub & 0xFF } return offset + byteLength } Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) if (value < 0) value = 0xff + value + 1 this[offset] = (value & 0xff) return offset + 1 } Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff) this[offset + 1] = (value >>> 8) } else { objectWriteUInt16(this, value, offset, true) } return offset + 2 } Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8) this[offset + 1] = (value & 0xff) } else { objectWriteUInt16(this, value, offset, false) } return offset + 2 } Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff) this[offset + 1] = (value >>> 8) this[offset + 2] = (value >>> 16) this[offset + 3] = (value >>> 24) } else { objectWriteUInt32(this, value, offset, true) } return offset + 4 } Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) if (value < 0) value = 0xffffffff + value + 1 if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24) this[offset + 1] = (value >>> 16) this[offset + 2] = (value >>> 8) this[offset + 3] = (value & 0xff) } else { objectWriteUInt32(this, value, offset, false) } return offset + 4 } function checkIEEE754 (buf, value, offset, ext, max, min) { if (offset + ext > buf.length) throw new RangeError('Index out of range') if (offset < 0) throw new RangeError('Index out of range') } function writeFloat (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) } ieee754.write(buf, value, offset, littleEndian, 23, 4) return offset + 4 } Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { return writeFloat(this, value, offset, true, noAssert) } Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { return writeFloat(this, value, offset, false, noAssert) } function writeDouble (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) } ieee754.write(buf, value, offset, littleEndian, 52, 8) return offset + 8 } Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { return writeDouble(this, value, offset, true, noAssert) } Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { return writeDouble(this, value, offset, false, noAssert) } // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) Buffer.prototype.copy = function copy (target, targetStart, start, end) { if (!start) start = 0 if (!end && end !== 0) end = this.length if (targetStart >= target.length) targetStart = target.length if (!targetStart) targetStart = 0 if (end > 0 && end < start) end = start // Copy 0 bytes; we're done if (end === start) return 0 if (target.length === 0 || this.length === 0) return 0 // Fatal error conditions if (targetStart < 0) { throw new RangeError('targetStart out of bounds') } if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') if (end < 0) throw new RangeError('sourceEnd out of bounds') // Are we oob? if (end > this.length) end = this.length if (target.length - targetStart < end - start) { end = target.length - targetStart + start } var len = end - start var i if (this === target && start < targetStart && targetStart < end) { // descending copy from end for (i = len - 1; i >= 0; --i) { target[i + targetStart] = this[i + start] } } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { // ascending copy from start for (i = 0; i < len; ++i) { target[i + targetStart] = this[i + start] } } else { Uint8Array.prototype.set.call( target, this.subarray(start, start + len), targetStart ) } return len } // Usage: // buffer.fill(number[, offset[, end]]) // buffer.fill(buffer[, offset[, end]]) // buffer.fill(string[, offset[, end]][, encoding]) Buffer.prototype.fill = function fill (val, start, end, encoding) { // Handle string cases: if (typeof val === 'string') { if (typeof start === 'string') { encoding = start start = 0 end = this.length } else if (typeof end === 'string') { encoding = end end = this.length } if (val.length === 1) { var code = val.charCodeAt(0) if (code < 256) { val = code } } if (encoding !== undefined && typeof encoding !== 'string') { throw new TypeError('encoding must be a string') } if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { throw new TypeError('Unknown encoding: ' + encoding) } } else if (typeof val === 'number') { val = val & 255 } // Invalid ranges are not set to a default, so can range check early. if (start < 0 || this.length < start || this.length < end) { throw new RangeError('Out of range index') } if (end <= start) { return this } start = start >>> 0 end = end === undefined ? this.length : end >>> 0 if (!val) val = 0 var i if (typeof val === 'number') { for (i = start; i < end; ++i) { this[i] = val } } else { var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString()) var len = bytes.length for (i = 0; i < end - start; ++i) { this[i + start] = bytes[i % len] } } return this } // HELPER FUNCTIONS // ================ var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g function base64clean (str) { // Node strips out invalid characters like \n and \t from the string, base64-js does not str = stringtrim(str).replace(INVALID_BASE64_RE, '') // Node converts strings with length < 2 to '' if (str.length < 2) return '' // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not while (str.length % 4 !== 0) { str = str + '=' } return str } function stringtrim (str) { if (str.trim) return str.trim() return str.replace(/^\s+|\s+$/g, '') } function toHex (n) { if (n < 16) return '0' + n.toString(16) return n.toString(16) } function utf8ToBytes (string, units) { units = units || Infinity var codePoint var length = string.length var leadSurrogate = null var bytes = [] for (var i = 0; i < length; ++i) { codePoint = string.charCodeAt(i) // is surrogate component if (codePoint > 0xD7FF && codePoint < 0xE000) { // last char was a lead if (!leadSurrogate) { // no lead yet if (codePoint > 0xDBFF) { // unexpected trail if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) continue } else if (i + 1 === length) { // unpaired lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) continue } // valid lead leadSurrogate = codePoint continue } // 2 leads in a row if (codePoint < 0xDC00) { if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) leadSurrogate = codePoint continue } // valid surrogate pair codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 } else if (leadSurrogate) { // valid bmp char, but last char was a lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) } leadSurrogate = null // encode utf8 if (codePoint < 0x80) { if ((units -= 1) < 0) break bytes.push(codePoint) } else if (codePoint < 0x800) { if ((units -= 2) < 0) break bytes.push( codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80 ) } else if (codePoint < 0x10000) { if ((units -= 3) < 0) break bytes.push( codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 ) } else if (codePoint < 0x110000) { if ((units -= 4) < 0) break bytes.push( codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 ) } else { throw new Error('Invalid code point') } } return bytes } function asciiToBytes (str) { var byteArray = [] for (var i = 0; i < str.length; ++i) { // Node's code seems to be doing this and not & 0x7F.. byteArray.push(str.charCodeAt(i) & 0xFF) } return byteArray } function utf16leToBytes (str, units) { var c, hi, lo var byteArray = [] for (var i = 0; i < str.length; ++i) { if ((units -= 2) < 0) break c = str.charCodeAt(i) hi = c >> 8 lo = c % 256 byteArray.push(lo) byteArray.push(hi) } return byteArray } function base64ToBytes (str) { return base64.toByteArray(base64clean(str)) } function blitBuffer (src, dst, offset, length) { for (var i = 0; i < length; ++i) { if ((i + offset >= dst.length) || (i >= src.length)) break dst[i + offset] = src[i] } return i } function isnan (val) { return val !== val // eslint-disable-line no-self-compare } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"base64-js":62,"ieee754":124,"isarray":125}],66:[function(require,module,exports){ module.exports={"eras":{"e-50":"50 versions back","e-49":"49 versions back","e-48":"48 versions back","e-47":"47 versions back","e-46":"46 versions back","e-45":"45 versions back","e-44":"44 versions back","e-43":"43 versions back","e-42":"42 versions back","e-41":"41 versions back","e-40":"40 versions back","e-39":"39 versions back","e-38":"38 versions back","e-37":"37 versions back","e-36":"36 versions back","e-35":"35 versions back","e-34":"34 versions back","e-33":"33 versions back","e-32":"32 versions back","e-31":"31 versions back","e-30":"30 versions back","e-29":"29 versions back","e-28":"28 versions back","e-27":"27 versions back","e-26":"26 versions back","e-25":"25 versions back","e-24":"24 versions back","e-23":"23 versions back","e-22":"22 versions back","e-21":"21 versions back","e-20":"20 versions back","e-19":"19 versions back","e-18":"18 versions back","e-17":"17 versions back","e-16":"16 versions back","e-15":"15 versions back","e-14":"14 versions back","e-13":"13 versions back","e-12":"12 versions back","e-11":"11 versions back","e-10":"10 versions back","e-9":"9 versions back","e-8":"8 versions back","e-7":"7 versions back","e-6":"6 versions back","e-5":"5 versions back","e-4":"4 versions back","e-3":"3 versions back","e-2":"2 versions back","e-1":"Previous version","e0":"Current","e1":"Near future","e2":"Farther future","e3":"3 versions ahead"},"agents":{"ie":{"browser":"IE","abbr":"IE","prefix":"ms","type":"desktop","usage_global":{"5.5":0.009298,"6":0.0301182,"7":0.0250985,"8":0.441733,"9":0.296162,"10":0.271063,"11":3.80493},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5.5","6","7","8","9","10","11",null,null,null]},"edge":{"browser":"Edge","abbr":"Edge","prefix":"ms","type":"desktop","usage_global":{"12":0.068306,"13":0.346409,"14":1.0929},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"12","13","14",null,null,null]},"firefox":{"browser":"Firefox","abbr":"FF","prefix":"moz","type":"desktop","usage_global":{"2":0.014637,"3":0.043911,"3.5":0.024395,"3.6":0.073185,"4":0.009758,"5":0.004879,"6":0.020136,"7":0.005725,"8":0.019516,"9":0.00533,"10":0.009758,"11":0.009758,"12":0.014637,"13":0.004879,"14":0.004879,"15":0.019516,"16":0.014637,"17":0.004879,"18":0.014637,"19":0.009758,"20":0.009758,"21":0.019516,"22":0.009758,"23":0.014637,"24":0.014637,"25":0.029274,"26":0.009758,"27":0.014637,"28":0.014637,"29":0.019516,"30":0.014637,"31":0.034153,"32":0.014637,"33":0.019516,"34":0.024395,"35":0.029274,"36":0.024395,"37":0.024395,"38":0.082943,"39":0.043911,"40":0.039032,"41":0.043911,"42":0.043911,"43":0.151249,"44":0.09758,"45":0.161007,"46":0.14637,"47":0.473263,"48":0.434231,"49":4.55699,"50":0.14637,"51":0.004879,"52":0},"versions":[null,"2","3","3.5","3.6","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52"]},"chrome":{"browser":"Chrome","abbr":"Chr.","prefix":"webkit","type":"desktop","usage_global":{"4":0.004879,"5":0.004879,"6":0.004879,"7":0.005591,"8":0.005591,"9":0.005591,"10":0.004879,"11":0.029274,"12":0.009758,"13":0.004879,"14":0.004879,"15":0.009758,"16":0.009758,"17":0.009758,"18":0.019516,"19":0.019516,"20":0.014637,"21":0.019516,"22":0.04879,"23":0.014637,"24":0.039032,"25":0.019516,"26":0.029274,"27":0.019516,"28":0.019516,"29":0.024395,"30":0.024395,"31":0.092701,"32":0.019516,"33":0.04879,"34":0.039032,"35":0.04879,"36":0.034153,"37":0.034153,"38":0.043911,"39":0.058548,"40":0.04879,"41":0.04879,"42":0.078064,"43":0.282982,"44":0.082943,"45":0.312256,"46":0.087822,"47":0.121975,"48":0.151249,"49":1.63446,"50":0.24395,"51":0.663544,"52":0.575722,"53":18.1694,"54":4.75215,"55":0.078064,"56":0.024395,"57":0},"versions":["4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57"]},"safari":{"browser":"Safari","abbr":"Saf.","prefix":"webkit","type":"desktop","usage_global":{"3.1":0,"3.2":0.008692,"4":0.019516,"5":0.04879,"5.1":0.078064,"6":0.009758,"6.1":0.073185,"7":0.039032,"7.1":0.019516,"8":0.131733,"9":0.175644,"9.1":0.863583,"10":1.02459,"TP":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.1","3.2","4","5","5.1","6","6.1","7","7.1","8","9","9.1","10","TP",null,null]},"opera":{"browser":"Opera","abbr":"Op.","prefix":"webkit","type":"desktop","usage_global":{"9":0.0082,"9.5-9.6":0.00685,"10.0-10.1":0.009758,"10.5":0.008392,"10.6":0.009758,"11":0.016581,"11.1":0.006229,"11.5":0.004879,"11.6":0.024395,"12":0.029274,"12.1":0.14637,"15":0.00685,"16":0.00685,"17":0.00685,"18":0.005014,"19":0.006015,"20":0.004879,"21":0.006597,"22":0.006597,"23":0.013434,"24":0.006702,"25":0.006015,"26":0.005595,"27":0.014637,"28":0.004879,"29":0.004879,"30":0.004879,"31":0.00533,"32":0.005152,"33":0.005014,"34":0.009758,"35":0.004879,"36":0.034153,"37":0.053669,"38":0.058548,"39":0.019516,"40":0.380562,"41":0.063427,"42":0,"43":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,"9","9.5-9.6","10.0-10.1","10.5","10.6","11","11.1","11.5","11.6","12","12.1","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43",null],"prefix_exceptions":{"9":"o","9.5-9.6":"o","10.0-10.1":"o","10.5":"o","10.6":"o","11":"o","11.1":"o","11.5":"o","11.6":"o","12":"o","12.1":"o"}},"ios_saf":{"browser":"iOS Safari","abbr":"iOS","prefix":"webkit","type":"mobile","usage_global":{"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0.166887,"8":0,"8.1-8.4":0.308317,"9.0-9.2":0.147087,"9.3":2.24402,"10":6.19274},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.2","4.0-4.1","4.2-4.3","5.0-5.1","6.0-6.1","7.0-7.1","8","8.1-8.4","9.0-9.2","9.3","10",null,null,null]},"op_mini":{"browser":"Opera Mini","abbr":"O.Mini","prefix":"o","type":"mobile","usage_global":{"all":4.11094},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"all",null,null,null]},"android":{"browser":"Android Browser","abbr":"And.","prefix":"webkit","type":"mobile","usage_global":{"2.1":0,"2.2":0,"2.3":0.00675026,"3":0,"4":0.0540021,"4.1":0.194793,"4.2-4.3":0.486983,"4.4":1.11669,"4.4.3-4.4.4":1.12633,"53":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"2.1","2.2","2.3","3","4","4.1","4.2-4.3","4.4","4.4.3-4.4.4","53",null,null,null]},"bb":{"browser":"Blackberry Browser","abbr":"BB","prefix":"webkit","type":"mobile","usage_global":{"7":0.0576112,"10":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"7","10",null,null,null]},"op_mob":{"browser":"Opera Mobile","abbr":"O.Mob","prefix":"o","type":"mobile","usage_global":{"10":0,"11":0,"11.1":0,"11.5":0,"12":0,"12.1":0.00847579,"37":0.305128},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"10","11","11.1","11.5","12","12.1","37",null,null,null],"prefix_exceptions":{"37":"webkit"}},"and_chr":{"browser":"Chrome for Android","abbr":"Chr/And.","prefix":"webkit","type":"mobile","usage_global":{"53":23.1976},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"53",null,null,null]},"and_ff":{"browser":"Firefox for Android","abbr":"FF/And.","prefix":"moz","type":"mobile","usage_global":{"49":0.035847},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"49",null,null,null]},"ie_mob":{"browser":"IE Mobile","abbr":"IE.Mob","prefix":"ms","type":"mobile","usage_global":{"10":0.114105,"11":0.464568},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"10","11",null,null,null]},"and_uc":{"browser":"UC Browser for Android","abbr":"UC","prefix":"webkit","type":"mobile","usage_global":{"11":9.16659},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"11",null,null,null],"prefix_exceptions":{"11":"webkit"}},"samsung":{"browser":"Samsung Internet","abbr":"SS","prefix":"webkit","type":"mobile","usage_global":{"4":3.33889},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"4",null,null,null]}},"statuses":{"rec":"W3C Recommendation","pr":"W3C Proposed Recommendation","cr":"W3C Candidate Recommendation","wd":"W3C Working Draft","ls":"WHATWG Living Standard","other":"Other","unoff":"Unofficial / Note"},"cats":{"CSS":["CSS3","CSS","CSS2"],"HTML5":["Canvas","HTML5"],"JS API":["JS API"],"Other":["PNG","Other","DOM"],"SVG":["SVG"]},"updated":1478324034,"data":{"png-alpha":{"title":"PNG alpha transparency","description":"Semi-transparent areas in PNG files","spec":"http://www.w3.org/TR/PNG/","status":"rec","links":[{"url":"http://en.wikipedia.org/wiki/Portable_Network_Graphics","title":"Wikipedia"},{"url":"http://dillerdesign.com/experiment/DD_belatedPNG/","title":"Workaround for IE6"}],"categories":["PNG"],"stats":{"ie":{"5.5":"n","6":"p","7":"y","8":"y","9":"y","10":"y","11":"y"},"edge":{"12":"y","13":"y","14":"y"},"firefox":{"2":"y","3":"y","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y","44":"y","45":"y","46":"y","47":"y","48":"y","49":"y","50":"y","51":"y","52":"y"},"chrome":{"4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y","44":"y","45":"y","46":"y","47":"y","48":"y","49":"y","50":"y","51":"y","52":"y","53":"y","54":"y","55":"y","56":"y","57":"y"},"safari":{"3.1":"y","3.2":"y","4":"y","5":"y","5.1":"y","6":"y","6.1":"y","7":"y","7.1":"y","8":"y","9":"y","9.1":"y","10":"y","TP":"y"},"opera":{"9":"y","9.5-9.6":"y","10.0-10.1":"y","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y"},"ios_saf":{"3.2":"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0-7.1":"y","8":"y","8.1-8.4":"y","9.0-9.2":"y","9.3":"y","10":"y"},"op_mini":{"all":"y"},"android":{"2.1":"y","2.2":"y","2.3":"y","3":"y","4":"y","4.1":"y","4.2-4.3":"y","4.4":"y","4.4.3-4.4.4":"y","53":"y"},"bb":{"7":"y","10":"y"},"op_mob":{"10":"y","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","37":"y"},"and_chr":{"53":"y"},"and_ff":{"49":"y"},"ie_mob":{"10":"y","11":"y"},"and_uc":{"11":"y"},"samsung":{"4":"y"}},"notes":"IE6 does support full transparency in 8-bit PNGs, which can sometimes be an alternative to 24-bit PNGs.","notes_by_num":{},"usage_perc_y":98,"usage_perc_a":0,"ucprefix":false,"parent":"","keywords":"","ie_id":"","chrome_id":"","firefox_id":"","webkit_id":""},"apng":{"title":"Animated PNG (APNG)","description":"Like animated GIFs, but allowing 24-bit colors and alpha transparency","spec":"https://wiki.mozilla.org/APNG_Specification","status":"unoff","links":[{"url":"http://en.wikipedia.org/wiki/APNG","title":"Wikipedia"},{"url":"https://github.com/davidmz/apng-canvas","title":"Polyfill using canvas"},{"url":"https://chrome.google.com/webstore/detail/ehkepjiconegkhpodgoaeamnpckdbblp","title":"Chrome extension providing support"},{"url":"https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/6513393-apng-animated-png-images-support-firefox-and-sa","title":"Microsoft Edge feature request on UserVoice"},{"url":"https://addons.opera.com/en/extensions/details/apng/?display=en","title":"Opera extension providing support"},{"url":"https://code.google.com/p/chromium/issues/detail?id=437662","title":"Chromium issue"}],"categories":["PNG"],"stats":{"ie":{"5.5":"n","6":"n","7":"n","8":"n","9":"n","10":"n","11":"n"},"edge":{"12":"n","13":"n","14":"n"},"firefox":{"2":"n","3":"y","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y","44":"y","45":"y","46":"y","47":"y","48":"y","49":"y","50":"y","51":"y","52":"y"},"chrome":{"4":"n","5":"n","6":"n","7":"n","8":"n","9":"n","10":"n","11":"n","12":"n","13":"n","14":"n","15":"n","16":"n","17":"n","18":"n","19":"n","20":"n","21":"n","22":"n","23":"n","24":"n","25":"n","26":"n","27":"n","28":"n","29":"n","30":"n","31":"n","32":"n","33":"n","34":"n","35":"n","36":"n","37":"n","38":"n","39":"n","40":"n","41":"n","42":"n","43":"n","44":"n","45":"n","46":"n","47":"n","48":"n","49":"n","50":"n","51":"n","52":"n","53":"n","54":"n","55":"n","56":"n","57":"n"},"safari":{"3.1":"n","3.2":"n","4":"n","5":"n","5.1":"n","6":"n","6.1":"n","7":"n","7.1":"n","8":"y","9":"y","9.1":"y","10":"y","TP":"y"},"opera":{"9":"n","9.5-9.6":"y","10.0-10.1":"y","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"n","16":"n","17":"n","18":"n","19":"n","20":"n","21":"n","22":"n","23":"n","24":"n","25":"n","26":"n","27":"n","28":"n","29":"n","30":"n","31":"n","32":"n","33":"n","34":"n","35":"n","36":"n","37":"n","38":"n","39":"n","40":"n","41":"n","42":"n","43":"n"},"ios_saf":{"3.2":"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0-7.1":"n","8":"y","8.1-8.4":"y","9.0-9.2":"y","9.3":"y","10":"y"},"op_mini":{"all":"n"},"android":{"2.1":"n","2.2":"n","2.3":"n","3":"n","4":"n","4.1":"n","4.2-4.3":"n","4.4":"n","4.4.3-4.4.4":"n","53":"n"},"bb":{"7":"n","10":"n"},"op_mob":{"10":"y","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","37":"n"},"and_chr":{"53":"n"},"and_ff":{"49":"y"},"ie_mob":{"10":"n","11":"n"},"and_uc":{"11":"n"},"samsung":{"4":"n"}},"notes":"Where support for APNG is missing, only the first frame is displayed","notes_by_num":{},"usage_perc_y":18.48,"usage_perc_a":0,"ucprefix":false,"parent":"","keywords":"","ie_id":"","chrome_id":"6691520493125632","firefox_id":"","webkit_id":""},"video":{"title":"Video element","description":"Method of playing videos on webpages (without requiring a plug-in).","spec":"https://html.spec.whatwg.org/multipage/embedded-content.html#the-video-element","status":"ls","links":[{"url":"https://dev.opera.com/articles/view/everything-you-need-to-know-about-html5-video-and-audio/","title":"Detailed article on video/audio elements"},{"url":"http://webmproject.org","title":"WebM format information"},{"url":"http://camendesign.co.uk/code/video_for_everybody","title":"Video for Everybody"},{"url":"http://diveintohtml5.info/video.html","title":"Video on the Web - includes info on Android support"},{"url":"https://raw.github.com/phiggins42/has.js/master/detect/video.js#video","title":"has.js test"},{"url":"http://docs.webplatform.org/wiki/html/elements/video","title":"WebPlatform Docs"}],"categories":["HTML5"],"stats":{"ie":{"5.5":"n","6":"n","7":"n","8":"n","9":"y","10":"y","11":"y"},"edge":{"12":"y","13":"y","14":"y"},"firefox":{"2":"n","3":"n","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y","44":"y","45":"y","46":"y","47":"y","48":"y","49":"y","50":"y","51":"y","52":"y"},"chrome":{"4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y","44":"y","45":"y","46":"y","47":"y","48":"y","49":"y","50":"y","51":"y","52":"y","53":"y","54":"y","55":"y","56":"y","57":"y"},"safari":{"3.1":"n","3.2":"n","4":"y","5":"y","5.1":"y","6":"y","6.1":"y","7":"y","7.1":"y","8":"y","9":"y","9.1":"y","10":"y","TP":"y"},"opera":{"9":"n","9.5-9.6":"n","10.0-10.1":"n","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y"},"ios_saf":{"3.2":"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0-7.1":"y","8":"y","8.1-8.4":"y","9.0-9.2":"y","9.3":"y","10":"y"},"op_mini":{"all":"n"},"android":{"2.1":"a #1","2.2":"a #1","2.3":"y","3":"y","4":"y","4.1":"y","4.2-4.3":"y","4.4":"y","4.4.3-4.4.4":"y","53":"y"},"bb":{"7":"y","10":"y"},"op_mob":{"10":"n","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","37":"y"},"and_chr":{"53":"y"},"and_ff":{"49":"y"},"ie_mob":{"10":"y","11":"y"},"and_uc":{"11":"y"},"samsung":{"4":"y"}},"notes":"Different browsers have support for different video formats, see sub-features for details.\r\n\r\n","notes_by_num":{"1":"The Android browser (before 2.3) requires [specific handling](http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/) to run the video element."},"usage_perc_y":93.33,"usage_perc_a":0,"ucprefix":false,"parent":"","keywords":"