1 | "use strict";
|
---|
2 |
|
---|
3 | function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
---|
4 |
|
---|
5 | function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
|
---|
6 |
|
---|
7 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
---|
8 |
|
---|
9 | var Value = require('../value');
|
---|
10 |
|
---|
11 | var ImageSet = /*#__PURE__*/function (_Value) {
|
---|
12 | _inheritsLoose(ImageSet, _Value);
|
---|
13 |
|
---|
14 | function ImageSet() {
|
---|
15 | return _Value.apply(this, arguments) || this;
|
---|
16 | }
|
---|
17 |
|
---|
18 | var _proto = ImageSet.prototype;
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * Use non-standard name for WebKit and Firefox
|
---|
22 | */
|
---|
23 | _proto.replace = function replace(string, prefix) {
|
---|
24 | var fixed = _Value.prototype.replace.call(this, string, prefix);
|
---|
25 |
|
---|
26 | if (prefix === '-webkit-') {
|
---|
27 | fixed = fixed.replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi, 'url($1)$2');
|
---|
28 | }
|
---|
29 |
|
---|
30 | return fixed;
|
---|
31 | };
|
---|
32 |
|
---|
33 | return ImageSet;
|
---|
34 | }(Value);
|
---|
35 |
|
---|
36 | _defineProperty(ImageSet, "names", ['image-set']);
|
---|
37 |
|
---|
38 | module.exports = ImageSet; |
---|